storybook/cypress/integration/knobs.spec.ts

22 lines
486 B
TypeScript
Raw Normal View History

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