当前位置: 首页>>代码示例>>TypeScript>>正文


TypeScript coveo-search-ui.Component类代码示例

本文整理汇总了TypeScript中coveo-search-ui.Component的典型用法代码示例。如果您正苦于以下问题:TypeScript Component类的具体用法?TypeScript Component怎么用?TypeScript Component使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Component类的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类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。