-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
schrodinger: assignment archetype test
- Loading branch information
1 parent
cf7fec9
commit 320e993
Showing
6 changed files
with
142 additions
and
16 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...est/java/com/evolveum/midpoint/testing/schrodinger/scenarios/AssignmentArchetypeTest.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,34 @@ | ||
package com.evolveum.midpoint.testing.schrodinger.scenarios; | ||
|
||
import com.evolveum.midpoint.testing.schrodinger.TestBase; | ||
import org.testng.annotations.Test; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* Created by honchar | ||
*/ | ||
public class AssignmentArchetypeTest extends TestBase { | ||
|
||
private static final File ARCHETYPE_BUSINESS_ROLE_FILE = new File("src/test/resources/configuration/objects/archetypes/archetype-business-role.xml"); | ||
private static final String RELATIONS_CONTAINER_HEADER_KEY = "Relations"; | ||
private static final String RELATION_CONTAINER_HEADER_KEY = "Relation"; | ||
private static final String NEWLY_ADDED_RELATION_CONTAINER_HEADER_KEY = "RelationDefinitionType.details"; | ||
|
||
@Test(priority = 0) | ||
public void importArchetypeBusinessRole() { | ||
importObject(ARCHETYPE_BUSINESS_ROLE_FILE); | ||
} | ||
|
||
@Test | ||
public void configureRelationDefinitions(){ | ||
//TODO wait till MID-5144 fix | ||
// basicPage | ||
// .roleManagement() | ||
// .form() | ||
// .expandContainerPropertiesPanel(RELATIONS_CONTAINER_HEADER_KEY) | ||
// .addNewContainerValue(RELATION_CONTAINER_HEADER_KEY, NEWLY_ADDED_RELATION_CONTAINER_HEADER_KEY) | ||
// .expandContainerPropertiesPanel(NEWLY_ADDED_RELATION_CONTAINER_HEADER_KEY) | ||
|
||
} | ||
} |
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
51 changes: 51 additions & 0 deletions
51
...ingertest/src/test/resources/configuration/objects/archetypes/archetype-business-role.xml
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,51 @@ | ||
<!-- | ||
~ Copyright (c) 2019 Evolveum | ||
~ | ||
~ Licensed under the Apache License, Version 2.0 (the "License"); | ||
~ you may not use this file except in compliance with the License. | ||
~ You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, software | ||
~ distributed under the License is distributed on an "AS IS" BASIS, | ||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
~ See the License for the specific language governing permissions and | ||
~ limitations under the License. | ||
--> | ||
<archetype oid="018e7340-199a-11e9-ad93-2b136d1c7ecf" | ||
xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3" | ||
xmlns:t="http://prism.evolveum.com/xml/ns/public/types-3" | ||
xmlns:org='http://midpoint.evolveum.com/xml/ns/public/common/org-3'> | ||
<name>Business Role</name> | ||
<archetypePolicy> | ||
<display> | ||
<label>Business Role</label> | ||
<pluralLabel>Business Roles</pluralLabel> | ||
<icon> | ||
<cssClass>fe fe-business</cssClass> | ||
<color>green</color> | ||
</icon> | ||
</display> | ||
</archetypePolicy> | ||
<assignment> | ||
<assignmentRelation> | ||
<description>This archetype is applicable to roles.</description> | ||
<holderType>RoleType</holderType> | ||
</assignmentRelation> | ||
</assignment> | ||
<inducement> | ||
<assignmentRelation> | ||
<description>Any user can have business role (can be a member).</description> | ||
<holderType>UserType</holderType> | ||
<relation>org:approver</relation> | ||
</assignmentRelation> | ||
<assignmentRelation> | ||
<description>Only employees may be owners/approvers for business role.</description> | ||
<holderType>UserType</holderType> | ||
<holderArchetypeRef oid="7135e68c-ee53-11e8-8025-170b77da3fd6"/> <!-- Employee archetype --> | ||
<relation>org:owner</relation> | ||
</assignmentRelation> | ||
</inducement> | ||
</archetype> |
20 changes: 20 additions & 0 deletions
20
...ain/java/com/evolveum/midpoint/schrodinger/component/configuration/RoleManagementTab.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,20 @@ | ||
package com.evolveum.midpoint.schrodinger.component.configuration; | ||
|
||
import com.codeborne.selenide.SelenideElement; | ||
import com.evolveum.midpoint.schrodinger.component.Component; | ||
import com.evolveum.midpoint.schrodinger.component.common.PrismForm; | ||
import com.evolveum.midpoint.schrodinger.page.configuration.SystemPage; | ||
|
||
/** | ||
* Created by honchar | ||
*/ | ||
public class RoleManagementTab extends Component<SystemPage> { | ||
|
||
public RoleManagementTab(SystemPage parent, SelenideElement parentElement) { | ||
super(parent, parentElement); | ||
} | ||
|
||
public PrismForm<RoleManagementTab> form(){ | ||
return new PrismForm<>(this, null); | ||
} | ||
} |
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