{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/41548519","id":41548519,"diff_hunk":"@@ -0,0 +1,98 @@\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.base import Base\n+from gaiatest.apps.music.regions.list_view import ListView\n+\n+\n+class Music(Base):\n+\n+    name = 'Music'\n+    manifest_url = '{}music{}/manifest.webapp'.format(Base.DEFAULT_PROTOCOL, Base.DEFAULT_APP_HOSTNAME)\n+\n+    _loading_spinner_locator = (By.ID, 'spinner-overlay')\n+    _active_view_locator = (By.CSS_SELECTOR, '.active')\n+    _music_tiles_locator = (By.ID, 'tiles')\n+    _views_locator = (By.ID, 'views')\n+    _tabs_locator = (By.ID, 'tabs')\n+    _empty_overlay_shadow_DOM_locator = (By.ID, 'empty-overlay')\n+    _empty_music_title_locator = (By.CSS_SELECTOR, '[data-l10n-id=\"empty-title\"]')\n+    _empty_music_text_locator = (By.CSS_SELECTOR, '[data-l10n-id=\"empty-text\"]')\n+    _albums_tab_locator = (By.CSS_SELECTOR, '[data-l10n-id=\"albums-tab\"]')\n+    _songs_tab_locator = (By.CSS_SELECTOR, '[data-l10n-id=\"songs-tab\"]')\n+    _artists_tab_locator = (By.CSS_SELECTOR, '[data-l10n-id=\"artists-tab\"]')\n+    _title_locator = (By.ID, 'title-text')\n+\n+    def launch(self):\n+        Base.launch(self)\n+        Wait(self.marionette).until(expected.element_not_displayed(\n+            *self._loading_spinner_locator))\n+\n+    def wait_for_music_tiles_displayed(self):\n+        self.marionette.switch_to_frame(self.marionette.find_element(*self._active_view_locator))\n+        Wait(self.marionette).until(expected.element_displayed(*self._music_tiles_locator))\n+        self.apps.switch_to_displayed_app()\n+\n+    def wait_for_empty_message_to_load(self):\n+        empty_overlay = self.marionette.find_element(*self._empty_overlay_shadow_DOM_locator)\n+        self.marionette.switch_to_shadow_root(empty_overlay)\n+        Wait(self.marionette).until(lambda m: self.empty_music_title == 'Add songs to get started')\n+        Wait(self.marionette).until(lambda m: self.empty_music_text == 'Load songs on to the memory card.')\n+        self.apps.switch_to_displayed_app()\n+\n+    def wait_for_view_displayed(self, view_name):","path":"tests/python/gaia-ui-tests/gaiatest/apps/music/app.py","position":46,"original_position":46,"commit_id":"d0ad95f72c07e871649af99d4b6ab5f2793b5df3","original_commit_id":"d0ad95f72c07e871649af99d4b6ab5f2793b5df3","user":{"login":"npark-mozilla","id":6930774,"avatar_url":"https://avatars.githubusercontent.com/u/6930774?v=3","gravatar_id":"","url":"https://api.github.com/users/npark-mozilla","html_url":"https://github.com/npark-mozilla","followers_url":"https://api.github.com/users/npark-mozilla/followers","following_url":"https://api.github.com/users/npark-mozilla/following{/other_user}","gists_url":"https://api.github.com/users/npark-mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/npark-mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npark-mozilla/subscriptions","organizations_url":"https://api.github.com/users/npark-mozilla/orgs","repos_url":"https://api.github.com/users/npark-mozilla/repos","events_url":"https://api.github.com/users/npark-mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/npark-mozilla/received_events","type":"User","site_admin":false},"body":"oh, this would be used for imagecompare tests, will update this test on a separate PR where I migrate the imagecompare tests that access music apps.","created_at":"2015-10-08T18:18:53Z","updated_at":"2015-10-08T18:18:53Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/32306#discussion_r41548519","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/41548519"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32306#discussion_r41548519"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306","id":47078396,"html_url":"https://github.com/mozilla-b2g/gaia/pull/32306","diff_url":"https://github.com/mozilla-b2g/gaia/pull/32306.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/32306.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32306","number":32306,"state":"open","locked":false,"title":"Bug 1208553 - Convert gaia ui tests for music-nga app ","user":{"login":"npark-mozilla","id":6930774,"avatar_url":"https://avatars.githubusercontent.com/u/6930774?v=3","gravatar_id":"","url":"https://api.github.com/users/npark-mozilla","html_url":"https://github.com/npark-mozilla","followers_url":"https://api.github.com/users/npark-mozilla/followers","following_url":"https://api.github.com/users/npark-mozilla/following{/other_user}","gists_url":"https://api.github.com/users/npark-mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/npark-mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npark-mozilla/subscriptions","organizations_url":"https://api.github.com/users/npark-mozilla/orgs","repos_url":"https://api.github.com/users/npark-mozilla/repos","events_url":"https://api.github.com/users/npark-mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/npark-mozilla/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-07T20:34:53Z","updated_at":"2015-10-08T18:18:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"09e9209b5caed22b3d7ca7e0ac5303f8f8e9a112","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306/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/32306/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/d0ad95f72c07e871649af99d4b6ab5f2793b5df3","head":{"label":"npark-mozilla:1208553","ref":"1208553","sha":"d0ad95f72c07e871649af99d4b6ab5f2793b5df3","user":{"login":"npark-mozilla","id":6930774,"avatar_url":"https://avatars.githubusercontent.com/u/6930774?v=3","gravatar_id":"","url":"https://api.github.com/users/npark-mozilla","html_url":"https://github.com/npark-mozilla","followers_url":"https://api.github.com/users/npark-mozilla/followers","following_url":"https://api.github.com/users/npark-mozilla/following{/other_user}","gists_url":"https://api.github.com/users/npark-mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/npark-mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npark-mozilla/subscriptions","organizations_url":"https://api.github.com/users/npark-mozilla/orgs","repos_url":"https://api.github.com/users/npark-mozilla/repos","events_url":"https://api.github.com/users/npark-mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/npark-mozilla/received_events","type":"User","site_admin":false},"repo":{"id":18301296,"name":"gaia","full_name":"npark-mozilla/gaia","owner":{"login":"npark-mozilla","id":6930774,"avatar_url":"https://avatars.githubusercontent.com/u/6930774?v=3","gravatar_id":"","url":"https://api.github.com/users/npark-mozilla","html_url":"https://github.com/npark-mozilla","followers_url":"https://api.github.com/users/npark-mozilla/followers","following_url":"https://api.github.com/users/npark-mozilla/following{/other_user}","gists_url":"https://api.github.com/users/npark-mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/npark-mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/npark-mozilla/subscriptions","organizations_url":"https://api.github.com/users/npark-mozilla/orgs","repos_url":"https://api.github.com/users/npark-mozilla/repos","events_url":"https://api.github.com/users/npark-mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/npark-mozilla/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/npark-mozilla/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 https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/npark-mozilla/gaia","forks_url":"https://api.github.com/repos/npark-mozilla/gaia/forks","keys_url":"https://api.github.com/repos/npark-mozilla/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/npark-mozilla/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/npark-mozilla/gaia/teams","hooks_url":"https://api.github.com/repos/npark-mozilla/gaia/hooks","issue_events_url":"https://api.github.com/repos/npark-mozilla/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/npark-mozilla/gaia/events","assignees_url":"https://api.github.com/repos/npark-mozilla/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/npark-mozilla/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/npark-mozilla/gaia/tags","blobs_url":"https://api.github.com/repos/npark-mozilla/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/npark-mozilla/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/npark-mozilla/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/npark-mozilla/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/npark-mozilla/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/npark-mozilla/gaia/languages","stargazers_url":"https://api.github.com/repos/npark-mozilla/gaia/stargazers","contributors_url":"https://api.github.com/repos/npark-mozilla/gaia/contributors","subscribers_url":"https://api.github.com/repos/npark-mozilla/gaia/subscribers","subscription_url":"https://api.github.com/repos/npark-mozilla/gaia/subscription","commits_url":"https://api.github.com/repos/npark-mozilla/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/npark-mozilla/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/npark-mozilla/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/npark-mozilla/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/npark-mozilla/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/npark-mozilla/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/npark-mozilla/gaia/merges","archive_url":"https://api.github.com/repos/npark-mozilla/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/npark-mozilla/gaia/downloads","issues_url":"https://api.github.com/repos/npark-mozilla/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/npark-mozilla/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/npark-mozilla/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/npark-mozilla/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/npark-mozilla/gaia/labels{/name}","releases_url":"https://api.github.com/repos/npark-mozilla/gaia/releases{/id}","created_at":"2014-03-31T17:15:03Z","updated_at":"2015-05-07T15:36:28Z","pushed_at":"2015-10-08T00:07:23Z","git_url":"git://github.com/npark-mozilla/gaia.git","ssh_url":"git@github.com:npark-mozilla/gaia.git","clone_url":"https://github.com/npark-mozilla/gaia.git","svn_url":"https://github.com/npark-mozilla/gaia","homepage":"https://wiki.mozilla.org/B2G","size":940775,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"dd9fe1df3f15991e5f7400b8a72f5b7bd2ee695a","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-10-06T13:28:32Z","pushed_at":"2015-10-08T18:05:51Z","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":1645238,"stargazers_count":1991,"watchers_count":1991,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2462,"mirror_url":null,"open_issues_count":1239,"forks":2462,"open_issues":1239,"watchers":1991,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32306"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32306"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32306/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32306/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/32306/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/d0ad95f72c07e871649af99d4b6ab5f2793b5df3"}}}}