This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
test_marketplace_login.py
55 lines (37 loc) · 1.74 KB
/
test_marketplace_login.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from gaiatest import GaiaTestCase
class TestMarketplaceLogin(GaiaTestCase):
_login_button = ('css selector', 'a.button.browserid')
_persona_frame = ('css selector', "iframe[name='__persona_dialog']")
_search_result = ('css selector', '#search-results li.item')
def setUp(self):
GaiaTestCase.setUp(self)
# unlock the lockscreen if it's locked
self.lockscreen.unlock()
self.data_layer.enable_wifi()
self.data_layer.connect_to_wifi(self.testvars['wifi'])
# launch the app
self.app = self.apps.launch('Marketplace')
def test_login_marketplace(self):
# https://moztrap.mozilla.org/manage/case/4134/
self.wait_for_element_displayed(*self._login_button)
self.marionette.find_element(*self._login_button).click()
# switch to top level frame
self.marionette.switch_to_frame()
#switch to persona frame
self.wait_for_element_present(*self._persona_frame)
#persona_frame = self.marionette.find_element(*self._persona_frame)
#self.marionette.switch_to_frame(persona_frame)
#TODO switch to Persona frame and wait for throbber to clear
#TODO complete Persona login
#self.testvars['marketplace_username']
#self.testvars['marketplace_password']
#TODO Switch back to marketplace and verify that user is logged in
def tearDown(self):
# close the app
if self.app:
self.apps.kill(self.app)
self.data_layer.disable_wifi()
GaiaTestCase.tearDown(self)