Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7.x] [Uptime] Fix flaky functional test for #54541 (#56449) #56655

Merged
merged 1 commit into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions x-pack/test/functional/apps/uptime/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
it('pagination is cleared when filter criteria changes', async () => {
await pageObjects.uptime.goToUptimePageAndSetDateRange(DEFAULT_DATE_START, DEFAULT_DATE_END);
await pageObjects.uptime.changePage('next');
// there should now be pagination data in the URL
await pageObjects.uptime.pageUrlContains('pagination');
await pageObjects.uptime.pageHasExpectedIds([
'0010-down',
'0011-up',
Expand All @@ -67,9 +65,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
'0018-up',
'0019-up',
]);
await retry.tryForTime(12000, async () => {
// there should now be pagination data in the URL
await pageObjects.uptime.pageUrlContains('pagination');
});
await pageObjects.uptime.setStatusFilter('up');
// ensure that pagination is removed from the URL
await pageObjects.uptime.pageUrlContains('pagination', false);
await pageObjects.uptime.pageHasExpectedIds([
'0000-intermittent',
'0001-up',
Expand All @@ -82,6 +82,10 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
'0008-up',
'0009-up',
]);
await retry.tryForTime(12000, async () => {
// ensure that pagination is removed from the URL
await pageObjects.uptime.pageUrlContains('pagination', false);
});
});

describe('snapshot counts', () => {
Expand Down
4 changes: 2 additions & 2 deletions x-pack/test/functional/services/uptime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ export function UptimeProvider({ getService }: FtrProviderContext) {
await browser.pressKeys(browser.keys.ENTER);
},
async goToNextPage() {
await testSubjects.click('xpack.uptime.monitorList.nextButton');
await testSubjects.click('xpack.uptime.monitorList.nextButton', 5000);
},
async goToPreviousPage() {
await testSubjects.click('xpack.uptime.monitorList.prevButton');
await testSubjects.click('xpack.uptime.monitorList.prevButton', 5000);
},
async setStatusFilterUp() {
await testSubjects.click('xpack.uptime.filterBar.filterStatusUp');
Expand Down