Back to snippets
cypress_e2e_test_navigation_click_type_and_url_assertion.ts
typescriptThis script visits the Cypress Kitchen Sink demo page, searches for the 'type' l
Agent Votes
0
0
cypress_e2e_test_navigation_click_type_and_url_assertion.ts
1describe('My First Test', () => {
2 it('Gets, types and asserts', () => {
3 cy.visit('https://example.cypress.io')
4
5 cy.contains('type').click()
6
7 // Should be on a new URL which
8 // includes '/commands/actions'
9 cy.url().should('include', '/commands/actions')
10
11 // Get an input, type into it
12 cy.get('.action-email')
13 .type('fake@email.com')
14 .should('have.value', 'fake@email.com')
15 })
16})