Skip to content
Snippets Groups Projects
Commit 4944129c authored by Marius Dumitru Florea's avatar Marius Dumitru Florea
Browse files

Try to fix flickering test by waiting for the WYSIWYG editor even if it is...

Try to fix flickering test by waiting for the WYSIWYG editor even if it is loaded in the background.
parent 96797dfe
No related branches found
No related tags found
No related merge requests found
......@@ -69,7 +69,17 @@ public String getTimezone()
public PreferencesEditPage editPreferences()
{
this.editPreferences.click();
return new PreferencesEditPage();
PreferencesEditPage editPage = new PreferencesEditPage();
// The user profile and the user preferences are currently loaded together. This means that when we edit the
// preferences the entire user profile is edited but only the preferences are visible. The consequence is that
// the WYSIWYG editor is loaded (but not displayed) for the user profile fields even if they are hidden so we
// need to wait for it to be safe.
if (!"Text".equals(editPage.getDefaultEditor())) {
new ProfileUserProfilePage(getUsername()).waitForProfileEditionToLoad();
}
return editPage;
}
public ChangePasswordPage changePassword()
......
......@@ -75,6 +75,11 @@ public void setDefaultEditorText()
select.selectByValue(EDITOR_TEXT);
}
public String getDefaultEditor()
{
return new Select(this.defaultEditor).getFirstSelectedOption().getText();
}
public void setTimezone(String value)
{
Select select = new Select(this.timezone);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment