Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADD UserAccountTests suite and respective classes and methods, REFACT…
…OR just basic naming and some minor changes
- Loading branch information
1 parent
58030c6
commit 6390c15
Showing
12 changed files
with
446 additions
and
10 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
...dinger/src/main/java/com/evolveum/midpoint/schrodinger/component/FocusProjectionsTab.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
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
44 changes: 44 additions & 0 deletions
44
...hrodinger/src/main/java/com/evolveum/midpoint/schrodinger/component/self/QuickSearch.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,44 @@ | ||
package com.evolveum.midpoint.schrodinger.component.self; | ||
|
||
import com.codeborne.selenide.Condition; | ||
import com.codeborne.selenide.SelenideElement; | ||
import com.evolveum.midpoint.schrodinger.MidPoint; | ||
import com.evolveum.midpoint.schrodinger.component.Component; | ||
import com.evolveum.midpoint.schrodinger.component.common.DropDown; | ||
import com.evolveum.midpoint.schrodinger.component.common.table.Table; | ||
import com.evolveum.midpoint.schrodinger.util.Schrodinger; | ||
import org.openqa.selenium.By; | ||
|
||
import static com.codeborne.selenide.Selenide.$; | ||
|
||
/** | ||
* Created by matus on 5/10/2018. | ||
*/ | ||
public class QuickSearch<T> extends Component<T> { | ||
public QuickSearch(T parent, SelenideElement parentElement) { | ||
super(parent, parentElement); | ||
} | ||
|
||
public QuickSearch<T> inputValue(String name){ | ||
$(Schrodinger.byElementAttributeValue("input","name","searchInput")).setValue(name); | ||
|
||
return this; | ||
} | ||
|
||
//TODO rethink | ||
public Table clickSearch(){ | ||
$(Schrodinger.byElementAttributeValue("button","data-s-id","searchButton")) | ||
.click(); | ||
|
||
return new Table("null",null); | ||
} | ||
|
||
public QuickSearchDropDown<QuickSearch<T>> clickSearchFor(){ | ||
$(Schrodinger.bySelfOrDescendantElementAttributeValue("button","data-toggle","dropdown","class","sr-only")) | ||
.waitUntil(Condition.appears,MidPoint.TIMEOUT_DEFAULT).click(); | ||
SelenideElement dropDown = $(Schrodinger.byElementAttributeValue("ul","role","menu")) | ||
.waitUntil(Condition.visible,MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new QuickSearchDropDown<>(this,dropDown); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...r/src/main/java/com/evolveum/midpoint/schrodinger/component/self/QuickSearchDropDown.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,37 @@ | ||
package com.evolveum.midpoint.schrodinger.component.self; | ||
|
||
import com.codeborne.selenide.SelenideElement; | ||
import com.evolveum.midpoint.schrodinger.component.common.DropDown; | ||
import com.evolveum.midpoint.schrodinger.util.Schrodinger; | ||
|
||
import static com.codeborne.selenide.Selenide.$; | ||
|
||
/** | ||
* Created by matus on 5/10/2018. | ||
*/ | ||
public class QuickSearchDropDown<T> extends DropDown<T> { | ||
public QuickSearchDropDown(T parent, SelenideElement parentElement) { | ||
super(parent, parentElement); | ||
} | ||
|
||
public T clickUsers(){ | ||
$(Schrodinger.byElementAttributeValue("a","value","Users")) | ||
.click(); | ||
|
||
return this.getParent(); | ||
} | ||
|
||
public T clickResources(){ | ||
$(Schrodinger.byElementAttributeValue("a","value","Resources")) | ||
.click(); | ||
|
||
return this.getParent(); | ||
} | ||
|
||
public T clickTasks(){ | ||
$(Schrodinger.byElementAttributeValue("a","value","Tasks")). | ||
click(); | ||
|
||
return this.getParent(); | ||
} | ||
} |
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
90 changes: 90 additions & 0 deletions
90
...er/src/main/java/com/evolveum/midpoint/schrodinger/component/user/UsersTableDropDown.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,90 @@ | ||
package com.evolveum.midpoint.schrodinger.component.user; | ||
|
||
import com.codeborne.selenide.Condition; | ||
import com.codeborne.selenide.SelenideElement; | ||
import com.evolveum.midpoint.schrodinger.MidPoint; | ||
import com.evolveum.midpoint.schrodinger.component.common.ConfirmationModal; | ||
import com.evolveum.midpoint.schrodinger.component.common.DropDown; | ||
import com.evolveum.midpoint.schrodinger.component.common.table.Table; | ||
import com.evolveum.midpoint.schrodinger.util.Schrodinger; | ||
|
||
import static com.codeborne.selenide.Selenide.$; | ||
|
||
/** | ||
* Created by matus on 5/10/2018. | ||
*/ | ||
public class UsersTableDropDown<T> extends DropDown<T> { | ||
public UsersTableDropDown(T parent, SelenideElement parentElement) { | ||
super(parent, parentElement); | ||
} | ||
|
||
public ConfirmationModal<UsersTableDropDown<T>> clickEnable() { | ||
|
||
$(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" + | ||
" Enable")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT).click(); | ||
|
||
SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new ConfirmationModal<>(this, actualModal); | ||
} | ||
|
||
public ConfirmationModal<UsersTableDropDown<T>> clickDisable() { | ||
|
||
$(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" + | ||
" Disable")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT).click(); | ||
|
||
SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new ConfirmationModal<>(this, actualModal); | ||
} | ||
|
||
public ConfirmationModal<UsersTableDropDown<T>> clickReconcile() { | ||
|
||
$(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" + | ||
" Reconcile")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT).click(); | ||
|
||
SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new ConfirmationModal<>(this, actualModal); | ||
} | ||
|
||
|
||
public ConfirmationModal<UsersTableDropDown<T>> clickUnlock() { | ||
|
||
$(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" + | ||
" Unlock")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT).click(); | ||
|
||
SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new ConfirmationModal<>(this, actualModal); | ||
} | ||
|
||
|
||
public ConfirmationModal<UsersTableDropDown<T>> clickDelete() { | ||
|
||
$(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" + | ||
" Delete")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT).click(); | ||
|
||
SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new ConfirmationModal<>(this, actualModal); | ||
} | ||
|
||
public ConfirmationModal<UsersTableDropDown<T>> clickMerge() { | ||
|
||
$(Schrodinger.byElementValue("a", "data-s-id", "menuItemLink", "\n" + | ||
" Merge")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT).click(); | ||
|
||
SelenideElement actualModal = $(Schrodinger.byElementAttributeValue("div", "aria-labelledby", "Confirm action")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new ConfirmationModal<>(this, actualModal); | ||
} | ||
|
||
|
||
} |
17 changes: 17 additions & 0 deletions
17
tools/schrodinger/src/main/java/com/evolveum/midpoint/schrodinger/page/self/HomePage.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 |
---|---|---|
@@ -1,9 +1,26 @@ | ||
package com.evolveum.midpoint.schrodinger.page.self; | ||
|
||
import com.codeborne.selenide.Condition; | ||
import com.codeborne.selenide.SelenideElement; | ||
import com.evolveum.midpoint.schrodinger.MidPoint; | ||
import com.evolveum.midpoint.schrodinger.component.common.Popover; | ||
import com.evolveum.midpoint.schrodinger.component.common.Search; | ||
import com.evolveum.midpoint.schrodinger.component.self.QuickSearch; | ||
import com.evolveum.midpoint.schrodinger.page.BasicPage; | ||
import com.evolveum.midpoint.schrodinger.util.Schrodinger; | ||
import org.openqa.selenium.By; | ||
|
||
import static com.codeborne.selenide.Selenide.$; | ||
|
||
/** | ||
* Created by Viliam Repan (lazyman). | ||
*/ | ||
public class HomePage extends BasicPage { | ||
|
||
public QuickSearch<HomePage> search() { | ||
SelenideElement searchElement = $(By.cssSelector("div.quicksearch-panel")) | ||
.waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT); | ||
|
||
return new QuickSearch<HomePage>(this, searchElement); | ||
} | ||
} |
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.