generated from NHSDigital/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7414dec
commit 1e095e8
Showing
13 changed files
with
194 additions
and
111 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from libs import playwright_ops | ||
from libs.constants import actions, escape_characters, object_properties | ||
|
||
|
||
class pg_dashboard: | ||
po = playwright_ops.playwright_operations() | ||
|
||
LNK_PROGRAMMES = f"heading{escape_characters.SEPARATOR}Programmes" | ||
LNK_VACCINES = f"heading{escape_characters.SEPARATOR}Vaccines" | ||
LNK_SESSIONS = f"heading{escape_characters.SEPARATOR}Sessions" | ||
LNK_CHILDREN = f"heading{escape_characters.SEPARATOR}Children" | ||
LNK_NOTICES = f"heading{escape_characters.SEPARATOR}Important Notices" | ||
LNK_ORGANISATION = f"heading{escape_characters.SEPARATOR}Your organisation" | ||
|
||
def click_programmes(self): | ||
self.po.perform_action(locator=self.LNK_PROGRAMMES, action=actions.CLICK_LINK) | ||
|
||
def click_vaccines(self): | ||
self.po.perform_action(locator=self.LNK_VACCINES, action=actions.CLICK_LINK) | ||
|
||
def click_sessions(self): | ||
self.po.perform_action(locator=self.LNK_SESSIONS, action=actions.CLICK_LINK) | ||
|
||
def click_children(self): | ||
self.po.perform_action(locator=self.LNK_CHILDREN, action=actions.CLICK_LINK) | ||
|
||
def click_important_notices(self): | ||
self.po.perform_action(locator=self.LNK_NOTICES, action=actions.CLICK_LINK) | ||
|
||
def click_your_organisation(self): | ||
self.po.perform_action(locator=self.LNK_ORGANISATION, action=actions.CLICK_LINK) | ||
|
||
def verify_all_expected_links(self): | ||
self.po.verify(locator=self.LNK_PROGRAMMES, property=object_properties.VISIBILITY, value=True, exact=True) | ||
self.po.verify(locator=self.LNK_VACCINES, property=object_properties.VISIBILITY, value=True, exact=True) | ||
self.po.verify(locator=self.LNK_SESSIONS, property=object_properties.VISIBILITY, value=True, exact=True) | ||
self.po.verify(locator=self.LNK_CHILDREN, property=object_properties.VISIBILITY, value=True, exact=True) | ||
self.po.verify(locator=self.LNK_NOTICES, property=object_properties.VISIBILITY, value=True, exact=True) | ||
self.po.verify( | ||
locator=self.LNK_ORGANISATION, | ||
property=object_properties.VISIBILITY, | ||
value=True, | ||
exact=True, | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,54 @@ | ||
import pytest | ||
|
||
from libs.constants import test_data_file_paths | ||
from pages import pg_home, pg_login, pg_programmes | ||
from pages import pg_dashboard, pg_login, pg_programmes | ||
|
||
|
||
class Test_Regression_Vaccinations_Upload: | ||
login_page = pg_login.pg_login() | ||
home_page = pg_home.pg_home() | ||
home_page = pg_dashboard.pg_dashboard() | ||
programmes_page = pg_programmes.pg_programmes() | ||
|
||
@pytest.mark.vaccinations | ||
@pytest.mark.regression | ||
@pytest.mark.order(201) | ||
def test_reg_hpv_positive_file_upload(self, create_browser_page): | ||
self.login_page.perform_login() | ||
self.login_page.perform_valid_login() | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_hpv_vaccination_records(file_paths=test_data_file_paths.VACCS_HPV_POSITIVE) | ||
|
||
@pytest.mark.vaccinations | ||
@pytest.mark.regression | ||
@pytest.mark.order(202) | ||
def test_reg_hpv_negative_file_upload(self, create_browser_page): | ||
self.login_page.perform_login() | ||
self.login_page.perform_valid_login() | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_hpv_vaccination_records(file_paths=test_data_file_paths.VACCS_HPV_NEGATIVE) | ||
|
||
@pytest.mark.vaccinations | ||
@pytest.mark.regression | ||
@pytest.mark.order(203) | ||
def test_reg_hpv_duplicate_record_upload(self, create_browser_page): | ||
self.login_page.perform_login() | ||
self.login_page.perform_valid_login() | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_hpv_vaccination_records(file_paths=test_data_file_paths.VACCS_HPV_DUP_1) | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_hpv_vaccination_records(file_paths=test_data_file_paths.VACCS_HPV_DUP_2) | ||
|
||
@pytest.mark.vaccinations | ||
@pytest.mark.regression | ||
@pytest.mark.order(204) | ||
def test_reg_hpv_file_structure(self, create_browser_page): | ||
self.login_page.perform_login() | ||
self.login_page.perform_valid_login() | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_invalid_files(file_paths=test_data_file_paths.VACCS_HPV_INVALID_STRUCTURE) | ||
|
||
@pytest.mark.vaccinations | ||
@pytest.mark.regression | ||
@pytest.mark.order(205) | ||
def test_reg_hpv_no_record(self, create_browser_page): | ||
self.login_page.perform_login() | ||
self.login_page.perform_valid_login() | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_invalid_files(file_paths=test_data_file_paths.VACCS_HPV_HEADER_ONLY) | ||
|
||
@pytest.mark.vaccinations | ||
@pytest.mark.regression | ||
@pytest.mark.order(206) | ||
def test_reg_hpv_empty_file(self, create_browser_page): | ||
self.login_page.perform_login() | ||
self.login_page.perform_valid_login() | ||
self.home_page.click_programmes() | ||
self.programmes_page.upload_invalid_files(file_paths=test_data_file_paths.VACCS_HPV_EMPTY_FILE) |
Oops, something went wrong.