Example #1
0
    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.click()

        persona = Persona(self.marionette)
        persona.login(self.user.email, self.user.password)

        # wait to fall back to browser
        self.wait_for_condition(lambda m: self.apps.displayed_app.name == browser.name)
        self.apps.switch_to_displayed_app()

        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)
Example #2
0
 def tap_sign_in(self):
     self.marionette.find_element(*self._sign_in_button_locator).tap()
     from gaiatest.apps.persona.app import Persona
     return Persona(self.marionette)
Example #3
0
 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
Example #4
0
 def tap_sign_in(self):
     # TODO: click works but not tap
     self.marionette.find_element(*self._sign_in_button_locator).click()
     from gaiatest.apps.persona.app import Persona
     return Persona(self.marionette)
Example #5
0
File: persona.py Project: adrm/gaia
 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
Example #6
0
 def launch_standard_sign_in(self):
     self.switch_to_mozId_frame()
     self.tap_standard_button()
     from gaiatest.apps.persona.app import Persona
     return Persona(self.marionette)