{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/comments/26932005","id":26932005,"diff_hunk":"@@ -0,0 +1,44 @@\n+# This Source Code Form is subject to the terms of the Mozilla Public\n+# License, v. 2.0. If a copy of the MPL was not distributed with this\n+# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n+\n+from fxapom.fxapom import FxATestAccount\n+\n+from marketplacetests.marketplace_gaia_test import MarketplaceGaiaTestCase\n+from marketplacetests.marketplace.app import Marketplace\n+from marketplacetests.payment.app import Payment\n+\n+\n+class TestMarketplaceIncorrectPin(MarketplaceGaiaTestCase):\n+\n+    def test_incorrect_pin(self):\n+\n+        APP_NAME = 'Test Zippy With Me'\n+        good_pin = '1234'\n+        bad_pin = '1111'\n+        acct = FxATestAccount(base_url=self.base_url).create_account()\n+\n+        if self.apps.is_app_installed(APP_NAME):\n+            self.apps.uninstall(APP_NAME)\n+\n+        marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)\n+        marketplace.launch()\n+\n+        marketplace.login(acct.email, acct.password)\n+\n+        marketplace.set_region('United States')\n+\n+        details_page = marketplace.navigate_to_app(APP_NAME)\n+        details_page.tap_install_button()\n+\n+        payment = Payment(self.marionette)\n+        payment.create_pin(good_pin)\n+        payment.wait_for_buy_app_section_displayed()\n+        self.assertIn(APP_NAME, payment.app_name)\n+        payment.tap_cancel_button()\n+\n+        marketplace.wait_for_notification_message_displayed('Payment cancelled.')","path":"marketplacetests/tests/test_marketplace_incorrect_pin.py","position":40,"original_position":40,"commit_id":"49fc56d68381cdad9220de4a0c4a8d7affc2665f","original_commit_id":"49fc56d68381cdad9220de4a0c4a8d7affc2665f","user":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?v=3","gravatar_id":"","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"body":"We need to complete the create PIN dialog in order to register the correct PIN, which brings us to a screen where we either have to `Buy` or `Cancel`. We then need to bring up the enter PIN dialog in order to test the invalid PIN. It seemed simpler to `Cancel` at this point rather than `Buy`. I haven't tested it, but I was also guessing that if we successfully Buy the app then we won't get an opportunity to enter our PIN again for purchase of this app, so we'd need yet another app to test with. Does that all make sense?","created_at":"2015-03-23T12:28:10Z","updated_at":"2015-03-23T12:28:10Z","html_url":"https://github.com/mozilla/marketplace-tests-gaia/pull/93#discussion_r26932005","pull_request_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93","_links":{"self":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/comments/26932005"},"html":{"href":"https://github.com/mozilla/marketplace-tests-gaia/pull/93#discussion_r26932005"},"pull_request":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93","id":31582699,"html_url":"https://github.com/mozilla/marketplace-tests-gaia/pull/93","diff_url":"https://github.com/mozilla/marketplace-tests-gaia/pull/93.diff","patch_url":"https://github.com/mozilla/marketplace-tests-gaia/pull/93.patch","issue_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues/93","number":93,"state":"open","locked":false,"title":"Bug 1014170 - [marketplace-tests-gaia] Add a test to check that entering an incorrrect PIN throws an error message","user":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?v=3","gravatar_id":"","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"body":"This adds a new test that is part of a Q1 goal.\r\n\r\nIt also includes a bit of refactoring, as we need to be able to call `switch_to_marketplace_frame` from both the marketplace app object and the payment app object.\r\n\r\n@davehunt r?","created_at":"2015-03-20T01:57:25Z","updated_at":"2015-03-23T12:28:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b43a8c8e2cdf77a9f8f6f4e282af3737b552ffa","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93/commits","review_comments_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93/comments","review_comment_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues/93/comments","statuses_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/statuses/49fc56d68381cdad9220de4a0c4a8d7affc2665f","head":{"label":"bobsilverberg:invalid_pin","ref":"invalid_pin","sha":"49fc56d68381cdad9220de4a0c4a8d7affc2665f","user":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?v=3","gravatar_id":"","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"repo":{"id":16386248,"name":"marketplace-tests-gaia","full_name":"bobsilverberg/marketplace-tests-gaia","owner":{"login":"bobsilverberg","id":142755,"avatar_url":"https://avatars.githubusercontent.com/u/142755?v=3","gravatar_id":"","url":"https://api.github.com/users/bobsilverberg","html_url":"https://github.com/bobsilverberg","followers_url":"https://api.github.com/users/bobsilverberg/followers","following_url":"https://api.github.com/users/bobsilverberg/following{/other_user}","gists_url":"https://api.github.com/users/bobsilverberg/gists{/gist_id}","starred_url":"https://api.github.com/users/bobsilverberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobsilverberg/subscriptions","organizations_url":"https://api.github.com/users/bobsilverberg/orgs","repos_url":"https://api.github.com/users/bobsilverberg/repos","events_url":"https://api.github.com/users/bobsilverberg/events{/privacy}","received_events_url":"https://api.github.com/users/bobsilverberg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bobsilverberg/marketplace-tests-gaia","description":"Marketplace UI tests for Firefox OS","fork":true,"url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia","forks_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/forks","keys_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/teams","hooks_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/hooks","issue_events_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/issues/events{/number}","events_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/events","assignees_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/assignees{/user}","branches_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/branches{/branch}","tags_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/tags","blobs_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/languages","stargazers_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/stargazers","contributors_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/contributors","subscribers_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/subscribers","subscription_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/subscription","commits_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/contents/{+path}","compare_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/merges","archive_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/downloads","issues_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/issues{/number}","pulls_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/labels{/name}","releases_url":"https://api.github.com/repos/bobsilverberg/marketplace-tests-gaia/releases{/id}","created_at":"2014-01-30T18:21:47Z","updated_at":"2014-08-12T14:05:32Z","pushed_at":"2015-03-21T18:37:44Z","git_url":"git://github.com/bobsilverberg/marketplace-tests-gaia.git","ssh_url":"git@github.com:bobsilverberg/marketplace-tests-gaia.git","clone_url":"https://github.com/bobsilverberg/marketplace-tests-gaia.git","svn_url":"https://github.com/bobsilverberg/marketplace-tests-gaia","homepage":null,"size":595,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"27aac99063611c0dcd4eaf50cea7412327658987","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":14169815,"name":"marketplace-tests-gaia","full_name":"mozilla/marketplace-tests-gaia","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/marketplace-tests-gaia","description":"Marketplace UI tests for Firefox OS","fork":false,"url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia","forks_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/forks","keys_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/teams","hooks_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/events","assignees_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/tags","blobs_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/subscription","commits_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/merges","archive_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/downloads","issues_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/releases{/id}","created_at":"2013-11-06T10:41:14Z","updated_at":"2015-03-18T18:41:50Z","pushed_at":"2015-03-21T18:37:45Z","git_url":"git://github.com/mozilla/marketplace-tests-gaia.git","ssh_url":"git@github.com:mozilla/marketplace-tests-gaia.git","clone_url":"https://github.com/mozilla/marketplace-tests-gaia.git","svn_url":"https://github.com/mozilla/marketplace-tests-gaia","homepage":null,"size":1053,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":15,"forks":9,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93"},"html":{"href":"https://github.com/mozilla/marketplace-tests-gaia/pull/93"},"issue":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues/93"},"comments":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/issues/93/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/pulls/93/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/marketplace-tests-gaia/statuses/49fc56d68381cdad9220de4a0c4a8d7affc2665f"}}}}