From 8508e57cb830b46f5b315d28f585c3bc1c8bd1f7 Mon Sep 17 00:00:00 2001 From: Manuel Sommer Date: Wed, 6 Nov 2024 12:05:55 +0100 Subject: [PATCH] fix dedupe_test --- tests/dedupe_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/dedupe_test.py b/tests/dedupe_test.py index 194c8e368ee..2b79be0a49d 100644 --- a/tests/dedupe_test.py +++ b/tests/dedupe_test.py @@ -141,7 +141,7 @@ def test_import_path_tests(self): driver.find_element(By.PARTIAL_LINK_TEXT, "Path Test 1").click() driver.find_element(By.ID, "dropdownMenu1").click() driver.find_element(By.LINK_TEXT, "Re-Upload Scan").click() - driver.find_element(By.ID, "id_file").send_keys(self.relative_path + "/dedupe_scans/dedupe_path_1.json") + driver.find_element(By.ID, "id_file").send_keys(os.path.realpath(self.relative_path + "/dedupe_scans/dedupe_path_1.json")) driver.find_elements(By.CSS_SELECTOR, "button.btn.btn-primary")[1].click() # 'Bandit Scan processed a total of 1 findings created 1 findings did not touch 1 findings.' @@ -155,7 +155,7 @@ def test_import_path_tests(self): driver.find_element(By.PARTIAL_LINK_TEXT, "Path Test 2").click() driver.find_element(By.ID, "dropdownMenu1").click() driver.find_element(By.LINK_TEXT, "Re-Upload Scan").click() - driver.find_element(By.ID, "id_file").send_keys(self.relative_path + "/dedupe_scans/dedupe_path_2.json") + driver.find_element(By.ID, "id_file").send_keys(os.path.realpath(self.relative_path + "/dedupe_scans/dedupe_path_2.json")) driver.find_elements(By.CSS_SELECTOR, "button.btn.btn-primary")[1].click() # 'Bandit Scan processed a total of 2 findings created 2 findings did not touch 1 findings.' @@ -213,7 +213,7 @@ def test_import_endpoint_tests(self): driver.find_element(By.PARTIAL_LINK_TEXT, "Endpoint Test 1").click() driver.find_element(By.ID, "dropdownMenu1").click() driver.find_element(By.LINK_TEXT, "Re-Upload Scan").click() - driver.find_element(By.ID, "id_file").send_keys(self.relative_path + "/dedupe_scans/dedupe_endpoint_1.xml") + driver.find_element(By.ID, "id_file").send_keys(os.path.realpath(self.relative_path + "/dedupe_scans/dedupe_endpoint_1.xml")) driver.find_elements(By.CSS_SELECTOR, "button.btn.btn-primary")[1].click() self.assertTrue(self.is_success_message_present(text="a total of 3 findings")) @@ -224,7 +224,7 @@ def test_import_endpoint_tests(self): driver.find_element(By.PARTIAL_LINK_TEXT, "Endpoint Test 2").click() driver.find_element(By.ID, "dropdownMenu1").click() driver.find_element(By.LINK_TEXT, "Re-Upload Scan").click() - driver.find_element(By.ID, "id_file").send_keys(self.relative_path + "/dedupe_scans/dedupe_endpoint_2.xml") + driver.find_element(By.ID, "id_file").send_keys(os.path.realpath(self.relative_path + "/dedupe_scans/dedupe_endpoint_2.xml")) driver.find_elements(By.CSS_SELECTOR, "button.btn.btn-primary")[1].click() self.assertTrue(self.is_success_message_present(text="a total of 3 findings"))