mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-02 05:03:44 +08:00
Ok, I think I fixed all e2e tests
This commit is contained in:
parent
a54747bf13
commit
b4130f3675
@ -98,13 +98,15 @@ Cypress.Commands.add('navigateToStory', (kind, name) => {
|
||||
cy.log(`navigateToStory ${kind} ${name}`);
|
||||
|
||||
// Section might be collapsed
|
||||
cy.get(`#${kindId}`).then(async ($item) => {
|
||||
if ($item.attr('aria-expanded') === 'false') {
|
||||
await $item.click();
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(300);
|
||||
}
|
||||
});
|
||||
if (Cypress.$(`#${kindId}`).length) {
|
||||
cy.get(`#${kindId}`).then(async ($item) => {
|
||||
if ($item.attr('aria-expanded') === 'false') {
|
||||
await $item.click();
|
||||
// eslint-disable-next-line cypress/no-unnecessary-waiting
|
||||
cy.wait(300);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
cy.get(storyLinkId).click({ force: true });
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user