- Learning about Cypress for e2e and intergration testing. It’s differnt from something like Jest for unit testing and much more similar to something like Selenium. the API lets you pick out specific DOM elements, then focus, click or perform other user actions.
- The mindset of writing cypress test is different from writing traditional unit test and applying arrange, act , assert. Instead it’s more like arrange, act , assert, act assert , act assert. You are instead writing tests that reflect the “user journey”.
example cypress test
context('Example', () => {
it('example cypress test', () => {
cy.get("[data-testid='Login-Button']").click();
cy.get("div[data-test-id='Login-Feild']")
.find('input')
.scrollIntoView()
.should('be.visible');
}
)