mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-17 05:02:23 +08:00
Update e2e test for search.
This commit is contained in:
parent
f58d941f57
commit
8d0651a094
@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user