Skip to content

Commit

Permalink
Merge pull request #4822 from freedomofpress/backport-4819
Browse files Browse the repository at this point in the history
[1.0.0] Backport #4819 Fix journalist test_delete_one
  • Loading branch information
kushaldas committed Sep 16, 2019
2 parents c7ea7d5 + f19c5cc commit a0ae3a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion securedrop/tests/functional/journalist_navigation_steps.py
Expand Up @@ -17,6 +17,7 @@
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.ui import WebDriverWait


# Number of times to try flaky clicks.
Expand Down Expand Up @@ -879,7 +880,12 @@ def _journalist_delete_all_confirmation(self):

def _journalist_delete_one(self):
self.safe_click_by_css_selector("[name=doc_names_selected]")
self.safe_click_by_id("delete-selected-link")

el = WebDriverWait(self.driver, self.timeout, self.poll_frequency).until(
expected_conditions.element_to_be_clickable((By.ID, "delete-selected-link"))
)
el.location_once_scrolled_into_view
ActionChains(self.driver).move_to_element(el).click().perform()

def _journalist_flags_source(self):
self.safe_click_by_id("flag-button")
Expand Down

0 comments on commit a0ae3a9

Please sign in to comment.