def test_persona_cookie(self): """ Smoketest of cookie handling/Persona integration Log in with Persona user After refreshing 123done should still be logged in (cookie retained) """ browser = Browser(self.marionette) browser.launch() browser.go_to_url('http://firefoxos.123done.org') browser.switch_to_content() self.wait_for_element_displayed(*self._logged_out_button_locator, timeout=120) login_button = self.marionette.find_element(*self._logged_out_button_locator) login_button.tap() persona = Persona(self.marionette) persona.switch_to_persona_frame() persona.login(self.user.email, self.user.password) # Back to browser content browser.switch_to_content() self.wait_for_element_displayed(*self._logged_in_button_locator) browser.switch_to_chrome() # Refresh the page browser.tap_go_button() # Now we expect B2G to retain the Persona cookie and remain logged in browser.switch_to_content() self.wait_for_element_displayed(*self._logged_in_button_locator)
def test_persona_cookie(self): """ Smoketest of cookie handling/Persona integration Log in with Persona user After refreshing 123done should still be logged in (cookie retained) """ browser = Browser(self.marionette) browser.launch() browser.go_to_url('http://firefoxos.123done.org', timeout=120) browser.switch_to_content() self.wait_for_element_displayed(*self._logged_out_button_locator, timeout=120) login_button = self.marionette.find_element( *self._logged_out_button_locator) login_button.tap() persona = Persona(self.marionette) persona.switch_to_persona_frame() persona.login(self.user.email, self.user.password) # Back to browser content browser.switch_to_content() self.wait_for_element_displayed(*self._logged_in_button_locator) browser.switch_to_chrome() # Refresh the page browser.tap_go_button() # Now we expect B2G to retain the Persona cookie and remain logged in browser.switch_to_content() self.wait_for_element_displayed(*self._logged_in_button_locator)
def tap_standard_sign_in(self): self.tap_standard_button() from gaiatest.apps.persona.app import Persona persona = Persona(self.marionette) persona.switch_to_persona_frame() return persona