Skip to content

Commit 1ab6ff6

Browse files
committed
added new files for features and feature file outlines from the selenium feature file.
1 parent c96c44c commit 1ab6ff6

10 files changed

+345
-12
lines changed

pages/communication_production/batch_list_page.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from pages.base_page import BasePage
33
from datetime import datetime
44
from utils.calendar_picker import CalendarPicker
5+
from utils.table_util import TableUtils
56

67

78
class BatchListPage(BasePage):
@@ -128,6 +129,34 @@ def __init__(self, page):
128129
super().__init__(page)
129130

130131

132+
def verify_sortable_and_filterable_columns(self) -> None:
133+
"""
134+
Validates the presence of expected columns in the Active Batch List table.
135+
"""
136+
table = TableUtils(
137+
self.page, "table.active-batch-list"
138+
) # Adjust selector as needed
139+
expected_columns = [
140+
"ID",
141+
"Type",
142+
"Original",
143+
"Event Code",
144+
"Description",
145+
"Batch Split By",
146+
"Screening Centre",
147+
"Status",
148+
"Priority",
149+
"Deadline",
150+
"Count",
151+
]
152+
153+
for column in expected_columns:
154+
column_index = table.get_column_index(column)
155+
assert (
156+
column_index != -1
157+
), f"Column '{column}' not found in the batch list table"
158+
159+
131160
class ArchivedBatchListPage(BatchListPage):
132161
"""Archived Batch List Page locators, and methods for interacting with the Archived Batch List page"""
133162

tests/regression/communications_production/test_basic_active_batch_list_functionality_regression.py

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
)
77
from pages.communication_production.batch_list_page import ActiveBatchListPage
88
from utils.user_tools import UserTools
9+
from utils.table_util import TableUtils
910

1011

1112
@pytest.fixture(scope="function", autouse=True)
@@ -21,12 +22,47 @@ def before_each(page: Page):
2122
BasePage(page).go_to_communications_production_page()
2223
CommunicationsProductionPage(page).go_to_active_batch_list_page()
2324

25+
# @BCSSAdditionalTests @LettersTests
26+
# Feature: Basic Active Batch List functionality
2427

