Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Add a fix for mozillians failing tests and update registration tests …
Browse files Browse the repository at this point in the history
…to skip location setting step when creating profile
  • Loading branch information
viorelaioia committed Feb 14, 2017
1 parent 26a141e commit e4c9369
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion pages/edit_group.py
Expand Up @@ -72,7 +72,8 @@ def set_irc_channel(self, irc_channel):

def click_update(self):
self._root_element.find_element(*self._update_locator).click()
self.wait_for_page_loaded()
self.wait_for_element_not_present(*self._update_locator)
self.wait_for_element_present(*self._update_locator)

class DeletePanel(PageRegion):
_delete_acknowledgement_locator = (By.ID, 'delete-checkbox')
Expand Down
12 changes: 8 additions & 4 deletions pages/settings.py
Expand Up @@ -108,7 +108,8 @@ def set_bio(self, biography):

def click_update(self):
self._root_element.find_element(*self._update_locator).click()
self.wait_for_page_loaded()
self.wait_for_element_not_present(*self._update_locator)
self.wait_for_element_present(*self._update_locator)

class DeleteAccount(PageRegion):

Expand Down Expand Up @@ -156,7 +157,8 @@ def delete_skill(self, skill):

def click_update(self):
self._root_element.find_element(*self._update_locator).click()
self.wait_for_page_loaded()
self.wait_for_element_not_present(*self._update_locator)
self.wait_for_element_present(*self._update_locator)

class YouAndMozilla(PageRegion):

Expand Down Expand Up @@ -215,7 +217,8 @@ def select_random_year(self):

def click_update(self):
self._root_element.find_element(*self._update_locator).click()
self.wait_for_page_loaded()
self.wait_for_element_not_present(*self._update_locator)
self.wait_for_element_present(*self._update_locator)

class Groups(PageRegion):

Expand Down Expand Up @@ -276,7 +279,8 @@ def update_nickname(self, new_nickname):

def click_update(self):
self._root_element.find_element(*self._update_locator).click()
self.wait_for_page_loaded()
self.wait_for_element_not_present(*self._update_locator)
self.wait_for_element_present(*self._update_locator)

class DeveloperTab(PageRegion):

Expand Down
7 changes: 0 additions & 7 deletions tests/test_register.py
Expand Up @@ -19,9 +19,6 @@ def test_profile_creation(self, base_url, selenium, new_user):
# Full name
profile.set_full_name("New MozilliansUser")

# Location
profile.set_location('Mountain View, 94041, California')

# Agree to privacy policy
profile.check_privacy()

Expand All @@ -32,17 +29,13 @@ def test_profile_creation(self, base_url, selenium, new_user):

assert 'New MozilliansUser' == profile_page.name
assert new_user['email'] == profile_page.email
assert 'Mountain View, California, United States' == profile_page.location

def test_creating_profile_without_checking_privacy_policy_checkbox(self, base_url, selenium, new_user):
home_page = Home(base_url, selenium)
profile = home_page.create_new_user(new_user['email'])

profile.set_full_name("User that doesn't like policy")

# Location
profile.set_location('Durango, Colorado')

# Click recaptcha box
profile.check_recaptcha()

Expand Down

0 comments on commit e4c9369

Please sign in to comment.