Skip to content

Commit

Permalink
add retry
Browse files Browse the repository at this point in the history
  • Loading branch information
dmlemeshko committed Mar 12, 2020
1 parent 3655862 commit c0338e2
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions x-pack/test/functional/page_objects/accountsetting_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,22 @@ import expect from '@kbn/expect';
export function AccountSettingProvider({ getService }) {
const testSubjects = getService('testSubjects');
const userMenu = getService('userMenu');
const retry = getService('retry');

class AccountSettingsPage {
async verifyAccountSettings(expectedEmail, expectedUserName) {
await userMenu.clickProvileLink();
await retry.try(async () => {
await userMenu.clickProvileLink();

const usernameField = await testSubjects.find('username');
const userName = await usernameField.getVisibleText();
expect(userName).to.be(expectedUserName);
const usernameField = await testSubjects.find('username');
const userName = await usernameField.getVisibleText();
expect(userName).to.be(expectedUserName);

const emailIdField = await testSubjects.find('email');
const emailField = await emailIdField.getVisibleText();
expect(emailField).to.be(expectedEmail);
await userMenu.closeMenu();
const emailIdField = await testSubjects.find('email');
const emailField = await emailIdField.getVisibleText();
expect(emailField).to.be(expectedEmail);
await userMenu.closeMenu();
});
}

async changePassword(currentPassword, newPassword) {
Expand Down

0 comments on commit c0338e2

Please sign in to comment.