use of org.xwiki.user.test.po.PreferencesEditPage in project xwiki-platform by xwiki.
the class UserProfileTest method testChangeDefaultEditor.
/**
* Functionality check: changing the default editor.
*/
@Test
@IgnoreBrowsers({ @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason = "See https://jira.xwiki.org/browse/XE-1146"), @IgnoreBrowser(value = "internet.*", version = "9\\.*", reason = "See https://jira.xwiki.org/browse/XE-1177") })
public void testChangeDefaultEditor() {
PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
// Setting to Text Editor
PreferencesEditPage preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setDefaultEditorText();
preferencesEditPage.clickSaveAndView();
preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals(TEXT_EDITOR, preferencesPage.getDefaultEditor());
// Setting to WYSIWYG Editor
this.customProfilePage = ProfileUserProfilePage.gotoPage(this.userName);
preferencesPage = this.customProfilePage.switchToPreferences();
preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setDefaultEditorWysiwyg();
preferencesEditPage.clickSaveAndView();
preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals(WYSIWYG_EDITOR, preferencesPage.getDefaultEditor());
// Setting to Default Editor
this.customProfilePage = ProfileUserProfilePage.gotoPage(this.userName);
preferencesPage = this.customProfilePage.switchToPreferences();
preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setDefaultEditorDefault();
preferencesEditPage.clickSaveAndView();
preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals(DEFAULT_EDITOR, preferencesPage.getDefaultEditor());
}
use of org.xwiki.user.test.po.PreferencesEditPage in project xwiki-platform by xwiki.
the class UserProfileTest method testChangeUserProfile.
/**
* Functionality check: changing the user type.
*/
@Test
@IgnoreBrowsers({ @IgnoreBrowser(value = "internet.*", version = "8\\.*", reason = "See https://jira.xwiki.org/browse/XE-1146"), @IgnoreBrowser(value = "internet.*", version = "9\\.*", reason = "See https://jira.xwiki.org/browse/XE-1177") })
public void testChangeUserProfile() {
String timezone = "Europe/Paris";
PreferencesUserProfilePage preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals("", preferencesPage.getTimezone());
// Setting to Simple user and setting the timezone to Europe/Paris
PreferencesEditPage preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setSimpleUserType();
preferencesEditPage.setTimezone(timezone);
preferencesEditPage.clickSaveAndView();
preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals(SIMPLE_USER, preferencesPage.getUserType());
Assert.assertEquals(timezone, preferencesPage.getTimezone());
// Setting to Advanced user
preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setAdvancedUserType();
preferencesEditPage.clickSaveAndView();
this.customProfilePage.switchToPreferences();
Assert.assertEquals(ADVANCED_USER, preferencesPage.getUserType());
}
Aggregations