28+
# Scenario: Check navigation from Active Batch List Screen to Manage Active Batch Screen
29+
# Given I log in to BCSS "England" as user role "HubManager"
30+
# When I view the active batch list
31+
# And I select an active batch
32+
# Then I view the details of an active batch
33+
34+
# # Copied from the now-deleted UserPathway.feature - need to tidy up duplicate steps etc
35+
# # rovi ignored as this contains non implemented steps.
36+
# @ignore
37+
# Scenario: User prints the Pre-Invitation Letters batch (#4)
38+
# Given I log in to BCSS "England" as user role "Hub Manager - State Registered"
39+
# When I navigate to the Communications Production > Active Batch List Page
40+
# And I prepare the Pre-Invitation FIT letter batch
41+
# Then The Pre-Invitation FIT letter batch is no longer listed
42+
43+
@pytest.mark.wip
2544
@pytest.mark.regression
2645
def test_headings_on_active_batch_list_screen(page: Page) -> None:
2746
"""
2847
Confirms that the active batch list table contains a sortable and filterable column for "ID", "Type", "Original",
2948
"Event Code", "Description", "Batch Split By", "Screening Centre", "Status", "Priority", "Deadline" and "Count"
3049
"""
31-
# Active batch list page loads as expected
32-
ActiveBatchListPage(page).verify_deadline_date_filter_input
50+
# Scenario: Check headings on Active Batch List Screen
51+
# Given I log in to BCSS "England" as user role "HubManager"
52+
# When I view the active batch list
53+
# Then the table contains a sortable and filterable column for "ID"
54+
# And the table contains a sortable and filterable column for "Type"
55+
# And the table contains a sortable and filterable column for "Original"
56+
# And the table contains a sortable and filterable column for "Event Code"
57+
# And the table contains a sortable and filterable column for "Description"
58+
# And the table contains a sortable and filterable column for "Batch Split By"
59+
# And the table contains a sortable and filterable column for "Screening Centre"
60+
# And the table contains a sortable and filterable column for "Status"
61+
# And the table contains a sortable and filterable column for "Priority"
62+
# And the table contains a sortable and filterable column for "Deadline"
63+
# And the table contains a sortable and filterable column for "Count"
64+
batch_list_page = ActiveBatchListPage(page)
65+
# 🔍 TEMPORARY DEBUGGING
66+
table = TableUtils(page, "table.active-batch-list")
67+
print("DEBUG - Headers Found:", table.get_table_headers())
68+
batch_list_page.verify_sortable_and_filterable_columns()
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# @BCSSAdditionalTests @LettersTests
2+
# Feature: Basic Archived Batch List functionality
3+
4+
# Scenario: Check headings on Archived Batch List Screen
5+
# Given I log in to BCSS "England" as user role "HubManager"
6+
# When I view the archived batch list
7+
# Then the table contains a sortable and filterable column for "ID"
8+
# And the table contains a sortable and filterable column for "Type"
9+
# And the table contains a sortable and filterable column for "Original"
10+
# And the table contains a sortable and filterable column for "Letter Group"
11+
# And the table contains a sortable and filterable column for "Event Code"
12+
# And the table contains a sortable and filterable column for "Description"
13+
# And the table contains a sortable and filterable column for "Batch Split By"
14+
# And the table contains a sortable and filterable column for "Screening Centre"
15+
# And the table contains a sortable and filterable column for "Status"
16+
# And the table contains a sortable and filterable column for "Priority"
17+
# And the table contains a sortable and filterable column for "Date On Letter"
18+
# And the table contains a sortable and filterable column for "Date Archived"
19+
# And the table contains a sortable and filterable column for "Count"
20+
21+
22+
# Scenario: Check navigation from Archived Batch List Screen to Manage Archived Batch Screen
23+
# Given I log in to BCSS "England" as user role "HubManager"
24+
# When I view the archived batch list
25+
# And I select an archived batch
26+
# Then I view the details of an archived batch
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# @LettersTests
2+
# Feature: Basic Manage Active Batch functionality
3+
4+
5+
# Scenario: I can prepare, retrieve and confirm a letter batch of any number of files
6+
# The first open batch will be picked up for processing, regardless of letter type
7+
8+
# Given I log in to BCSS "England" as user role "HubManagerStateRegistered"
9+
# When I view the active batch list
10+
# And There are open letter batches to process in the active batch list
11+
# Then I view the "Original" type "Open" status active letter batch for "" ""
12+
# And I prepare the letter batch
13+
# And I retrieve and confirm the letters
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# @LettersTests
2+
# Feature: Basic Manage Archived Batch functionality
3+
4+
5+
# Scenario: I can take an archived batch, reprint it, then archive that new batch
6+
# Given I log in to BCSS "England" as user role "HubManagerStateRegistered"
7+
# When I view the archived batch list
8+
# And I view the "Original" type archived letter batch for "S1" "Pre"
9+
# And I reprint the archived letter batch
10+
# And I prepare the letter batch
11+
# And I retrieve and confirm the letters
12+
# And my batch is now archived
13+
14+
15+
# Scenario: Check that S1 has supplementary batches
16+
# Given I log in to BCSS "England" as user role "HubManagerStateRegistered"
17+
# When I view the letter library index
18+
# And I filter the letter library index list to view the "Supplementary Letters" letters group
19+
# And I ensure that I can create "S1" supplementary batches
20+
# And I view the archived batch list
21+
# And I view the "Original" type archived letter batch for "S1" "Pre"
22+
# And I create a supplementary batch
23+
# And I prepare the letter batch
24+
# And I retrieve and confirm the letters
25+
# And my batch is now archived
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# @BCSSAdditionalTests
2+
# Feature: FIT Self Refer - letter processing
3+
4+
# Narrative Description: When a self-referral subject is invited for FOBT screening, they are entered into
5+
# an S83f letter batch. This batch comprises the S83f and S83f-ATT letters, and the S83f-CSV (test kit) file.
6+
# When the batch is prepared and confirmed, the subject is progressed to status S84, and links to both the S83f
7+
# and S83f-ATT letters are displayed in their event history, in the S84 event.
8+
9+
# # NOTES
10+
# # This feature file assumes that the default kit type for all SC invitations is FIT, so all self-referrals will be sent a FIT kit.
11+
# # Because the smokescreen tests also generate invitations, this feature file was consistently failing due to the invitations for
12+
# # hub BCS01 being right up to date, i.e. no more invitations were allowed to be generated. To fix this, this feature file has
13+
# # been changed to use hub BCS02 instead.
14+
15+
# Scenario: Self-refer a subject in my hub for FIT
16+
# Given I log in to BCSS "England" as user role "HubManagerAtBCS02"
17+
# And there are "currently" "no" self-refer subjects ready to invite
18+
# And I have a subject with no screening history who is eligible to self refer
19+
# When I view the subject
20+
# And I self refer the subject
21+
# And I send a new kit to the subject
22+
# And the FOBT invitations shortlist is refreshed
23+
# Then there are "now" "some" self-refer subjects ready to invite
24+
# And I pause to admire the view for "0" seconds
25+
26+
# Scenario: Invite a self-refer subject for FIT creates or updates an S83f letter batch
27+
# Given I log in to BCSS "England" as user role "HubManagerAtBCS02"
28+
# And there are "currently" "some" self-refer subjects ready to invite
29+
# When I generate invitations
30+
# And I view the active batch list
31+
# And I filter the active batch list to view only "Original" type batches
32+
# And I filter the active batch list to view only "Open" status batches
33+
# And I pause to admire the view for "0" seconds
34+
# Then There is "now" a letter batch for "S83" "Invitation & Test Kit (Self-referral) (FIT)"
35+
36+
# # Note that this "When I view ..." includes 3 steps from above (view active batch list, and filter by type and status), and clicks the batch ID link
37+
# Scenario: There are 3 components in the S83f letter batch
38+
# Given I log in to BCSS "England" as user role "HubManagerAtBCS02"
39+
# When I view the active batch list
40+
# And I view the "Original" type "Open" status active letter batch for "S83" "Invitation & Test Kit (Self-referral) (FIT)"
41+
# And I pause to admire the view for "0" seconds
42+
# Then letter type "Invitation & Test Kit (Self-referral) (FIT)" with file format "PDF-A4-V03" is listed
43+
# And letter type "Pre-invitation (Self-referral) (FIT)" with file format "PDF-A4-V03" is listed
44+
# And letter type "Invitation & Test Kit (Self-referral) (FIT)" with file format "FIT-KIT-CSV" is listed
45+
46+
# Scenario: Before confirming the S83f letter batch the self-referred subject's latest event status is S83
47+
# Given I log in to BCSS "England" as user role "HubManagerAtBCS02"
48+
# When I view the active batch list
49+
# And I view the "Original" type "Open" status active letter batch for "S83" "Invitation & Test Kit (Self-referral) (FIT)"
50+
# And I identify a subject who is in the letter batch
51+
# And I view the subject
52+
# And I pause to admire the view for "0" seconds
53+
# Then the subject is at latest event status "S83 - Selected for Screening (Self-referral)"
54+
55+
# # Manual scenario: I can process the letter batch
56+
# # Given I log in to BCSS England as user role Hub Manager
57+
# # When I view an active S83f letter batch
58+
# # Then I can prepare the batch
59+
# # And I can retrieve and confirm each of the 3 components
60+
# # And I can tell which is the pre-invitation letter and which is the invitation letter
61+
62+
# Scenario: When the S83f batch has been confirmed the self-referred subject has a self-referral invitation and test kit sent
63+
# Given I log in to BCSS "England" as user role "HubManagerAtBCS02"
64+
# When I view the active batch list
65+
# And I view the "Original" type "Open" status active letter batch for "S83" "Invitation & Test Kit (Self-referral) (FIT)"
66+
# And I identify a subject who is in the letter batch
67+
# And I prepare the letter batch
68+
# And I retrieve and confirm the letters
69+
# And I view the subject
70+
# And I pause to admire the view for "0" seconds
71+
# Then the subject is at latest event status "S84 - Invitation and Test Kit Sent (Self-referral)"
72+
# And the latest "S84 - Invitation and Test Kit Sent (Self-referral)" event shows "2" "View Letter" links
73+
74+
# # Manual scenario: The letters can be accessed via the subject episode history
75+
# # Given I log in to BCSS England as user role Hub Manager
76+
# # When I view the latest episode history of a FIT self-referral subject
77+
# # And I view both letters
78+
# # And I can see that one is a pre-invitation letter and one is an invitation letter
79+
# # And the text of each is as expected
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# @BCSSAdditionalTests @LettersTests
2+
# Feature: Letter Library
3+
4+
# Narrative Description: As a user of BCSS I am able to view national letter definitions,
5+
# and create local versions
6+
7+
# # Notes: In the Letter Library Index, when you click on a LETTER code, this takes you to the Version History
8+
# # screen. When you click on a CSV code, this takes you to the CSV File Format screen.
9+
10+
# #-------------------------------------------------------------------------------------------------
11+
# # S83f : FIT self-referral letters:
12+
# # S83f-ATT = pre-invitation letter
13+
# # S83f = invitation letter
14+
# # S83f-CSV = test kit details
15+
16+
# Scenario: All three parts of the S83f letter exist
17+
# Given I log in to BCSS "England" as user role "HubManager"
18+
# When I view the letter library index
19+
# And I filter the letter library index list to view the "Invitation Letters" letters group
20+
# Then the "S83f" letter is listed in the letter library index
21+
# And the "S83f-CSV" letter is listed in the letter library index
22+
# And the "S83f-ATT" letter is listed in the letter library index
23+
24+
# Scenario: A current S83f FIT self-referral invitation and test kit letter exists and has the correct settings
25+
# Given I log in to BCSS "England" as user role "HubManager"
26+
# When I view the letter library index
27+
# And I view the "S83f" letter definition
28+
# And I pause to admire the view for "0" seconds
29+
# Then the letter definition setting "Description" is "Invitation & Test Kit (Self-referral) (FIT)"
30+
# And the letter definition setting "Letter Code" is "S83f"
31+
# And the letter definition setting "Letter Group" is "Invitation Letters"
32+
# And the letter definition setting "Letter Format" is "PDF-A4-V03"
33+
# And the letter definition setting "Priority" is "High"
34+
# And the letter definition setting "Destination" is "Patient"
35+
# And the letter definition setting "Event Status" is "S83"
36+
# And there "is" a current version of the selected letter definition
37+
38+
# Scenario: A current S83f-ATT FIT self-referral pre-invitation letter exists and has the correct settings
39+
# Given I log in to BCSS "England" as user role "HubManager"
40+
# When I view the letter library index
41+
# And I view the "S83f-ATT" letter definition
42+
# And I pause to admire the view for "0" seconds
43+
# Then the letter definition setting "Description" is "Pre-invitation (Self-referral) (FIT)"
44+
# And the letter definition setting "Letter Code" is "S83f-ATT"
45+
# And the letter definition setting "Letter Group" is "Invitation Letters"
46+
# And the letter definition setting "Letter Format" is "PDF-A4-V03"
47+
# And the letter definition setting "Priority" is "High"
48+
# And the letter definition setting "Destination" is "Patient"
49+
# And the letter definition setting "Event Status" is "S83"
50+
# And there "is" a current version of the selected letter definition
51+
52+
53+
# Scenario: As a hub manager, I can define a local version of the S83f FIT self-referral invitation & test kit letter
54+
# Given I log in to BCSS "England" as user role "HubManager"
55+
# When I view the letter library index
56+
# And I view the "S83f" letter definition
57+
# And I pause to admire the view for "0" seconds
58+
# Given there "is not" a local version of the selected letter definition
59+
# Then I can define a local version of the selected letter definition
60+
61+
# Scenario: As a hub manager, I can define a local version of the S83f-ATT FIT self-referral pre-invitation letter
62+
# Given I log in to BCSS "England" as user role "HubManager"
63+
# When I view the letter library index
64+
# And I view the "S83f-ATT" letter definition
65+
# And I pause to admire the view for "0" seconds
66+
# Given there "is not" a local version of the selected letter definition
67+
# Then I can define a local version of the selected letter definition
68+
69+
# # Manual Scenario: I set up a local version for S83f-ATT pre-invitation letter
70+
# # Given I log in to BCSS England as user role Hub Manager
71+
# # When I view the letter library index
72+
# # And I view the S83f-ATT pre-invitation letter definition
73+
# # Then I define a local version
74+
75+
# #-------------------------------------------------------------------------------------------------
76+
# # A183 : 1st Positive Appointment Requested letter
77+
78+
# Scenario: A current A183 letter exists and has the correct settings
79+
# Given I log in to BCSS "England" as user role "HubManager"
80+
# When I view the letter library index
81+
# And I view the "A183" letter definition
82+
# And I pause to admire the view for "0" seconds
83+
# Then the letter definition setting "Description" is "Practitioner Clinic 1st Appointment"
84+
# And the letter definition setting "Letter Code" is "A183"
85+
# And the letter definition setting "Letter Group" is "Practitioner Clinic Letters"
86+
# And the letter definition setting "Letter Format" is "PDF-A4-V03"
87+
# And the letter definition setting "Priority" is "Urgent"
88+
# And the letter definition setting "Destination" is "Patient"
89+
# And the letter definition setting "Event Status" is "A183"
90+
# And there "is" a current version of the selected letter definition
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Feature: Letters
2+
3+
# Manual Scenario: I have a letter for a subject with a long name
4+
# Given I log in to BCSS England as user role Hub Manager
5+
# When I have a subject with a long name
6+
# And I view a letter for the subject
7+
# Then the subject title, forename and surname is not split over multiple lines unnecessarily
8+
9+
# Manual Scenario: I have a letter that might go over 2 pages
10+
# Given I log in to BCSS England as user role Hub Manager
11+
# When I have conditions which might affect the letter length e.g. subject with a long name, GP Endorsement, GP long name, line breaks
12+
# And I view a letter for the subject
13+
# Then the letter does not spread over two pages

