Skip to content

Commit

Permalink
Update deprecated test code
Browse files Browse the repository at this point in the history
Updates old test code using deprecated find_element_by functions in test_dashboard to use new find_element function.
  • Loading branch information
ItIsJordan committed Aug 14, 2024
1 parent 568d7d9 commit 5f162ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/e2e/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ def test_dashboard(live_server, logged_in_browser):
assert manage_widget.find_element(By.CLASS_NAME,'modal-title').text == 'Manage Submission'

# Check reminder email button works
reminder_button = manage_widget.find_element_by_css_selector('.trigger-actions .btn-primary')
reminder_button = manage_widget.find_element(By.CSS_SELECTOR, '.trigger-actions .btn-primary')
assert reminder_button.get_attribute('data-action') == 'email'
reminder_button.click()
confirmation_message = manage_widget.find_element_by_id('confirmation_message').text
confirmation_message = manage_widget.find_element(By.ID, 'confirmation_message').text
assert confirmation_message == 'Are you sure you want to email this uploader?'
confirmation_button = manage_widget.find_element_by_css_selector('.confirm-move-action')
confirmation_button = manage_widget.find_element(By.CSS_SELECTOR, '.confirm-move-action')
confirmation_button.click()
assert not manage_widget.find_element_by_id('confirmation').is_displayed()
assert not manage_widget.find_element(By.ID, 'confirmation').is_displayed()

# Close modal
manage_widget.find_element(By.CSS_SELECTOR, '.modal-footer .btn-default').click()
Expand Down

0 comments on commit 5f162ab

Please sign in to comment.