How to use the wix-ui-test-utils/protractor.getStoryUrl 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-backoffice / src / components / Heading / Heading.e2e.ts View on Github external
describe('Heading', () => {
  const storyUrl = getStoryUrl('Components', 'Heading');

  beforeEach(() => browser.get(storyUrl));
  eyes.it('should display correct content', () => {
    const dataHook = 'storybook-heading';
    const driver = headingTestkitFactory({dataHook});

    return waitForVisibilityOf(driver.element(), 'Cannot find Heading')
      .then(() => expect(driver.getText()).toBe('Some text'));
  });
});
github wix / wix-ui-backoffice / src / components / StylableUIText / UIText.e2e.ts View on Github external
describe('UIText', () => {
  const storyUrl = getStoryUrl('Internal', 'UIText');

  beforeEach(() => browser.get(storyUrl));
  eyes.it('should display correct content', () => {
    const dataHook = 'storybook-uiText';
    const driver = uiTextTestkitFactory({dataHook});

    return waitForVisibilityOf(driver.element(), 'Cannot find UIText')
      .then(() => expect(driver.getText()).toBe('Some text'));
  });
});
github wix / wix-ui-backoffice / src / components / Autocomplete / Autocomplete.e2e.ts View on Github external
describe('Autocomplete', () => {
  const storyUrl = getStoryUrl('Components', 'Autocomplete');
  const dataHook = 'storybook-autocomplete';

  beforeEach(() => browser.get(storyUrl));

  eyes.it('should render autocomplete', async () => {
    const driver = autocompleteTestkitFactory({ dataHook });
    await waitForVisibilityOf(driver.element(), 'Cannot find Autocomplete');
    expect(driver.element()).toBeDefined();
  });
});
github wix / wix-ui-backoffice / src / components / AddressInput / AddressInput.e2e.ts View on Github external
describe('AddressInput', () => {
    const storyUrl = getStoryUrl('Components', 'AddressInput');
    let driver;

    beforeAll(async () => {
        await browser.get(storyUrl);
        driver = addressInputTestkitFactory({dataHook: 'storybook-address-input'});
        await waitForVisibilityOf(driver.element(), 'Cannot find AddressInput');
    });

    afterEach(() => autoExampleDriver.reset());

    eyes.it('should exist', () => {
        expect(driver.element().isPresent()).toBe(true);
    });

    eyes.it('should display mocked addresses', async () => {
        driver.pressKey('n');
github wix / wix-ui-backoffice / src / components / StylableCounterBadge / CounterBadge.e2e.tsx View on Github external
describe('CounterBadge', () => {
  const storyUrl = getStoryUrl('Components', 'StylableCounterBadge');

  beforeEach(() => browser.get(storyUrl));
  eyes.it('should display correct content', () => {
    const dataHook = 'storybook-counterBadge';
    const driver = counterBadgeTestkitFactory({ dataHook });

    return waitForVisibilityOf(
      driver.element(),
      'Cannot find CounterBadge'
    ).then(() => expect(driver.text()).toBe('12'));
  });

  eyes.it('should display "99+" when number > 99', () => {
    const dataHook = 'storybook-counterBadge';
    const driver = counterBadgeTestkitFactory({ dataHook });