Skip to content

Commit

Permalink
fix: Failed tests due to changed XPaths - MEED-7163 - Meeds-io/MIPs#144
Browse files Browse the repository at this point in the history
… (#268)
  • Loading branch information
boubaker authored and rdenarie committed Aug 23, 2024
1 parent cc5b2b5 commit 533c0b1
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 24 deletions.
11 changes: 10 additions & 1 deletion src/main/java/io/meeds/qa/ui/pages/PeoplePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private ElementFacade sentRequestsButtonElement() {
private ElementFacade getUserProfileFullName(String user) {
return findByXPathOrCSS(String.format("//a[contains(text(),'%s') and contains(@class,'userFullname')]", user));
}

public boolean searchUser(String user) {
TextBoxElementFacade inputField = insertSearchTerm(user);

Expand Down Expand Up @@ -404,4 +404,13 @@ public TextBoxElementFacade insertSearchTerm(String term) {
return inputField;
}

public TextBoxElementFacade insertSearchTerm(String term) {
clickOnApplicationFilterButton();

TextBoxElementFacade inputField = searchPeopleInputElement();
inputField.checkVisible();
inputField.setTextValue(term + "x");
return inputField;
}

}
3 changes: 2 additions & 1 deletion src/main/java/io/meeds/qa/ui/pages/RulePage.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void saveAction(String title,
if (manual) {
applicationElement("Let them submit their contribution").click();
} else {
applicationElement("Boost Collaboration").click();
applicationElement("Boost collaboration").click();
}
}
clickOnStartButton();
Expand Down Expand Up @@ -331,6 +331,7 @@ private ElementFacade acceptedRadioBtnElement() {

private ElementFacade pendingRadioBtnElement() {
return findByXPathOrCSS("//*[contains(@class,'v-navigation-drawer--open')]//input[@value='PENDING']//ancestor::*[contains(@class,'v-radio')]");

}

}
38 changes: 19 additions & 19 deletions src/test/resources/features/Gamification/Achievement.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Feature: Achievements

And I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Send kudos 6'
And I select a 'Boost Collaboration' application
And I enter the rule title 'Send kudos'
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Send kudos' event
Expand All @@ -33,8 +33,8 @@ Feature: Achievements

And I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Receive kudos 6'
And I select a 'Boost Collaboration' application
And I enter the rule title 'Receive kudos'
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Receive kudos' event
Expand Down Expand Up @@ -98,8 +98,8 @@ Feature: Achievements

And I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Send kudos 86'
And I select a 'Boost Collaboration' application
And I enter the rule title 'Send kudos'
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Send kudos' event
Expand All @@ -115,8 +115,8 @@ Feature: Achievements

When I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Receive kudos 86'
And I select a 'Boost Collaboration' application
And I enter the rule title 'Receive kudos'
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Receive kudos' event
Expand Down Expand Up @@ -175,7 +175,7 @@ Feature: Achievements
And I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Join space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Join space' event
Expand Down Expand Up @@ -263,7 +263,7 @@ Feature: Achievements
And I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Join space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Join space' event
Expand Down Expand Up @@ -373,7 +373,7 @@ Feature: Achievements
When I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Post activity in a space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Add a Post' event
Expand Down Expand Up @@ -422,7 +422,7 @@ Feature: Achievements
When I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Comment activity in space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Comment a Post' event
Expand All @@ -439,7 +439,7 @@ Feature: Achievements
When I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Receive comment activity in space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Receive a Comment' event
Expand Down Expand Up @@ -493,7 +493,7 @@ Feature: Achievements
When I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Like activity in space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Like a Post' event
Expand All @@ -510,7 +510,7 @@ Feature: Achievements
When I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Receive activity like in space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Receive a Like' event
Expand Down Expand Up @@ -565,7 +565,7 @@ Feature: Achievements
When I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Like stream comment in space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Like a Comment' event
Expand All @@ -582,7 +582,7 @@ Feature: Achievements
When I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Receive Like on stream comment in space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Receive a Like on a Comment' event
Expand Down Expand Up @@ -638,8 +638,8 @@ Feature: Achievements

And I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Space Join'
And I select a 'Boost Collaboration' application
And I enter the rule title 'Cancel Space Join'
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Join space' event
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/features/Gamification/Rules.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Rules
And I click on 'Add action' button
And I wait for drawer to open
And I enter the rule title 'Receive kudos'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Receive kudos' event
Expand Down Expand Up @@ -65,7 +65,7 @@ Feature: Rules
And I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Join space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Join space' event
Expand Down Expand Up @@ -106,7 +106,7 @@ Feature: Rules
When I click on 'Add Action' button
And I wait for drawer to open
And I enter the rule title 'Join space'
And I select a 'Boost Collaboration' application
And I select a 'Boost collaboration' application
And I click on 'Start' button in drawer
And I add rule random description
And I select a 'Join space' event
Expand Down

0 comments on commit 533c0b1

Please sign in to comment.