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


TypeScript test-subj-selector.default函数代码示例

本文整理汇总了TypeScript中@kbn/test-subj-selector.default函数的典型用法代码示例。如果您正苦于以下问题:TypeScript default函数的具体用法?TypeScript default怎么用?TypeScript default使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了default函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。

示例1: exists

    public async exists(selector: string, options: ExistsOptions = {}): Promise<boolean> {
      const { timeout = WAIT_FOR_EXISTS_TIME, allowHidden = false } = options;

      log.debug(`TestSubjects.exists(${selector})`);
      return await (allowHidden
        ? find.existsByCssSelector(testSubjSelector(selector), timeout)
        : find.existsByDisplayedByCssSelector(testSubjSelector(selector), timeout));
    }
开发者ID:elastic,项目名称:kibana,代码行数:8,代码来源:test_subjects.ts

示例2: clickWhenNotDisabled

 public async clickWhenNotDisabled(
   selector: string,
   { timeout = FIND_TIME }: { timeout?: number } = {}
 ): Promise<void> {
   log.debug(`TestSubjects.clickWhenNotDisabled(${selector})`);
   await find.clickByCssSelectorWhenNotDisabled(testSubjSelector(selector), { timeout });
 }
开发者ID:elastic,项目名称:kibana,代码行数:7,代码来源:test_subjects.ts

示例3: waitForDeleted

 public async waitForDeleted(selectorOrElement: string | WebElementWrapper): Promise<void> {
   if (typeof selectorOrElement === 'string') {
     await find.waitForDeletedByCssSelector(testSubjSelector(selectorOrElement));
   } else {
     await find.waitForElementStale(selectorOrElement);
   }
 }
开发者ID:elastic,项目名称:kibana,代码行数:7,代码来源:test_subjects.ts

示例4: waitForAttributeToChange

 public async waitForAttributeToChange(
   selector: string,
   attribute: string,
   value: string
 ): Promise<void> {
   await find.waitForAttributeToChange(testSubjSelector(selector), attribute, value);
 }
开发者ID:elastic,项目名称:kibana,代码行数:7,代码来源:test_subjects.ts

示例5: findDescendant

 public async findDescendant(
   selector: string,
   parentElement: WebElementWrapper
 ): Promise<WebElementWrapper> {
   log.debug(`TestSubjects.findDescendant(${selector})`);
   return await find.descendantDisplayedByCssSelector(testSubjSelector(selector), parentElement);
 }
开发者ID:elastic,项目名称:kibana,代码行数:7,代码来源:test_subjects.ts

示例6: InfraHomePageProvider

export function InfraHomePageProvider({ getService }: KibanaFunctionalTestDefaultProviders) {
  const testSubjects = getService('testSubjects');
  const find = getService('find');
  const browser = getService('browser');

  return {
    async goToTime(time: number) {
      const datePickerInput = await find.byCssSelector(
        `${testSubjSelector('waffleDatePicker')} .euiDatePicker.euiFieldText`
      );

      await datePickerInput.type(Array(30).fill(browser.keys.BACK_SPACE));
      await datePickerInput.type([moment(time).format('L LTS'), browser.keys.RETURN]);
    },

    async getWaffleMap() {
      return await testSubjects.find('waffleMap');
    },

    async getNoMetricsIndicesPrompt() {
      return await testSubjects.find('noMetricsIndicesPrompt');
    },

    async getNoMetricsDataPrompt() {
      return await testSubjects.find('noMetricsDataPrompt');
    },

    async openSourceConfigurationFlyout() {
      await testSubjects.click('configureSourceButton');
      await testSubjects.exists('sourceConfigurationFlyout');
    },
  };
}
开发者ID:,项目名称:,代码行数:33,代码来源:

示例7: descendantExists

 async descendantExists(selector: string, parentElement: WebElementWrapper): Promise<boolean> {
   log.debug(`TestSubjects.descendantExists(${selector})`);
   return await find.descendantExistsByCssSelector(testSubjSelector(selector), parentElement);
 }
开发者ID:elastic,项目名称:kibana,代码行数:4,代码来源:test_subjects.ts

示例8: click

 public async click(selector: string, timeout: number = FIND_TIME): Promise<void> {
   log.debug(`TestSubjects.click(${selector})`);
   await find.clickByCssSelector(testSubjSelector(selector), timeout);
 }
开发者ID:elastic,项目名称:kibana,代码行数:4,代码来源:test_subjects.ts

示例9: getCssSelector

 public getCssSelector(selector: string): string {
   return testSubjSelector(selector);
 }
开发者ID:elastic,项目名称:kibana,代码行数:3,代码来源:test_subjects.ts


注:本文中的@kbn/test-subj-selector.default函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。