/** Functionality check: changing the default editor. */
@Test
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, this.customProfilePage.getDefaultEditorToUse());
// Setting to WYSIWYG Editor
this.customProfilePage.gotoPage();
preferencesPage = this.customProfilePage.switchToPreferences();
preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setDefaultEditorWysiwyg();
preferencesEditPage.clickSaveAndView();
preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals(WYSIWYG_EDITOR, this.customProfilePage.getDefaultEditorToUse());
// Setting to Default Editor
this.customProfilePage.gotoPage();
preferencesPage = this.customProfilePage.switchToPreferences();
preferencesEditPage = preferencesPage.editPreferences();
preferencesEditPage.setDefaultEditorDefault();
preferencesEditPage.clickSaveAndView();
preferencesPage = this.customProfilePage.switchToPreferences();
Assert.assertEquals(DEFAULT_EDITOR, this.customProfilePage.getDefaultEditorToUse());
}