Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix for schrodinger tests of labs 101 (MOD10, MOD110
- Loading branch information
Showing
13 changed files
with
1,815 additions
and
1,078 deletions.
There are no files selected for viewing
2,145 changes: 1,078 additions & 1,067 deletions
2,145
...ort-impl/src/main/java/com/evolveum/midpoint/report/impl/ReportHTMLCreateTaskHandler.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
...rtest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M12Authorizations.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
/* | ||
* Copyright (c) 2010-2019 Evolveum and contributors | ||
* | ||
* This work is dual-licensed under the Apache License 2.0 | ||
* and European Union Public License. See LICENSE file for details. | ||
*/ | ||
package com.evolveum.midpoint.testing.schrodinger.labs; | ||
|
||
import com.evolveum.midpoint.schema.SchemaConstantsGenerated; | ||
import com.evolveum.midpoint.schrodinger.page.configuration.AboutPage; | ||
|
||
import com.evolveum.midpoint.schrodinger.page.login.FormLoginPage; | ||
|
||
import com.evolveum.midpoint.schrodinger.page.self.ProfilePage; | ||
import com.evolveum.midpoint.schrodinger.util.Utils; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.testng.Assert; | ||
import org.testng.annotations.AfterClass; | ||
import org.testng.annotations.BeforeClass; | ||
import org.testng.annotations.Test; | ||
|
||
import javax.xml.namespace.QName; | ||
import java.io.File; | ||
import java.io.IOException; | ||
|
||
/** | ||
* @author skublik | ||
*/ | ||
|
||
public class M12Authorizations extends AbstractLabTest{ | ||
|
||
private static final Logger LOG = LoggerFactory.getLogger(M12Authorizations.class); | ||
|
||
private static final File ROLE_BASIC_USER_FILE = new File(LAB_OBJECTS_DIRECTORY + "roles/role-basic-user.xml"); | ||
private static final File ROLE_BASIC_USER_FILE_12_1 = new File(LAB_OBJECTS_DIRECTORY + "roles/role-basic-user-12-1.xml"); | ||
|
||
// @AfterClass | ||
// @Override | ||
// public void afterClass() { | ||
// super.afterClass(); | ||
// | ||
// midPoint.formLogin().loginWithReloadLoginPage(username, password); | ||
// | ||
// LOG.info("After: Login name " + username + " pass " + password); | ||
// | ||
// AboutPage aboutPage = basicPage.aboutPage(); | ||
// aboutPage | ||
// .clickSwitchToFactoryDefaults() | ||
// .clickYes(); | ||
// } | ||
|
||
@Test(groups={"M12"}, dependsOnGroups={"M11"}) | ||
public void mod12test01BasicUserAuthorization() { | ||
importObject(ROLE_BASIC_USER_FILE, true); | ||
showUser("X000005").selectTabBasic() | ||
.form() | ||
.setPasswordFieldsValues(new QName(SchemaConstantsGenerated.NS_COMMON, "value"), "qwerty12345XXXX") | ||
.and() | ||
.and() | ||
.clickSave() | ||
.feedback() | ||
.isSuccess(); | ||
|
||
basicPage.loggedUser().logoutIfUserIsLogin(); | ||
FormLoginPage login = midPoint.formLogin(); | ||
login.login("X000005", "qwerty12345XXXX") | ||
.feedback() | ||
.isError(); | ||
|
||
login.login(getUsername(), getPassword()); | ||
|
||
Utils.addAsignments(showUser("X000005").selectTabAssignments(), "Basic user"); | ||
|
||
basicPage.loggedUser().logoutIfUserIsLogin(); | ||
login.login("X000005", "qwerty12345XXXX"); | ||
|
||
ProfilePage profile = basicPage.profile(); | ||
Assert.assertTrue(profile.selectTabProjections() | ||
.table() | ||
.containsLinksTextPartially("")); //TODO projections names | ||
|
||
Assert.assertTrue(profile.selectTabAssignments() | ||
.table() | ||
.containsLinksTextPartially("Basic user", "")); //TODO roles names | ||
|
||
basicPage.credentials(); //TODO implement credentials page | ||
|
||
basicPage.loggedUser().logoutIfUserIsLogin(); | ||
login.login(getUsername(), getPassword()); | ||
|
||
importObject(ROLE_BASIC_USER_FILE_12_1, true); | ||
|
||
basicPage.loggedUser().logoutIfUserIsLogin(); | ||
login.login("X000005", "qwerty12345ZZZZ"); | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.