-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing of the notification delay update
- Loading branch information
Showing
1 changed file
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1022,6 +1022,11 @@ def test_edit_profile_scenario(self): | |
self.assertEqual(last_name_field.get_attribute("value"), "Frusciante") | ||
email_field = self.selenium.find_element(By.ID, "id_email") | ||
self.assertEqual(email_field.get_attribute("value"), "[email protected]") | ||
motification_delay_days_field = self.selenium.find_element( | ||
By.ID, "id_notification_delay_days" | ||
) | ||
# Users have one year of delay by default | ||
self.assertEqual(motification_delay_days_field.get_attribute("value"), "365") | ||
|
||
# Let's update the values | ||
first_name_field.clear() | ||
|
@@ -1030,6 +1035,8 @@ def test_edit_profile_scenario(self): | |
last_name_field.send_keys("Palmer") | ||
email_field.clear() | ||
email_field.send_keys("[email protected]") | ||
motification_delay_days_field.clear() | ||
motification_delay_days_field.send_keys("30") | ||
save_button = self.selenium.find_element( | ||
By.ID, "gbif-alert-profile-save-button" | ||
) | ||
|
@@ -1059,6 +1066,11 @@ def test_edit_profile_scenario(self): | |
self.assertEqual(last_name_field.get_attribute("value"), "Palmer") | ||
email_field = self.selenium.find_element(By.ID, "id_email") | ||
self.assertEqual(email_field.get_attribute("value"), "[email protected]") | ||
motification_delay_days_field = self.selenium.find_element( | ||
By.ID, "id_notification_delay_days" | ||
) | ||
# Users have one year of delay by default | ||
self.assertEqual(motification_delay_days_field.get_attribute("value"), "30") | ||
|
||
def test_no_profile_page_if_not_logged(self): | ||
"""We try to access the profile page directly from the URL, without being signed in""" | ||
|