Update e2e test for search.

This commit is contained in:
Gert Hengeveld 2020-10-07 21:20:15 +02:00
parent f58d941f57
commit 8d0651a094

View File

@ -6,17 +6,17 @@ describe('Navigation', () => {
});
it('should search navigation item', () => {
cy.get('#storybook-explorer-searchfield').click().clear().type('persisting the action logger');
cy.get('#storybook-explorer-searchfield').click().clear().type('syntax');
cy.get('.sidebar-container a')
.should('contain', 'Persisting the action logger')
cy.get('#storybook-explorer-menu button')
.should('contain', 'SyntaxHighlighter')
.and('not.contain', 'a11y');
});
it('should display no results after searching a non-existing navigation item', () => {
cy.get('#storybook-explorer-searchfield').click().clear().type('zzzzzzzzzz');
cy.get('.sidebar-container').should('contain', 'This filter resulted in 0 results');
cy.get('#storybook-explorer-menu button').should('not.exist');
});
});