{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/37030702","id":37030702,"diff_hunk":"@@ -0,0 +1,63 @@\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 marionette_driver import expected, By, Wait\n+\n+from gaiatest.apps.clock.app import Clock\n+from gaiatest.apps.base import PageRegion\n+\n+\n+\n+class StopWatch(Clock):\n+    _stopwatch_view_locator = (By.CSS_SELECTOR,'#stopwatch-panel.active')\n+    _stopwatch_time_locator = (By.CSS_SELECTOR, \".stopwatch-time\")\n+    _stopwatch_start_locator = (By.CSS_SELECTOR, '#stopwatch-controls .stopwatch-start')\n+    _stopwatch_pause_locator = (By.CSS_SELECTOR, '#stopwatch-controls .stopwatch-pause')\n+    _stopwatch_reset_locator = (By.CSS_SELECTOR, '#stopwatch-controls .stopwatch-reset')\n+    _stopwatch_resume_locator = (By.CSS_SELECTOR, '#stopwatch-controls .stopwatch-resume')\n+    _stopwatch_lap_locator = (By.CSS_SELECTOR, '#stopwatch-controls .stopwatch-lap')\n+    _all_laps_locator = (By.CSS_SELECTOR, '.stopwatch-laps li')\n+\n+    def __init__(self, marionette):\n+        Clock.__init__(self, marionette)\n+        view = self.marionette.find_element(*self._stopwatch_view_locator)\n+        Wait(self.marionette).until(lambda m: view.location['x'] == 0 and view.is_displayed())\n+\n+    @property\n+    def current_time(self):\n+        current_time = Wait(self.marionette).until(expected.element_present(*self._stopwatch_time_locator))\n+        return current_time.text\n+\n+    @property\n+    def laps(self):\n+        return [self.LapItem(self.marionette, lap) for lap in self.marionette.find_elements(*self._all_laps_locator)]\n+\n+    def start(self):\n+        Wait(self.marionette).until(expected.element_present(*self._stopwatch_start_locator)).tap()\n+\n+    def pause(self):\n+        Wait(self.marionette).until(expected.element_present(*self._stopwatch_pause_locator)).tap()\n+\n+    def reset(self):","path":"tests/python/gaia-ui-tests/gaiatest/apps/clock/regions/stopwatch.py","position":42,"original_position":42,"commit_id":"63cab88f55bc8621b21ac00cfdfcb89c776b0180","original_commit_id":"63cab88f55bc8621b21ac00cfdfcb89c776b0180","user":{"login":"mwargers","id":2105568,"avatar_url":"https://avatars.githubusercontent.com/u/2105568?v=3","gravatar_id":"","url":"https://api.github.com/users/mwargers","html_url":"https://github.com/mwargers","followers_url":"https://api.github.com/users/mwargers/followers","following_url":"https://api.github.com/users/mwargers/following{/other_user}","gists_url":"https://api.github.com/users/mwargers/gists{/gist_id}","starred_url":"https://api.github.com/users/mwargers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwargers/subscriptions","organizations_url":"https://api.github.com/users/mwargers/orgs","repos_url":"https://api.github.com/users/mwargers/repos","events_url":"https://api.github.com/users/mwargers/events{/privacy}","received_events_url":"https://api.github.com/users/mwargers/received_events","type":"User","site_admin":false},"body":"Same here?","created_at":"2015-08-13T21:58:20Z","updated_at":"2015-08-13T21:58:20Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/31336#discussion_r37030702","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/37030702"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/31336#discussion_r37030702"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336","id":42294406,"html_url":"https://github.com/mozilla-b2g/gaia/pull/31336","diff_url":"https://github.com/mozilla-b2g/gaia/pull/31336.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/31336.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/31336","number":31336,"state":"open","locked":false,"title":"Bug 1193978 - Automated Test [Clock] Use stopwatch, set a few laps, reset.","user":{"login":"silne30","id":1432078,"avatar_url":"https://avatars.githubusercontent.com/u/1432078?v=3","gravatar_id":"","url":"https://api.github.com/users/silne30","html_url":"https://github.com/silne30","followers_url":"https://api.github.com/users/silne30/followers","following_url":"https://api.github.com/users/silne30/following{/other_user}","gists_url":"https://api.github.com/users/silne30/gists{/gist_id}","starred_url":"https://api.github.com/users/silne30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silne30/subscriptions","organizations_url":"https://api.github.com/users/silne30/orgs","repos_url":"https://api.github.com/users/silne30/repos","events_url":"https://api.github.com/users/silne30/events{/privacy}","received_events_url":"https://api.github.com/users/silne30/received_events","type":"User","site_admin":false},"body":"…topwatch.","created_at":"2015-08-12T22:01:41Z","updated_at":"2015-08-13T21:58:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6f5190ec63601c12a870a6ac7edf0f6c82138930","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/31336/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/63cab88f55bc8621b21ac00cfdfcb89c776b0180","head":{"label":"silne30:Bug_1193978_Stopwatch_Laps_Test","ref":"Bug_1193978_Stopwatch_Laps_Test","sha":"63cab88f55bc8621b21ac00cfdfcb89c776b0180","user":{"login":"silne30","id":1432078,"avatar_url":"https://avatars.githubusercontent.com/u/1432078?v=3","gravatar_id":"","url":"https://api.github.com/users/silne30","html_url":"https://github.com/silne30","followers_url":"https://api.github.com/users/silne30/followers","following_url":"https://api.github.com/users/silne30/following{/other_user}","gists_url":"https://api.github.com/users/silne30/gists{/gist_id}","starred_url":"https://api.github.com/users/silne30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silne30/subscriptions","organizations_url":"https://api.github.com/users/silne30/orgs","repos_url":"https://api.github.com/users/silne30/repos","events_url":"https://api.github.com/users/silne30/events{/privacy}","received_events_url":"https://api.github.com/users/silne30/received_events","type":"User","site_admin":false},"repo":{"id":32407805,"name":"gaia","full_name":"silne30/gaia","owner":{"login":"silne30","id":1432078,"avatar_url":"https://avatars.githubusercontent.com/u/1432078?v=3","gravatar_id":"","url":"https://api.github.com/users/silne30","html_url":"https://github.com/silne30","followers_url":"https://api.github.com/users/silne30/followers","following_url":"https://api.github.com/users/silne30/following{/other_user}","gists_url":"https://api.github.com/users/silne30/gists{/gist_id}","starred_url":"https://api.github.com/users/silne30/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silne30/subscriptions","organizations_url":"https://api.github.com/users/silne30/orgs","repos_url":"https://api.github.com/users/silne30/repos","events_url":"https://api.github.com/users/silne30/events{/privacy}","received_events_url":"https://api.github.com/users/silne30/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/silne30/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/silne30/gaia","forks_url":"https://api.github.com/repos/silne30/gaia/forks","keys_url":"https://api.github.com/repos/silne30/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silne30/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silne30/gaia/teams","hooks_url":"https://api.github.com/repos/silne30/gaia/hooks","issue_events_url":"https://api.github.com/repos/silne30/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/silne30/gaia/events","assignees_url":"https://api.github.com/repos/silne30/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/silne30/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/silne30/gaia/tags","blobs_url":"https://api.github.com/repos/silne30/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silne30/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silne30/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/silne30/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silne30/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/silne30/gaia/languages","stargazers_url":"https://api.github.com/repos/silne30/gaia/stargazers","contributors_url":"https://api.github.com/repos/silne30/gaia/contributors","subscribers_url":"https://api.github.com/repos/silne30/gaia/subscribers","subscription_url":"https://api.github.com/repos/silne30/gaia/subscription","commits_url":"https://api.github.com/repos/silne30/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/silne30/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/silne30/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/silne30/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/silne30/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/silne30/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silne30/gaia/merges","archive_url":"https://api.github.com/repos/silne30/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silne30/gaia/downloads","issues_url":"https://api.github.com/repos/silne30/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/silne30/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/silne30/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/silne30/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silne30/gaia/labels{/name}","releases_url":"https://api.github.com/repos/silne30/gaia/releases{/id}","created_at":"2015-03-17T17:05:47Z","updated_at":"2015-03-17T17:06:16Z","pushed_at":"2015-08-13T18:19:39Z","git_url":"git://github.com/silne30/gaia.git","ssh_url":"git@github.com:silne30/gaia.git","clone_url":"https://github.com/silne30/gaia.git","svn_url":"https://github.com/silne30/gaia","homepage":"https://wiki.mozilla.org/B2G","size":944590,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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-b2g:master","ref":"master","sha":"a430fafd76128e476b18c91998ca9c0b44b626f4","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-08-13T21:28:18Z","pushed_at":"2015-08-13T20:48:49Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1577301,"stargazers_count":1968,"watchers_count":1968,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2391,"mirror_url":null,"open_issues_count":1126,"forks":2391,"open_issues":1126,"watchers":1968,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/31336"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/31336"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/31336/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/31336/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/63cab88f55bc8621b21ac00cfdfcb89c776b0180"}}}}