How to use the @testing-library/dom.getByRole function in @testing-library/dom

To help you get started, we’ve selected a few @testing-library/dom 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 gitlabhq / gitlabhq / spec / frontend / sidebar / components / time_tracking / report_spec.js View on Github external
it('renders correct results', async () => {
        await waitForPromises();

        expect(getByRole(wrapper.element, 'columnheader', { name: /8h 30m/i })).not.toBeNull();
      });
    });
github gitlabhq / gitlabhq / spec / frontend / jira_import / components / jira_import_form_spec.js View on Github external
it('shows a heading for the user mapping section', () => {
      expect(
        getByRole(wrapper.element, 'heading', { name: 'Jira-GitLab user mapping template' }),
      ).toBeTruthy();
    });
github gitlabhq / gitlabhq / spec / frontend / jira_import / components / jira_import_form_spec.js View on Github external
  const getHeader = (name) => getByRole(wrapper.element, 'columnheader', { name });