GitHub PullRequestReviewCommentEvent at 2014-07-09 18:54:03
Repository: android-player-samples
Actor: BCjwhisenant
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/comments/14728538","id":14728538,"diff_hunk":"@@ -0,0 +1,166 @@\n+package com.brightcove.player.samples.onceux.basic.test;\n+\n+import java.util.concurrent.TimeUnit;\n+import java.util.List;\n+import java.util.ArrayList;\n+import android.util.Log;\n+\n+import com.android.uiautomator.core.UiObject;\n+import com.android.uiautomator.core.UiObjectNotFoundException;\n+import com.android.uiautomator.core.UiSelector;\n+import com.android.uiautomator.core.UiDevice;\n+import com.android.uiautomator.core.UiWatcher;\n+import com.android.uiautomator.testrunner.UiAutomatorTestCase;\n+\n+/**\n+ * BasicCompanionAdTest tests the presence and functionality of companion ads and their links.\n+ */\n+public class CompanionAdTestCase extends OnceUxUiAutomatorBase {\n+\n+    /**\n+     * The Android logcat tag.\n+     */\n+    private final String TAG = this.getClass().getSimpleName();\n+\n+    /**\n+     * The UiObject that represents the companion ad image.\n+     */\n+    private UiObject companionAd;\n+\n+    /**\n+     * The UiObject that represents the text that is present at every Ad Break. It reads \"Your video will\n+     * resume in\" followed by how many seconds are left in the ad break.\n+     */\n+    private UiObject adText = new UiObject(new UiSelector().textStartsWith(\"Your video will resume in\"));\n+\n+    // Test Methods\n+    /**\n+     * Makes the assertion as that there should be a companion ad in an ad break.\n+     */\n+    public void testCompanionAd() throws Exception {\n+        Log.v(TAG, \"Beginning testCompanionAd\");","path":"BasicOnceUxSampleApp/src/uiTest/java/com/brightcove/player/samples/onceux/basic/test/CompanionAdTestCase.java","position":41,"original_position":41,"commit_id":"be73fb186963a2df0944d8c1e51221c1a63562ac","original_commit_id":"be73fb186963a2df0944d8c1e51221c1a63562ac","user":{"login":"BCjwhisenant","id":359060,"avatar_url":"https://avatars.githubusercontent.com/u/359060?","gravatar_id":null,"url":"https://api.github.com/users/BCjwhisenant","html_url":"https://github.com/BCjwhisenant","followers_url":"https://api.github.com/users/BCjwhisenant/followers","following_url":"https://api.github.com/users/BCjwhisenant/following{/other_user}","gists_url":"https://api.github.com/users/BCjwhisenant/gists{/gist_id}","starred_url":"https://api.github.com/users/BCjwhisenant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BCjwhisenant/subscriptions","organizations_url":"https://api.github.com/users/BCjwhisenant/orgs","repos_url":"https://api.github.com/users/BCjwhisenant/repos","events_url":"https://api.github.com/users/BCjwhisenant/events{/privacy}","received_events_url":"https://api.github.com/users/BCjwhisenant/received_events","type":"User","site_admin":false},"body":"These \"Beginning\" and \"Finished\" log statements will be redundant in a test report. That is, most test reports will list the test classes, and whether they passed or not. (And if the test assertion failed, there is usually a stack trace that will also pretty clearly indicate where the problem lies.)","created_at":"2014-07-09T18:54:03Z","updated_at":"2014-07-09T18:54:03Z","html_url":"https://github.com/BrightcoveOS/android-player-samples/pull/62#discussion_r14728538","pull_request_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62","_links":{"self":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/comments/14728538"},"html":{"href":"https://github.com/BrightcoveOS/android-player-samples/pull/62#discussion_r14728538"},"pull_request":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62"}}},"pull_request":{"url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62","id":18173577,"html_url":"https://github.com/BrightcoveOS/android-player-samples/pull/62","diff_url":"https://github.com/BrightcoveOS/android-player-samples/pull/62.diff","patch_url":"https://github.com/BrightcoveOS/android-player-samples/pull/62.patch","issue_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/62","number":62,"state":"open","title":"New OnceUx Test Class CompanionAdTestCase.java","user":{"login":"brwhyan","id":7670584,"avatar_url":"https://avatars.githubusercontent.com/u/7670584?","gravatar_id":"92bfc51817433a5e3bd44a3962aeb222","url":"https://api.github.com/users/brwhyan","html_url":"https://github.com/brwhyan","followers_url":"https://api.github.com/users/brwhyan/followers","following_url":"https://api.github.com/users/brwhyan/following{/other_user}","gists_url":"https://api.github.com/users/brwhyan/gists{/gist_id}","starred_url":"https://api.github.com/users/brwhyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brwhyan/subscriptions","organizations_url":"https://api.github.com/users/brwhyan/orgs","repos_url":"https://api.github.com/users/brwhyan/repos","events_url":"https://api.github.com/users/brwhyan/events{/privacy}","received_events_url":"https://api.github.com/users/brwhyan/received_events","type":"User","site_admin":false},"body":"##Rationale\r\nNow that Companion Ads have been implemented into the Sample App, It's time for tests.\r\n##Changed Files\r\n**CompanionAdTestCase.java**\r\n* New utility methods\r\n    * *companionCheck* finds the companion ad based on the companion ad frame's resource id\r\n    * *toCompanionAdCheck(int msec)* navigates to the next ad break, then performs *companionCheck*. It returns the results of *companionCheck*.\r\n    * *toEndOfAdBreak* navigates to the end of an ad break, hides the seek controls, and then performs *companionCheck*. It returns the results of *companionCheck*.\r\n* New tests\r\n    * **testCompanionAd** navigates through the video using *toCompanionAdCheck* and *toEndOfAdBreak*. After the start of each ad break, it asserts that the companion ad is present.\r\n    * **testCompanionAdLink** clicks on a companion ad and tests for the presence of the browser url the click is meant to link to\r\n    * **testCompanionAdVanish** navigates through the video using *toCompanionAdCheck* and *toEndOfAdBreak*, checking after the end of each ad break for the presence of a companion ad. It asserts that *toEndOfAdBreak* will return false for each ad break.","created_at":"2014-07-09T17:17:36Z","updated_at":"2014-07-09T18:54:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3b7a8bbf8d7d0f66b2be80a57a098d8c219cdfe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62/commits","review_comments_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62/comments","review_comment_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/comments/{number}","comments_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/62/comments","statuses_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/statuses/be73fb186963a2df0944d8c1e51221c1a63562ac","head":{"label":"BrightcoveOS:onceux-companionad-uitest","ref":"onceux-companionad-uitest","sha":"be73fb186963a2df0944d8c1e51221c1a63562ac","user":{"login":"BrightcoveOS","id":442411,"avatar_url":"https://avatars.githubusercontent.com/u/442411?","gravatar_id":"aba539fc77df1359a52a9394c0de0805","url":"https://api.github.com/users/BrightcoveOS","html_url":"https://github.com/BrightcoveOS","followers_url":"https://api.github.com/users/BrightcoveOS/followers","following_url":"https://api.github.com/users/BrightcoveOS/following{/other_user}","gists_url":"https://api.github.com/users/BrightcoveOS/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightcoveOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightcoveOS/subscriptions","organizations_url":"https://api.github.com/users/BrightcoveOS/orgs","repos_url":"https://api.github.com/users/BrightcoveOS/repos","events_url":"https://api.github.com/users/BrightcoveOS/events{/privacy}","received_events_url":"https://api.github.com/users/BrightcoveOS/received_events","type":"Organization","site_admin":false},"repo":{"id":14517858,"name":"android-player-samples","full_name":"BrightcoveOS/android-player-samples","owner":{"login":"BrightcoveOS","id":442411,"avatar_url":"https://avatars.githubusercontent.com/u/442411?","gravatar_id":"aba539fc77df1359a52a9394c0de0805","url":"https://api.github.com/users/BrightcoveOS","html_url":"https://github.com/BrightcoveOS","followers_url":"https://api.github.com/users/BrightcoveOS/followers","following_url":"https://api.github.com/users/BrightcoveOS/following{/other_user}","gists_url":"https://api.github.com/users/BrightcoveOS/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightcoveOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightcoveOS/subscriptions","organizations_url":"https://api.github.com/users/BrightcoveOS/orgs","repos_url":"https://api.github.com/users/BrightcoveOS/repos","events_url":"https://api.github.com/users/BrightcoveOS/events{/privacy}","received_events_url":"https://api.github.com/users/BrightcoveOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BrightcoveOS/android-player-samples","description":"Provides sample apps for the Brightcove Player SDK and Plugins for Android","fork":false,"url":"https://api.github.com/repos/BrightcoveOS/android-player-samples","forks_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/forks","keys_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/teams","hooks_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/hooks","issue_events_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/events{/number}","events_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/events","assignees_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/assignees{/user}","branches_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/branches{/branch}","tags_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/tags","blobs_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/languages","stargazers_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/stargazers","contributors_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/contributors","subscribers_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/subscribers","subscription_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/subscription","commits_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/comments/{number}","contents_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/contents/{+path}","compare_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/merges","archive_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/downloads","issues_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues{/number}","pulls_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/labels{/name}","releases_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/releases{/id}","created_at":"2013-11-19T07:56:35Z","updated_at":"2014-07-04T02:04:59Z","pushed_at":"2014-07-09T17:16:14Z","git_url":"git://github.com/BrightcoveOS/android-player-samples.git","ssh_url":"git@github.com:BrightcoveOS/android-player-samples.git","clone_url":"https://github.com/BrightcoveOS/android-player-samples.git","svn_url":"https://github.com/BrightcoveOS/android-player-samples","homepage":null,"size":17308,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":4,"default_branch":"master"}},"base":{"label":"BrightcoveOS:master","ref":"master","sha":"a3261388961deedc6b9e33c8d59b2d1869f4b5da","user":{"login":"BrightcoveOS","id":442411,"avatar_url":"https://avatars.githubusercontent.com/u/442411?","gravatar_id":"aba539fc77df1359a52a9394c0de0805","url":"https://api.github.com/users/BrightcoveOS","html_url":"https://github.com/BrightcoveOS","followers_url":"https://api.github.com/users/BrightcoveOS/followers","following_url":"https://api.github.com/users/BrightcoveOS/following{/other_user}","gists_url":"https://api.github.com/users/BrightcoveOS/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightcoveOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightcoveOS/subscriptions","organizations_url":"https://api.github.com/users/BrightcoveOS/orgs","repos_url":"https://api.github.com/users/BrightcoveOS/repos","events_url":"https://api.github.com/users/BrightcoveOS/events{/privacy}","received_events_url":"https://api.github.com/users/BrightcoveOS/received_events","type":"Organization","site_admin":false},"repo":{"id":14517858,"name":"android-player-samples","full_name":"BrightcoveOS/android-player-samples","owner":{"login":"BrightcoveOS","id":442411,"avatar_url":"https://avatars.githubusercontent.com/u/442411?","gravatar_id":"aba539fc77df1359a52a9394c0de0805","url":"https://api.github.com/users/BrightcoveOS","html_url":"https://github.com/BrightcoveOS","followers_url":"https://api.github.com/users/BrightcoveOS/followers","following_url":"https://api.github.com/users/BrightcoveOS/following{/other_user}","gists_url":"https://api.github.com/users/BrightcoveOS/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightcoveOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightcoveOS/subscriptions","organizations_url":"https://api.github.com/users/BrightcoveOS/orgs","repos_url":"https://api.github.com/users/BrightcoveOS/repos","events_url":"https://api.github.com/users/BrightcoveOS/events{/privacy}","received_events_url":"https://api.github.com/users/BrightcoveOS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BrightcoveOS/android-player-samples","description":"Provides sample apps for the Brightcove Player SDK and Plugins for Android","fork":false,"url":"https://api.github.com/repos/BrightcoveOS/android-player-samples","forks_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/forks","keys_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/teams","hooks_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/hooks","issue_events_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/events{/number}","events_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/events","assignees_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/assignees{/user}","branches_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/branches{/branch}","tags_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/tags","blobs_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/statuses/{sha}","languages_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/languages","stargazers_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/stargazers","contributors_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/contributors","subscribers_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/subscribers","subscription_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/subscription","commits_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/comments/{number}","contents_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/contents/{+path}","compare_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/merges","archive_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/downloads","issues_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues{/number}","pulls_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls{/number}","milestones_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/milestones{/number}","notifications_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/labels{/name}","releases_url":"https://api.github.com/repos/BrightcoveOS/android-player-samples/releases{/id}","created_at":"2013-11-19T07:56:35Z","updated_at":"2014-07-04T02:04:59Z","pushed_at":"2014-07-09T17:16:14Z","git_url":"git://github.com/BrightcoveOS/android-player-samples.git","ssh_url":"git@github.com:BrightcoveOS/android-player-samples.git","clone_url":"https://github.com/BrightcoveOS/android-player-samples.git","svn_url":"https://github.com/BrightcoveOS/android-player-samples","homepage":null,"size":17308,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":3,"forks":3,"open_issues":3,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62"},"html":{"href":"https://github.com/BrightcoveOS/android-player-samples/pull/62"},"issue":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/62"},"comments":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/BrightcoveOS/android-player-samples/statuses/be73fb186963a2df0944d8c1e51221c1a63562ac"}}}}