tests/regression/subject/demographic/test_temporary_address.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ def before_each(page: Page) -> str:
3636
return nhs_no
3737

3838

39-
@pytest.mark.wip
4039
@pytest.mark.regression
4140
@pytest.mark.subject_tests
4241
def test_not_amending_temporary_address(page: Page, before_each) -> None:
@@ -58,7 +57,6 @@ def test_not_amending_temporary_address(page: Page, before_each) -> None:
5857
LogoutPage(page).log_out()
5958

6059

61-
@pytest.mark.wip
6260
@pytest.mark.regression
6361
@pytest.mark.subject_tests
6462
def test_add_temporary_address_then_delete(page: Page, before_each) -> None:
@@ -99,7 +97,6 @@ def test_add_temporary_address_then_delete(page: Page, before_each) -> None:
9997
LogoutPage(page).log_out()
10098

10199

102-
@pytest.mark.wip
103100
@pytest.mark.regression
104101
@pytest.mark.subject_tests
105102
def test_validation_regarding_dates(page: Page) -> None:
@@ -171,7 +168,6 @@ def test_validation_regarding_dates(page: Page) -> None:
171168
LogoutPage(page).log_out()
172169

173170

174-
@pytest.mark.wip
175171
@pytest.mark.regression
176172
@pytest.mark.subject_tests
177173
def test_ammending_temporary_address(page: Page, before_each) -> None:
@@ -226,7 +222,6 @@ def test_ammending_temporary_address(page: Page, before_each) -> None:
226222
LogoutPage(page).log_out()
227223

228224

229-
@pytest.mark.wip
230225
@pytest.mark.regression
231226
@pytest.mark.subject_tests
232227
def test_validating_minimum_information(page: Page, before_each) -> None:

0 commit comments

Comments
 (0)