Skip to content

Commit

Permalink
schrodinger: extended the test with the same element ids on the page
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Oct 21, 2020
1 parent 10c89a0 commit 503422e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Expand Up @@ -36,14 +36,15 @@ public class OrgMembersTests extends AbstractSchrodingerTest {
private static final String CONFIGURATION_ORGS_DIRECTORY = CONFIGURATION_OBJECTS_DIRECTORY + "orgs/";

private static final File USER_ORG_MEMBER_FILE = new File(CONFIGURATION_USERS_DIRECTORY + "user-org-member.xml");
private static final File USER_NOT_ORG_MEMBER_FILE = new File(CONFIGURATION_USERS_DIRECTORY + "user-not-org-member.xml");
private static final File ORG_WITH_MEMBER_FILE = new File(CONFIGURATION_ORGS_DIRECTORY + "org-with-member.xml");
private static final String ORG_NAME = "TestOrgWithMembers";
private static final String ORG_WITH_MEMBER_NAME = "Assign member test";
private static final String USER_NAME = "OrgMembersWithDefaultRelation";

@Override
protected List<File> getObjectListToImport(){
return Arrays.asList(USER_ORG_MEMBER_FILE, ORG_WITH_MEMBER_FILE);
return Arrays.asList(USER_ORG_MEMBER_FILE, USER_NOT_ORG_MEMBER_FILE, ORG_WITH_MEMBER_FILE);
}

@Test
Expand Down Expand Up @@ -102,6 +103,13 @@ public void assignExistingUserAsMember(){
.getMemberPanel()
.table()
.containsLinksTextPartially("UniqueNameUserForMemberTest"));

//test that schrodinger looks correctly for the element inside parent element, not on the whole page
// (both page and popup window contains tables with Name column, we need to look through Name column in the popup)
Assert.assertNotNull(basicPage.orgStructure()
.selectTabWithRootOrg(ORG_WITH_MEMBER_NAME)
.getMemberPanel()
.assignMember()
.table()
.rowByColumnLabel("Name", "NotMemberUser"));
}
}
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2020 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<user xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3">
<name>NotMemberUser</name>
<givenName>GivenNameForNotMemberUser</givenName>
</user>

0 comments on commit 503422e

Please sign in to comment.