{"action":"created","comment":{"url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/comments/51673465","id":51673465,"diff_hunk":"@@ -0,0 +1,168 @@\n+﻿using System;\n+using System.Text;\n+using System.Collections.Generic;\n+using Microsoft.VisualStudio.TestTools.UnitTesting;\n+using TestFramework;\n+\n+namespace Tests\n+{\n+    /// <summary>\n+    /// Header Test class for dev.office.com web site\n+    /// </summary>\n+    [TestClass]\n+    public class HeaderTest\n+    {\n+        [ClassInitialize]\n+        public static void ClassInitialize(TestContext context)\n+        {\n+            Browser.Initialize();\n+        }\n+\n+        [ClassCleanup]\n+        public static void ClassCleanup()\n+        {\n+            Browser.Close();\n+        }\n+\n+        [TestCleanup]\n+        public void TestCleanup()\n+        {\n+            Browser.Goto(Utility.GetConfigurationValue(\"BaseAddress\"));\n+        }\n+        /// <summary>\n+        /// Verify whether clicking the branding can navigate to home page\n+        /// </summary>\n+        [TestMethod]\n+        public void Acceptance_S01_TC01_CanBrandingNavToHomePage()\n+        {\n+            Browser.SetWaitTime(TimeSpan.FromSeconds(30));\n+            string[] navOptions = new string[] { \n+                \"Explore\",\n+                \"Getting Started\", \n+                \"Code Samples\", \n+                \"Resources\", \n+                \"Documentation\" };\n+\n+            string navItem = navOptions[new Random().Next(navOptions.Length)];\n+\n+            Pages.Navigation.Select(navItem);\n+            string[] navSubOptions = Utility.GetNavSubItems(navItem);\n+            if (navSubOptions == null)\n+            {\n+                Utility.ClickBranding();\n+\n+                Assert.IsTrue(\n+                   Pages.HomePage.IsAt(),\n+                    @\"Clicking the branding image at {0}should navigate to Dev center home Page\",\n+                    navItem);\n+            }\n+            else\n+            {\n+                string subNavItem = string.Empty;\n+\n+                //Find a page that contains the branding\n+                do\n+                {\n+                    Browser.GoBack();\n+                    int randomIndex = new Random().Next(navSubOptions.Length);\n+                    subNavItem = navSubOptions[randomIndex];\n+                    Pages.Navigation.Select(navItem);\n+                    Utility.Click(subNavItem);\n+                    Browser.SwitchToNewWindow();\n+                } while (!Utility.BrandingExists());\n+\n+                Utility.ClickBranding();\n+\n+                Assert.IsTrue(\n+                   Pages.HomePage.IsAt(),\n+                    @\"Clicking the branding image at {0}->{1} should navigate to Dev center home Page\",\n+                    navItem,\n+                    subNavItem);\n+            }\n+        }\n+\n+        /// <summary>\n+        /// Verify whether clicking the branding can navigate to home page\n+        /// </summary>\n+        [TestMethod]\n+        public void Comps_S01_TC02_CanSearchWidget()\n+        {\n+            int randomIndex = new Random().Next(Utility.TypicalSearchText.Length);\n+            string searchString = Utility.TypicalSearchText[randomIndex];\n+            string[] results = Utility.SearchWidget(searchString);\n+            bool isFound = false;\n+            string foundResult = string.Empty;\n+            for (int i = 0; i < results.Length; i++)\n+            {\n+                if (results[i].ToLower().Contains(searchString.ToLower()))\n+                {\n+                    isFound = true;\n+                    foundResult = results[i];\n+                    break;\n+                }\n+            }\n+            Assert.IsTrue(isFound,\n+                \"Search {0} should find the result:\\n{1}\",\n+                searchString,\n+                foundResult);\n+        }\n+\n+        ///// <summary>\n+        ///// Verify whether Facebook can be navigated to\n+        ///// </summary>\n+        //[TestMethod]\n+        //public void Comps_S01_TC03_CanGotoFacebook()","path":"Tests/HeaderTest.cs","position":114,"original_position":114,"commit_id":"2161c6e6130b7a590664a1f2804bc3fdf0d90687","original_commit_id":"2161c6e6130b7a590664a1f2804bc3fdf0d90687","user":{"login":"ChunLi0819","id":13775414,"avatar_url":"https://avatars.githubusercontent.com/u/13775414?v=3","gravatar_id":"","url":"https://api.github.com/users/ChunLi0819","html_url":"https://github.com/ChunLi0819","followers_url":"https://api.github.com/users/ChunLi0819/followers","following_url":"https://api.github.com/users/ChunLi0819/following{/other_user}","gists_url":"https://api.github.com/users/ChunLi0819/gists{/gist_id}","starred_url":"https://api.github.com/users/ChunLi0819/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChunLi0819/subscriptions","organizations_url":"https://api.github.com/users/ChunLi0819/orgs","repos_url":"https://api.github.com/users/ChunLi0819/repos","events_url":"https://api.github.com/users/ChunLi0819/events{/privacy}","received_events_url":"https://api.github.com/users/ChunLi0819/received_events","type":"User","site_admin":false},"body":"They are commented out just because currently there is only one icon for RSS","created_at":"2016-02-03T03:08:22Z","updated_at":"2016-02-03T03:08:22Z","html_url":"https://github.com/JingyuShao/DevOfficeComTest/pull/8#discussion_r51673465","pull_request_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/comments/51673465"},"html":{"href":"https://github.com/JingyuShao/DevOfficeComTest/pull/8#discussion_r51673465"},"pull_request":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8","id":57978435,"html_url":"https://github.com/JingyuShao/DevOfficeComTest/pull/8","diff_url":"https://github.com/JingyuShao/DevOfficeComTest/pull/8.diff","patch_url":"https://github.com/JingyuShao/DevOfficeComTest/pull/8.patch","issue_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues/8","number":8,"state":"open","locked":false,"title":"Add new test cases","user":{"login":"ChunLi0819","id":13775414,"avatar_url":"https://avatars.githubusercontent.com/u/13775414?v=3","gravatar_id":"","url":"https://api.github.com/users/ChunLi0819","html_url":"https://github.com/ChunLi0819","followers_url":"https://api.github.com/users/ChunLi0819/followers","following_url":"https://api.github.com/users/ChunLi0819/following{/other_user}","gists_url":"https://api.github.com/users/ChunLi0819/gists{/gist_id}","starred_url":"https://api.github.com/users/ChunLi0819/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChunLi0819/subscriptions","organizations_url":"https://api.github.com/users/ChunLi0819/orgs","repos_url":"https://api.github.com/users/ChunLi0819/repos","events_url":"https://api.github.com/users/ChunLi0819/events{/privacy}","received_events_url":"https://api.github.com/users/ChunLi0819/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-02-02T12:12:10Z","updated_at":"2016-02-03T03:08:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8/commits","review_comments_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8/comments","review_comment_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues/8/comments","statuses_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/statuses/2161c6e6130b7a590664a1f2804bc3fdf0d90687","head":{"label":"KarinLee:test","ref":"test","sha":"2161c6e6130b7a590664a1f2804bc3fdf0d90687","user":{"login":"KarinLee","id":15025971,"avatar_url":"https://avatars.githubusercontent.com/u/15025971?v=3","gravatar_id":"","url":"https://api.github.com/users/KarinLee","html_url":"https://github.com/KarinLee","followers_url":"https://api.github.com/users/KarinLee/followers","following_url":"https://api.github.com/users/KarinLee/following{/other_user}","gists_url":"https://api.github.com/users/KarinLee/gists{/gist_id}","starred_url":"https://api.github.com/users/KarinLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarinLee/subscriptions","organizations_url":"https://api.github.com/users/KarinLee/orgs","repos_url":"https://api.github.com/users/KarinLee/repos","events_url":"https://api.github.com/users/KarinLee/events{/privacy}","received_events_url":"https://api.github.com/users/KarinLee/received_events","type":"User","site_admin":false},"repo":{"id":48161698,"name":"DevOfficeComTest","full_name":"KarinLee/DevOfficeComTest","owner":{"login":"KarinLee","id":15025971,"avatar_url":"https://avatars.githubusercontent.com/u/15025971?v=3","gravatar_id":"","url":"https://api.github.com/users/KarinLee","html_url":"https://github.com/KarinLee","followers_url":"https://api.github.com/users/KarinLee/followers","following_url":"https://api.github.com/users/KarinLee/following{/other_user}","gists_url":"https://api.github.com/users/KarinLee/gists{/gist_id}","starred_url":"https://api.github.com/users/KarinLee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KarinLee/subscriptions","organizations_url":"https://api.github.com/users/KarinLee/orgs","repos_url":"https://api.github.com/users/KarinLee/repos","events_url":"https://api.github.com/users/KarinLee/events{/privacy}","received_events_url":"https://api.github.com/users/KarinLee/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KarinLee/DevOfficeComTest","description":"","fork":true,"url":"https://api.github.com/repos/KarinLee/DevOfficeComTest","forks_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/forks","keys_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/teams","hooks_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/hooks","issue_events_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/issues/events{/number}","events_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/events","assignees_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/assignees{/user}","branches_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/branches{/branch}","tags_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/tags","blobs_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/git/refs{/sha}","trees_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/statuses/{sha}","languages_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/languages","stargazers_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/stargazers","contributors_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/contributors","subscribers_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/subscribers","subscription_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/subscription","commits_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/commits{/sha}","git_commits_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/git/commits{/sha}","comments_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/comments{/number}","issue_comment_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/issues/comments{/number}","contents_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/contents/{+path}","compare_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/merges","archive_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/downloads","issues_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/issues{/number}","pulls_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/pulls{/number}","milestones_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/milestones{/number}","notifications_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/labels{/name}","releases_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/releases{/id}","deployments_url":"https://api.github.com/repos/KarinLee/DevOfficeComTest/deployments","created_at":"2015-12-17T08:21:28Z","updated_at":"2016-01-12T02:31:23Z","pushed_at":"2016-02-02T14:07:31Z","git_url":"git://github.com/KarinLee/DevOfficeComTest.git","ssh_url":"git@github.com:KarinLee/DevOfficeComTest.git","clone_url":"https://github.com/KarinLee/DevOfficeComTest.git","svn_url":"https://github.com/KarinLee/DevOfficeComTest","homepage":null,"size":4765,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"JingyuShao:test","ref":"test","sha":"71788b2ab0840a198872f7e099baaade92fb2f26","user":{"login":"JingyuShao","id":13442590,"avatar_url":"https://avatars.githubusercontent.com/u/13442590?v=3","gravatar_id":"","url":"https://api.github.com/users/JingyuShao","html_url":"https://github.com/JingyuShao","followers_url":"https://api.github.com/users/JingyuShao/followers","following_url":"https://api.github.com/users/JingyuShao/following{/other_user}","gists_url":"https://api.github.com/users/JingyuShao/gists{/gist_id}","starred_url":"https://api.github.com/users/JingyuShao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JingyuShao/subscriptions","organizations_url":"https://api.github.com/users/JingyuShao/orgs","repos_url":"https://api.github.com/users/JingyuShao/repos","events_url":"https://api.github.com/users/JingyuShao/events{/privacy}","received_events_url":"https://api.github.com/users/JingyuShao/received_events","type":"User","site_admin":false},"repo":{"id":47441663,"name":"DevOfficeComTest","full_name":"JingyuShao/DevOfficeComTest","owner":{"login":"JingyuShao","id":13442590,"avatar_url":"https://avatars.githubusercontent.com/u/13442590?v=3","gravatar_id":"","url":"https://api.github.com/users/JingyuShao","html_url":"https://github.com/JingyuShao","followers_url":"https://api.github.com/users/JingyuShao/followers","following_url":"https://api.github.com/users/JingyuShao/following{/other_user}","gists_url":"https://api.github.com/users/JingyuShao/gists{/gist_id}","starred_url":"https://api.github.com/users/JingyuShao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JingyuShao/subscriptions","organizations_url":"https://api.github.com/users/JingyuShao/orgs","repos_url":"https://api.github.com/users/JingyuShao/repos","events_url":"https://api.github.com/users/JingyuShao/events{/privacy}","received_events_url":"https://api.github.com/users/JingyuShao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JingyuShao/DevOfficeComTest","description":"","fork":false,"url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest","forks_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/forks","keys_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/teams","hooks_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/hooks","issue_events_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues/events{/number}","events_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/events","assignees_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/assignees{/user}","branches_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/branches{/branch}","tags_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/tags","blobs_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/git/refs{/sha}","trees_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/statuses/{sha}","languages_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/languages","stargazers_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/stargazers","contributors_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/contributors","subscribers_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/subscribers","subscription_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/subscription","commits_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/commits{/sha}","git_commits_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/git/commits{/sha}","comments_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/comments{/number}","issue_comment_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues/comments{/number}","contents_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/contents/{+path}","compare_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/merges","archive_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/downloads","issues_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues{/number}","pulls_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls{/number}","milestones_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/milestones{/number}","notifications_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/labels{/name}","releases_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/releases{/id}","deployments_url":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/deployments","created_at":"2015-12-05T04:05:16Z","updated_at":"2015-12-10T21:09:28Z","pushed_at":"2016-02-02T14:07:32Z","git_url":"git://github.com/JingyuShao/DevOfficeComTest.git","ssh_url":"git@github.com:JingyuShao/DevOfficeComTest.git","clone_url":"https://github.com/JingyuShao/DevOfficeComTest.git","svn_url":"https://github.com/JingyuShao/DevOfficeComTest","homepage":null,"size":4701,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8"},"html":{"href":"https://github.com/JingyuShao/DevOfficeComTest/pull/8"},"issue":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues/8"},"comments":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/JingyuShao/DevOfficeComTest/statuses/2161c6e6130b7a590664a1f2804bc3fdf0d90687"}}}}