Skip to content

Commit d57c174

Browse files
integration tests: wait for findings datatable (#3704)
* it dedupe: wait for datatables * it dedupe: wait for datatables * it dedupe: wait for datatables
1 parent 6e5d0ae commit d57c174

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/dedupe_test.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,24 @@ def test_delete_findings(self):
7979
driver.find_element_by_css_selector("i.fa.fa-trash").click()
8080
try:
8181
WebDriverWait(driver, 1).until(EC.alert_is_present(),
82-
'Timed out waiting for PA creation ' +
82+
'Timed out waiting for finding delete ' +
8383
'confirmation popup to appear.')
8484
driver.switch_to.alert.accept()
8585
except TimeoutException:
8686
self.fail('Confirmation dialogue not shown, cannot delete previous findings')
8787

88+
# not sure if this is needed. the datatables js logic only kicks in
89+
# if the dev with id "findings" is present
90+
# so if it isn't, the no_findings div is available straight after
91+
# the page load. but we see some errors here about the div not being there
92+
# but when we log the page source, the no_findings div is present
93+
self.wait_for_datatable_if_content("no_findings", "findings_wrapper")
94+
8895
text = None
8996
if self.element_exists_by_id("no_findings"):
9097
text = driver.find_element_by_id("no_findings").text
9198

99+
self.assertIsNotNone(text)
92100
self.assertTrue('No findings found.' in text)
93101
# check that user was redirect back to url where it came from based on return_url
94102
self.assertTrue(driver.current_url.endswith('page=1'))

0 commit comments

Comments
 (0)