當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Component.computeCssClassName方法代碼示例

本文整理匯總了TypeScript中coveo-search-ui.Component.computeCssClassName方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Component.computeCssClassName方法的具體用法?TypeScript Component.computeCssClassName怎麽用?TypeScript Component.computeCssClassName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在coveo-search-ui.Component的用法示例。


在下文中一共展示了Component.computeCssClassName方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: it

    it('should be accessible when opened', async done => {
      const quickviewElement = $$('div', {
        className: Component.computeCssClassName(Quickview)
      });

      testResultElement(quickviewElement.el);
      await afterQuerySuccess();
      (get(document.querySelector(`.${Component.computeCssClassName(Quickview)}`)) as Quickview).open();
      await afterDelay(500);
      const axeResults = await axe.run(getRoot());
      expect(axeResults).toBeAccessible();
      done();
    });
開發者ID:coveo,項目名稱:search-ui,代碼行數:13,代碼來源:AccessibilityQuickview.ts

示例2: it

    it('should be accessible when opened', async done => {
      const cardOverlayElement = $$('div', {
        className: Component.computeCssClassName(CardOverlay)
      });

      testResultElement(cardOverlayElement.el);
      await afterQuerySuccess();
      const cardOverlayInDocument = $$(getRoot()).find(`.${Component.computeCssClassName(CardOverlay)}`);
      const cardOverlayInstance = get(cardOverlayInDocument as HTMLElement) as CardOverlay;
      cardOverlayInstance.openOverlay();
      const axeResults = await axe.run(getRoot());
      expect(axeResults).toBeAccessible();
      done();
    });
開發者ID:francoislg,項目名稱:search-ui,代碼行數:14,代碼來源:AccessibilityCardOverlay.ts

示例3:

 const getFacetElement = () => {
   return $$('div', {
     className: Component.computeCssClassName(FacetRange),
     'data-field': '@date',
     'data-date-field': true
   });
 };
開發者ID:coveo,項目名稱:search-ui,代碼行數:7,代碼來源:AccessibilityFacetRange.ts

示例4: it

 it('should be accessible', async done => {
   getResultsColumn().appendChild($$('div', { className: Component.computeCssClassName(ResultsPerPage) }).el);
   await afterQuerySuccess();
   const axeResults = await axe.run(getRoot());
   expect(axeResults).toBeAccessible();
   done();
 });
開發者ID:coveo,項目名稱:search-ui,代碼行數:7,代碼來源:AccessibilityResultsPerPage.ts

示例5: getResultsColumn

    const buildErrortReportElement = () => {
      const errorReportElement = $$('div', {
        className: Component.computeCssClassName(ErrorReport)
      });

      getResultsColumn().appendChild(errorReportElement.el);
    };
開發者ID:coveo,項目名稱:search-ui,代碼行數:7,代碼來源:AccessibilityErrorReport.ts

示例6: it

 it('should be accessible', async done => {
   getResultsColumn().appendChild($$('div', { className: Component.computeCssClassName(Aggregate), 'data-field': '@objecttype' }).el);
   await afterQuerySuccess();
   const axeResults = await axe.run(getRoot());
   expect(axeResults).toBeAccessible();
   done();
 });
開發者ID:coveo,項目名稱:search-ui,代碼行數:7,代碼來源:AccessibilityAggregate.ts

示例7: it

    it('should be accessible with an associated facet', async done => {
      const fieldValueElement = $$('div', {
        className: Component.computeCssClassName(FieldValue),
        'data-field': '@filetype'
      });

      const facetElement = $$('div', {
        className: Component.computeCssClassName(Facet),
        'data-field': '@filetype'
      });
      getResultsColumn().appendChild(facetElement.el);
      testResultElement(fieldValueElement.el);
      await afterQuerySuccess();
      const axeResults = await axe.run(getRoot());
      expect(axeResults).toBeAccessible();
      done();
    });
開發者ID:coveo,項目名稱:search-ui,代碼行數:17,代碼來源:AccessibilityFieldValue.ts

示例8:

 const getFacetElement = () => {
   return $$('div', {
     className: Component.computeCssClassName(FacetSlider),
     'data-field': '@date',
     'data-date-field': true,
     'data-graph-steps': 10
   });
 };
開發者ID:coveo,項目名稱:search-ui,代碼行數:8,代碼來源:AccessibilityFacetSlider.ts

示例9: it

    it('should be accessible', async done => {
      const resultActionMenuElement = $$(
        'div',
        {
          className: Component.computeCssClassName(ResultActionsMenu)
        },
        $$('div', {
          className: Component.computeCssClassName(Quickview)
        })
      );

      testResultElement(resultActionMenuElement.el);
      await afterQuerySuccess();
      const axeResults = await axe.run(getRoot());
      expect(axeResults).toBeAccessible();
      done();
    });
開發者ID:coveo,項目名稱:search-ui,代碼行數:17,代碼來源:AccessibilityResultActionMenu.ts

示例10: it

      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();
      });
開發者ID:coveo,項目名稱:search-ui,代碼行數:18,代碼來源:AccessibilityOmnibox.ts


注:本文中的coveo-search-ui.Component.computeCssClassName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。