How to use the wix-ui-test-utils/protractor.createStoryUrl function in wix-ui-test-utils

To help you get started, we’ve selected a few wix-ui-test-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wix / wix-ui-tpa / src / components / CopyUrlButton / CopyUrlButton.e2e.ts View on Github external
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();
github wix / wix-ui-tpa / src / components / SocialBar / SocialBar.e2e.ts View on Github external
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);
  });
});