{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/45522838","id":45522838,"diff_hunk":"@@ -19,37 +19,117 @@ marionette('using the gallery menu', function() {\n   });\n \n   setup(function() {\n-    // Remove all files in temp device storage.\n-    client.fileManager.removeAllFiles();\n-    // Add file into the pictures directory\n-    client.fileManager.add({\n-      type: 'pictures',\n-      filePath: 'test_media/Pictures/firefoxOS.png'\n-    });\n     app = new Gallery(client);\n-    app.launch();\n   });\n \n-  test('should let you select images', function() {\n-    // Use the 'selection' button and select the test image.\n-    // Selected images should have an border/highlight.\n-    app.thumbnailsSelectButton.click();\n-    app.thumbnail.click();\n+  suite('Gallery app with single image', function() {\n+    setup(function() {\n+      // Remove all files in temp device storage.\n+      client.fileManager.removeAllFiles();\n+      // Add file into the pictures directory\n+      client.fileManager.add({\n+        type: 'pictures',\n+        filePath: 'test_media/Pictures/firefoxOS.png'\n+      });\n+    });\n+\n+    suite('Select and delete single image', function() {\n+      setup(function() {\n+        app.launch();\n+      });\n+\n+      test('should let you select images', function() {\n+        // Use the 'selection' button and select the test image.\n+        // Selected images should have an border/highlight.\n+        app.thumbnailsSelectButton.click();\n+        app.thumbnail.click();\n+\n+        var outline = app.thumbnail.cssProperty('outline');\n+        assert.ok(outline != null);\n+      });\n \n-    var outline = app.thumbnail.cssProperty('outline');\n-    assert.ok(outline != null);\n+      test('should let you delete images', function() {\n+        // This test deletes the test image.\n+        app.thumbnailsSelectButton.click();\n+        app.thumbnail.click();\n+        app.thumbnailsDeleteButton.click();\n+        app.confirmButton.click();\n+\n+        // Wait for the overlay with 'No photos or videos' message.\n+        var overlayView = app.overlayView;\n+        client.helper.waitForElement(overlayView);\n+        assert.ok(overlayView.displayed());\n+      });\n+    });\n   });\n \n-  test('should let you delete images', function() {\n-    // This test deletes the test image.\n-    app.thumbnailsSelectButton.click();\n-    app.thumbnail.click();\n-    app.thumbnailsDeleteButton.click();\n-    app.confirmButton.click();\n-\n-    // Wait for the overlay with 'No photos or videos' message.\n-    var overlayView = app.overlayView;\n-    client.helper.waitForElement(overlayView);\n-    assert.ok(overlayView.displayed());\n+  suite('Gallery app with multiple images', function() {\n+    setup(function() {\n+      // Remove all files in temp device storage.\n+      client.fileManager.removeAllFiles();\n+      // Add file into the pictures directory\n+      client.fileManager.add([\n+        {type: 'pictures',filePath: 'apps/gallery/test/images/01.jpg'},\n+        {type: 'pictures',filePath: 'apps/gallery/test/images/02.png'},\n+        {type: 'pictures',filePath: 'apps/gallery/test/images/03.gif'}\n+      ]);\n+    });\n+\n+    suite('Select and delete multiple images', function() {\n+      setup(function() {\n+        app.launch();\n+      });\n+\n+      test('should let you select images', function() {\n+        // Use the 'selection' button and select the test images.\n+        // Selected images should have an border/highlight.\n+        app.thumbnailsSelectButton.click();\n+        app.tapThumbnail(0);\n+        app.tapThumbnail(1);\n+        app.tapThumbnail(2);\n+\n+        assert.ok(app.thumbnails[0].cssProperty('outline') != null);\n+        assert.ok(app.thumbnails[1].cssProperty('outline') != null);\n+        assert.ok(app.thumbnails[2].cssProperty('outline') != null);\n+\n+        assert.ok(app.thumbnailsNumberSelected.text() == '3 selected');\n+\n+      });\n+\n+      test('should let you cancel delete images', function() {\n+        // Use the 'selection' button and select the test images.\n+        // Selected images should have an border/highlight.\n+        app.thumbnailsSelectButton.click();\n+        app.tapThumbnail(0);\n+        app.tapThumbnail(1);\n+        app.tapThumbnail(2);\n+        // Check number of selected images\n+        assert.ok(app.thumbnailsNumberSelected.text() == '3 selected');\n+        app.thumbnailsDeleteButton.click();\n+        // Cancel delete of images\n+        app.confirmCancelButton.click();\n+\n+        // Check files still exist\n+        assert.ok(app.thumbnails.length == '3');\n+        assert.ok(app.thumbnailsNumberSelected.text() == '3 selected');\n+      });\n+\n+      test('should let you delete images', function() {\n+        // This test deletes the test image.\n+        app.thumbnailsSelectButton.click();\n+        app.tapThumbnail(0);\n+        app.tapThumbnail(1);\n+        app.tapThumbnail(2);\n+\n+        app.thumbnailsDeleteButton.click();\n+        app.confirmButton.click();\n+\n+        // Wait for the overlay with 'No photos or videos' message.\n+        var overlayView = app.overlayView;\n+        client.helper.waitForElement(overlayView);\n+        assert.ok(overlayView.displayed());","path":"apps/gallery/test/marionette/delete_image_test.js","position":138,"original_position":138,"commit_id":"e5710f90b5218aab74ea3d3caad2fafab9f77e6f","original_commit_id":"e5710f90b5218aab74ea3d3caad2fafab9f77e6f","user":{"login":"punamdahiya","id":597734,"avatar_url":"https://avatars.githubusercontent.com/u/597734?v=3","gravatar_id":"","url":"https://api.github.com/users/punamdahiya","html_url":"https://github.com/punamdahiya","followers_url":"https://api.github.com/users/punamdahiya/followers","following_url":"https://api.github.com/users/punamdahiya/following{/other_user}","gists_url":"https://api.github.com/users/punamdahiya/gists{/gist_id}","starred_url":"https://api.github.com/users/punamdahiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punamdahiya/subscriptions","organizations_url":"https://api.github.com/users/punamdahiya/orgs","repos_url":"https://api.github.com/users/punamdahiya/repos","events_url":"https://api.github.com/users/punamdahiya/events{/privacy}","received_events_url":"https://api.github.com/users/punamdahiya/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2015-11-20T21:47:56Z","updated_at":"2015-11-20T21:47:56Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/33196#discussion_r45522838","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/45522838"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33196#discussion_r45522838"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196","id":50699471,"html_url":"https://github.com/mozilla-b2g/gaia/pull/33196","diff_url":"https://github.com/mozilla-b2g/gaia/pull/33196.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/33196.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33196","number":33196,"state":"open","locked":false,"title":"Bug 1219657 - [Gallery] Implement delete multiple images Gij test","user":{"login":"punamdahiya","id":597734,"avatar_url":"https://avatars.githubusercontent.com/u/597734?v=3","gravatar_id":"","url":"https://api.github.com/users/punamdahiya","html_url":"https://github.com/punamdahiya","followers_url":"https://api.github.com/users/punamdahiya/followers","following_url":"https://api.github.com/users/punamdahiya/following{/other_user}","gists_url":"https://api.github.com/users/punamdahiya/gists{/gist_id}","starred_url":"https://api.github.com/users/punamdahiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punamdahiya/subscriptions","organizations_url":"https://api.github.com/users/punamdahiya/orgs","repos_url":"https://api.github.com/users/punamdahiya/repos","events_url":"https://api.github.com/users/punamdahiya/events{/privacy}","received_events_url":"https://api.github.com/users/punamdahiya/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-13T22:19:59Z","updated_at":"2015-11-20T21:47:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf4f63b18e26f34e9348fded04677e6f802e6074","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196/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/33196/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/e5710f90b5218aab74ea3d3caad2fafab9f77e6f","head":{"label":"punamdahiya:Bug1219657","ref":"Bug1219657","sha":"e5710f90b5218aab74ea3d3caad2fafab9f77e6f","user":{"login":"punamdahiya","id":597734,"avatar_url":"https://avatars.githubusercontent.com/u/597734?v=3","gravatar_id":"","url":"https://api.github.com/users/punamdahiya","html_url":"https://github.com/punamdahiya","followers_url":"https://api.github.com/users/punamdahiya/followers","following_url":"https://api.github.com/users/punamdahiya/following{/other_user}","gists_url":"https://api.github.com/users/punamdahiya/gists{/gist_id}","starred_url":"https://api.github.com/users/punamdahiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punamdahiya/subscriptions","organizations_url":"https://api.github.com/users/punamdahiya/orgs","repos_url":"https://api.github.com/users/punamdahiya/repos","events_url":"https://api.github.com/users/punamdahiya/events{/privacy}","received_events_url":"https://api.github.com/users/punamdahiya/received_events","type":"User","site_admin":false},"repo":{"id":9442203,"name":"gaia","full_name":"punamdahiya/gaia","owner":{"login":"punamdahiya","id":597734,"avatar_url":"https://avatars.githubusercontent.com/u/597734?v=3","gravatar_id":"","url":"https://api.github.com/users/punamdahiya","html_url":"https://github.com/punamdahiya","followers_url":"https://api.github.com/users/punamdahiya/followers","following_url":"https://api.github.com/users/punamdahiya/following{/other_user}","gists_url":"https://api.github.com/users/punamdahiya/gists{/gist_id}","starred_url":"https://api.github.com/users/punamdahiya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/punamdahiya/subscriptions","organizations_url":"https://api.github.com/users/punamdahiya/orgs","repos_url":"https://api.github.com/users/punamdahiya/repos","events_url":"https://api.github.com/users/punamdahiya/events{/privacy}","received_events_url":"https://api.github.com/users/punamdahiya/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/punamdahiya/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/punamdahiya/gaia","forks_url":"https://api.github.com/repos/punamdahiya/gaia/forks","keys_url":"https://api.github.com/repos/punamdahiya/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/punamdahiya/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/punamdahiya/gaia/teams","hooks_url":"https://api.github.com/repos/punamdahiya/gaia/hooks","issue_events_url":"https://api.github.com/repos/punamdahiya/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/punamdahiya/gaia/events","assignees_url":"https://api.github.com/repos/punamdahiya/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/punamdahiya/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/punamdahiya/gaia/tags","blobs_url":"https://api.github.com/repos/punamdahiya/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/punamdahiya/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/punamdahiya/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/punamdahiya/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/punamdahiya/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/punamdahiya/gaia/languages","stargazers_url":"https://api.github.com/repos/punamdahiya/gaia/stargazers","contributors_url":"https://api.github.com/repos/punamdahiya/gaia/contributors","subscribers_url":"https://api.github.com/repos/punamdahiya/gaia/subscribers","subscription_url":"https://api.github.com/repos/punamdahiya/gaia/subscription","commits_url":"https://api.github.com/repos/punamdahiya/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/punamdahiya/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/punamdahiya/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/punamdahiya/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/punamdahiya/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/punamdahiya/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/punamdahiya/gaia/merges","archive_url":"https://api.github.com/repos/punamdahiya/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/punamdahiya/gaia/downloads","issues_url":"https://api.github.com/repos/punamdahiya/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/punamdahiya/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/punamdahiya/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/punamdahiya/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/punamdahiya/gaia/labels{/name}","releases_url":"https://api.github.com/repos/punamdahiya/gaia/releases{/id}","created_at":"2013-04-15T06:30:33Z","updated_at":"2014-06-25T09:23:22Z","pushed_at":"2015-11-20T17:45:38Z","git_url":"git://github.com/punamdahiya/gaia.git","ssh_url":"git@github.com:punamdahiya/gaia.git","clone_url":"https://github.com/punamdahiya/gaia.git","svn_url":"https://github.com/punamdahiya/gaia","homepage":"https://wiki.mozilla.org/B2G","size":972016,"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":"33c0b510768ef3246e5052cb652c078fc3e988f4","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-11-18T11:11:13Z","pushed_at":"2015-11-20T21:35:23Z","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":1182963,"stargazers_count":2011,"watchers_count":2011,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2539,"mirror_url":null,"open_issues_count":1296,"forks":2539,"open_issues":1296,"watchers":2011,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33196"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33196"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33196/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33196/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/33196/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/e5710f90b5218aab74ea3d3caad2fafab9f77e6f"}}}}