mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:51:25 +08:00
20 lines
467 B
TypeScript
20 lines
467 B
TypeScript
describe('addon-action', () => {
|
|
before(() => {
|
|
cy.visitStorybook();
|
|
});
|
|
|
|
it('should trigger an action', () => {
|
|
// click on the button
|
|
cy.navigateToStory('example-button', 'primary');
|
|
|
|
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');
|
|
});
|
|
});
|