From ce435385a7650324d4abef0fac01c3489c600519 Mon Sep 17 00:00:00 2001 From: Mark Youngman Date: Thu, 25 Apr 2024 16:16:23 +0100 Subject: [PATCH] EES-5090 Fix failing UI test --- .../admin_and_public_2/bau/publish_release_and_amend.robot | 1 + tests/robot-tests/tests/libs/utilities.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/robot-tests/tests/admin_and_public_2/bau/publish_release_and_amend.robot b/tests/robot-tests/tests/admin_and_public_2/bau/publish_release_and_amend.robot index e64539aa132..ef2323aae2a 100644 --- a/tests/robot-tests/tests/admin_and_public_2/bau/publish_release_and_amend.robot +++ b/tests/robot-tests/tests/admin_and_public_2/bau/publish_release_and_amend.robot @@ -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 diff --git a/tests/robot-tests/tests/libs/utilities.py b/tests/robot-tests/tests/libs/utilities.py index 45b713c1fec..c3cb7e26c24 100644 --- a/tests/robot-tests/tests/libs/utilities.py +++ b/tests/robot-tests/tests/libs/utilities.py @@ -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}")