Skip to content

Commit

Permalink
update selenide test to new assign org to user search field
Browse files Browse the repository at this point in the history
  • Loading branch information
gpalos committed Oct 29, 2015
1 parent de4c414 commit 7b59e6f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
Expand Up @@ -248,10 +248,7 @@ public void assignObjectToUser(String linkText, String objectName){
//click Assign menu item with the specified linkText
$(By.linkText(linkText)).shouldBe(visible).click();
//search for object by objectName in the opened Select object(s) window
String searchBoxName = "tabPanel:panel:assignmentsContainer:assignmentsPanel:assignablePopup:content:searchForm:basicSearch:searchText";
if (OrganizationStructureTests.ASSIGN_ORG_UNIT_LINKTEXT.equals(linkText))
searchBoxName = "tabPanel:panel:assignmentsContainer:assignmentsPanel:assignableOrgPopup:content:tabs:panel:searchForm:basicSearch:searchText";
searchForElement(objectName, searchBoxName);
searchForElement(objectName, "basicSearch:searchText");
//select checkbox for the found object
$(byAttribute("about", "table")).find(By.tagName("tbody")).find(By.tagName("input")).shouldBe(visible).click();
//click Assign button
Expand Down
Expand Up @@ -94,14 +94,14 @@ public void test003createAccountTest() {
//open user's Edit page
openUsersEditPage(USER_NAME);

//click on the menu icon in the Accounts section
$(By.xpath("/html/body/div[1]/div/section[2]/form/div[4]/div/div/div[9]/div[2]/div[1]/div/div[2]/ul/li/a"))
//click on the menu icon in the Projection section
$(By.xpath("/html/body/div[1]/div/section[2]/form/div[4]/div/div/div[7]/div[2]/div[1]/div/div[2]/ul/li/a"))
.shouldBe(visible).click();
//click on the Add account menu item
//click on the Add projection menu item
$(By.linkText("Add projection")).shouldBe(visible).click();

//search for resource in resources list in the opened Select resource(s) window
searchForElement(OPENDJ_RESOURCE_NAME, "tabPanel:panel:resourcePopup:content:searchForm:basicSearch:searchText");
searchForElement(OPENDJ_RESOURCE_NAME, "basicSearch:searchText");
$(By.xpath("/html/body/div[5]/form/div/div[2]/div/div/div/div[2]/div/div/div/div/div/div[2]/div/table/tbody/tr/td[2]/div"))
.shouldHave(text(OPENDJ_RESOURCE_NAME));

Expand Down
5 changes: 4 additions & 1 deletion testing/selenidetest/testng-integration.xml
Expand Up @@ -17,7 +17,10 @@
-->
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="selenidetests" parallel="false">
<parameter name="site.url" value="http://localhost:8080/midpoint"/>
<listeners>
<listener class-name="com.evolveum.midpoint.tools.testng.AlphabeticalMethodInterceptor"/>
</listeners>
<parameter name="site.url" value="http://localhost/midpoint"/>
<suite-files>
<suite-file path="./basic-tests-suite.xml"/>
</suite-files>
Expand Down

0 comments on commit 7b59e6f

Please sign in to comment.