Skip to content

Instantly share code, notes, and snippets.

@trivial-search
Created February 14, 2018 06:18
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 trivial-search/0196e7db468c4bd60faf3aa9a2b3c681 to your computer and use it in GitHub Desktop.
Save trivial-search/0196e7db468c4bd60faf3aa9a2b3c681 to your computer and use it in GitHub Desktop.
it('verify the total count and existence of a particular element in the dropdown',() => {
// get the element and it's associated children
cy.get('#sort-by-menu-header > div > ul').children()
// perform the assertion on existence of a particular item in the drop down
.should('contain','New Arrivals')
// perform the assertion on the number of children i.e. options in the drop down
.and('have.length','6')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment