use of org.xwiki.release.test.po.ReleaseHomePage in project xwiki-platform by xwiki.
the class ReleaseTest method testRelease.
@Test
public void testRelease() {
// Create a user and log in with it so that we test the application with a standard user
// Note that using the superadmin user would also fail since the uservatar macro doesn't work with it.
getUtil().createUserAndLogin(getTestClassName() + "User", "password");
// Delete pages that we create in the test (we have to be logged in).
getUtil().deletePage("Release", RELEASE_PAGE_NAME);
// Navigate to the Release app by clicking in the Application Panel.
// This verifies that the Release application is registered in the Applications Panel.
// It also verifies that the Translation is registered properly.
ApplicationsPanel applicationPanel = ApplicationsPanel.gotoPage();
ViewPage vp = applicationPanel.clickApplication("Release");
// Verify we're on the right page!
Assert.assertEquals(ReleaseHomePage.getSpace(), vp.getMetaDataValue("space"));
Assert.assertEquals(ReleaseHomePage.getPage(), vp.getMetaDataValue("page"));
ReleaseHomePage homePage = new ReleaseHomePage();
// Add new Release
ReleaseEntryEditPage entryPage = homePage.addRelease(RELEASE_VERSION);
vp = entryPage.waitUntilPageIsLoaded().clickSaveAndView();
// Go back to the home page by clicking in the breadcrumb
vp.clickBreadcrumbLink("Releases");
homePage.waitUntilPageIsLoaded();
// Assert Livetable:
// - verify that the Translation has been applied by checking the Translated livetable column name
// - verify that the Livetable contains our new Release entry
LiveTableElement lt = homePage.getReleaseLiveTable();
Assert.assertTrue(lt.hasRow("Version", RELEASE_VERSION));
}
Aggregations