@Test @InSequence(1) public void createNewUserTest() throws URISyntaxException { driver.get(authContextRoot.toURI().resolve(CONSOLE_PATH).toString()); loginPage.waitForPage(); loginPage.login(ADMIN_USERNAME, PASSWORD); if (passwordChangePage.isPagePresent()) { passwordChangePage.changePassword(PASSWORD); } keyCloakNavigation.waitForPage(); keyCloakNavigation.users(); User newUser = new User(); newUser.setUsername(NEW_USER_USERNAME); newUser.setEnabled(true); usersPage.addUser(newUser); userPageNavBar.roleMappings(); roleMappingsPage.assignRole("developer"); userPageNavBar.credentials(); credentialsPage.setPassword(NEW_USER_PASSWORD); modal.waitForDialog(); modal.remove(); dropdown.click("Sign Out"); loginPage.waitForPage(); }
@Test @InSequence(0) public void activateDeveloperTest() throws URISyntaxException { String ble = contextRoot.toExternalForm(); driver.manage().timeouts().setScriptTimeout(15, TimeUnit.SECONDS); driver.get(authContextRoot.toURI().resolve(CONSOLE_PATH).toString()); loginPage.waitForPage(); loginPage.login(ADMIN_USERNAME, PASSWORD); if (passwordChangePage.isPagePresent()) { passwordChangePage.changePassword(PASSWORD); } keyCloakNavigation.waitForPage(); keyCloakNavigation.users(); usersPage.activateUser(DEVELOPER_USERNAME); dropdown.click("Sign Out"); loginPage.waitForPage(); }