當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。