mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
FIx [test-failed]: Chrome X-Pack UI Functional Tests.x-pack/test/functional/apps/lens/group1/persistent_context·ts - lens app - group 1 lens query context keeps selected index pattern after refresh (#134039)
This commit is contained in:
parent
6f2a7f487c
commit
cb71390ed5
2 changed files with 14 additions and 3 deletions
|
@ -34,7 +34,18 @@ export class UnifiedSearchPageObject extends FtrService {
|
|||
|
||||
await this.retry.waitFor(
|
||||
'wait for updating switcher',
|
||||
async () => (await this.testSubjects.getVisibleText(switchButtonSelector)) === dataViewTitle
|
||||
async () => (await this.getSelectedDataView(switchButtonSelector)) === dataViewTitle
|
||||
);
|
||||
}
|
||||
|
||||
public async getSelectedDataView(switchButtonSelector: string) {
|
||||
let visibleText = '';
|
||||
|
||||
await this.retry.waitFor('wait for updating switcher', async () => {
|
||||
visibleText = await this.testSubjects.getVisibleText(switchButtonSelector);
|
||||
return Boolean(visibleText);
|
||||
});
|
||||
|
||||
return visibleText;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -860,14 +860,14 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
|
|||
* Returns the current index pattern of the data panel
|
||||
*/
|
||||
async getDataPanelIndexPattern() {
|
||||
return await (await testSubjects.find('lns-dataView-switch-link')).getAttribute('title');
|
||||
return await PageObjects.unifiedSearch.getSelectedDataView('lns-dataView-switch-link');
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the current index pattern of the first layer
|
||||
*/
|
||||
async getFirstLayerIndexPattern() {
|
||||
return await (await testSubjects.find('lns_layerIndexPatternLabel')).getAttribute('title');
|
||||
return await PageObjects.unifiedSearch.getSelectedDataView('lns_layerIndexPatternLabel');
|
||||
},
|
||||
|
||||
async linkedToOriginatingApp() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue