Skip to content

Commit

Permalink
[Discover] Update sidebar flaky tests (#180724)
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta authored Apr 16, 2024
1 parent 09155fa commit 6184129
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/functional/apps/discover/group3/_lens_vis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
hasTimeField: true,
changeTimestampField: `--- I don't want to use the time filter ---`,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
await checkNoVis(defaultTotalCount);

await dataViews.editFromSearchBar({ newName: 'logs', newTimeField: '@timestamp' });
Expand Down
2 changes: 2 additions & 0 deletions test/functional/apps/discover/group3/_panels_toggle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: false,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();
});

Expand Down Expand Up @@ -259,6 +260,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: false,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.discover.selectTextBaseLang();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();
});
Expand Down
3 changes: 3 additions & 0 deletions test/functional/apps/discover/group3/_sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: true,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be(
INITIAL_FIELD_LIST_SUMMARY
);
Expand Down
3 changes: 3 additions & 0 deletions test/functional/apps/discover/group4/_adhoc_data_views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: true,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
const first = await PageObjects.discover.getCurrentDataViewId();

await PageObjects.discover.addRuntimeField(
Expand Down Expand Up @@ -145,6 +146,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: true,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
const prevDataViewId = await PageObjects.discover.getCurrentDataViewId();

// trigger data view id update
Expand Down Expand Up @@ -243,6 +245,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: true,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
await filterBar.addFilter({
field: 'nestedField.child',
operation: 'is',
Expand Down
2 changes: 2 additions & 0 deletions test/functional/apps/discover/group4/_data_view_edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
hasTimeField: true,
});
await dataViews.waitForSwitcherToBe(`${initialPattern}*`);
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await PageObjects.discover.getHitCountInt()).to.be(2);
Expand All @@ -93,6 +94,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: false,
hasTimeField: true,
});
await PageObjects.discover.waitUntilSearchingHasFinished();

await retry.try(async () => {
expect(await PageObjects.discover.getHitCountInt()).to.be(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
hasTimeField: true,
});
await dataViews.waitForSwitcherToBe(`${initialPattern}*`);
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await PageObjects.discover.getHitCountInt()).to.be(1);
Expand Down Expand Up @@ -106,6 +107,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
hasTimeField: true,
});
await dataViews.waitForSwitcherToBe(`${initialPattern}*`);
await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await PageObjects.discover.getHitCountInt()).to.be(1);
Expand Down
2 changes: 2 additions & 0 deletions test/functional/apps/discover/group4/_new_search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
adHoc: true,
hasTimeField: true,
});
await PageObjects.discover.waitUntilSearchingHasFinished();
await filterBar.addFilter({ field: 'extension', operation: 'is', value: 'css' });
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.discover.waitUntilSearchingHasFinished();
await queryBar.setQuery('bytes > 100');
await queryBar.submitQuery();
await PageObjects.header.waitUntilLoadingHasFinished();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,9 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
hasTimeField: true,
});

await PageObjects.discover.waitUntilSearchingHasFinished();
await PageObjects.unifiedFieldList.waitUntilSidebarHasLoaded();

expect(await PageObjects.unifiedFieldList.getSidebarAriaDescription()).to.be(
INITIAL_FIELD_LIST_SUMMARY
);
Expand Down

0 comments on commit 6184129

Please sign in to comment.