[Discover] Fix time zone switch functional test in cloud env (#76396)
This commit is contained in:
parent
89bf20ef6a
commit
1eec83d7b9
|
@ -224,9 +224,7 @@ export default function ({ getService, getPageObjects }) {
|
|||
await kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'America/Phoenix' });
|
||||
await PageObjects.common.navigateToApp('discover');
|
||||
await PageObjects.header.awaitKibanaChrome();
|
||||
await queryBar.setQuery('');
|
||||
// To remove focus of the of the search bar so date/time picker can show
|
||||
await PageObjects.discover.selectIndexPattern(defaultSettings.defaultIndex);
|
||||
await queryBar.clearQuery();
|
||||
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
||||
|
||||
log.debug(
|
||||
|
|
|
@ -346,6 +346,10 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
|
|||
await browser.pressKeys(browser.keys.ENTER);
|
||||
}
|
||||
|
||||
async pressTabKey() {
|
||||
await browser.pressKeys(browser.keys.TAB);
|
||||
}
|
||||
|
||||
// Pause the browser at a certain place for debugging
|
||||
// Not meant for usage in CI, only for dev-usage
|
||||
async pause() {
|
||||
|
|
|
@ -54,6 +54,11 @@ export function QueryBarProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
});
|
||||
}
|
||||
|
||||
public async clearQuery(): Promise<void> {
|
||||
await this.setQuery('');
|
||||
await PageObjects.common.pressTabKey();
|
||||
}
|
||||
|
||||
public async submitQuery(): Promise<void> {
|
||||
log.debug('QueryBar.submitQuery');
|
||||
await testSubjects.click('queryInput');
|
||||
|
|
Loading…
Reference in a new issue