Beispiel #1
0
 def login(self, user):
     credentials = (user, MockUser) and user
     from fxapom.pages.sign_in import SignIn
     fxa_login = SignIn(self.testsetup)
     fxa_login.sign_in(credentials['email'], credentials['password'])
     self.wait_notification_box_visible()
     self.wait_notification_box_not_visible()
Beispiel #2
0
    def login(self, email, password):
        from fxapom.pages.sign_in import SignIn

        fxa_login = SignIn(self.testsetup)
        fxa_login.sign_in(email, password)
        self.wait_notification_box_visible()
        self.wait_notification_box_not_visible()
Beispiel #3
0
def test_webdriver_with_fxa_popup(webdriver):
    webdriver.current_window_handle = 'bar'
    webdriver.window_handles = [1, 2]
    sign_in = SignIn(webdriver)
    assert sign_in._main_window_handle == 'bar'
    assert sign_in.popup is True
    webdriver.window_handles = [2]
    sign_in.sign_in('email', 'password')
Beispiel #4
0
def test_webdriver_with_fxa_popup(webdriver):
    webdriver.current_window_handle = 'bar'
    webdriver.window_handles = [1, 2]
    sign_in = SignIn(webdriver)
    assert sign_in._main_window_handle == 'bar'
    assert sign_in.popup is True
    webdriver.window_handles = [2]
    sign_in.sign_in('email', 'password')
Beispiel #5
0
def test_webdriver_with_fxa_popup(webdriver):
    webdriver.current_window_handle = "bar"
    webdriver.window_handles = [1, 2]
    sign_in = SignIn(webdriver)
    assert sign_in._main_window_handle == "bar"
    assert sign_in.popup is True
    webdriver.window_handles = [2]
    sign_in.sign_in("email", "password")
Beispiel #6
0
def test_webdriver_fxa_popup_without_logo_displayed(webdriver):
    webdriver.window_handles = [1, 2]

    def hidden_logo(*locator):
        element = Mock()
        element.is_displayed = Mock(return_value=True)
        if locator == SignIn._fox_logo_locator:
            element.is_displayed.return_value = False
        return element

    webdriver.find_element = Mock(side_effect=hidden_logo)
    sign_in = SignIn(webdriver)
    webdriver.window_handles = [2]
    sign_in.sign_in('email', 'password')
Beispiel #7
0
def test_webdriver_fxa_popup_without_logo_displayed(webdriver):
    webdriver.window_handles = [1, 2]

    def hidden_logo(*locator):
        element = Mock()
        element.is_displayed = Mock(return_value=True)
        if locator == SignIn._fox_logo_locator:
            element.is_displayed.return_value = False
        return element

    webdriver.find_element = Mock(side_effect=hidden_logo)
    sign_in = SignIn(webdriver)
    webdriver.window_handles = [2]
    sign_in.sign_in('email', 'password')
Beispiel #8
0
 def login(self, email, password):
     from fxapom.pages.sign_in import SignIn
     fxa_login = SignIn(self.testsetup)
     fxa_login.sign_in(email, password)
     self.wait_notification_box_visible()
     self.wait_notification_box_not_visible()
Beispiel #9
0
 def login(self, email, password):
     from fxapom.pages.sign_in import SignIn
     fxa_login = SignIn(self.selenium)
     fxa_login.sign_in(email, password)
     self.wait_for_notification()
Beispiel #10
0
 def login(self, user):
     credentials = (user, MockUser) and user
     from fxapom.pages.sign_in import SignIn
     fxa_login = SignIn(self.testsetup)
     fxa_login.sign_in(credentials['email'], credentials['password'])