storybook/cypress/integration/knobs.spec.ts

16 lines
444 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');
2020-03-27 20:04:50 +01:00
cy.get('#Name').clear().type('John Doe');
2019-10-16 16:11:56 +02:00
2020-03-27 20:04:50 +01:00
cy.preview().console('info').find('p').eq(0).should('contain.text', 'My name is John Doe');
2019-10-13 14:24:49 +02:00
});
});