Skip to content

Commit b918223

Browse files
committed
Hotfix because caseworker was the 10th and not 9th entry in row - 9th is a placeholder
1 parent e306d7c commit b918223

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

itk_dev_shared_components/eflyt/eflyt_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def extract_cases(browser: webdriver.Chrome) -> list[Case]:
8181
status = row.find_element(By.XPATH, "td[6]").text
8282
cpr = row.find_element(By.XPATH, "td[7]/a").text
8383
name = row.find_element(By.XPATH, "td[8]").text
84-
case_worker = row.find_element(By.XPATH, "td[9]").text
84+
case_worker = row.find_element(By.XPATH, "td[10]").text
8585

8686
case = Case(case_number, deadline, case_types, status, cpr, name, case_worker)
8787
cases.append(case)

tests/test_eflyt/test_search.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@ def test_extract_cases(self):
3535
self.assertIsInstance(case.deadline, (date, type(None)))
3636
self.assertIsInstance(case.status, str)
3737
self.assertIsInstance(case.cpr, str)
38+
self.assertRegex(case.cpr, r"\d{6}-\d{4}")
3839
self.assertIsInstance(case.name, str)
40+
self.assertGreater(len(case.name), 0)
3941
self.assertIsInstance(case.case_worker, str)
42+
self.assertGreater(len(case.case_worker), 0)
4043

4144
def test_open_case(self):
4245
"""Open a case and check the browser opened the case view"""

0 commit comments

Comments
 (0)