Skip to content

Commit

Permalink
Add wait_for in selenium test
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekj117 committed Jun 24, 2020
1 parent d2ff2bd commit 85327b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions securedrop/tests/functional/journalist_navigation_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,8 @@ def _admin_adds_a_user_with_invalid_username(self):

self.safe_click_by_css_selector("button[type=submit]")

self.wait_for(lambda: self.driver.find_element_by_css_selector(".form-validation-error"))

error_msg = self.driver.find_element_by_css_selector(".form-validation-error")
assert "Invalid username '{}'".format(invalid_username) in error_msg.text

Expand Down

0 comments on commit 85327b0

Please sign in to comment.