Skip to content

Commit

Permalink
Merge pull request #4801 from dfe-analytical-services/EES-5090
Browse files Browse the repository at this point in the history
EES-5090 Fix failing UI test
  • Loading branch information
mmyoungman authored Apr 26, 2024
2 parents 6ad5200 + ce43538 commit 409ea38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ Verify help and support section is correct
Verify Dates data block accordion section
user opens accordion section Dates data block id:content
user scrolls to accordion section Dates data block id:content
user waits until page finishes loading
${section}= user gets accordion section content element Dates data block id:content

user checks chart title contains ${section} Updated dates table title
Expand Down
4 changes: 2 additions & 2 deletions tests/robot-tests/tests/libs/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ def is_webelement(variable: object) -> bool:
def _normalise_child_locator(child_locator: str) -> str:
if isinstance(child_locator, str):
# the below substitution is necessary in order to correctly find the parent's descendants. Without the
# preceding dot, the double forward sl()ash breaks out of the parent container and returns the xpath query
# preceding dot, the double forward slash breaks out of the parent container and returns the xpath query
# to the root of the DOM, leading to false positives or incorrectly found DOM elements. The below
# substitution covers both child selectors beginning with "xpath://" and "//", as the double forward
# sl()ashes without the "xpath:" prefix are inferred as being xpath expressions.
# slashes without the "xpath:" prefix are inferred as being xpath expressions.
return re.sub(r"^(xpath:)?//", "xpath:.//", child_locator)

raise_assertion_error(f"Child locator was not a str - {child_locator}")
Expand Down

0 comments on commit 409ea38

Please sign in to comment.