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


Python Marketplace.submit_feedback方法代碼示例

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


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

示例1: TestMarketplaceFeedback

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import submit_feedback [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

示例2: TestMarketplaceFeedback

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import submit_feedback [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

示例3: test_marketplace_feedback_user

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import submit_feedback [as 別名]
    def test_marketplace_feedback_user(self):
        username = self.testvars['marketplace']['username']
        password = self.testvars['marketplace']['password']

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

        # go to feedback tab
        marketplace.select_setting_feedback()

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

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

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

示例4: TestMarketplaceFeedback

# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import submit_feedback [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


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