ViewPage vp = new ViewPage();
// TODO: this should be a PageObject API
vp.waitUntilElementIsVisible(By.className("xnotification-warning"));
// TODO: this should be a PageObject API
WebElement warning = getDriver().findElement(By.className("xnotification-warning"));
Assert.assertEquals(XWIKI_SYNTAX_1_WARNING, warning.getText());
adminPage.gotoPage();
annotationsAdminPage = adminPage.clickAnnotationsSection();
annotationsAdminPage.activateAnnotations();
annotationsAdminPage.displayAnnotationsByDefault();
annotationsAdminPage.displayAnnotationsHighlightByDefault();
annotationsAdminPage.clickSave();
getUtil().gotoPage(SPACE_NAME, DOC_NAME);
// Landing directly on this page might result in notification not to be displayed
getDriver().navigate().refresh();
// TODO: this should be a PageObject API
vp.waitUntilElementIsVisible(By.id("body"));
vp = new ViewPage();
// TODO: this should be a PageObject API
vp.waitUntilElementIsVisible(By.className("xnotification-warning"));
// TODO: this should be a PageObject API
warning = getDriver().findElement(By.className("xnotification-warning"));
Assert.assertEquals(XWIKI_SYNTAX_1_WARNING, warning.getText());
}