mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-07 07:21:17 +08:00
26 lines
647 B
TypeScript
26 lines
647 B
TypeScript
import { visit } from '../helper';
|
|
|
|
describe('addon-links', () => {
|
|
before(() => {
|
|
visit('official-storybook?path=/story/addons-links-button--first');
|
|
});
|
|
|
|
it('should navigate on link', () => {
|
|
cy.getStoryElement()
|
|
.find('button')
|
|
.first()
|
|
.should('contain.text', 'Go to "Second"')
|
|
.click({ force: true });
|
|
|
|
cy.url().should('include', 'path=/story/addons-links-button--second');
|
|
|
|
cy.getStoryElement()
|
|
.find('button')
|
|
.first()
|
|
.should('contain.text', 'Go to "First"')
|
|
.click({ force: true });
|
|
|
|
cy.url().should('include', 'path=/story/addons-links-button--first');
|
|
});
|
|
});
|