Skip to content

Commit 91c926c

Browse files
Addressing comments in PR
1 parent 816c8c5 commit 91c926c

File tree

2 files changed

+115
-99
lines changed

2 files changed

+115
-99
lines changed

pages/datasets/investigation_dataset_page.py

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from playwright.sync_api import Page, expect
22
from pages.base_page import BasePage
3-
from enum import Enum
3+
from enum import StrEnum
44

55

66
class InvestigationDatasetsPage(BasePage):
@@ -29,6 +29,9 @@ def __init__(self, page: Page):
2929
self.theraputic_procedure_type = self.page.get_by_role(
3030
"radio", name="Therapeutic"
3131
)
32+
self.diagnostic_procedure_type = self.page.get_by_role(
33+
"radio", name="Diagnostic"
34+
)
3235
self.bowel_preparation_quality_option = self.page.get_by_label(
3336
"Bowel preparation quality"
3437
)
@@ -210,6 +213,13 @@ def select_theraputic_procedure_type(self) -> None:
210213
"""
211214
self.theraputic_procedure_type.check()
212215

216+
def select_diagnostic_procedure_type(self) -> None:
217+
"""
218+
This method is designed to select the diagnostic procedure type.
219+
It selects the diagnostic procedure type.
220+
"""
221+
self.diagnostic_procedure_type.check()
222+
213223
def select_bowel_preparation_quality_option(self, option: str) -> None:
214224
"""
215225
This method is designed to select a bowel preparation quality option.
@@ -607,7 +617,7 @@ def expect_text_to_be_visible(self, text: str) -> None:
607617
expect(self.page.get_by_text(text)).to_contain_text(text)
608618

609619

610-
class SiteLookupOptions(Enum):
620+
class SiteLookupOptions(StrEnum):
611621
"""Enum for site lookup options"""
612622

613623
RL401 = "35317"
@@ -617,7 +627,7 @@ class SiteLookupOptions(Enum):
617627
RL405 = "42808"
618628

619629

