How to use the coveo-search-ui.Component.computeCssClassName function in coveo-search-ui

To help you get started, we’ve selected a few coveo-search-ui 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 coveo / search-ui / accessibilityTest / AccessibilityOmnibox.ts View on Github external
it('should be accessible with analytics suggestions', async done => {
        const analyticsSuggestionsElement = $$('div', {
          className: Component.computeCssClassName(AnalyticsSuggestions)
        });
        const analyticsElement = $$('div', {
          className: Component.computeCssClassName(Analytics)
        });
        getResultsColumn().appendChild(analyticsSuggestionsElement.el);
        getResultsColumn().appendChild(analyticsElement.el);

        await afterQuerySuccess();
        setText(omniboxElement, 'm');
        showSuggestions(omniboxElement);
        await afterDelay(1000);
        const axeResults = await axe.run(getRoot());
        expect(axeResults).toBeAccessible();
        done();
      });
github coveo / search-ui / accessibilityTest / AccessibilityTab.ts View on Github external
it('should be accessible when configured as a span', async done => {
      const tab = $$('span', {
        className: Component.computeCssClassName(Tab),
        'data-caption': 'All Content',
        'data-id': 'All'
      });

      getTabSection().appendChild(tab.el);

      await afterQuerySuccess();
      const axeResults = await axe.run(getRoot());
      expect(axeResults).toBeAccessible();
      done();
    });
  });
github coveo / search-ui / accessibilityTest / AccessibilityOmnibox.ts View on Github external
it('should be accessible with analytics suggestions', async done => {
        const analyticsSuggestionsElement = $$('div', {
          className: Component.computeCssClassName(AnalyticsSuggestions)
        });
        const analyticsElement = $$('div', {
          className: Component.computeCssClassName(Analytics)
        });
        getResultsColumn().appendChild(analyticsSuggestionsElement.el);
        getResultsColumn().appendChild(analyticsElement.el);

        await afterQuerySuccess();
        setText(omniboxElement, 'm');
        showSuggestions(omniboxElement);
        await afterDelay(1000);
        const axeResults = await axe.run(getRoot());
        expect(axeResults).toBeAccessible();
        done();
      });
github coveo / search-ui / accessibilityTest / AccessibilityResultList.ts View on Github external
const getResultListCardElement = () => {
      return $$('div', {
        className: Component.computeCssClassName(ResultList),
        'data-layout': 'card'
      });
    };
    it('should be accessible', async done => {
github coveo / search-ui / accessibilityTest / AccessibilityAdvancedSearch.ts View on Github external
const getAdvancedSearchElement = () => {
      return $$('div', { className: Component.computeCssClassName(AdvancedSearch) });
    };
github coveo / search-ui / accessibilityTest / AccessibilityCardOverlay.ts View on Github external
beforeEach(() => {
        addFieldEqualFilter('@filetype', 'youtubevideo');

        const cardOverlayElement = getOverlayElement();

        const fieldTableElement = $$(
          'table',
          {
            className: Component.computeCssClassName(FieldTable),
            'data-allow-minimization': 'false'
          },
          $$('tr', { 'data-field': '@author', 'data-caption': 'Author' })
        );

        const facetElement = $$('div', {
          className: Component.computeCssClassName(Facet),
          'data-field': '@author'
        });

        cardOverlayElement.append(fieldTableElement.el);
        getFacetColumn().appendChild(facetElement.el);
        testResultElement(cardOverlayElement.el);
      });
github coveo / search-ui / accessibilityTest / AccessibilityResultPreviewsManager.ts View on Github external
function buildQuerySuggestPreview() {
      const querySuggestPreviewElement = $$('div', { className: Component.computeCssClassName(QuerySuggestPreview) }).el;
      querySuggestPreviewElement.dataset.executeQueryDelay = executeQueryDelay.toString();
      getSearchSection().appendChild(querySuggestPreviewElement);
    }
github coveo / search-ui / accessibilityTest / AccessibilityErrorReport.ts View on Github external
const buildErrortReportElement = () => {
      const errorReportElement = $$('div', {
        className: Component.computeCssClassName(ErrorReport)
      });

      getResultsColumn().appendChild(errorReportElement.el);
    };
github coveo / search-ui / accessibilityTest / AccessibilityOmnibox.ts View on Github external
const getOmniboxElement = () => {
      return $$('div', {
        className: Component.computeCssClassName(Omnibox)
      });
    };
github coveo / search-ui / accessibilityTest / AccessibilityCardOverlay.ts View on Github external
beforeEach(() => {
        addFieldEqualFilter('@filetype', 'youtubevideo');

        const cardOverlayElement = getOverlayElement();

        const fieldTableElement = $$(
          'table',
          {
            className: Component.computeCssClassName(FieldTable),
            'data-allow-minimization': 'false'
          },
          $$('tr', { 'data-field': '@author', 'data-caption': 'Author' })
        );

        const facetElement = $$('div', {
          className: Component.computeCssClassName(Facet),
          'data-field': '@author'
        });

        cardOverlayElement.append(fieldTableElement.el);
        getFacetColumn().appendChild(facetElement.el);
        testResultElement(cardOverlayElement.el);
      });