Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('copyUrlButton', () => {
const storyUrl = createStoryUrl({
kind: 'Components/Share',
story: 'CopyUrlButton',
withExamples: true,
});
const dataHook = 'storybook-CopyUrlButton';
beforeEach(() => browser.get(storyUrl));
it('should copy text', async () => {
const driver = copyUrlButtonTestkitFactory({ dataHook });
await waitForVisibilityOf(
await driver.element(),
'Cannot find CopyUrlButton',
);
const buttonEl = await driver.element();
describe('socialBar', () => {
const storyUrl = createStoryUrl({
kind: 'Components/Share',
story: 'SocialBar',
withExamples: true,
});
const dataHook = 'storybook-SocialBar';
beforeEach(() => browser.get(storyUrl));
it('should render', async () => {
const driver = socialBarTestkitFactory({ dataHook });
await waitForVisibilityOf(await driver.element(), 'Cannot find SocialBar');
expect((await driver.element()).isDisplayed()).toBe(true);
});
});