[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 kibanaServer.uiSettings.replace({ 'dateFormat:tz': 'America/Phoenix' });
|
||||||
await PageObjects.common.navigateToApp('discover');
|
await PageObjects.common.navigateToApp('discover');
|
||||||
await PageObjects.header.awaitKibanaChrome();
|
await PageObjects.header.awaitKibanaChrome();
|
||||||
await queryBar.setQuery('');
|
await queryBar.clearQuery();
|
||||||
// To remove focus of the of the search bar so date/time picker can show
|
|
||||||
await PageObjects.discover.selectIndexPattern(defaultSettings.defaultIndex);
|
|
||||||
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
await PageObjects.timePicker.setDefaultAbsoluteRange();
|
||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
|
|
|
@ -346,6 +346,10 @@ export function CommonPageProvider({ getService, getPageObjects }: FtrProviderCo
|
||||||
await browser.pressKeys(browser.keys.ENTER);
|
await browser.pressKeys(browser.keys.ENTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async pressTabKey() {
|
||||||
|
await browser.pressKeys(browser.keys.TAB);
|
||||||
|
}
|
||||||
|
|
||||||
// Pause the browser at a certain place for debugging
|
// Pause the browser at a certain place for debugging
|
||||||
// Not meant for usage in CI, only for dev-usage
|
// Not meant for usage in CI, only for dev-usage
|
||||||
async pause() {
|
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> {
|
public async submitQuery(): Promise<void> {
|
||||||
log.debug('QueryBar.submitQuery');
|
log.debug('QueryBar.submitQuery');
|
||||||
await testSubjects.click('queryInput');
|
await testSubjects.click('queryInput');
|
||||||
|
|
Loading…
Reference in a new issue