當前位置: 首頁>>代碼示例>>Python>>正文


Python Marketplace.tap_settings方法代碼示例

本文整理匯總了Python中marketplacetests.marketplace.app.Marketplace.tap_settings方法的典型用法代碼示例。如果您正苦於以下問題:Python Marketplace.tap_settings方法的具體用法?Python Marketplace.tap_settings怎麽用?Python Marketplace.tap_settings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在marketplacetests.marketplace.app.Marketplace的用法示例。


在下文中一共展示了Marketplace.tap_settings方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: test_marketplace_change_region_anonymous

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
    def test_marketplace_change_region_anonymous(self):

        marketplace = Marketplace(self.marionette, 'Marketplace Dev')
        marketplace.launch()

        settings = marketplace.tap_settings()

        # change region
        settings.select_region(self._REGION)

        # save changes
        settings.tap_save_changes()

        # wait for the changes to be saved
        marketplace.wait_for_notification_message_displayed()
        self.assertEqual(marketplace.notification_message, 'Settings saved')

        # go to home
        marketplace.tap_back()

        # go back to settings
        settings = marketplace.tap_settings()

        # check if the region is same as changed before
        self.assertEqual(settings.region, self._REGION)
開發者ID:AlinT,項目名稱:marketplace-tests-gaia,代碼行數:27,代碼來源:test_marketplace_change_region_anonymous.py

示例2: test_add_review

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
    def test_add_review(self):

        marketplace = Marketplace(self.marionette, 'Marketplace dev')
        marketplace.launch()

        # Sign in
        settings = marketplace.tap_settings()
        persona = settings.tap_sign_in()
        persona.login(self.user.email, self.user.password)

        self.marionette.switch_to_frame()
        marketplace.launch()
        settings.wait_for_sign_out_button()

        # Search and select app
        results = marketplace.search('SoundCloud')
        self.assertGreater(len(results.search_results), 0, 'No results found.')
        details_page = results.search_results[0].tap_app()

        # Setting your default values for review
        current_time = str(time.time()).split('.')[0]
        rating = random.randint(1, 5)
        body = 'This is a test %s' % current_time

        # Adding the review
        review_box = details_page.tap_write_review()
        review_box.write_a_review(rating, body)

        marketplace.wait_for_notification_message_displayed()

        # Check if review was added correctly
        self.assertEqual(marketplace.notification_message, "Your review was posted")
        self.assertEqual(details_page.first_review_rating, rating)
        self.assertEqual(details_page.first_review_body, body)
開發者ID:chirarobert,項目名稱:marketplace-tests-gaia,代碼行數:36,代碼來源:test_marketplace_add_review.py

示例3: TestMarketplaceFeedback

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
class TestMarketplaceFeedback(GaiaTestCase):
    MARKETPLACE_DEV_NAME = 'Marketplace Dev'
    feedback_submitted_message = u'Feedback submitted. Thanks!'
    test_comment = 'This is a test comment.'

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.connect_to_network()
        self.install_marketplace()

    def test_marketplace_feedback_anonymous(self):
        # launch marketplace dev and go to marketplace
        self.marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
        self.marketplace.launch()

        # wait for settings button to come out
        self.marketplace.wait_for_setting_displayed()
        settings = self.marketplace.tap_settings()
        self.marketplace.select_setting_feedback()

        # enter and submit your feedback
        self.marketplace.enter_feedback(self.test_comment)
        self.marketplace.submit_feedback()

        # catch the notification
        self.marketplace.wait_for_notification_message_displayed()
        message_content = self.marketplace.notification_message

        # verify if the notification is right
        self.assertEqual(message_content, self.feedback_submitted_message)
開發者ID:AlinT,項目名稱:marketplace-tests-gaia,代碼行數:32,代碼來源:test_marketplace_feedback_anonymous.py

