Skip to content
Snippets Groups Projects
Commit 70b1754a authored by srosse's avatar srosse
Browse files

OO-2635: fix selenium tests

parent c2e42276
No related branches found
No related tags found
No related merge requests found
...@@ -10,21 +10,21 @@ ...@@ -10,21 +10,21 @@
#end #end
</div> </div>
<div class="o_cmembers o_owners"> <div class="o_cmembers">
#if($showOwners && $hasOwners) #if($showOwners && $hasOwners)
<div class="clearfix"> <div class="clearfix o_owners o_sel_owners">
<h4>$r.translate("members.owners")</h4> <h4>$r.translate("members.owners")</h4>
$r.render("owners") $r.render("owners")
</div> </div>
#end #end
#if($showCoaches && $hasCoaches) #if($showCoaches && $hasCoaches)
<div class="clearfix o_block o_coaches"> <div class="clearfix o_block o_coaches o_sel_coaches">
<h4>$r.translate("members.coaches")</h4> <h4>$r.translate("members.coaches")</h4>
$r.render("coaches") $r.render("coaches")
</div> </div>
#end #end
#if($showParticipants) #if($showParticipants)
<div class="clearfix o_block o_participants"> <div class="clearfix o_block o_participants o_sel_participants">
<h4>$r.translate("members.participants")</h4> <h4>$r.translate("members.participants")</h4>
#if($hasParticipants) #if($hasParticipants)
$r.render("participants") $r.render("participants")
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</div> </div>
#end #end
#if($showWaiting && $hasWaiting) #if($showWaiting && $hasWaiting)
<div class="clearfix o_block o_participants"> <div class="clearfix o_block o_participants o_sel_waiting_list">
<h4>$r.translate("members.waiting")</h4> <h4>$r.translate("members.waiting")</h4>
$r.render("waiting") $r.render("waiting")
</div> </div>
......
...@@ -326,22 +326,22 @@ public class GroupPage { ...@@ -326,22 +326,22 @@ public class GroupPage {
} }
public GroupPage assertParticipantList() { public GroupPage assertParticipantList() {
By participantListBy = By.id("o_sel_group_participants"); By participantListBy = By.className("o_sel_participants");
List<WebElement> participantListEl = browser.findElements(participantListBy); List<WebElement> participantListEl = browser.findElements(participantListBy);
Assert.assertFalse(participantListEl.isEmpty()); Assert.assertFalse(participantListEl.isEmpty());
return this; return this;
} }
public GroupPage assertMembersInOwnerList(UserVO owner) { public GroupPage assertMembersInOwnerList(UserVO owner) {
return assertMembers(owner, "o_sel_group_coaches"); return assertMembers(owner, "o_sel_coaches");
} }
public GroupPage assertMembersInParticipantList(UserVO owner) { public GroupPage assertMembersInParticipantList(UserVO owner) {
return assertMembers(owner, "o_sel_group_participants"); return assertMembers(owner, "o_sel_participants");
} }
public GroupPage assertMembersInWaitingList(UserVO owner) { public GroupPage assertMembersInWaitingList(UserVO owner) {
return assertMembers(owner, "o_sel_group_waiting_list"); return assertMembers(owner, "o_sel_waiting_list");
} }
private GroupPage assertMembers(UserVO member, String cssClass) { private GroupPage assertMembers(UserVO member, String cssClass) {
...@@ -351,20 +351,20 @@ public class GroupPage { ...@@ -351,20 +351,20 @@ public class GroupPage {
} }
public boolean isInMembersOwnerList(UserVO owner) { public boolean isInMembersOwnerList(UserVO owner) {
return isMembers(owner, "o_sel_group_coaches"); return isMembers(owner, "o_sel_coaches");
} }
public boolean isInMembersParticipantList(UserVO owner) { public boolean isInMembersParticipantList(UserVO owner) {
return isMembers(owner, "o_sel_group_participants"); return isMembers(owner, "o_sel_participants");
} }
public boolean isInMembersInWaitingList(UserVO owner) { public boolean isInMembersInWaitingList(UserVO owner) {
return isMembers(owner, "o_sel_group_waiting_list"); return isMembers(owner, "o_sel_waiting_list");
} }
private boolean isMembers(UserVO member, String cssClass) { private boolean isMembers(UserVO member, String cssClass) {
String firstName = member.getFirstName(); String firstName = member.getFirstName();
By longBy = By.xpath("//div[@id='" + cssClass + "']//table//tr//td//a[contains(text(),'" + firstName + "')]"); By longBy = By.xpath("//div[contains(@class,'" + cssClass + "')]//div[contains(@class,'o_cmember_info_wrapper')]/a/span[contains(text(),'" + firstName + "')]");
List<WebElement> elements = browser.findElements(longBy); List<WebElement> elements = browser.findElements(longBy);
return elements.size() > 0; return elements.size() > 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment