本文整理汇总了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));
}
示例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 });
}
示例3: waitForDeleted
public async waitForDeleted(selectorOrElement: string | WebElementWrapper): Promise<void> {
if (typeof selectorOrElement === 'string') {
await find.waitForDeletedByCssSelector(testSubjSelector(selectorOrElement));
} else {
await find.waitForElementStale(selectorOrElement);
}
}
示例4: waitForAttributeToChange
public async waitForAttributeToChange(
selector: string,
attribute: string,
value: string
): Promise<void> {
await find.waitForAttributeToChange(testSubjSelector(selector), attribute, value);
}
示例5: findDescendant
public async findDescendant(
selector: string,
parentElement: WebElementWrapper
): Promise<WebElementWrapper> {
log.debug(`TestSubjects.findDescendant(${selector})`);
return await find.descendantDisplayedByCssSelector(testSubjSelector(selector), parentElement);
}
示例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');
},
};
}
示例7: descendantExists
async descendantExists(selector: string, parentElement: WebElementWrapper): Promise<boolean> {
log.debug(`TestSubjects.descendantExists(${selector})`);
return await find.descendantExistsByCssSelector(testSubjSelector(selector), parentElement);
}
示例8: click
public async click(selector: string, timeout: number = FIND_TIME): Promise<void> {
log.debug(`TestSubjects.click(${selector})`);
await find.clickByCssSelector(testSubjSelector(selector), timeout);
}
示例9: getCssSelector
public getCssSelector(selector: string): string {
return testSubjSelector(selector);
}