示例4: test_marketplace_purchase_app_wifi

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
    def test_marketplace_purchase_app_wifi(self):

        marketplace = Marketplace(self.marionette, 'Marketplace Dev')
        marketplace.launch()

        # Tap settings and sign in in Marketplace
        settings = marketplace.tap_settings()
        persona = settings.tap_sign_in()

        # login with PersonaTestUser account
        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        marketplace.launch()

        # wait for the page to refresh and the sign out button to be visible
        settings.wait_for_sign_out_button()

        # Well I dunno, it just needs this
        time.sleep(3)

        settings.select_region("Spain")

        time.sleep(3)

        settings.tap_save_changes()

        # search for a paid app and tap on the price
        search = marketplace.search(self._APP_NAME)
        bango = search.search_results[0].tap_purchase_button()

        # pay app
        bango.create_pin('1234')

        # verify phone number
        bango.verify_phone_number(mobile_phone_number=self.testvars['carrier']['phone_number'],
                                  country=self.testvars['carrier']['country'],
                                  network=self.testvars['carrier']['network'])

        # but the app
        bango.wait_for_buy_app_section_displayed()
        bango.tap_buy_button()

        # At gaia System level, complete the installation prompt
        self._confirm_installation()

        # Switch into homescreen frame
        homescreen_frame = self.marionette.find_element(*self._homescreen_iframe_locator)
        self.marionette.switch_to_frame(homescreen_frame)

        # Not overly concerned about it being visible, only present
        self.assertTrue(self.is_element_present(*self._app_icon_locator))
開發者ID:AlinT,項目名稱:marketplace-tests-gaia,代碼行數:55,代碼來源:test_marketplace_purchase_app_wifi.py

示例5: test_marketplace_purchase_app_on_dev_with_mocked_bango

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
    def test_marketplace_purchase_app_on_dev_with_mocked_bango(self):

        marketplace = Marketplace(self.marionette, 'Marketplace Dev')
        marketplace.launch()

        # Tap settings and sign in in Marketplace
        settings = marketplace.tap_settings()
        persona = settings.tap_sign_in()

        # login with PersonaTestUser account
        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        marketplace.launch()

        # wait for the page to refresh and the sign out button to be visible
        settings.wait_for_sign_out_button()

        # Well I dunno, it just needs this
        time.sleep(3)

        settings.select_region("Spain")

        time.sleep(3)

        settings.tap_save_changes()
        marketplace.wait_for_notification_message_not_displayed()

        # search for a paid app and tap on the price
        search = marketplace.search('Bag of Dice')
        bango = search.search_results[0].tap_purchase_button()

        # pay app
        bango.create_pin('1234')

        # make fake payment
        bango.make_fake_payment()
        self.marionette.switch_to_frame()

        # At gaia System level, complete the installation prompt
        self._confirm_installation()

        # Switch into homescreen frame
        homescreen_frame = self.marionette.find_element(*self._homescreen_iframe_locator)
        self.marionette.switch_to_frame(homescreen_frame)

        # Not overly concerned about it being visible, only present
        self.assertTrue(self.is_element_present(*self._app_icon_locator))
開發者ID:bebef1987,項目名稱:marketplace-tests-gaia,代碼行數:51,代碼來源:test_marketplace_purchase_app_on_dev_with_mocked_bango.py

示例6: TestMarketplaceFeedback

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
class TestMarketplaceFeedback(MarketplaceGaiaTestCase):
    feedback_submitted_message = u'Feedback submitted. Thanks!'
    test_comment = 'This is a test comment.'

    def test_marketplace_feedback_anonymous(self):

        # launch marketplace dev and go to marketplace
        self.marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
        self.marketplace.launch()

        # go to settings page
        self.marketplace.tap_settings()
        self.marketplace.select_setting_feedback()

        # enter and submit your feedback
        self.marketplace.enter_feedback(self.test_comment)
        self.marketplace.submit_feedback()

        # catch the notification
        self.marketplace.wait_for_notification_message_displayed()
        message_content = self.marketplace.notification_message

        # verify if the notification is right
        self.assertEqual(message_content, self.feedback_submitted_message)
開發者ID:bobsilverberg,項目名稱:marketplace-tests-gaia,代碼行數:26,代碼來源:test_marketplace_feedback_anonymous.py

