mirror of
https://github.com/Redocly/redoc.git
synced 2025-07-30 09:59:45 +03:00
test(): Fix tests
This commit is contained in:
parent
dd6299b612
commit
99aec2fffd
|
@ -1,7 +1,7 @@
|
||||||
describe('Search', () => {
|
describe('Search', () => {
|
||||||
const getSearchInput = () => cy.get('[role="search"] input');
|
const getSearchInput = () => cy.get('[role="search"] input');
|
||||||
const getSearchResults = () => cy.get('[data-role="search:results"]');
|
const getSearchResults = () => cy.get('[data-role="search:results"]');
|
||||||
const getResult = i => cy.get('[role=search] [role=menuitem]').eq(i);
|
const getResult = i => cy.get('[role=search] [role=menuitem]').eq(i).find('label');
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.visit('e2e/standalone.html');
|
cy.visit('e2e/standalone.html');
|
||||||
|
@ -45,7 +45,7 @@ describe('Search', () => {
|
||||||
|
|
||||||
getSearchInput().type('{enter}', { force: true });
|
getSearchInput().type('{enter}', { force: true });
|
||||||
|
|
||||||
cy.contains('[role=menu] [role=menuitem]', 'Introduction').should('have.class', 'active');
|
cy.contains('[role=menu] [role=menuitem] label', 'Introduction').should('have.class', 'active');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should mark search results', () => {
|
it('should mark search results', () => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user