Skip to content

Commit 6006cbd

Browse files
Addressing PR comments
1 parent 54ac5e6 commit 6006cbd

File tree

6 files changed

+30
-48
lines changed

6 files changed

+30
-48
lines changed

pages/datasets/investigation_dataset_page.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,13 @@ def assert_drug_dose_unit_text(
942942

943943

944944
def normalize_label(text: str) -> str:
945+
"""
946+
Normalizes a label by removing extra whitespace and converting to lowercase.
947+
Args:
948+
text (str): The label text to normalize.
949+
Returns:
950+
str: The normalized label text.
951+
"""
945952
return re.sub(r"\s+", " ", text.replace("\xa0", " ")).strip().lower()
946953

947954

pages/login/select_job_role_page.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class SelectJobRolePage(BasePage):
77

88
def __init__(self, page: Page):
99
super().__init__(page)
10-
self.page = page
1110
self.select_job_dropdown = self.page.locator("#selRole")
1211
self.continue_button = self.page.locator("#SelectButton")
1312

pytest.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ markers =
4545
subject_search: tests that are part of the subject search test suite
4646
investigation_dataset_tests: tests that are part of the investigation dataset test suite
4747
skip_before_test: tests that will not use the before_test fixture
48-
bcss_additional_tests: tests that are part of the BCSS Additional Tests test suite
48+
bcss_additional_tests: tests that are part of the BCSS additional tests test suite
4949
colonoscopy_dataset_tests: tests that are part of the colonoscopy datasets test suite
5050
fobt_diagnosis_date_entry_tests: tests that are part of fobt subject episodes record diagnosis date

tests/regression/subject/episodes/datasets/investigation/endoscopy/test_endoscopy_investigation_dataset_scenarios.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def test_check_different_hub_roles_access_to_edit_endoscopy_investigation_datase
181181
check_role_access_to_edit_investigation_dataset(
182182
page,
183183
nhs_no,
184-
role="Hub Director State Registered",
184+
role="Hub Director State Registered at BCS03",
185185
edit_access=False,
186186
role_logging="ROLE: Hub Director - state registered : view only",
187187
)
@@ -191,7 +191,7 @@ def test_check_different_hub_roles_access_to_edit_endoscopy_investigation_datase
191191
check_role_access_to_edit_investigation_dataset(
192192
page,
193193
nhs_no,
194-
role="Hub Manager",
194+
role="Hub Manager at BCS01",
195195
edit_access=False,
196196
role_logging="ROLE: Hub Manager : view only",
197197
)
@@ -211,7 +211,7 @@ def test_check_different_hub_roles_access_to_edit_endoscopy_investigation_datase
211211
check_role_access_to_edit_investigation_dataset(
212212
page,
213213
nhs_no,
214-
role="Team Leader",
214+
role="Team Leader at BCS01",
215215
edit_access=False,
216216
role_logging="ROLE: Team Leader : view only",
217217
)
@@ -221,7 +221,7 @@ def test_check_different_hub_roles_access_to_edit_endoscopy_investigation_datase
221221
check_role_access_to_edit_investigation_dataset(
222222
page,
223223
nhs_no,
224-
role="Senior Screening Assistant",
224+
role="Senior Screening Assistant at BCS01",
225225
edit_access=False,
226226
role_logging="ROLE: Senior Screening Assistant : view only",
227227
)
@@ -231,7 +231,7 @@ def test_check_different_hub_roles_access_to_edit_endoscopy_investigation_datase
231231
check_role_access_to_edit_investigation_dataset(
232232
page,
233233
nhs_no,
234-
role="Screening Assistant",
234+
role="Screening Assistant at BCS02",
235235
edit_access=False,
236236
role_logging="ROLE: Screening Assistant : view only",
237237
)
@@ -276,7 +276,7 @@ def test_check_different_screening_centre_roles_access_to_edit_endoscopy_investi
276276
check_role_access_to_edit_investigation_dataset(
277277
page,
278278
nhs_no,
279-
role="Screening Practioner at BCS001",
279+
role="Screening Practitioner at BCS001",
280280
edit_access=True,
281281
role_logging="ROLE: Screening Practitioner (SP) : edit",
282282
role_type="Screening Practitioner",
@@ -287,7 +287,7 @@ def test_check_different_screening_centre_roles_access_to_edit_endoscopy_investi
287287
check_role_access_to_edit_investigation_dataset(
288288
page,
289289
nhs_no,
290-
role="Assistant Screening Practitioner",
290+
role="Assistant Screening Practitioner at BCS001",
291291
edit_access=True,
292292
role_logging="ROLE: Assistant Screening Practitioner (ASP) : edit",
293293
)
@@ -297,7 +297,7 @@ def test_check_different_screening_centre_roles_access_to_edit_endoscopy_investi
297297
check_role_access_to_edit_investigation_dataset(
298298
page,
299299
nhs_no,
300-
role="BCSS Support - SC",
300+
role="BCSS Support - SC at BCS001",
301301
edit_access=True,
302302
role_logging="ROLE: BCSS Support - SC : edit",
303303
)
@@ -318,7 +318,7 @@ def test_check_different_screening_centre_roles_access_to_edit_endoscopy_investi
318318
check_role_access_to_edit_investigation_dataset(
319319
page,
320320
nhs_no,
321-
role="Screening Centre Clerk",
321+
role="Screening Centre Clerk at BCS001",
322322
edit_access=False,
323323
role_logging="ROLE: Screening Centre Clerk : view only",
324324
role_type="Screening Centre Clerk",
@@ -344,7 +344,7 @@ def test_check_different_national_and_qa_roles_access_to_edit_endoscopy_investig
344344
check_role_access_to_edit_investigation_dataset(
345345
page,
346346
nhs_no,
347-
role="National Data Analyst",
347+
role="National Data Analyst at BCS0",
348348
edit_access=False,
349349
role_logging="ROLE: National Data Analyst : view only",
350350
)
@@ -354,7 +354,7 @@ def test_check_different_national_and_qa_roles_access_to_edit_endoscopy_investig
354354
check_role_access_to_edit_investigation_dataset(
355355
page,
356356
nhs_no,
357-
role="National QA User",
357+
role="National QA User at BCS0",
358358
edit_access=False,
359359
role_logging="ROLE: National QA User : view only",
360360
)
@@ -1275,7 +1275,7 @@ def check_role_access_to_edit_investigation_dataset(
12751275

12761276
if (
12771277
role == "Specialist Screening Practitioner at BCS009 & BCS001"
1278-
or role == "Assistant Screening Practitioner"
1278+
or role == "Assistant Screening Practitioner at BCS001"
12791279
):
12801280
OrganisationSwitchPage(page).select_organisation_by_id("BCS001")
12811281
OrganisationSwitchPage(page).click_continue()

users.json

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -51,79 +51,55 @@
5151
"Wolverhampton Bowel Cancer Screening Centre, MultiOrgUser"
5252
]
5353
},
54-
"Hub Director State Registered": {
54+
"Hub Director State Registered at BCS03": {
5555
"username": "BCSS414",
5656
"roles": [
5757
"Hub Director State Registered, England"
5858
]
5959
},
60-
"Hub Manager": {
61-
"username": "BCSS402",
62-
"roles": [
63-
"Hub Manager, England"
64-
]
65-
},
66-
"Team Leader": {
67-
"username": "BCSS403",
68-
"roles": [
69-
"Team Leader, England"
70-
]
71-
},
72-
"Senior Screening Assistant": {
60+
"Senior Screening Assistant at BCS01": {
7361
"username": "BCSS404",
7462
"roles": [
7563
"Senior Screening Assistant, England"
7664
]
7765
},
78-
"Screening Assistant": {
66+
"Screening Assistant at BCS02": {
7967
"username": "BCSS412",
8068
"roles": [
8169
"Senior Screening Assistant, England"
8270
]
8371
},
84-
"Screening Practitioner": {
85-
"username": "BCSS326",
86-
"roles": [
87-
"Screening Practitioner, England"
88-
]
89-
},
90-
"Assistant Screening Practitioner": {
72+
"Assistant Screening Practitioner at BCS001": {
9173
"username": "BCSS324",
9274
"roles": [
9375
"Assistant Screening Practitioner, England"
9476
]
9577
},
96-
"BCSS Support - SC": {
97-
"username": "BCSS307",
98-
"roles": [
99-
"BCSS Support - SC, England"
100-
]
101-
},
10278
"Screening Coordinator at BCS001": {
10379
"username": "BCSS121",
10480
"roles": [
10581
"Screening Coordinator at BCS001, England"
10682
]
10783
},
108-
"Screening Practioner at BCS001": {
84+
"Screening Practitioner at BCS001": {
10985
"username": "BCSS121",
11086
"roles": [
11187
"Screening Practioner at BCS001, England"
11288
]
11389
},
114-
"Screening Centre Clerk": {
90+
"Screening Centre Clerk at BCS001": {
11591
"username": "BCSS119",
11692
"roles": [
11793
"Screening Centre Clerk, England"
11894
]
11995
},
120-
"National Data Analyst": {
96+
"National Data Analyst at BCS0": {
12197
"username": "BCSS212",
12298
"roles": [
12399
"National Data Analyst, England"
124100
]
125101
},
126-
"National QA User": {
102+
"National QA User at BCS0": {
127103
"username": "BCSS263",
128104
"roles": [
129105
"National QA User, England"

utils/dataset_field_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ def assert_cell_to_right_has_expected_text(
120120
Asserts that the first visible field to the right of the cell containing `text` has the expected value,
121121
ensuring it is in the same row (not just visually to the right).
122122
Args:
123-
text (str): The label or text on the left-hand side.
124-
expected_text (str): The text expected in the cell to the right.
123+
text (str): The text in the left-hand cell.
124+
expected_text (str): The expected value in the adjacent right-hand cell.
125125
div (str, optional): The ID of the container DIV. Defaults to None.
126126
Raises:
127127
AssertionError: If the expected text is not found.

0 commit comments

Comments
 (0)