use of org.xwiki.test.ui.po.editor.WYSIWYGEditPage in project xwiki-platform by xwiki.
the class ViewPage method editSection.
public WYSIWYGEditPage editSection(int sectionNumber) {
By sectionBy = By.xpath("//span[contains(@class, 'edit_section')][" + sectionNumber + "]/a");
// Since Section Edit links are generated by JS (for XWiki Syntax 2.0) after the page has loaded make sure
// we wait for them.
getDriver().waitUntilElementIsVisible(sectionBy);
getDriver().findElement(sectionBy).click();
return new WYSIWYGEditPage();
}
use of org.xwiki.test.ui.po.editor.WYSIWYGEditPage in project xwiki-platform by xwiki.
the class EditWikiTest method testSwitchToWysiwygWithAdvancedContent.
/**
* Tests that the warning about loosing some of the page content when switching to the WYSIWYG editor is not
* displayed if the page syntax is xwiki/2.0.
*/
@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 testSwitchToWysiwygWithAdvancedContent() {
// Place some HTML in the page content.
this.editPage.setContent("{{html}}<hr/>{{/html}}");
// If we are asked to confirm the editor switch then we choose to remain on the wiki editor.
getDriver().makeConfirmDialogSilent(false);
// Switch to WYSIWYG editor.
WYSIWYGEditPage wysiwygEditPage = this.editPage.editWYSIWYG();
// Check that we are indeed in WYSIWYG edit mode.
Assert.assertEquals(Editor.WYSIWYG, wysiwygEditPage.getEditor());
}
Aggregations