storybook/cypress/generated/addon-action.spec.ts
2020-07-05 14:44:52 +02:00

20 lines
456 B
TypeScript

describe('addon-action', () => {
before(() => {
cy.visitStorybook();
});
it('should trigger an action', () => {
// click on the button
cy.navigateToStory('button', 'text');
cy.getStoryElement().contains('Button').click();
cy.viewAddonPanel('Actions');
// TODO @yannbf improve tab identifier on addons
// get the logs
cy.get('#storybook-panel-root')
.contains(/onClick/)
.should('be.visible');
});
});