本文整理匯總了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);
}