Skip to content

Commit

Permalink
adding schrodinger LoginPage tests to suite
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Mar 2, 2020
1 parent aaacabd commit 07cc7e6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
Expand Up @@ -43,7 +43,7 @@ public void beforeClass() throws IOException {
}

@Test
public void loginLockoutUser() {
public void test001loginLockoutUser() {
basicPage.loggedUser().logoutIfUserIsLogin();
open("/login");
for (int i = 0; i < 4; i++) {
Expand All @@ -53,13 +53,13 @@ public void loginLockoutUser() {
}

@Test
public void loginDisabledUser() {
public void test002loginDisabledUser() {
basicPage.loggedUser().logoutIfUserIsLogin();
unsuccessfulLogin("disabled_user", "5ecr3t");
}

@Test
public void loginEnabledUserWithoutAuthorizationsUser() {
public void test003loginEnabledUserWithoutAuthorizationsUser() {
basicPage.loggedUser().logoutIfUserIsLogin();
unsuccessfulLogin("enabled_user_without_authorizations", "5ecr3t");
}
Expand All @@ -73,7 +73,7 @@ protected void unsuccessfulLogin(String username, String password){
}

@Test
public void auditingSuccessfulLogin() {
public void test010auditingSuccessfulLogin() {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();
login.login("administrator", "5ecr3t");
Expand All @@ -89,7 +89,7 @@ protected void auditingSuccesfulLogin(String username) {
}

@Test
public void auditingFailLogin() {
public void test011auditingFailLogin() {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();
login.login("bad_administrator", "5ecr3t");
Expand All @@ -103,7 +103,7 @@ public void auditingFailLogin() {
}

@Test
public void auditingSuccessfulLogout() {
public void test012auditingSuccessfulLogout() {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();
login.login("administrator", "5ecr3t");
Expand Down
Expand Up @@ -28,7 +28,7 @@
public class LoginPageTest extends AbstractLoginPageTest {

@Test
public void changeLanguageFormPage() {
public void test020changeLanguageFormPage() {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();

Expand All @@ -38,7 +38,7 @@ public void changeLanguageFormPage() {
}

@Test
public void changeLanguageSamlSelectPage() {
public void test021changeLanguageSamlSelectPage() {
basicPage.loggedUser().logoutIfUserIsLogin();
SamlSelectPage login = midPoint.samlSelect();
login.goToUrl();
Expand Down
Expand Up @@ -61,7 +61,7 @@ public void beforeClass() throws IOException {
SystemPage systemPage = new SystemPage();
PrismForm<InfrastructureTab> infrastructureForm = systemPage.infrastructureTab().form();
infrastructureForm.showEmptyAttributes("Infrastructure");
infrastructureForm.addAttributeValue("defaultHostname", getConfiguration().getBaseUrl());
infrastructureForm.addAttributeValue("publicHttpUrlPattern", getConfiguration().getBaseUrl());
File notificationFile = NOTIFICATION_FILE;
notificationFile.createNewFile();
NotificationsTab notificationTab = systemPage.notificationsTab();
Expand All @@ -88,7 +88,7 @@ public void failWholeAuthenticationFlow() {
}

@Test
public void loginAndLogoutForAdministrators() {
public void test020loginAndLogoutForAdministrators() {
basicPage.loggedUser().logoutIfUserIsLogin();
open("/auth/emergency/internalLoginForm");
FormLoginPage login = midPoint.formLogin();
Expand All @@ -98,14 +98,14 @@ public void loginAndLogoutForAdministrators() {
}

@Test
public void negativeLoginForAdministrators() {
public void test021negativeLoginForAdministrators() {
basicPage.loggedUser().logoutIfUserIsLogin();
open("/auth/emergency/internalLoginForm");
unsuccessfulLogin("user_without_superuser", "5ecr3t");
}

@Test
public void changePassowordMailNonce() throws IOException, InterruptedException {
public void test030changePassowordMailNonce() throws IOException, InterruptedException {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();
MailNoncePage mailNonce = (MailNoncePage) login.forgotPassword();
Expand All @@ -120,7 +120,7 @@ public void changePassowordMailNonce() throws IOException, InterruptedException
}

@Test
public void changePassowordSecurityQuestion() {
public void test031changePassowordSecurityQuestion() {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();
open("/login");
Expand All @@ -137,9 +137,12 @@ public void changePassowordSecurityQuestion() {
}

@Test
public void selfRegistration() throws IOException, InterruptedException {
public void test040selfRegistration() throws IOException, InterruptedException {
basicPage.loggedUser().logoutIfUserIsLogin();
FormLoginPage login = midPoint.formLogin();
open("/login");
open("/");
TimeUnit.SECONDS.sleep(2);
SelfRegistrationPage registrationPage = login.register();
registrationPage.setGivenName("Test").setFamilyName("User").setEmail("test.user@evolveum.com").setPassword("5ecr3t").submit();
TimeUnit.SECONDS.sleep(4);
Expand Down

0 comments on commit 07cc7e6

Please sign in to comment.