[6.x] [ftr/pageObjects/security] try simplified logout check to avoid flakiness (#28893) (#28967)

Backports the following commits to 6.x:
 - [ftr/pageObjects/security] try simplified logout check to avoid flakiness  (#28893)
This commit is contained in:
Spencer 2019-01-17 17:20:20 -08:00 committed by GitHub
parent a8593fc112
commit 15e65ef729
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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() {