本文整理汇总了Python中marketplacetests.marketplace.app.Marketplace.wait_for_setting_displayed方法的典型用法代码示例。如果您正苦于以下问题:Python Marketplace.wait_for_setting_displayed方法的具体用法?Python Marketplace.wait_for_setting_displayed怎么用?Python Marketplace.wait_for_setting_displayed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类marketplacetests.marketplace.app.Marketplace
的用法示例。
在下文中一共展示了Marketplace.wait_for_setting_displayed方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestMarketplaceFeedback
# 需要导入模块: from marketplacetests.marketplace.app import Marketplace [as 别名]
# 或者: from marketplacetests.marketplace.app.Marketplace import wait_for_setting_displayed [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)
示例2: TestMarketplaceFeedback
# 需要导入模块: from marketplacetests.marketplace.app import Marketplace [as 别名]
# 或者: from marketplacetests.marketplace.app.Marketplace import wait_for_setting_displayed [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)
示例3: TestMarketplaceLogin
# 需要导入模块: from marketplacetests.marketplace.app import Marketplace [as 别名]
# 或者: from marketplacetests.marketplace.app.Marketplace import wait_for_setting_displayed [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()