Skip to content

Commit

Permalink
Improved testing displayed paths in the hierarchy view
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Apr 22, 2024
1 parent 997ef98 commit f670f10
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public void regularGroupThatWrapsARepeatableGroupShouldBeTreatedAsARegularOne()
.clickGoToArrow()
.clickGoUpIcon()
.clickGoUpIcon()
.assertText("Outer")
.assertPath("Outer")
.assertNotRemovableGroup();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class FormStylingTest {
.startBlankForm(FORM_NAME)
.clickGoToArrow()
.clickOnGroup("selectOneQuestions")
.assertText("selectOneQuestions")
.assertPath("selectOneQuestions")
.clickOnQuestion("Select one widget")
.assertText("selectOneQuestions")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void dynamicGroupLabel_should_beCalculatedProperly() {
.swipeToNextQuestion("Photo")
.assertText("gr1 > 1 > Person: 25")
.clickGoToArrow()
.assertText("gr1 > 1 > Person: 25")
.assertPath("gr1 > 1 > Person: 25")
.clickOnQuestion("Photo")
.swipeToNextQuestionWithRepeatGroup("gr1")
.clickOnDoNotAdd(new FormEntryPage("Repeat titles 1648"))
Expand All @@ -71,7 +71,7 @@ public void dynamicGroupLabel_should_beCalculatedProperly() {
.swipeToNextQuestion("Date")
.assertText("Part1 > 1 > Xxx: SecondPart")
.clickGoToArrow()
.assertText("Part1 > 1 > Xxx: SecondPart")
.assertPath("Part1 > 1 > Xxx: SecondPart")
.clickOnQuestion("Date")
.swipeToNextQuestion("Multi Select")
.swipeToNextQuestionWithRepeatGroup("Part1")
Expand Down Expand Up @@ -254,7 +254,7 @@ public void when_navigateOnHierarchyView_should_breadcrumbPathBeVisible() {
.swipeToNextQuestion("Age")
.inputText("3")
.clickGoToArrow()
.assertText("People > 3 > Person: C")
.assertPath("People > 3 > Person: C")
.clickGoUpIcon()
.assertText("3.\u200E Person: C")
.clickJumpEndButton()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ public FormHierarchyPage assertHierarchyItem(int position, String primaryText, S
return this;
}

public FormHierarchyPage assertPath(String text) {
onView(withId(R.id.pathtext)).check(matches(withText(text)));
return this;
}

public FormEntryPage clickOnQuestion(String questionLabel) {
return clickOnQuestion(questionLabel, false);
}
Expand Down

0 comments on commit f670f10

Please sign in to comment.