1
0
mirror of https://github.com/storybookjs/storybook.git synced 2025-03-23 05:02:10 +08:00
storybook/cypress/integration/knobs.spec.ts

20 lines
463 B
TypeScript
Raw Normal View History

2020-05-09 11:34:04 +02:00
import { clickAddon, visit } from '../helper';
2019-10-13 14:24:49 +02:00
describe('Knobs', () => {
beforeEach(() => {
2020-05-09 11:34:04 +02:00
visit('official-storybook/?path=/story/addons-knobs-withknobs--tweaks-static-values');
2019-10-13 14:24:49 +02:00
});
it('[text] it should change a string value', () => {
clickAddon('Knobs');
2020-03-27 20:04:50 +01:00
cy.get('#Name').clear().type('John Doe');
2019-10-16 16:11:56 +02:00
2020-05-09 11:34:04 +02:00
cy.getStoryElement()
.console('info')
.find('p')
.eq(0)
.should('contain.text', 'My name is John Doe');
2019-10-13 14:24:49 +02:00
});
});