From 1f92932cc5fff98858e3b796892be1812d2d524d Mon Sep 17 00:00:00 2001 From: Nusrath Moh Date: Wed, 1 Nov 2023 14:19:36 +0000 Subject: [PATCH 1/3] EES-4643 fixing Prod UI test failures in 'general_public' suite --- .../tests/general_public/glossary_page.robot | 18 +++++++++--------- .../general_public/notifications_absence.robot | 3 ++- .../general_public/permalink_prod_1.robot | 8 ++++---- .../general_public/permalink_prod_2.robot | 7 +++---- .../general_public/permalink_prod_3.robot | 8 ++++---- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/robot-tests/tests/general_public/glossary_page.robot b/tests/robot-tests/tests/general_public/glossary_page.robot index 5cb2655d8c1..a42b01a4654 100644 --- a/tests/robot-tests/tests/general_public/glossary_page.robot +++ b/tests/robot-tests/tests/general_public/glossary_page.robot @@ -25,19 +25,19 @@ Validate glossary accordion sections user checks accordion is in position D 4 user checks accordion is in position Z 26 -Search for Pupil referral unit - user verifies accordion is closed P +Search for Voluntary repayment + user verifies accordion is closed V - user enters text into element id:pageSearchForm-input Pupil referral unit + user enters text into element id:pageSearchForm-input Voluntary repayment user waits until element contains id:pageSearchForm-resultsLabel Found 1 result user clicks element id:pageSearchForm-option-0 - user verifies accordion is open P + user verifies accordion is open V - ${section}= user gets accordion section content element P + ${section}= user gets accordion section content element V - user waits until parent contains element ${section} id:pupil-referral-unit - user checks element is visible id:pupil-referral-unit - user checks element should contain id:pupil-referral-unit Pupil referral unit (PRUs) + user waits until parent contains element ${section} id:voluntary-repayment + user checks element is visible id:voluntary-repayment + user checks element should contain id:voluntary-repayment Voluntary repayment user checks element should contain ${section} - ... An alternative education provision specifically organised to provide education for children who are not able to attend school and may not otherwise receive a suitable education. + ... A borrower can at any time choose to repay some or all of their loan balance early, in addition to any repayments they are liable to make based on their income. diff --git a/tests/robot-tests/tests/general_public/notifications_absence.robot b/tests/robot-tests/tests/general_public/notifications_absence.robot index 6ed2721fb12..b41341c9d2d 100644 --- a/tests/robot-tests/tests/general_public/notifications_absence.robot +++ b/tests/robot-tests/tests/general_public/notifications_absence.robot @@ -35,5 +35,6 @@ Sign up for email alerts user clicks button Subscribe # EES-1265 - user waits until h1 is visible Subscribed %{WAIT_LONG} + #user waits until h1 is visible Subscribed %{WAIT_LONG} + user waits until page contains Subscribed %{WAIT_SMALL} user checks page contains Thank you. Check your email to confirm your subscription. diff --git a/tests/robot-tests/tests/general_public/permalink_prod_1.robot b/tests/robot-tests/tests/general_public/permalink_prod_1.robot index 0fe8c2c4fb6..a7c0225435c 100644 --- a/tests/robot-tests/tests/general_public/permalink_prod_1.robot +++ b/tests/robot-tests/tests/general_public/permalink_prod_1.robot @@ -43,10 +43,10 @@ Validate table user checks table cell contains 1 3 148,820 Validate footnotes - user checks page contains element - ... xpath://h3[text()="Footnotes"]/../ol/li[text()="State-funded secondary schools include city technology colleges and all secondary academies, including all-through academies and free schools."] - user checks page contains element - ... xpath://h3[text()="Footnotes"]/../ol/li[text()="x - 1 or 2 pupils, or a percentage based on 1 or 2."] + user checks page contains element //h3[@class="govuk-heading-m"] + user checks page contains + ... State-funded secondary schools include city technology colleges and all secondary academies, including all-through academies and free schools. + user checks page contains x - 1 or 2 pupils, or a percentage based on 1 or 2. Validate download files user checks page contains Table in ODS format (spreadsheet, with title and footnotes) diff --git a/tests/robot-tests/tests/general_public/permalink_prod_2.robot b/tests/robot-tests/tests/general_public/permalink_prod_2.robot index 96142298c73..ed726cb58fd 100644 --- a/tests/robot-tests/tests/general_public/permalink_prod_2.robot +++ b/tests/robot-tests/tests/general_public/permalink_prod_2.robot @@ -55,10 +55,9 @@ Validate table user checks row cell contains text ${row} 3 7,916,225 Validate footnotes - user checks page contains element - ... xpath://h3[text()="Footnotes"]/../ol/li[text()="Includes pupils who are sole or dual main registrations. Includes boarding pupils."] - user checks page contains element - ... xpath://h3[text()="Footnotes"]/../ol/li[text()="x - 1 or 2 pupils, or a percentage based on 1 or 2."] + user checks page contains element //h3[@class="govuk-heading-m"] + user checks page contains Includes pupils who are sole or dual main registrations. Includes boarding pupils. + user checks page contains x - 1 or 2 pupils, or a percentage based on 1 or 2. Validate download files user checks page contains Table in ODS format (spreadsheet, with title and footnotes) diff --git a/tests/robot-tests/tests/general_public/permalink_prod_3.robot b/tests/robot-tests/tests/general_public/permalink_prod_3.robot index d9fbfcd9c55..64d0e6e03dc 100644 --- a/tests/robot-tests/tests/general_public/permalink_prod_3.robot +++ b/tests/robot-tests/tests/general_public/permalink_prod_3.robot @@ -61,10 +61,10 @@ Validate table user checks row cell contains text ${row} 3 798 Validate footnotes - user checks page contains element - ... xpath://h3[text()="Footnotes"]/../ol/li[text()="The number of fixed period exclusions expressed as a percentage of the number of pupils in January each year."] - user checks page contains element - ... xpath://h3[text()="Footnotes"]/../ol/li[text()="x - 1 or 2 pupils, or a percentage based on 1 or 2."] + user checks page contains element //h3[@class="govuk-heading-m"] + user checks page contains + ... The number of fixed period exclusions expressed as a percentage of the number of pupils in January each year. + user checks page contains x - 1 or 2 pupils, or a percentage based on 1 or 2. Validate download files user checks page contains Table in ODS format (spreadsheet, with title and footnotes) From df76841cead0563415eac3ff370786ba7b0f062c Mon Sep 17 00:00:00 2001 From: Nusrath Moh Date: Thu, 2 Nov 2023 11:58:12 +0000 Subject: [PATCH 2/3] EES-4643:Resoponding to PR comments --- tests/robot-tests/tests/general_public/glossary_page.robot | 2 -- tests/robot-tests/tests/general_public/permalink_prod_1.robot | 2 +- tests/robot-tests/tests/general_public/permalink_prod_2.robot | 2 +- tests/robot-tests/tests/general_public/permalink_prod_3.robot | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/robot-tests/tests/general_public/glossary_page.robot b/tests/robot-tests/tests/general_public/glossary_page.robot index a42b01a4654..ae3bf5dc4c7 100644 --- a/tests/robot-tests/tests/general_public/glossary_page.robot +++ b/tests/robot-tests/tests/general_public/glossary_page.robot @@ -27,11 +27,9 @@ Validate glossary accordion sections Search for Voluntary repayment user verifies accordion is closed V - user enters text into element id:pageSearchForm-input Voluntary repayment user waits until element contains id:pageSearchForm-resultsLabel Found 1 result user clicks element id:pageSearchForm-option-0 - user verifies accordion is open V ${section}= user gets accordion section content element V diff --git a/tests/robot-tests/tests/general_public/permalink_prod_1.robot b/tests/robot-tests/tests/general_public/permalink_prod_1.robot index a7c0225435c..3e35faa1eba 100644 --- a/tests/robot-tests/tests/general_public/permalink_prod_1.robot +++ b/tests/robot-tests/tests/general_public/permalink_prod_1.robot @@ -43,7 +43,7 @@ Validate table user checks table cell contains 1 3 148,820 Validate footnotes - user checks page contains element //h3[@class="govuk-heading-m"] + user checks page contains element testid:footnotes user checks page contains ... State-funded secondary schools include city technology colleges and all secondary academies, including all-through academies and free schools. user checks page contains x - 1 or 2 pupils, or a percentage based on 1 or 2. diff --git a/tests/robot-tests/tests/general_public/permalink_prod_2.robot b/tests/robot-tests/tests/general_public/permalink_prod_2.robot index ed726cb58fd..719e92031f4 100644 --- a/tests/robot-tests/tests/general_public/permalink_prod_2.robot +++ b/tests/robot-tests/tests/general_public/permalink_prod_2.robot @@ -55,7 +55,7 @@ Validate table user checks row cell contains text ${row} 3 7,916,225 Validate footnotes - user checks page contains element //h3[@class="govuk-heading-m"] + user checks page contains element testid:footnotes user checks page contains Includes pupils who are sole or dual main registrations. Includes boarding pupils. user checks page contains x - 1 or 2 pupils, or a percentage based on 1 or 2. diff --git a/tests/robot-tests/tests/general_public/permalink_prod_3.robot b/tests/robot-tests/tests/general_public/permalink_prod_3.robot index 64d0e6e03dc..7113d7194f6 100644 --- a/tests/robot-tests/tests/general_public/permalink_prod_3.robot +++ b/tests/robot-tests/tests/general_public/permalink_prod_3.robot @@ -61,7 +61,7 @@ Validate table user checks row cell contains text ${row} 3 798 Validate footnotes - user checks page contains element //h3[@class="govuk-heading-m"] + user checks page contains element testid:footnotes user checks page contains ... The number of fixed period exclusions expressed as a percentage of the number of pupils in January each year. user checks page contains x - 1 or 2 pupils, or a percentage based on 1 or 2. From a7de9d5f19a089de7e307892874a0c9a29be6a0c Mon Sep 17 00:00:00 2001 From: Nusrath Moh Date: Thu, 2 Nov 2023 12:22:57 +0000 Subject: [PATCH 3/3] EES-4643 Responding to PR comments --- .../tests/general_public/notifications_absence.robot | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/robot-tests/tests/general_public/notifications_absence.robot b/tests/robot-tests/tests/general_public/notifications_absence.robot index b41341c9d2d..cfcc3954575 100644 --- a/tests/robot-tests/tests/general_public/notifications_absence.robot +++ b/tests/robot-tests/tests/general_public/notifications_absence.robot @@ -35,6 +35,5 @@ Sign up for email alerts user clicks button Subscribe # EES-1265 - #user waits until h1 is visible Subscribed %{WAIT_LONG} - user waits until page contains Subscribed %{WAIT_SMALL} + user waits until page contains Subscribed %{WAIT_LONG} user checks page contains Thank you. Check your email to confirm your subscription.