Skip to content

Commit c79d8aa

Browse files
committed
addressing sonarqube errors
1 parent e9f7f67 commit c79d8aa

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

tests/regression/manual_cease/test_manually_cease_a_subject.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,6 @@ def test_manual_cease_from_already_ceased_subject_for_informal_death(
558558
)
559559

560560

561-
@pytest.mark.wip
562561
@pytest.mark.vpn_required
563562
@pytest.mark.manual_cease
564563
@pytest.mark.regression

utils/manual_cease.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from playwright.sync_api import Page
88
from enum import IntEnum
99

10+
BTN_REQUEST_CEASE_SELECTOR = "input[name='BTN_REQUEST_CEASE']"
11+
1012

1113
def create_manual_cease_ready_subject(
1214
screening_centre: str = "BCS002", base_age: int = 75
@@ -77,13 +79,13 @@ def process_manual_cease_with_disclaimer(
7779

7880
try:
7981
# Check if Request Cease button is visible
80-
page.locator("input[name='BTN_REQUEST_CEASE']").wait_for(timeout=3000)
82+
page.locator(BTN_REQUEST_CEASE_SELECTOR).wait_for(timeout=3000)
8183
logging.info(
8284
"[CHECK] 'Request Cease' button is present — proceeding with steps 1-3"
8385
)
8486

8587
# Step 1: Click "Request Cease"
86-
page.locator("input[name='BTN_REQUEST_CEASE']").click()
88+
page.locator(BTN_REQUEST_CEASE_SELECTOR).click()
8789
logging.info("[STEP 1] Clicked 'Request Cease'")
8890

8991
# Step 2: Select reason
@@ -136,7 +138,7 @@ def process_manual_cease_immediate(
136138
logging.info("[MANUAL CEASE] Starting full cease workflow")
137139

138140
# Step 1: Click "Request Cease"
139-
page.locator("input[name='BTN_REQUEST_CEASE']").click()
141+
page.locator(BTN_REQUEST_CEASE_SELECTOR).click()
140142
logging.info("[STEP 1] Clicked 'Request Cease'")
141143

142144
# Step 2: Select reason from dropdown
@@ -169,7 +171,7 @@ def process_manual_cease_immediate(
169171
logging.info("[STEP 4] Clicked 'Save Request Cease'")
170172
else:
171173
logging.error("[STEP 4] No cease confirmation button found!")
172-
raise Exception("Cease button not found on the page")
174+
raise RuntimeError("Cease button not found on the page")
173175

174176

175177
# Markers for special assertions

0 commit comments

Comments
 (0)