Skip to content

Commit 19bcdad

Browse files
fix promote stub test
1 parent 9fae483 commit 19bcdad

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

tests/base_test_class.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,9 @@ def is_element_by_id_present(self, elem_id):
260260
return False
261261
return True
262262

263+
def is_info_message_present(self, text=None):
264+
return self.is_element_by_css_selector_present(".alert-info", text=text)
265+
263266
def is_success_message_present(self, text=None):
264267
return self.is_element_by_css_selector_present(".alert-success", text=text)
265268

tests/test_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ def test_add_and_promote_stub_finding(self):
214214
driver.find_element(By.PARTIAL_LINK_TEXT, "Quick Security Testing").click()
215215

216216
# Click on link of finding name to promote to finding
217-
driver.find_elements(By.NAME, "stub_finding_name")[0].click()
218-
# Check we have the correct stub finding
217+
driver.find_element(By.PARTIAL_LINK_TEXT, "App Vulnerable to XSS3").click()
218+
self.assertTrue(self.is_info_message_present(text="In order to promote a Potential Finding to a Verified Finding you must provide the following information."))
219219
self.assertEqual(driver.find_element(By.ID, "id_title").get_attribute("value"), "App Vulnerable to XSS3")
220220
# Edit finding Description
221221
driver.find_element(By.ID, "id_cvssv3_score").send_keys(Keys.TAB, Keys.TAB, "This is a promoted stub finding")

0 commit comments

Comments
 (0)