mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-10 19:06:34 +03:00
chore: revert: "remove some {force: true} from e2e tests"
tests fails on CI for some reason
This reverts commit d0e037c586
.
This commit is contained in:
parent
7e5b6d9029
commit
ec44f00e36
|
@ -28,7 +28,7 @@ describe('Menu', () => {
|
|||
cy.contains('[role=menuitem].-depth1', 'pet').click({ force: true });
|
||||
cy.location('hash').should('equal', '#tag/pet');
|
||||
|
||||
cy.contains('[role=menuitem]', 'Find pet by ID').click();
|
||||
cy.contains('[role=menuitem]', 'Find pet by ID').click({ force: true });
|
||||
cy.location('hash').should('equal', '#operation/getPetById');
|
||||
});
|
||||
|
||||
|
@ -38,7 +38,7 @@ describe('Menu', () => {
|
|||
petItem()
|
||||
.click({ force: true })
|
||||
.should('have.class', 'active');
|
||||
cy.contains('[role=menuitem].-depth1', 'store').click();
|
||||
cy.contains('[role=menuitem].-depth1', 'store').click({ force: true });
|
||||
petItem().should('not.have.class', 'active');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -11,44 +11,44 @@ describe('Search', () => {
|
|||
getSearchResults().should('not.exist');
|
||||
|
||||
// should not open for less than 3 symbols
|
||||
getSearchInput().type('in');
|
||||
getSearchInput().type('in', { force: true });
|
||||
getSearchResults().should('not.exist');
|
||||
|
||||
getSearchInput().type('t');
|
||||
getSearchInput().type('t', { force: true });
|
||||
cy.get('[role=search] [role=menuitem]')
|
||||
.should('have.length', 3)
|
||||
.first()
|
||||
.should('contain', 'Introduction');
|
||||
|
||||
getSearchInput().type('{esc}');
|
||||
getSearchInput().type('{esc}', { force: true });
|
||||
getSearchResults().should('not.exist');
|
||||
});
|
||||
|
||||
it('should support arrow navigation', () => {
|
||||
getSearchInput().type('int');
|
||||
getSearchInput().type('int', { force: true });
|
||||
|
||||
getSearchInput().type('{downarrow}');
|
||||
getSearchInput().type('{downarrow}', { force: true });
|
||||
getResult(0).should('have.class', 'active');
|
||||
|
||||
getSearchInput().type('{downarrow}');
|
||||
getSearchInput().type('{downarrow}', { force: true });
|
||||
getResult(1).should('have.class', 'active');
|
||||
getResult(0).should('not.have.class', 'active');
|
||||
|
||||
getSearchInput().type('{uparrow}');
|
||||
getSearchInput().type('{uparrow}', { force: true });
|
||||
getResult(1).should('not.have.class', 'active');
|
||||
getResult(0).should('have.class', 'active');
|
||||
|
||||
getSearchInput().type('{uparrow}');
|
||||
getSearchInput().type('{uparrow}', { force: true });
|
||||
getResult(0).should('have.class', 'active');
|
||||
|
||||
getSearchInput().type('{enter}');
|
||||
getSearchInput().type('{enter}', { force: true });
|
||||
|
||||
cy.contains('[role=navigation] [role=menuitem]', 'Introduction').should('have.class', 'active');
|
||||
});
|
||||
|
||||
it('should mark search results', () => {
|
||||
cy.get('[data-markjs]').should('not.exist');
|
||||
getSearchInput().type('int');
|
||||
getSearchInput().type('int', { force: true });
|
||||
cy.get('[data-markjs]').should('exist');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user