Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Sep 24, 2020
2 parents a1cc730 + b8ca2ee commit ff4910a
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
Expand Up @@ -46,6 +46,9 @@ public void mod09test01ImportStaticOrgStructure() {
OrgTreePage orgTree = basicPage.orgStructure();
Assert.assertTrue(orgTree.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.showTreeNodeDropDownMenu("ExAmPLE, Inc. - Functional Structure")
.expandAll()
.expandOrg("Software Department")
.containsChildOrg("ExAmPLE, Inc. - Functional Structure", "Executive Division", "Sales Department",
"Human Resources", "Technology Division", "IT Administration Department", "Software Department", "Java Development"));
Assert.assertTrue(orgTree.selectTabWithRootOrg("Groups")
Expand All @@ -65,7 +68,8 @@ public void mod09test02CreateStaticOrgStructure() {
basicPage.orgStructure()
.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.expandOrg("Secret Operations")
.showTreeNodeDropDownMenu("Secret Operations")
.expandAll()
.selectOrgInTree("Transportation and Logistics Department")
.and()
.getMemberPanel()
Expand All @@ -84,8 +88,8 @@ public void mod09test02CreateStaticOrgStructure() {
Assert.assertTrue(basicPage.orgStructure()
.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.expandOrg("Secret Operations")
.expandOrg("Transportation and Logistics Department")
.showTreeNodeDropDownMenu("Secret Operations")
.expandAll()
.showTreeNodeDropDownMenu("Warp Speed Research")
.edit()
.selectTabBasic()
Expand All @@ -111,8 +115,8 @@ public void mod09test02CreateStaticOrgStructure() {
Assert.assertTrue(basicPage.orgStructure()
.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.expandOrg("Secret Operations")
.expandOrg("Transportation and Logistics Department")
.showTreeNodeDropDownMenu("Secret Operations")
.expandAll()
.selectOrgInTree("Warp Speed Research")
.and()
.getMemberPanel()
Expand All @@ -136,8 +140,8 @@ public void mod09test03OrganizationActingAsARole() {
Assert.assertFalse(basicPage.orgStructure()
.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.expandOrg("Secret Operations")
.expandOrg("Transportation and Logistics Department")
.showTreeNodeDropDownMenu("Secret Operations")
.expandAll()
.selectOrgInTree("Warp Speed Research")
.and()
.getMemberPanel()
Expand Down Expand Up @@ -194,8 +198,8 @@ public void mod09test03OrganizationActingAsARole() {
Assert.assertTrue(basicPage.orgStructure()
.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.expandOrg("Secret Operations")
.expandOrg("Transportation and Logistics Department")
.showTreeNodeDropDownMenu("Secret Operations")
.expandAll()
.selectOrgInTree("Warp Speed Research")
.and()
.getMemberPanel()
Expand All @@ -212,8 +216,8 @@ public void mod09test03OrganizationActingAsARole() {
basicPage.orgStructure()
.selectTabWithRootOrg("ExAmPLE, Inc. - Functional Structure")
.getOrgHierarchyPanel()
.expandOrg("Secret Operations")
.expandOrg("Transportation and Logistics Department")
.showTreeNodeDropDownMenu("Secret Operations")
.expandAll()
.showTreeNodeDropDownMenu("Warp Speed Research")
.edit()
.selectTabInducements()
Expand Down
Expand Up @@ -54,6 +54,7 @@ public AssignmentHolderDetailsPage newMember(String title) {
}
$(Schrodinger.byElementAttributeValue("div", "title", title))
.waitUntil(Condition.visible, MidPoint.TIMEOUT_DEFAULT_2_S).click();
Selenide.sleep(MidPoint.TIMEOUT_DEFAULT_2_S);
return new AssignmentHolderDetailsPage(){};
}

Expand Down
Expand Up @@ -79,12 +79,13 @@ private SelenideElement getParentOrgNode (String parentOrg) {
}

public OrgHierarchyPanel<T> expandOrg(String orgName) {
SelenideElement parentNode = getParentOrgNode(orgName);
SelenideElement node = parentNode.$x(".//div[@"+Schrodinger.DATA_S_ID+"='node']");
selectOrgInTree(orgName);
selectOrgInTree(orgName);
SelenideElement node = getParentElement().$(By.cssSelector(".tree-node.success"));
SelenideElement expandButton = node.$x(".//a[@" + Schrodinger.DATA_S_ID + "='junction']");
if (expandButton.has(Condition.cssClass("tree-junction-collapsed"))) {
expandButton.waitUntil(Condition.appear, MidPoint.TIMEOUT_DEFAULT_2_S).click();
expandButton.waitWhile(Condition.cssClass("tree-junction-collapsed"), MidPoint.TIMEOUT_DEFAULT_2_S);
expandButton.waitUntil(Condition.appear, MidPoint.TIMEOUT_MEDIUM_6_S).click();
expandButton.waitWhile(Condition.cssClass("tree-junction-collapsed"), MidPoint.TIMEOUT_MEDIUM_6_S);
}
return this;
}
Expand Down
Expand Up @@ -32,11 +32,11 @@ public OrgPage edit(){
return new OrgPage();
}

public T expandAll(){
public OrgHierarchyPanel<OrgRootTab> expandAll(){
getParentElement().$x(".//schrodinger[@"+ Schrodinger.DATA_S_RESOURCE_KEY +"='TreeTablePanel.expandAll']").parent()
.waitUntil(Condition.appear, MidPoint.TIMEOUT_DEFAULT_2_S).click();
Selenide.sleep(MidPoint.TIMEOUT_SHORT_4_S);
return getParent();
return (OrgHierarchyPanel<OrgRootTab>) getParent();
}

public T collapseAll(){
Expand Down

0 comments on commit ff4910a

Please sign in to comment.