From 3fc27eb6c038946a47831a9c4522d778dbf6c630 Mon Sep 17 00:00:00 2001 From: lskublik Date: Tue, 28 Apr 2020 15:34:11 +0200 Subject: [PATCH] adding schrodinger test for module 11 of training 101 --- .../schrodinger/AbstractSchrodingerTest.java | 22 +- .../schrodinger/labs/AbstractLabTest.java | 27 +- .../schrodinger/labs/M10ObjectTemplate.java | 21 - .../labs/M11SystemConfiguration.java | 188 ++++ .../M3ResourcesAttributesAndMappingsTest.java | 6 +- .../labs/M7SynchronizationFlavours.java | 2 +- .../schrodinger/scenarios/AccountTests.java | 2 +- .../scenarios/AdvancedAccountTests.java | 2 +- .../scenarios/OrganizationStructureTests.java | 2 +- .../scenarios/SynchronizationTests.java | 2 +- .../objectCollection-active-employees.xml | 18 + .../objectCollection-former-employees.xml | 18 + .../objectCollection-inactive-employees.xml | 18 + .../system-configuration-11-1.xml | 824 ++++++++++++++++ .../system-configuration-11-2.xml | 829 ++++++++++++++++ .../system-configuration-11-3.xml | 881 ++++++++++++++++++ .../resources/labs/sources/source-11-1.csv | 18 + .../schrodingertest/testng-integration.xml | 3 +- .../component/TabWithContainerWrapper.java | 28 + .../DeploymentInformationTab.java | 22 + .../component/configuration/SystemTab.java | 8 +- .../midpoint/schrodinger/page/BasicPage.java | 5 + .../page/configuration/SystemPage.java | 5 + 23 files changed, 2889 insertions(+), 62 deletions(-) create mode 100644 testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M11SystemConfiguration.java create mode 100644 testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-active-employees.xml create mode 100644 testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-former-employees.xml create mode 100644 testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-inactive-employees.xml create mode 100644 testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-1.xml create mode 100644 testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-2.xml create mode 100644 testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-3.xml create mode 100644 testing/schrodingertest/src/test/resources/labs/sources/source-11-1.csv create mode 100644 tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/TabWithContainerWrapper.java create mode 100644 tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/DeploymentInformationTab.java diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/AbstractSchrodingerTest.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/AbstractSchrodingerTest.java index b7d6e079245..07b889f83e5 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/AbstractSchrodingerTest.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/AbstractSchrodingerTest.java @@ -13,19 +13,13 @@ import java.io.InputStream; import java.util.Properties; -import com.codeborne.selenide.Condition; import com.codeborne.selenide.Selenide; import com.codeborne.selenide.ex.ElementNotFound; import com.codeborne.selenide.testng.BrowserPerClass; -import com.evolveum.midpoint.schrodinger.component.AssignmentsTab; - import com.evolveum.midpoint.schrodinger.component.common.FeedbackBox; -import com.evolveum.midpoint.schrodinger.component.common.table.AbstractTableWithPrismView; -import com.evolveum.midpoint.schrodinger.page.AssignmentHolderDetailsPage; import org.apache.commons.io.FileUtils; -import org.openqa.selenium.By; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.test.context.SpringBootTest; @@ -70,7 +64,7 @@ public abstract class AbstractSchrodingerTest extends AbstractIntegrationTest { private static final Logger LOG = LoggerFactory.getLogger(AbstractSchrodingerTest.class); - protected static File csvTargetDir; + protected static File testTargetDir; protected EnvironmentConfiguration configuration; @@ -220,19 +214,19 @@ protected File initTestDirectory(String dir) throws IOException { String home = fetchMidpointHome(); File parentDir = new File(home, "schrodinger"); parentDir.mkdir(); - csvTargetDir = new File(parentDir, dir); + testTargetDir = new File(parentDir, dir); - if (csvTargetDir.mkdir()) { + if (testTargetDir.mkdir()) { - return csvTargetDir; + return testTargetDir; } else { - if (csvTargetDir.exists()) { + if (testTargetDir.exists()) { - FileUtils.cleanDirectory(csvTargetDir); - return csvTargetDir; + FileUtils.cleanDirectory(testTargetDir); + return testTargetDir; } else { - throw new IOException("Creation of directory \"" + csvTargetDir.getAbsolutePath() + "\" unsuccessful"); + throw new IOException("Creation of directory \"" + testTargetDir.getAbsolutePath() + "\" unsuccessful"); } } } diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/AbstractLabTest.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/AbstractLabTest.java index 4a7af6e4d4f..883bc6a8464 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/AbstractLabTest.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/AbstractLabTest.java @@ -59,6 +59,7 @@ public class AbstractLabTest extends AbstractSchrodingerTest { protected static final File HR_SOURCE_FILE_10_2_PART1 = new File(LAB_SOURCES_DIRECTORY + "source-10-2-part1.csv"); protected static final File HR_SOURCE_FILE_10_2_PART2 = new File(LAB_SOURCES_DIRECTORY + "source-10-2-part2.csv"); protected static final File HR_SOURCE_FILE_10_2_PART3 = new File(LAB_SOURCES_DIRECTORY + "source-10-2-part3.csv"); + protected static final File HR_SOURCE_FILE_11_1 = new File(LAB_SOURCES_DIRECTORY + "source-11-1.csv"); protected static final String DIRECTORY_CURRENT_TEST = "labTests"; @@ -74,6 +75,7 @@ public class AbstractLabTest extends AbstractSchrodingerTest { protected static final String CSV_3_RESOURCE_OID = "10000000-9999-9999-0000-a000ff000004"; protected static final String HR_FILE_SOURCE_NAME = "source.csv"; protected static final String HR_RESOURCE_NAME = "ExAmPLE, Inc. HR Source"; + protected static final String NOTIFICATION_FILE_NAME = "notification.txt"; protected static final String PASSWORD_ATTRIBUTE_RESOURCE_KEY = "User password attribute name"; protected static final String UNIQUE_ATTRIBUTE_RESOURCE_KEY = "Unique attribute name"; @@ -89,6 +91,7 @@ public class AbstractLabTest extends AbstractSchrodingerTest { protected static File csv2TargetFile; protected static File csv3TargetFile; protected static File hrTargetFile; + protected static File notificationFile = new File("./target/notification.txt"); @AfterClass @Override @@ -112,8 +115,8 @@ public AssignmentHolderObjectListTable showUserInTable( .search() .byName() .inputValue(userName) - .updateSearch() - .and(); + .updateSearch() + .and(); } public AccountPage showShadow(String resourceName, String searchedItem, String itemValue){ @@ -143,7 +146,7 @@ public ResourceShadowTable getShadowTable(String resourceName, String searchedIt .search() .byName() .inputValue(resourceName) - .updateSearch() + .updateSearch() .and() .clickByName(resourceName) .clickAccountsTab(); @@ -153,17 +156,17 @@ public ResourceShadowTable getShadowTable(String resourceName, String searchedIt tab.clickSearchInResource(); } Selenide.sleep(1000); - if (intent != null && !intent.isBlank()) { + if (intent != null && !intent.isEmpty()) { tab.setIntent(intent); Selenide.sleep(MidPoint.TIMEOUT_DEFAULT_2_S); } return tab.table() - .search() - .resetBasicSearch() - .byItem(searchedItem) - .inputValueWithEnter(itemValue) - .and() - .and(); + .search() + .resetBasicSearch() + .byItem(searchedItem) + .inputValueWithEnter(itemValue) + .and() + .and(); } protected TaskPage showTask(String name) { @@ -171,8 +174,8 @@ protected TaskPage showTask(String name) { .table() .search() .byName() - .inputValue(name) - .updateSearch() + .inputValue(name) + .updateSearch() .and() .clickByName(name); } diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M10ObjectTemplate.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M10ObjectTemplate.java index cb7690fa5ec..876a9c9698b 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M10ObjectTemplate.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M10ObjectTemplate.java @@ -18,17 +18,13 @@ import com.evolveum.midpoint.schrodinger.component.configuration.ObjectPolicyTab; import com.evolveum.midpoint.schrodinger.component.org.OrgRootTab; import com.evolveum.midpoint.schrodinger.component.resource.ResourceAccountsTab; -import com.evolveum.midpoint.schrodinger.page.configuration.AboutPage; import com.evolveum.midpoint.schrodinger.page.resource.ViewResourcePage; import com.evolveum.midpoint.schrodinger.page.task.TaskPage; import com.evolveum.midpoint.schrodinger.page.user.UserPage; import com.evolveum.midpoint.testing.schrodinger.scenarios.ScenariosCommons; import org.apache.commons.io.FileUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.testng.Assert; -import org.testng.annotations.AfterClass; import org.testng.annotations.Test; import java.io.File; @@ -40,29 +36,12 @@ public class M10ObjectTemplate extends AbstractLabTest{ - private static final Logger LOG = LoggerFactory.getLogger(M10ObjectTemplate.class); - private static final File OBJECT_TEMPLATE_USER_SIMPLE_FILE = new File(LAB_OBJECTS_DIRECTORY + "objectTemplate/object-template-example-user-simple.xml"); private static final File OBJECT_TEMPLATE_USER_FILE = new File(LAB_OBJECTS_DIRECTORY + "objectTemplate/object-template-example-user.xml"); private static final File OBJECT_TEMPLATE_USER_FILE_10_3 = new File(LAB_OBJECTS_DIRECTORY + "objectTemplate/object-template-example-user-10-3.xml"); private static final File LOOKUP_EMP_STATUS_FILE = new File(LAB_OBJECTS_DIRECTORY + "lookupTables/lookup-emp-status.xml"); private static final File CSV_3_RESOURCE_FILE_10_4 = new File(LAB_OBJECTS_DIRECTORY + "resources/localhost-csvfile-3-ldap-10-4.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={"M10"}, dependsOnGroups={"M9"}) public void mod10test01SimpleObjectTemplate() throws IOException { importObject(OBJECT_TEMPLATE_USER_SIMPLE_FILE, true); diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M11SystemConfiguration.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M11SystemConfiguration.java new file mode 100644 index 00000000000..b88c21f62b6 --- /dev/null +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M11SystemConfiguration.java @@ -0,0 +1,188 @@ +/* + * 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 static com.codeborne.selenide.Selenide.$; + +import com.codeborne.selenide.Selenide; + +import com.evolveum.midpoint.schrodinger.MidPoint; + +import com.evolveum.midpoint.schrodinger.page.configuration.AboutPage; +import com.evolveum.midpoint.schrodinger.page.login.FormLoginPage; +import com.evolveum.midpoint.schrodinger.util.Schrodinger; + +import org.apache.commons.io.FileUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.Assert; +import org.testng.annotations.AfterClass; +import org.testng.annotations.Test; + +import java.io.File; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.file.Files; +import java.nio.file.Paths; + +/** + * @author skublik + */ + +public class M11SystemConfiguration extends AbstractLabTest { + + private static final Logger LOG = LoggerFactory.getLogger(M11SystemConfiguration.class); + + private static final File SYSTEM_CONFIGURATION_FILE_11_1 = new File(LAB_OBJECTS_DIRECTORY + "systemConfiguration/system-configuration-11-1.xml"); + private static final File SYSTEM_CONFIGURATION_FILE_11_2 = new File(LAB_OBJECTS_DIRECTORY + "systemConfiguration/system-configuration-11-2.xml"); + private static final File SYSTEM_CONFIGURATION_FILE_11_3 = new File(LAB_OBJECTS_DIRECTORY + "systemConfiguration/system-configuration-11-3.xml"); + private static final File OBJECT_COLLECTION_ACTIVE_EMP_FILE = new File(LAB_OBJECTS_DIRECTORY + "objectCollections/objectCollection-active-employees.xml"); + private static final File OBJECT_COLLECTION_INACTIVE_EMP_FILE = new File(LAB_OBJECTS_DIRECTORY + "objectCollections/objectCollection-inactive-employees.xml"); + private static final File OBJECT_COLLECTION_FORMER_EMP_FILE = new File(LAB_OBJECTS_DIRECTORY + "objectCollections/objectCollection-former-employees.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={"M11"}, dependsOnGroups={"M10"}) + public void mod11test01ConfiguringNotifications() throws IOException { + notificationFile = new File(testTargetDir, NOTIFICATION_FILE_NAME); + notificationFile.createNewFile(); + + importObject(SYSTEM_CONFIGURATION_FILE_11_1, true); + + basicPage.notifications() + .setRedirectToFile(notificationFile.getAbsolutePath()) + .and() + .save() + .feedback() + .isSuccess(); + + FileUtils.copyFile(HR_SOURCE_FILE_11_1, hrTargetFile); + Selenide.sleep(MidPoint.TIMEOUT_MEDIUM_6_S); + + String notification = readBodyOfLastNotification(); + + String startOfNotification = "Notification about user-related operation (status: SUCCESS)\n" + + "\n" + + "User: Chuck Norris (X000997, oid "; + + String endOfNotification = "The user record was created with the following data:\n" + + " - Name: X000997\n" + + " - Full name: Chuck Norris\n" + + " - Given name: Chuck\n" + + " - Family name: Norris\n" + + " - Title: Application Developer\n" + + " - Email: chuck.norris@example.com\n" + + " - Employee Number: 000997\n" + + " - Cost Center: 0211\n" + + " - Organizational Unit: Java Development\n" + + " - Extension:\n" + + " - Organizational Path: 0200:0210:0211\n" + + " - Is Manager: false\n" + + " - Employee Status: A\n" + + " - Credentials:\n" + + " - Password:\n" + + " - Value: (protected string)\n" + + " - Activation:\n" + + " - Administrative status: ENABLED\n" + + " - Valid from: Jul 15, 2010, 8:20:00 AM\n" + + " - Assignment #1:\n" + + " - Target: Employee (archetype) [default]\n" + + " - Assignment #2:\n" + + " - Target: ACTIVE (org) [default]\n" + + " - Assignment #3:\n" + + " - Target: 0211 (org) [default]\n" + + " - Assignment #4:\n" + + " - Target: Internal Employee (role) [default]\n" + + "\n" + + "Requester: midPoint Administrator (administrator)\n" + + "Channel: http://midpoint.evolveum.com/xml/ns/public/provisioning/channels-3#liveSync\n" + + "\n"; + + Assert.assertTrue(notification.startsWith(startOfNotification)); + Assert.assertTrue(notification.endsWith(endOfNotification)); + } + + @Test(dependsOnMethods = {"mod11test01ConfiguringNotifications"},groups={"M11"}, dependsOnGroups={"M10"}) + public void mod11test02ConfiguringDeploymentInformation() { + importObject(SYSTEM_CONFIGURATION_FILE_11_2, true); + + Assert.assertTrue($(Schrodinger.byDataId("header", "mainHeader")) + .getCssValue("background-color").equals("rgba(48, 174, 48, 1)")); + Assert.assertTrue($(Schrodinger.byDataId("span", "pageTitle")).getText().startsWith("DEV:")); + + basicPage.deploymentInformation() + .form() + .addAttributeValue("headerColor", "lightblue") + .and() + .and() + .save() + .feedback() + .isSuccess(); + + Assert.assertTrue($(Schrodinger.byDataId("header", "mainHeader")) + .getCssValue("background-color").equals("rgba(173, 216, 230, 1)")); + + basicPage.deploymentInformation() + .form() + .addAttributeValue("headerColor", "#30ae30") + .and() + .and() + .save() + .feedback() + .isSuccess(); + Assert.assertTrue($(Schrodinger.byDataId("header", "mainHeader")) + .getCssValue("background-color").equals("rgba(48, 174, 48, 1)")); + } + + @Test(dependsOnMethods = {"mod11test02ConfiguringDeploymentInformation"},groups={"M11"}, dependsOnGroups={"M10"}) + public void mod11test03ConfiguringObjectCollectionsAndViews() { + importObject(OBJECT_COLLECTION_ACTIVE_EMP_FILE, true); + importObject(OBJECT_COLLECTION_INACTIVE_EMP_FILE, true); + importObject(OBJECT_COLLECTION_FORMER_EMP_FILE, true); + importObject(SYSTEM_CONFIGURATION_FILE_11_3, true); + + basicPage.loggedUser().logoutIfUserIsLogin(); + FormLoginPage login = midPoint.formLogin(); + login.login(getUsername(), getPassword()); + + basicPage.listUsers("Employees"); + basicPage.listUsers("Externals"); + basicPage.listUsers("Inactive Employees"); + basicPage.listUsers("Former Employees"); + basicPage.listUsers("Active Employees"); + + } + + protected String readBodyOfLastNotification() throws IOException { + String separator = "============================================"; + byte[] encoded = Files.readAllBytes(Paths.get(notificationFile.getAbsolutePath())); + String notifications = new String(encoded, Charset.defaultCharset()); + if (!notifications.contains(separator)) { + return ""; + } + String notification = notifications.substring(notifications.lastIndexOf(separator) + separator.length(), notifications.length()-1); + String bodyTag = "body='"; + if (!notifications.contains(bodyTag)) { + return ""; + } + String body = notification.substring(notification.indexOf(bodyTag) + bodyTag.length(), notification.lastIndexOf("'")); + return body; + } +} diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M3ResourcesAttributesAndMappingsTest.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M3ResourcesAttributesAndMappingsTest.java index 20728730413..5ad697ff469 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M3ResourcesAttributesAndMappingsTest.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M3ResourcesAttributesAndMappingsTest.java @@ -52,7 +52,7 @@ public void beforeClass() throws IOException { public void mod03test01ViewingResources() throws Exception { initTestDirectory(DIRECTORY_CURRENT_TEST); - csv1TargetFile = new File(csvTargetDir, CSV_1_FILE_SOURCE_NAME); + csv1TargetFile = new File(testTargetDir, CSV_1_FILE_SOURCE_NAME); FileUtils.copyFile(CSV_1_SOURCE_FILE, csv1TargetFile); importObject(CSV_1_SIMPLE_RESOURCE_FILE,true); @@ -127,14 +127,14 @@ public void mod03test01ViewingResources() throws Exception { importObject(NUMERIC_PIN_FIRST_NONZERO_POLICY_FILE,true); - csv2TargetFile = new File(csvTargetDir, CSV_2_FILE_SOURCE_NAME); + csv2TargetFile = new File(testTargetDir, CSV_2_FILE_SOURCE_NAME); FileUtils.copyFile(CSV_2_SOURCE_FILE, csv2TargetFile); importObject(CSV_2_RESOURCE_FILE,true); changeResourceAttribute(CSV_2_RESOURCE_NAME, ScenariosCommons.CSV_RESOURCE_ATTR_FILE_PATH, csv2TargetFile.getAbsolutePath(), true); - csv3TargetFile = new File(csvTargetDir, CSV_3_FILE_SOURCE_NAME); + csv3TargetFile = new File(testTargetDir, CSV_3_FILE_SOURCE_NAME); FileUtils.copyFile(CSV_3_SOURCE_FILE, csv3TargetFile); importObject(CSV_3_RESOURCE_FILE,true); diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M7SynchronizationFlavours.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M7SynchronizationFlavours.java index a6fe4cce421..6f4530dc5d8 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M7SynchronizationFlavours.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/labs/M7SynchronizationFlavours.java @@ -36,7 +36,7 @@ public class M7SynchronizationFlavours extends AbstractLabTest{ @Test(groups={"M7"}, dependsOnGroups={"M6"}) public void mod07test01RunningImportFromResource() throws IOException { - hrTargetFile = new File(csvTargetDir, HR_FILE_SOURCE_NAME); + hrTargetFile = new File(testTargetDir, HR_FILE_SOURCE_NAME); FileUtils.copyFile(HR_SOURCE_FILE, hrTargetFile); importObject(HR_NO_EXTENSION_RESOURCE_FILE,true); diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AccountTests.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AccountTests.java index c477d9b2e3f..2080707129a 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AccountTests.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AccountTests.java @@ -56,7 +56,7 @@ public void createMidpointUser() throws IOException { initTestDirectory(DIRECTORY_CURRENT_TEST); - csvTargetFile = new File(csvTargetDir, FILE_RESOUCE_NAME); + csvTargetFile = new File(testTargetDir, FILE_RESOUCE_NAME); FileUtils.copyFile(CSV_INITIAL_SOURCE_FILE, csvTargetFile); UserPage user = basicPage.newUser(); diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AdvancedAccountTests.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AdvancedAccountTests.java index d8008410858..0357db3cd93 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AdvancedAccountTests.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AdvancedAccountTests.java @@ -28,7 +28,7 @@ public void initializeTestConfiguration() throws IOException { initTestDirectory(DIRECTORY_CURRENT_TEST); - csvTargetFile = new File(csvTargetDir, FILE_RESOUCE_NAME); + csvTargetFile = new File(testTargetDir, FILE_RESOUCE_NAME); FileUtils.copyFile(ScenariosCommons.CSV_SOURCE_FILE, csvTargetFile); diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/OrganizationStructureTests.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/OrganizationStructureTests.java index 2b5fd1f6175..77555958acf 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/OrganizationStructureTests.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/OrganizationStructureTests.java @@ -52,7 +52,7 @@ public void importOrgStructure() throws IOException { initTestDirectory(DIRECTORY_CURRENT_TEST); - csvTargetFile = new File(csvTargetDir, FILE_RESOUCE_NAME); + csvTargetFile = new File(testTargetDir, FILE_RESOUCE_NAME); FileUtils.copyFile(CSV_INITIAL_SOURCE_FILE, csvTargetFile); ImportObjectPage importPage = basicPage.importObject(); diff --git a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/SynchronizationTests.java b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/SynchronizationTests.java index 4f3aba2be36..8276c658c49 100644 --- a/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/SynchronizationTests.java +++ b/testing/schrodingertest/src/test/java/com/evolveum/midpoint/testing/schrodinger/scenarios/SynchronizationTests.java @@ -50,7 +50,7 @@ public void setUpResourceAndSynchronizationTask() throws IOException { initTestDirectory(DIRECTORY_CURRENT_TEST); - csvTargetFile = new File(csvTargetDir, FILE_RESOUCE_NAME); + csvTargetFile = new File(testTargetDir, FILE_RESOUCE_NAME); FileUtils.copyFile(CSV_INITIAL_SOURCE_FILE, csvTargetFile); importObject(ScenariosCommons.RESOURCE_CSV_GROUPS_AUTHORITATIVE_FILE,true); diff --git a/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-active-employees.xml b/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-active-employees.xml new file mode 100644 index 00000000000..6dd6fadfe2b --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-active-employees.xml @@ -0,0 +1,18 @@ + + + + active-employees + UserType + + + extension/empStatus + A + + + diff --git a/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-former-employees.xml b/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-former-employees.xml new file mode 100644 index 00000000000..e0573b0282f --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-former-employees.xml @@ -0,0 +1,18 @@ + + + + former-employees + UserType + + + extension/empStatus + F + + + diff --git a/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-inactive-employees.xml b/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-inactive-employees.xml new file mode 100644 index 00000000000..71b288e31cd --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/objects/objectCollections/objectCollection-inactive-employees.xml @@ -0,0 +1,18 @@ + + + + inactive-employees + UserType + + + extension/empStatus + I + + + diff --git a/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-1.xml b/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-1.xml new file mode 100644 index 00000000000..65ab7700d5f --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-1.xml @@ -0,0 +1,824 @@ + + + + SystemConfiguration + + + + + ERROR + ro.isdc.wro.extensions.processor.css.Less4jProcessor + + + OFF + org.hibernate.engine.jdbc.spi.SqlExceptionHelper + + + OFF + org.hibernate.engine.jdbc.batch.internal.BatchingBatch + + + WARN + org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl + + + OFF + org.hibernate.internal.ExceptionMapperStandardImpl + + + OFF + net.sf.jasperreports.engine.fill.JRFillDataset + + + WARN + org.apache.wicket.resource.PropertiesFactory + + + ERROR + org.springframework.context.support.ResourceBundleMessageSource + + + INFO + com.evolveum.midpoint.model.impl.lens.projector.Projector + + + INFO + com.evolveum.midpoint.model.impl.lens.Clockwork + + + %date [%X{subsystem}] [%thread] %level \(%logger\): %msg%n + MIDPOINT_LOG + ${midpoint.home}/log/midpoint.log + ${midpoint.home}/log/midpoint-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + + %date %level: %msg%n + MIDPOINT_PROFILE_LOG + ${midpoint.home}/log/midpoint-profile.log + ${midpoint.home}/log/midpoint-profile-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + MIDPOINT_LOG + INFO + + false +
false
+
+
+ + + + c:UserType + + + + P3M + + + P1M + + + + + + performance + Performance tracing + true + true + performance-trace %{timestamp} %{focusName} %{milliseconds} + true + true + + + functional + Functional tracing + true + functional-trace %{timestamp} %{focusName} + true + true + true + + normal + + + + functional-model-logging + Functional tracing (with model logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + com.evolveum.midpoint.model + TRACE + + + + normal + + + + functional-sql-logging + Functional tracing (with SQL logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + org.hibernate.SQL + TRACE + + + + normal + + + + + + + /self/profile + + View/edit your profile + + fa fa-user + + green + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfProfile + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /self/credentials + + View/edit your credentials + + fa fa-shield + + blue + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfCredentials + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /admin/users + + + fa fa-users + + red + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#users + + + /admin/resources + + + fa fa-database + + purple + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#resources + + + + my-cases + + + My case + My cases + + fe fe-case-object + + + 1000 + CaseType + + + + + + + + manual-case-view + + + Manual case + All manual cases + Manual provisioning cases + + 1010 + CaseType + + + + + + + + operation-request-case-view + + + Request + All requests + Operation requests + + 1020 + CaseType + + + + + + + + approval-case-view + + + Approval + All approvals + Approval cases + + 1030 + CaseType + + + + + + + + reconciliation-tasks-view + 30 + TaskType + + + + + + + + recomputation-tasks-view + 30 + TaskType + + + + + + + + import-tasks-view + 30 + TaskType + + + + + + + + live-sync-tasks-view + 30 + TaskType + + + + + + + + async-update-tasks-view + 30 + TaskType + + + + + + + + cleanup-tasks-view + 30 + TaskType + + + + + + + + report-tasks-view + 30 + TaskType + + + + + + + + single-bulk-action-tasks-view + 30 + TaskType + + + + + + + + iterative-bulk-action-tasks-view + 30 + TaskType + + + + + + + + certification-tasks-view + 30 + TaskType + + + + + + + + approval-tasks-view + 30 + TaskType + + + + + + + + utility-tasks-view + 30 + TaskType + + + + + + + + system-tasks-view + 30 + TaskType + + + + + + + + empls-view + 10 + UserType + + + + + + + + ext-view + 20 + UserType + + + + + + + + + + c:TaskType + + + + + 150 + + cleanupAfterCompletion + + + threadStopAction + + + binding + + + dependent + + + + + + + 900 + + executionStatus + + + node + + + nodeAsObserved + + + resultStatus + + + result + + + nextRunStartTimestamp + + + nextRetryTimestamp + + + unpauseAction + + + taskIdentifier + + + parent + + + waitingReason + + + stateBeforeSuspend + + + category + + + handlerUri + + + otherHandlersUriStack + + + channel + + + subtaskRef + + + dependentTaskRef + + + lastRunStartTimestamp + + + lastRunFinishTimestamp + + + completionTimestamp + + + + + + + hidden + 910 + + progress + + + expectedTotal + + + stalledSince + + + + + + + + safe + + "Safe" expression profile. It is supposed to contain only operations that are "safe", + i.e. operations that have very little risk to harm the system, circumvent midPoint security + and so on. Use of those operations should be reasonably safe in all expressions. + However, there are limitations. This profile may incomplete or it may even be not completely secure. + Proper security testing of this profile was not yet conducted. It is provided here "AS IS", + without any guarantees. Use at your own risk. + + deny + + asIs + allow + + + path + allow + + + value + allow + + + const + allow + + + script + deny + + + + + script-safe + deny + + com.evolveum.midpoint.xml.ns._public.common.common_3 + MidPoint common schema - generated bean classes + allow + + + com.evolveum.prism.xml.ns._public.types_3 + Prism schema - bean classes + allow + + + java.lang.Integer + allow + + + java.lang.Object + Basic Java operations. + deny + + equals + allow + + + hashCode + allow + + + + java.lang.String + String operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.lang.CharSequence + allow + + + java.lang.Enum + allow + + + java.util.List + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.ArrayList + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.Map + allow + + + java.util.HashMap + allow + + + java.util.Date + allow + + + javax.xml.namespace.QName + allow + + + javax.xml.datatype.XMLGregorianCalendar + allow + + + java.lang.System + Just a few methods of System are safe enough. + deny + + currentTimeMillis + allow + + + + java.lang.IllegalStateException + Basic Java exception. Also used in test. + allow + + + java.lang.IllegalArgumentException + Basic Java exception. + allow + + + com.evolveum.midpoint.model.common.expression.functions.BasicExpressionFunctions + MidPoint basic functions library + allow + + + com.evolveum.midpoint.model.common.expression.functions.LogExpressionFunctions + MidPoint logging functions library + allow + + + com.evolveum.midpoint.report.impl.ReportFunctions + MidPoint report functions library + allow + + + org.apache.commons.lang.StringUtils + Apache Commons: Strings + allow + + + + + + + + idm@example.com + + + + + mail + + + + + Notify system administrator for accounts + + idm@example.com + + + + + mail + + + + + + + RoleType + Notify system administrator for role change + + idm@example.com + + + idm-bcc@example.com + + + + + mail + + + + + OrgType + Notify system administrator for organization change + + idm@example.com + + + + + mail + + + + + mail + + + + + + idm@example.com + + mail + delete + taskEvent + + + + + + + + New accounts in midPoint managed systems + add + success + + administrator@example.com + + + + + mail + + + + + idm@example.com + false + + /opt/training/midpoint-labs/example-mail-notifications.log + + +
diff --git a/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-2.xml b/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-2.xml new file mode 100644 index 00000000000..0fefba44ba2 --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-2.xml @@ -0,0 +1,829 @@ + + + + SystemConfiguration + + + + + ERROR + ro.isdc.wro.extensions.processor.css.Less4jProcessor + + + OFF + org.hibernate.engine.jdbc.spi.SqlExceptionHelper + + + OFF + org.hibernate.engine.jdbc.batch.internal.BatchingBatch + + + WARN + org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl + + + OFF + org.hibernate.internal.ExceptionMapperStandardImpl + + + OFF + net.sf.jasperreports.engine.fill.JRFillDataset + + + WARN + org.apache.wicket.resource.PropertiesFactory + + + ERROR + org.springframework.context.support.ResourceBundleMessageSource + + + INFO + com.evolveum.midpoint.model.impl.lens.projector.Projector + + + INFO + com.evolveum.midpoint.model.impl.lens.Clockwork + + + %date [%X{subsystem}] [%thread] %level \(%logger\): %msg%n + MIDPOINT_LOG + ${midpoint.home}/log/midpoint.log + ${midpoint.home}/log/midpoint-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + + %date %level: %msg%n + MIDPOINT_PROFILE_LOG + ${midpoint.home}/log/midpoint-profile.log + ${midpoint.home}/log/midpoint-profile-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + MIDPOINT_LOG + INFO + + false +
false
+
+
+ + + + c:UserType + + + + P3M + + + P1M + + + + + + performance + Performance tracing + true + true + performance-trace %{timestamp} %{focusName} %{milliseconds} + true + true + + + functional + Functional tracing + true + functional-trace %{timestamp} %{focusName} + true + true + true + + normal + + + + functional-model-logging + Functional tracing (with model logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + com.evolveum.midpoint.model + TRACE + + + + normal + + + + functional-sql-logging + Functional tracing (with SQL logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + org.hibernate.SQL + TRACE + + + + normal + + + + + + + /self/profile + + View/edit your profile + + fa fa-user + + green + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfProfile + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /self/credentials + + View/edit your credentials + + fa fa-shield + + blue + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfCredentials + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /admin/users + + + fa fa-users + + red + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#users + + + /admin/resources + + + fa fa-database + + purple + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#resources + + + + my-cases + + + My case + My cases + + fe fe-case-object + + + 1000 + CaseType + + + + + + + + manual-case-view + + + Manual case + All manual cases + Manual provisioning cases + + 1010 + CaseType + + + + + + + + operation-request-case-view + + + Request + All requests + Operation requests + + 1020 + CaseType + + + + + + + + approval-case-view + + + Approval + All approvals + Approval cases + + 1030 + CaseType + + + + + + + + reconciliation-tasks-view + 30 + TaskType + + + + + + + + recomputation-tasks-view + 30 + TaskType + + + + + + + + import-tasks-view + 30 + TaskType + + + + + + + + live-sync-tasks-view + 30 + TaskType + + + + + + + + async-update-tasks-view + 30 + TaskType + + + + + + + + cleanup-tasks-view + 30 + TaskType + + + + + + + + report-tasks-view + 30 + TaskType + + + + + + + + single-bulk-action-tasks-view + 30 + TaskType + + + + + + + + iterative-bulk-action-tasks-view + 30 + TaskType + + + + + + + + certification-tasks-view + 30 + TaskType + + + + + + + + approval-tasks-view + 30 + TaskType + + + + + + + + utility-tasks-view + 30 + TaskType + + + + + + + + system-tasks-view + 30 + TaskType + + + + + + + + empls-view + 10 + UserType + + + + + + + + ext-view + 20 + UserType + + + + + + + + + + c:TaskType + + + + + 150 + + cleanupAfterCompletion + + + threadStopAction + + + binding + + + dependent + + + + + + + 900 + + executionStatus + + + node + + + nodeAsObserved + + + resultStatus + + + result + + + nextRunStartTimestamp + + + nextRetryTimestamp + + + unpauseAction + + + taskIdentifier + + + parent + + + waitingReason + + + stateBeforeSuspend + + + category + + + handlerUri + + + otherHandlersUriStack + + + channel + + + subtaskRef + + + dependentTaskRef + + + lastRunStartTimestamp + + + lastRunFinishTimestamp + + + completionTimestamp + + + + + + + hidden + 910 + + progress + + + expectedTotal + + + stalledSince + + + + + + + DEV + ExAmPLE, Inc. IDM Project + #30ae30 + + + + safe + + "Safe" expression profile. It is supposed to contain only operations that are "safe", + i.e. operations that have very little risk to harm the system, circumvent midPoint security + and so on. Use of those operations should be reasonably safe in all expressions. + However, there are limitations. This profile may incomplete or it may even be not completely secure. + Proper security testing of this profile was not yet conducted. It is provided here "AS IS", + without any guarantees. Use at your own risk. + + deny + + asIs + allow + + + path + allow + + + value + allow + + + const + allow + + + script + deny + + + + + script-safe + deny + + com.evolveum.midpoint.xml.ns._public.common.common_3 + MidPoint common schema - generated bean classes + allow + + + com.evolveum.prism.xml.ns._public.types_3 + Prism schema - bean classes + allow + + + java.lang.Integer + allow + + + java.lang.Object + Basic Java operations. + deny + + equals + allow + + + hashCode + allow + + + + java.lang.String + String operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.lang.CharSequence + allow + + + java.lang.Enum + allow + + + java.util.List + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.ArrayList + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.Map + allow + + + java.util.HashMap + allow + + + java.util.Date + allow + + + javax.xml.namespace.QName + allow + + + javax.xml.datatype.XMLGregorianCalendar + allow + + + java.lang.System + Just a few methods of System are safe enough. + deny + + currentTimeMillis + allow + + + + java.lang.IllegalStateException + Basic Java exception. Also used in test. + allow + + + java.lang.IllegalArgumentException + Basic Java exception. + allow + + + com.evolveum.midpoint.model.common.expression.functions.BasicExpressionFunctions + MidPoint basic functions library + allow + + + com.evolveum.midpoint.model.common.expression.functions.LogExpressionFunctions + MidPoint logging functions library + allow + + + com.evolveum.midpoint.report.impl.ReportFunctions + MidPoint report functions library + allow + + + org.apache.commons.lang.StringUtils + Apache Commons: Strings + allow + + + + + + + + idm@example.com + + + + + mail + + + + + Notify system administrator for accounts + + idm@example.com + + + + + mail + + + + + + + RoleType + Notify system administrator for role change + + idm@example.com + + + idm-bcc@example.com + + + + + mail + + + + + OrgType + Notify system administrator for organization change + + idm@example.com + + + + + mail + + + + + mail + + + + + + idm@example.com + + mail + delete + taskEvent + + + + + + + + New accounts in midPoint managed systems + add + success + + administrator@example.com + + + + + mail + + + + + idm@example.com + false + + /opt/training/midpoint-labs/example-mail-notifications.log + + +
diff --git a/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-3.xml b/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-3.xml new file mode 100644 index 00000000000..3efac8c76d7 --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/objects/systemConfiguration/system-configuration-11-3.xml @@ -0,0 +1,881 @@ + + + + SystemConfiguration + + + + + ERROR + ro.isdc.wro.extensions.processor.css.Less4jProcessor + + + OFF + org.hibernate.engine.jdbc.spi.SqlExceptionHelper + + + OFF + org.hibernate.engine.jdbc.batch.internal.BatchingBatch + + + WARN + org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl + + + OFF + org.hibernate.internal.ExceptionMapperStandardImpl + + + OFF + net.sf.jasperreports.engine.fill.JRFillDataset + + + WARN + org.apache.wicket.resource.PropertiesFactory + + + ERROR + org.springframework.context.support.ResourceBundleMessageSource + + + INFO + com.evolveum.midpoint.model.impl.lens.projector.Projector + + + INFO + com.evolveum.midpoint.model.impl.lens.Clockwork + + + %date [%X{subsystem}] [%thread] %level \(%logger\): %msg%n + MIDPOINT_LOG + ${midpoint.home}/log/midpoint.log + ${midpoint.home}/log/midpoint-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + + %date %level: %msg%n + MIDPOINT_PROFILE_LOG + ${midpoint.home}/log/midpoint-profile.log + ${midpoint.home}/log/midpoint-profile-%d{yyyy-MM-dd}.%i.log + 10 + 100MB + true + + MIDPOINT_LOG + INFO + + false +
false
+
+
+ + + + c:UserType + + + + P3M + + + P1M + + + + + + performance + Performance tracing + true + true + performance-trace %{timestamp} %{focusName} %{milliseconds} + true + true + + + functional + Functional tracing + true + functional-trace %{timestamp} %{focusName} + true + true + true + + normal + + + + functional-model-logging + Functional tracing (with model logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + com.evolveum.midpoint.model + TRACE + + + + normal + + + + functional-sql-logging + Functional tracing (with SQL logging) + true + functional-trace %{timestamp} %{focusName} + true + true + true + + + org.hibernate.SQL + TRACE + + + + normal + + + + + + + /self/profile + + View/edit your profile + + fa fa-user + + green + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfProfile + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /self/credentials + + View/edit your credentials + + fa fa-shield + + blue + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfCredentials + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#selfAll + + + /admin/users + + + fa fa-users + + red + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#users + + + /admin/resources + + + fa fa-database + + purple + http://midpoint.evolveum.com/xml/ns/public/security/authorization-ui-3#resources + + + + active-employees-view + 100 + UserType + + + Active Employees + + fa fa-male + + + + + + + + + + inactive-employees-view + 110 + UserType + + + Inactive Employees + + fa fa-sign-out + + + + + + + + + + former-employees-view + 120 + UserType + + + Former Employees + + fa fa-times + + + + + + + + + + my-cases + + + My case + My cases + + fe fe-case-object + + + 1000 + CaseType + + + + + + + + manual-case-view + + + Manual case + All manual cases + Manual provisioning cases + + 1010 + CaseType + + + + + + + + operation-request-case-view + + + Request + All requests + Operation requests + + 1020 + CaseType + + + + + + + + approval-case-view + + + Approval + All approvals + Approval cases + + 1030 + CaseType + + + + + + + + reconciliation-tasks-view + 30 + TaskType + + + + + + + + recomputation-tasks-view + 30 + TaskType + + + + + + + + import-tasks-view + 30 + TaskType + + + + + + + + live-sync-tasks-view + 30 + TaskType + + + + + + + + async-update-tasks-view + 30 + TaskType + + + + + + + + cleanup-tasks-view + 30 + TaskType + + + + + + + + report-tasks-view + 30 + TaskType + + + + + + + + single-bulk-action-tasks-view + 30 + TaskType + + + + + + + + iterative-bulk-action-tasks-view + 30 + TaskType + + + + + + + + certification-tasks-view + 30 + TaskType + + + + + + + + approval-tasks-view + 30 + TaskType + + + + + + + + utility-tasks-view + 30 + TaskType + + + + + + + + system-tasks-view + 30 + TaskType + + + + + + + + empls-view + 10 + UserType + + + + + + + + ext-view + 20 + UserType + + + + + + + + + + c:TaskType + + + + + 150 + + cleanupAfterCompletion + + + threadStopAction + + + binding + + + dependent + + + + + + + 900 + + executionStatus + + + node + + + nodeAsObserved + + + resultStatus + + + result + + + nextRunStartTimestamp + + + nextRetryTimestamp + + + unpauseAction + + + taskIdentifier + + + parent + + + waitingReason + + + stateBeforeSuspend + + + category + + + handlerUri + + + otherHandlersUriStack + + + channel + + + subtaskRef + + + dependentTaskRef + + + lastRunStartTimestamp + + + lastRunFinishTimestamp + + + completionTimestamp + + + + + + + hidden + 910 + + progress + + + expectedTotal + + + stalledSince + + + + + + + DEV + ExAmPLE, Inc. IDM Project + #30ae30 + + + + safe + + "Safe" expression profile. It is supposed to contain only operations that are "safe", + i.e. operations that have very little risk to harm the system, circumvent midPoint security + and so on. Use of those operations should be reasonably safe in all expressions. + However, there are limitations. This profile may incomplete or it may even be not completely secure. + Proper security testing of this profile was not yet conducted. It is provided here "AS IS", + without any guarantees. Use at your own risk. + + deny + + asIs + allow + + + path + allow + + + value + allow + + + const + allow + + + script + deny + + + + + script-safe + deny + + com.evolveum.midpoint.xml.ns._public.common.common_3 + MidPoint common schema - generated bean classes + allow + + + com.evolveum.prism.xml.ns._public.types_3 + Prism schema - bean classes + allow + + + java.lang.Integer + allow + + + java.lang.Object + Basic Java operations. + deny + + equals + allow + + + hashCode + allow + + + + java.lang.String + String operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.lang.CharSequence + allow + + + java.lang.Enum + allow + + + java.util.List + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.ArrayList + List operations are generally safe. But Groovy is adding execute() method which is very dangerous. + allow + + execute + deny + + + + java.util.Map + allow + + + java.util.HashMap + allow + + + java.util.Date + allow + + + javax.xml.namespace.QName + allow + + + javax.xml.datatype.XMLGregorianCalendar + allow + + + java.lang.System + Just a few methods of System are safe enough. + deny + + currentTimeMillis + allow + + + + java.lang.IllegalStateException + Basic Java exception. Also used in test. + allow + + + java.lang.IllegalArgumentException + Basic Java exception. + allow + + + com.evolveum.midpoint.model.common.expression.functions.BasicExpressionFunctions + MidPoint basic functions library + allow + + + com.evolveum.midpoint.model.common.expression.functions.LogExpressionFunctions + MidPoint logging functions library + allow + + + com.evolveum.midpoint.report.impl.ReportFunctions + MidPoint report functions library + allow + + + org.apache.commons.lang.StringUtils + Apache Commons: Strings + allow + + + + + + + + idm@example.com + + + + + mail + + + + + Notify system administrator for accounts + + idm@example.com + + + + + mail + + + + + + + RoleType + Notify system administrator for role change + + idm@example.com + + + idm-bcc@example.com + + + + + mail + + + + + OrgType + Notify system administrator for organization change + + idm@example.com + + + + + mail + + + + + mail + + + + + + idm@example.com + + mail + delete + taskEvent + + + + + + + + New accounts in midPoint managed systems + add + success + + administrator@example.com + + + + + mail + + + + + idm@example.com + false + + /opt/training/midpoint-labs/example-mail-notifications.log + + + +
diff --git a/testing/schrodingertest/src/test/resources/labs/sources/source-11-1.csv b/testing/schrodingertest/src/test/resources/labs/sources/source-11-1.csv new file mode 100644 index 00000000000..f4bdaa5e94b --- /dev/null +++ b/testing/schrodingertest/src/test/resources/labs/sources/source-11-1.csv @@ -0,0 +1,18 @@ +"name","firstName","lastName","position","ouNumber","department","ouPath","employedFrom","employedTo","isManager","empStatus" +"001212","John","Smith","Human Resources Specialist","0300","Human Resources","0300","2000-05-01T08:00:00",,1,"A" +"000090","Mel","Austenberg","General Manager","0100","Executive Division","0100","2008-06-01T08:00:00",,1,"A" +"001049","Ellen","Feckerwood","Assistant","0100","Executive Division","0100","2001-02-01T09:01:00",,0,"I" +"000045","Andreas","Decker","Sales Manager","0110","Sales Department","0100:0110","2010-07-15T08:20:00",,0,"A" +"000021","Rudie","Mechal","Assistant","0100","Executive Division","0100","2010-07-15T08:20:00",,0,"A" +"000089","Ivan","Rockerteller","Application Developer","0211","Java Development","0200:0210:0211","2010-07-15T08:20:00",,0,"A" +"000005","Eve","Morthanic","Executive Manager","0100","Executive Division","0100","2010-07-15T08:20:00",,1,"A" +"000035","James","Bradley","Technology Division Manager","0200","Technology Division","0200","2010-07-15T08:20:00",,1,"A" +"000078","Kyle","Harrison","Analyst","0210","Software Department","0200:0210","2010-07-15T08:20:00",,0,"A" +"000002","Richard","Dwayne","General Manager",,"Executive Division","0100","2000-05-01T08:00:00","2012-09-30T17:35:00",0,"F" +"000389","Ann","De Wries","Sales Manager","0110","Sales Department","0100:0110","2010-07-15T08:20:00",,0,"A" +"000158","Alice","Black","IT Administrator","0212","IT Administration Department","0200:0212","2010-07-15T08:20:00",,0,"A" +"000390","John","Wicks","IT Manager","0212","IT Administration Department","0200:0212","2010-07-15T08:20:00",,1,"A" +"000328","Adele","Dewrieux","Application Developer","0211","Java Development","0200:0210:0211","2010-07-15T08:20:00",,0,"A" +"000999","Arnold Judas","Rimmer","Application Developer","0211","Java Development","0200:0210:0211","2010-07-15T08:20:00",,0,"A" +"000998","David","Lister","Application Developer","0211","Java Development","0200:0210:0211","2010-07-15T08:20:00",,0,"A" +"000997","Chuck","Norris","Application Developer","0211","Java Development","0200:0210:0211","2010-07-15T08:20:00",,0,"A" diff --git a/testing/schrodingertest/testng-integration.xml b/testing/schrodingertest/testng-integration.xml index 8d074766a6d..8d7bc59d1c9 100644 --- a/testing/schrodingertest/testng-integration.xml +++ b/testing/schrodingertest/testng-integration.xml @@ -117,7 +117,8 @@ - + + \ No newline at end of file diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/TabWithContainerWrapper.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/TabWithContainerWrapper.java new file mode 100644 index 00000000000..191eae1b51d --- /dev/null +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/TabWithContainerWrapper.java @@ -0,0 +1,28 @@ +/* + * 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.schrodinger.component; + +import com.codeborne.selenide.SelenideElement; + +import com.evolveum.midpoint.schrodinger.component.common.PrismForm; +import com.evolveum.midpoint.schrodinger.component.configuration.SystemTab; + +/** + * @author skublik + */ + +public class TabWithContainerWrapper extends Component

{ + + public TabWithContainerWrapper(P parent, SelenideElement parentElement) { + super(parent, parentElement); + } + + public PrismForm form() { + SelenideElement element = null; + return new PrismForm((T) this, element); + } +} diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/DeploymentInformationTab.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/DeploymentInformationTab.java new file mode 100644 index 00000000000..4074431c4d8 --- /dev/null +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/DeploymentInformationTab.java @@ -0,0 +1,22 @@ +/* + * 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.schrodinger.component.configuration; + +import com.codeborne.selenide.SelenideElement; + +import com.evolveum.midpoint.schrodinger.component.TabWithContainerWrapper; +import com.evolveum.midpoint.schrodinger.page.configuration.SystemPage; + +/** + * @author skublik + */ + +public class DeploymentInformationTab extends TabWithContainerWrapper { + public DeploymentInformationTab(SystemPage parent, SelenideElement parentElement) { + super(parent, parentElement); + } +} diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/SystemTab.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/SystemTab.java index f4a2b24ff77..c69e84eb1c2 100644 --- a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/SystemTab.java +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/configuration/SystemTab.java @@ -10,23 +10,19 @@ import com.evolveum.midpoint.schrodinger.component.AssignmentHolderBasicTab; import com.evolveum.midpoint.schrodinger.component.Component; +import com.evolveum.midpoint.schrodinger.component.TabWithContainerWrapper; import com.evolveum.midpoint.schrodinger.component.common.PrismForm; import com.evolveum.midpoint.schrodinger.page.configuration.SystemPage; /** * Created by Viliam Repan (lazyman). */ -public class SystemTab extends Component { +public class SystemTab extends TabWithContainerWrapper { public SystemTab(SystemPage parent, SelenideElement parentElement) { super(parent, parentElement); } - public PrismForm form() { - SelenideElement element = null; - return new PrismForm(this, element); - } - public void auditRecordsCleanupInterval(String interval) { // todo implement } diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/BasicPage.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/BasicPage.java index fc3aec85bbe..eb4eef3c5b5 100644 --- a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/BasicPage.java +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/BasicPage.java @@ -315,6 +315,11 @@ public AdminGuiTab adminGui() { return new SystemPage().adminGuiTab(); } + public DeploymentInformationTab deploymentInformation() { + clickConfigurationMenu("PageAdmin.menu.top.configuration.basic", "PageAdmin.menu.top.configuration.deploymentInformation"); + return new SystemPage().deploymentInformationTab(); + } + public InfrastructureTab infrastructure() { clickConfigurationMenu("PageAdmin.menu.top.configuration.basic", "PageAdmin.menu.top.configuration.infrastructure"); return new SystemPage().infrastructureTab(); diff --git a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/configuration/SystemPage.java b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/configuration/SystemPage.java index 020cb382444..9cf8a9048fb 100644 --- a/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/configuration/SystemPage.java +++ b/tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/configuration/SystemPage.java @@ -64,6 +64,11 @@ public AdminGuiTab adminGuiTab() { return new AdminGuiTab(this, element); } + public DeploymentInformationTab deploymentInformationTab() { + SelenideElement element = getTabPanel().clickTab("pageSystemConfiguration.deploymentInformation.title"); + return new DeploymentInformationTab(this, element); + } + public InfrastructureTab infrastructureTab() { SelenideElement element = getTabPanel().clickTab("pageSystemConfiguration.infrastructure.title"); return new InfrastructureTab(this, element);