620-
class PractitionerOptions(Enum):
630+
class PractitionerOptions(StrEnum):
621631
"""
622632
Enum for practitioner options
623633
Only the first four options are present in this class
@@ -629,7 +639,7 @@ class PractitionerOptions(Enum):
629639
DOORFRAME_THIRSTY = "2034"
630640

631641

632-
class TestingClinicianOptions(Enum):
642+
class TestingClinicianOptions(StrEnum):
633643
"""Enum for testing clinician options"""
634644

635645
BORROWING_PROPERTY = "886"
@@ -638,13 +648,13 @@ class TestingClinicianOptions(Enum):
638648
CONSONANT_TRACTOR = "101"
639649

640650

641-
class AspirantEndoscopistOptions(Enum):
651+
class AspirantEndoscopistOptions(StrEnum):
642652
"""Enum for aspirant endoscopist options"""
643653

644654
ITALICISE_AMNESTY = "1832"
645655

646656

647-
class DrugTypeOptions(Enum):
657+
class DrugTypeOptions(StrEnum):
648658
"""Enum for drug type options"""
649659

650660
BISACODYL = "200537~Tablet(s)"
@@ -665,7 +675,7 @@ class DrugTypeOptions(Enum):
665675
OTHER = "203066"
666676

667677

668-
class BowelPreparationQualityOptions(Enum):
678+
class BowelPreparationQualityOptions(StrEnum):
669679
"""Enum for bowel preparation quality options"""
670680

671681
EXCELLENT = "305579"
@@ -675,7 +685,7 @@ class BowelPreparationQualityOptions(Enum):
675685
INADEQUATE = "305581~~305582"
676686

677687

678-
class ComfortOptions(Enum):
688+
class ComfortOptions(StrEnum):
679689
"""Enum for comfort during examination / recovery options"""
680690

681691
NO_DISCOMFORT = "18505"
@@ -685,7 +695,7 @@ class ComfortOptions(Enum):
685695
SEVERE_DISCOMFORT = "17276"
686696

687697

688-
class EndoscopyLocationOptions(Enum):
698+
class EndoscopyLocationOptions(StrEnum):
689699
"""Enum for endoscopy location options"""
690700

691701
ANUS = "17231~Scope not inserted clinical reason~204342"
@@ -702,14 +712,14 @@ class EndoscopyLocationOptions(Enum):
702712
APPENDIX = "17242~Colonoscopy Complete"
703713

704714

705-
class YesNoOptions(Enum):
715+
class YesNoOptions(StrEnum):
706716
"""Enum for scope imager used options"""
707717

708718
YES = "17058"
709719
NO = "17059"
710720

711721

712-
class InsufflationOptions(Enum):
722+
class InsufflationOptions(StrEnum):
713723
"""Enum for insufflation options"""
714724

715725
AIR = "200547"
@@ -722,15 +732,15 @@ class InsufflationOptions(Enum):
722732
WATER_AIR_CO2 = "305729"
723733

724734

725-
class OutcomeAtTimeOfProcedureOptions(Enum):
735+
class OutcomeAtTimeOfProcedureOptions(StrEnum):
726736
"""Enum for outcome at time of procedure options"""
727737

728738
LEAVE_DEPARTMENT = "17148~Complications are optional"
729739
PLANNED_ADMISSION = "17998~Complications are optional"
730740
UNPLANNED_ADMISSION = "17147~Complications are mandatory"
731741

732742

733-
class LateOutcomeOptions(Enum):
743+
class LateOutcomeOptions(StrEnum):
734744
"""Enum for late outcome options"""
735745

736746
NO_COMPLICATIONS = "17216~Complications are not required"
@@ -740,7 +750,7 @@ class LateOutcomeOptions(Enum):
740750
HOSPITAL_ADMISSION = "17220~Complications are mandatory"
741751

742752

743-
class CompletionProofOptions(Enum):
753+
class CompletionProofOptions(StrEnum):
744754
"""Enum for completion proof options"""
745755

746756
PHOTO_ANASTOMOSIS = "200573"
@@ -754,7 +764,7 @@ class CompletionProofOptions(Enum):
754764
NOT_POSSIBLE = "203007"
755765

756766

757-
class FailureReasonsOptions(Enum):
767+
class FailureReasonsOptions(StrEnum):
758768
"""Enum for failure reasons options"""
759769

760770
NO_FAILURE_REASONS = "18500"
@@ -778,7 +788,7 @@ class FailureReasonsOptions(Enum):
778788
PERFORATION = "205153~AVI"
779789

780790

781-
class PolypClassificationOptions(Enum):
791+
class PolypClassificationOptions(StrEnum):
782792
"""Enum for polyp classification options"""
783793

784794
LP = "17296"
@@ -792,23 +802,23 @@ class PolypClassificationOptions(Enum):
792802
LLA_C = "200683"
793803

794804

795-
class PolypAccessOptions(Enum):
805+
class PolypAccessOptions(StrEnum):
796806
"""Enum for polyp access options"""
797807

798808
EASY = "305583"
799809
DIFFICULT = "305584"
800810
NOT_KNOWN = "17060"
801811

802812

803-
class PolypInterventionModalityOptions(Enum):
813+
class PolypInterventionModalityOptions(StrEnum):
804814
"""Enum for polyp intervention modality options"""
805815

806816
POLYPECTOMY = "17189~Resection"
807817
EMR = "17193~Resection"
808818
ESD = "17520~Resection"
809819

810820

811-
class PolypInterventionDeviceOptions(Enum):
821+
class PolypInterventionDeviceOptions(StrEnum):
812822
"""Enum for polyp intervention device options"""
813823

814824
HOT_SNARE = "17070"
@@ -817,7 +827,7 @@ class PolypInterventionDeviceOptions(Enum):
817827
COLD_BIOPSY = "17073~En-bloc"
818828

819829

820-
class PolypInterventionExcisionTechniqueOptions(Enum):
830+
class PolypInterventionExcisionTechniqueOptions(StrEnum):
821831
"""Enum for polyp intervention excision technique options"""
822832

823833
EN_BLOC = "17751"

0 commit comments

Comments
 (0)