use of org.xwiki.test.ui.po.ResubmissionPage in project xwiki-platform by xwiki.
the class LoginTest method testDataIsPreservedAfterLogin.
@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 testDataIsPreservedAfterLogin() {
getUtil().gotoPage("Test", "TestData", "save", "content=this+should+not+be+saved");
getUtil().gotoPage("Test", "TestData", "save", "content=this+should+be+saved+instead&parent=Main.WebHome");
LoginPage loginPage = new LoginPage();
loginPage.loginAsAdmin();
// we switched to another user, CSRF protection (if enabled) will ask for confirmation
ResubmissionPage resubmissionPage = new ResubmissionPage();
if (resubmissionPage.isOnResubmissionPage()) {
resubmissionPage.resubmit();
}
Assert.assertTrue(getDriver().getCurrentUrl().contains("/xwiki/bin/view/Test/TestData"));
ViewPage viewPage = new ViewPage();
Assert.assertEquals("this should be saved instead", viewPage.getContent());
}
Aggregations