@Test @InSequence(2) public void adminCreateApplicationTest() { driver.get(contextRoot.toExternalForm()); loginPage.waitForPage(); loginPage.login(ADMIN_USERNAME, PASSWORD); if (passwordChangePage.isPagePresent()) { passwordChangePage.changePassword(PASSWORD); } navigation.goToApplications(); pushAppsPage.waitForPage(); navigation.goToApplications(); // initially there shouldn't exist any push applications while (!pushAppsPage.getApplicationList().isEmpty()) { Application application = pushAppsPage.getApplicationList().get(0); application.remove(); modal.waitForDialog(); modal.confirmName(application.getName()); modal.remove(); } pushAppsPage.pressCreateButton(); pushAppEditPage.registerNewPushApp(ADMIN_APPLICATION, ""); header.logout(); }
@Test @InSequence(5) public void developerCreateAppTest() { pushAppsPage.pressCreateButton(); pushAppEditPage.registerNewPushApp(DEVELOPER_APPLICATION, ""); pushAppsPage.waitForPage(); assertEquals(1, pushAppsPage.countApplications()); header.logout(); }
@Test @InSequence(6) public void adminApplicationListTest() { driver.get(contextRoot.toExternalForm()); loginPage.login(ADMIN_USERNAME, PASSWORD); if (passwordChangePage.isPagePresent()) { passwordChangePage.changePassword(PASSWORD); } navigation.goToApplications(); pushAppsPage.waitForPage(); assertEquals(3, pushAppsPage.countApplications()); assertTrue(pushAppsPage.applicationExists(ADMIN_APPLICATION, "")); assertTrue(pushAppsPage.applicationExists(DEVELOPER_APPLICATION, "")); assertTrue(pushAppsPage.applicationExists(NEW_USER_APPLICATION, "")); header.logout(); loginPage.waitForPage(); }
@Test @InSequence(3) public void newUserCreateApplicationTest() { driver.get(contextRoot.toExternalForm()); loginPage.waitForPage(); loginPage.login(NEW_USER_USERNAME, NEW_USER_PASSWORD); if (passwordChangePage.isPagePresent()) { passwordChangePage.changePassword(NEW_USER_PASSWORD); } navigation.goToApplications(); pushAppsPage.waitForPage(); navigation.goToApplications(); pushAppsPage.pressCreateButton(); pushAppEditPage.registerNewPushApp(NEW_USER_APPLICATION, ""); header.logout(); }