Skip to content

Commit

Permalink
[6.x] [ftr/pageObjects/security] try simplified logout check to avoid…
Browse files Browse the repository at this point in the history
… flakiness (elastic#28893) (elastic#28967)

Backports the following commits to 6.x:
 - [ftr/pageObjects/security] try simplified logout check to avoid flakiness  (elastic#28893)
  • Loading branch information
Spencer authored Jan 18, 2019
1 parent a8593fc commit 15e65ef
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions x-pack/test/functional/page_objects/security_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,9 @@ export function SecurityPageProvider({ getService, getPageObjects }) {

await find.clickByLinkText('Logout');

await retry.try(async () => {
const loginFormExists = await find.existsByDisplayedByCssSelector('.login-form');

const logoutLinkExists = await find.existsByLinkText('Logout');
if (logoutLinkExists) {
await find.clickByLinkText('Logout');
}

if (!loginFormExists) {
throw new Error('Logout is not completed yet');
}
});
await retry.waitForWithTimeout('login form', config.get('timeouts.waitFor') * 5, async () => (
await find.existsByDisplayedByCssSelector('.login-form')
));
}

async clickRolesSection() {
Expand Down

0 comments on commit 15e65ef

Please sign in to comment.