Skip to content

Commit b5dbde1

Browse files
committed
Fix regression tests
1 parent ab31cd4 commit b5dbde1

File tree

4 files changed

+34
-31
lines changed

4 files changed

+34
-31
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ lint: lint-black lint-pyright lint-flake8
4040

4141
run-tests: guard-product guard-env
4242
echo "Running Regression Tests"
43-
poetry run python ./runner.py --product=$(product) --env=$(env)
43+
poetry run python ./runner.py --product=$(product) --env=$(env) --tags=${tags}
4444

4545
check-licenses:
4646
scripts/check_python_licenses.sh

features/cpts_ui/select_your_role.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ Feature: Role selection page renders roles properly when logged in
44

55
Background:
66
Given I am logged in
7-
And I am on the SLR page
7+
And I am on the select_your_role page
88

99
@allure.tms:https://nhsd-jira.digital.nhs.uk/browse/AEA-4653
10-
Scenario: User can navigate to the SLR page
11-
Then I am on the SLR page
10+
Scenario: User can navigate to the select_your_role page
11+
Then I am on the select_your_role page
1212

1313
@allure.tms:https://nhsd-jira.digital.nhs.uk/browse/AEA-4653
1414
Scenario: User can see the summary container, but not the table contents by default

features/steps/cpts_ui/select_your_role_steps.py

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
from pages.select_your_role import SelectYourRole
66

77

8-
@when("I go to the SLR page")
9-
def i_go_to_the_slr_page(context):
8+
@when("I go to the select_your_role page")
9+
def i_go_to_the_select_your_role_page(context):
1010
context.page.goto(context.cpts_ui_base_url + "site/selectyourrole.html")
1111

1212

13-
@given("I am on the SLR page")
14-
def i_am_on_slr_page(context):
15-
i_go_to_the_slr_page(context)
16-
slr_page = SelectYourRole(context.page)
17-
expect(slr_page.summary).to_be_visible()
13+
@given("I am on the select_your_role page")
14+
def i_am_on_select_your_role_page(context):
15+
i_go_to_the_select_your_role_page(context)
16+
select_your_role_page = SelectYourRole(context.page)
17+
expect(select_your_role_page.summary).to_be_visible()
1818

1919

20-
@then("I am on the SLR page")
21-
def verify_on_slr_page(context):
22-
slr_page = SelectYourRole(context.page)
23-
expect(slr_page.summary).to_be_visible()
20+
@then("I am on the select_your_role page")
21+
def verify_on_select_your_role_page(context):
22+
select_your_role_page = SelectYourRole(context.page)
23+
expect(select_your_role_page.summary).to_be_visible()
2424

2525

2626
@given("I am logged in")
@@ -29,41 +29,44 @@ def login(context):
2929
context.page.get_by_role("button", name="Log in with mock CIS2").click()
3030
context.page.get_by_label("Username").fill("555073103100")
3131
context.page.get_by_role("button", name="Sign In").click()
32+
context.page.wait_for_url("**/auth_demo.html")
3233

3334

3435
@then("I can see the summary container")
3536
def i_can_see_the_summary_container(context):
36-
slr_page = SelectYourRole(context.page)
37-
expect(slr_page.summary).to_be_visible()
37+
select_your_role_page = SelectYourRole(context.page)
38+
expect(select_your_role_page.summary).to_be_visible()
3839

3940

4041
@then("I cannot see the summary table body")
4142
def i_cannot_see_the_summary_table_body(context):
42-
slr_page = SelectYourRole(context.page)
43-
expect(slr_page.roles_without_access_table_body).to_be_visible(visible=False)
43+
select_your_role_page = SelectYourRole(context.page)
44+
expect(select_your_role_page.roles_without_access_table_body).to_be_visible(
45+
visible=False
46+
)
4447

4548

4649
@then("I can see the summary table body")
4750
def i_can_see_the_summary_table_body(context):
48-
slr_page = SelectYourRole(context.page)
49-
expect(slr_page.roles_without_access_table_body).to_be_visible()
51+
select_your_role_page = SelectYourRole(context.page)
52+
expect(select_your_role_page.roles_without_access_table_body).to_be_visible()
5053

5154

5255
@then("I can see the table body has a header row")
5356
def i_can_see_the_table_body_header(context):
54-
slr_page = SelectYourRole(context.page)
55-
expect(slr_page.organisation_column_header).to_be_visible()
56-
expect(slr_page.role_column_header).to_be_visible()
57+
select_your_role_page = SelectYourRole(context.page)
58+
expect(select_your_role_page.organisation_column_header).to_be_visible()
59+
expect(select_your_role_page.role_column_header).to_be_visible()
5760

5861

5962
@then("I can see the table body has data")
6063
def i_can_see_the_table_body_data(context):
61-
slr_page = SelectYourRole(context.page)
62-
expect(slr_page.first_row_org_name).to_be_visible()
63-
expect(slr_page.first_row_role_name).to_be_visible()
64+
select_your_role_page = SelectYourRole(context.page)
65+
expect(select_your_role_page.first_row_org_name).to_be_visible()
66+
expect(select_your_role_page.first_row_role_name).to_be_visible()
6467

6568

6669
@when("I click on the summary expander")
6770
def click_on_summary_expander(context):
68-
slr_page = SelectYourRole(context.page)
69-
slr_page.summary.click()
71+
select_your_role_page = SelectYourRole(context.page)
72+
select_your_role_page.summary.click()

pages/select_your_role.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ def __init__(self, page: Page):
1313
self.role_column_header = page.get_by_role("columnheader", name="Role")
1414
self.roles_without_access_table_body = page.get_by_role("group").locator("div")
1515
self.first_row_org_name = page.get_by_role(
16-
"cell", name="NO ORG NAME (ODS: X09)"
16+
"cell", name="No Org Name (ODS: X09)"
1717
).first
1818
self.first_row_role_name = page.get_by_role(
19-
"cell", name='"Admin & Clerical":"Admin":"'
19+
"cell", name="Registration Authority Agent"
2020
).first
2121

2222
self.header = "[id='eps_header']"

0 commit comments

Comments
 (0)