示例7: test_marketplace_purchase_app_credit_card

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
    def test_marketplace_purchase_app_credit_card(self):

        marketplace = Marketplace(self.marionette, 'Marketplace Dev')
        marketplace.launch()

        # Tap settings and sign in in Marketplace
        settings = marketplace.tap_settings()
        persona = settings.tap_sign_in()

        # login with PersonaTestUser account
        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        marketplace.launch()

        # wait for the page to refresh and the sign out button to be visible
        settings.wait_for_sign_out_button()

        # Well I dunno, it just needs this
        time.sleep(3)

        settings.select_region("Spain")

        time.sleep(3)

        settings.tap_save_changes()

        # search for a paid app and tap on the price
        search = marketplace.search(self._APP_NAME)
        bango = search.search_results[0].tap_purchase_button()

        # pay app
        bango.create_pin('1234')

        # enter credit card details
        bango.pay_using_credit_card('5149934112455150', '0718', '123')
        self.marionette.switch_to_frame()

        # At gaia System level, complete the installation prompt
        self._confirm_installation()

        # Switch into homescreen frame
        homescreen_frame = self.marionette.find_element(*self._homescreen_iframe_locator)
        self.marionette.switch_to_frame(homescreen_frame)

        # Not overly concerned about it being visible, only present
        self.assertTrue(self.is_element_present(*self._app_icon_locator))
開發者ID:AlinT,項目名稱:marketplace-tests-gaia,代碼行數:50,代碼來源:test_marketplace_purchase_app_credit_card.py

示例8: TestMarketplaceFeedback

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
class TestMarketplaceFeedback(GaiaTestCase):
    MARKETPLACE_DEV_NAME = 'Marketplace Dev'
    feedback_submitted_message = u'Feedback submitted. Thanks!'
    test_comment = 'This is a test comment.'

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.connect_to_network()
        self.install_marketplace()

        self.user = PersonaTestUser().create_user(verified=True,
                                                  env={"browserid": "firefoxos.persona.org", "verifier": "marketplace-dev.allizom.org"})

    def test_marketplace_feedback_user(self):
        # launch marketplace dev and go to marketplace
        self.marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
        self.marketplace.launch()

        # wait for settings button to come out
        self.marketplace.wait_for_setting_displayed()
        settings = self.marketplace.tap_settings()

        # sign in with persona
        persona = settings.tap_sign_in()
        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        self.marketplace.launch()

        # go to feedback tab
        self.marketplace.select_setting_feedback()

        # enter and submit your feedback
        self.marketplace.enter_feedback(self.test_comment)
        self.marketplace.submit_feedback()

        # catch the notification
        self.marketplace.wait_for_notification_message_displayed()
        message_content = self.marketplace.notification_message

        # verify if the notification is right
        self.assertEqual(message_content, self.feedback_submitted_message)
開發者ID:AlinT,項目名稱:marketplace-tests-gaia,代碼行數:45,代碼來源:test_marketplace_feedback_login.py

示例9: TestMarketplaceLogin

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import tap_settings [as 別名]
class TestMarketplaceLogin(GaiaTestCase):

    MARKETPLACE_DEV_NAME = 'Marketplace Dev'

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.connect_to_network()
        self.install_marketplace()

        self.user = PersonaTestUser().create_user(verified=True,
                                                  env={"browserid": "firefoxos.persona.org", "verifier": "marketplace-dev.allizom.org"})

        self.marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
        self.marketplace.launch()

    def test_login_marketplace(self):
        # https://moztrap.mozilla.org/manage/case/4134/

        self.marketplace.wait_for_setting_displayed()
        settings = self.marketplace.tap_settings()
        persona = settings.tap_sign_in()

        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        self.marketplace.launch()

        # wait for signed-in notification at the bottom of the screen to clear
        self.marketplace.wait_for_notification_message_not_displayed()

        # Verify that user is logged in
        self.assertEqual(self.user.email, settings.email)

        # Sign out, which should return to the Marketplace home screen
        settings.tap_sign_out()

        # Verify that user is signed out
        settings.wait_for_sign_in_displayed()
開發者ID:AlinT,項目名稱:marketplace-tests-gaia,代碼行數:41,代碼來源:test_marketplace_login.py


注:本文中的marketplacetests.marketplace.app.Marketplace.tap_settings方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。