Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@kobvel
Created September 28, 2017 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kobvel/d0983fef8703adb7a73e24feabd20dae to your computer and use it in GitHub Desktop.
Save kobvel/d0983fef8703adb7a73e24feabd20dae to your computer and use it in GitHub Desktop.
describe('My First Test', function() {
it("clicking 'root' shows the right headings", function() {
cy.visit('https://example.cypress.io')
cy.contains('root').click()
// Should be on a new URL which includes '/commands/querying'
cy.url().should('include', '/commands/querying')
// Should find the main header "Querying"
cy.get('h1').should('contain', 'Querying')
// Should also find a sub-header about the contains command
cy.get('h4').should('contain', 'cy.contains()')
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment