{"action":"created","comment":{"url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/comments/64032633","id":64032633,"diff_hunk":"@@ -0,0 +1,82 @@\n+package com.wikia.webdriver.elements.mercury.components;\n+\n+import com.wikia.webdriver.common.contentpatterns.MercuryMessages;\n+import com.wikia.webdriver.common.core.Assertion;\n+import com.wikia.webdriver.common.core.elemnt.Wait;\n+import com.wikia.webdriver.common.logging.PageObjectLogging;\n+\n+import org.openqa.selenium.WebDriver;\n+import org.openqa.selenium.WebElement;\n+import org.openqa.selenium.support.FindBy;\n+import org.openqa.selenium.support.PageFactory;\n+\n+public class Header {\n+\n+  @FindBy(css = \".wiki-page-header__title\")\n+  private WebElement pageTitle;\n+\n+  @FindBy(css = \".wiki-page-header .has-hero-image\")\n+  private WebElement headerWithHeroImage;\n+\n+  @FindBy(css = \".wiki-page-header:not(.has-hero-image)\")\n+  private WebElement headerWithoutHeroImage;\n+\n+  private Wait wait;\n+\n+  public Header(WebDriver driver) {\n+    this.wait = new Wait(driver);\n+\n+    PageFactory.initElements(driver, this);\n+  }\n+\n+  public Header isPageTitleVisible() {\n+    wait.forElementVisible(pageTitle);\n+    PageObjectLogging.log(\"Page header title\", MercuryMessages.VISIBLE_MSG, true);\n+\n+    return this;\n+  }\n+\n+  public Header isHeroImageVisible() {\n+    wait.forElementVisible(headerWithHeroImage);\n+    PageObjectLogging.log(\"Hero image\", MercuryMessages.VISIBLE_MSG, true);\n+\n+    return this;\n+  }\n+\n+  public Header isHeroImageNotVisible() {\n+    wait.forElementVisible(headerWithoutHeroImage);\n+    PageObjectLogging.log(\"Hero image\", MercuryMessages.INVISIBLE_MSG, true);\n+\n+    return this;\n+  }\n+  \n+  public Header isHeroImageProperlyStyled() {\n+    PageObjectLogging.logInfo(\"checking 'background-color'…\");\n+    Assertion.assertEquals(\n+        headerWithHeroImage.getCssValue(\"background-color\"), \"rgba(255, 255, 255, 1)\");\n+    PageObjectLogging.logInfo(\"checking 'background-position'…\");\n+    Assertion.assertEquals(headerWithHeroImage.getCssValue(\"background-position\"), \"50% 50%\");\n+    PageObjectLogging.logInfo(\"checking 'background-repeat'…\");\n+    Assertion.assertEquals(headerWithHeroImage.getCssValue(\"background-repeat\"), \"no-repeat\");\n+\n+    return this;\n+  }\n+\n+  public Header isHeroImageSquare() {","path":"src/test/java/com/wikia/webdriver/elements/mercury/components/Header.java","position":65,"original_position":65,"commit_id":"6a7b8647599d69094121b8dd91cd5be77bda9537","original_commit_id":"6a7b8647599d69094121b8dd91cd5be77bda9537","user":{"login":"nikodamn","id":5969242,"avatar_url":"https://avatars.githubusercontent.com/u/5969242?v=3","gravatar_id":"","url":"https://api.github.com/users/nikodamn","html_url":"https://github.com/nikodamn","followers_url":"https://api.github.com/users/nikodamn/followers","following_url":"https://api.github.com/users/nikodamn/following{/other_user}","gists_url":"https://api.github.com/users/nikodamn/gists{/gist_id}","starred_url":"https://api.github.com/users/nikodamn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikodamn/subscriptions","organizations_url":"https://api.github.com/users/nikodamn/orgs","repos_url":"https://api.github.com/users/nikodamn/repos","events_url":"https://api.github.com/users/nikodamn/events{/privacy}","received_events_url":"https://api.github.com/users/nikodamn/received_events","type":"User","site_admin":false},"body":"I'd suggest adding try/catch and throwing NoSuchElementException in case when that element is not visible. Also what do you think about changing this method to return Boolean and moving assertion to the side of the test?","created_at":"2016-05-20T12:23:47Z","updated_at":"2016-05-20T12:23:47Z","html_url":"https://github.com/Wikia/selenium-tests/pull/1203#discussion_r64032633","pull_request_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203","_links":{"self":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/comments/64032633"},"html":{"href":"https://github.com/Wikia/selenium-tests/pull/1203#discussion_r64032633"},"pull_request":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203"}}},"pull_request":{"url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203","id":70363154,"html_url":"https://github.com/Wikia/selenium-tests/pull/1203","diff_url":"https://github.com/Wikia/selenium-tests/pull/1203.diff","patch_url":"https://github.com/Wikia/selenium-tests/pull/1203.patch","issue_url":"https://api.github.com/repos/Wikia/selenium-tests/issues/1203","number":1203,"state":"open","locked":false,"title":"XW-1484 Fix Mercury tests after top of article redesign","user":{"login":"rogatty","id":7030884,"avatar_url":"https://avatars.githubusercontent.com/u/7030884?v=3","gravatar_id":"","url":"https://api.github.com/users/rogatty","html_url":"https://github.com/rogatty","followers_url":"https://api.github.com/users/rogatty/followers","following_url":"https://api.github.com/users/rogatty/following{/other_user}","gists_url":"https://api.github.com/users/rogatty/gists{/gist_id}","starred_url":"https://api.github.com/users/rogatty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rogatty/subscriptions","organizations_url":"https://api.github.com/users/rogatty/orgs","repos_url":"https://api.github.com/users/rogatty/repos","events_url":"https://api.github.com/users/rogatty/events{/privacy}","received_events_url":"https://api.github.com/users/rogatty/received_events","type":"User","site_admin":false},"body":"https://wikia-inc.atlassian.net/browse/XW-1484\r\n\r\nNew tests to be added to the suite:\r\n* `MercuryTOCTest_006`\r\n* `mercury_header_checkElementsVisibilityWithoutInfobox`\r\n* `mercury_header_checkElementsVisibilityWithInfoboxAndWithHeroImage`\r\n* `mercury_header_checkElementsVisibilityWithInfoboxAndWithoutHeroImage`\r\n* `mercury_header_heroImageIsProperlyStyled`\r\n* `mercury_header_heroImageIsSquare`\r\n* `mercury_header_heroImageIsRectangle`\r\n\r\nRemoved tests:\r\n* `mercury_infobox_heroImageIsCentredAndHasTitleAbove`\r\n* `mercury_infobox_heroImageIsSquare`\r\n* `mercury_infobox_heroImageIsRectangle`\r\n\r\n@Wikia/x-wing @Wikia/west-wing @ludwikkazmierczak ","created_at":"2016-05-17T14:08:05Z","updated_at":"2016-05-20T12:23:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f854126703a5a195f57b557a072150b2a55b467c","assignee":{"login":"Warkot","id":7061001,"avatar_url":"https://avatars.githubusercontent.com/u/7061001?v=3","gravatar_id":"","url":"https://api.github.com/users/Warkot","html_url":"https://github.com/Warkot","followers_url":"https://api.github.com/users/Warkot/followers","following_url":"https://api.github.com/users/Warkot/following{/other_user}","gists_url":"https://api.github.com/users/Warkot/gists{/gist_id}","starred_url":"https://api.github.com/users/Warkot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Warkot/subscriptions","organizations_url":"https://api.github.com/users/Warkot/orgs","repos_url":"https://api.github.com/users/Warkot/repos","events_url":"https://api.github.com/users/Warkot/events{/privacy}","received_events_url":"https://api.github.com/users/Warkot/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203/commits","review_comments_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203/comments","review_comment_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Wikia/selenium-tests/issues/1203/comments","statuses_url":"https://api.github.com/repos/Wikia/selenium-tests/statuses/6a7b8647599d69094121b8dd91cd5be77bda9537","head":{"label":"Wikia:XW-1484","ref":"XW-1484","sha":"6a7b8647599d69094121b8dd91cd5be77bda9537","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":6275065,"name":"selenium-tests","full_name":"Wikia/selenium-tests","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/selenium-tests","description":"","fork":false,"url":"https://api.github.com/repos/Wikia/selenium-tests","forks_url":"https://api.github.com/repos/Wikia/selenium-tests/forks","keys_url":"https://api.github.com/repos/Wikia/selenium-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/selenium-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/selenium-tests/teams","hooks_url":"https://api.github.com/repos/Wikia/selenium-tests/hooks","issue_events_url":"https://api.github.com/repos/Wikia/selenium-tests/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/selenium-tests/events","assignees_url":"https://api.github.com/repos/Wikia/selenium-tests/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/selenium-tests/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/selenium-tests/tags","blobs_url":"https://api.github.com/repos/Wikia/selenium-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/selenium-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/selenium-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/selenium-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/selenium-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/selenium-tests/languages","stargazers_url":"https://api.github.com/repos/Wikia/selenium-tests/stargazers","contributors_url":"https://api.github.com/repos/Wikia/selenium-tests/contributors","subscribers_url":"https://api.github.com/repos/Wikia/selenium-tests/subscribers","subscription_url":"https://api.github.com/repos/Wikia/selenium-tests/subscription","commits_url":"https://api.github.com/repos/Wikia/selenium-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/selenium-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/selenium-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/selenium-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/selenium-tests/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/selenium-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/selenium-tests/merges","archive_url":"https://api.github.com/repos/Wikia/selenium-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/selenium-tests/downloads","issues_url":"https://api.github.com/repos/Wikia/selenium-tests/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/selenium-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/selenium-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/selenium-tests/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/selenium-tests/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/selenium-tests/deployments","created_at":"2012-10-18T08:06:11Z","updated_at":"2016-05-19T05:36:25Z","pushed_at":"2016-05-20T12:23:06Z","git_url":"git://github.com/Wikia/selenium-tests.git","ssh_url":"git@github.com:Wikia/selenium-tests.git","clone_url":"https://github.com/Wikia/selenium-tests.git","svn_url":"https://github.com/Wikia/selenium-tests","homepage":null,"size":131753,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":15,"default_branch":"master"}},"base":{"label":"Wikia:master","ref":"master","sha":"f117a1eddf66b1bc204eb3d2ea966cf802ecc96b","user":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"repo":{"id":6275065,"name":"selenium-tests","full_name":"Wikia/selenium-tests","owner":{"login":"Wikia","id":1171011,"avatar_url":"https://avatars.githubusercontent.com/u/1171011?v=3","gravatar_id":"","url":"https://api.github.com/users/Wikia","html_url":"https://github.com/Wikia","followers_url":"https://api.github.com/users/Wikia/followers","following_url":"https://api.github.com/users/Wikia/following{/other_user}","gists_url":"https://api.github.com/users/Wikia/gists{/gist_id}","starred_url":"https://api.github.com/users/Wikia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Wikia/subscriptions","organizations_url":"https://api.github.com/users/Wikia/orgs","repos_url":"https://api.github.com/users/Wikia/repos","events_url":"https://api.github.com/users/Wikia/events{/privacy}","received_events_url":"https://api.github.com/users/Wikia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Wikia/selenium-tests","description":"","fork":false,"url":"https://api.github.com/repos/Wikia/selenium-tests","forks_url":"https://api.github.com/repos/Wikia/selenium-tests/forks","keys_url":"https://api.github.com/repos/Wikia/selenium-tests/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Wikia/selenium-tests/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Wikia/selenium-tests/teams","hooks_url":"https://api.github.com/repos/Wikia/selenium-tests/hooks","issue_events_url":"https://api.github.com/repos/Wikia/selenium-tests/issues/events{/number}","events_url":"https://api.github.com/repos/Wikia/selenium-tests/events","assignees_url":"https://api.github.com/repos/Wikia/selenium-tests/assignees{/user}","branches_url":"https://api.github.com/repos/Wikia/selenium-tests/branches{/branch}","tags_url":"https://api.github.com/repos/Wikia/selenium-tests/tags","blobs_url":"https://api.github.com/repos/Wikia/selenium-tests/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Wikia/selenium-tests/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Wikia/selenium-tests/git/refs{/sha}","trees_url":"https://api.github.com/repos/Wikia/selenium-tests/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Wikia/selenium-tests/statuses/{sha}","languages_url":"https://api.github.com/repos/Wikia/selenium-tests/languages","stargazers_url":"https://api.github.com/repos/Wikia/selenium-tests/stargazers","contributors_url":"https://api.github.com/repos/Wikia/selenium-tests/contributors","subscribers_url":"https://api.github.com/repos/Wikia/selenium-tests/subscribers","subscription_url":"https://api.github.com/repos/Wikia/selenium-tests/subscription","commits_url":"https://api.github.com/repos/Wikia/selenium-tests/commits{/sha}","git_commits_url":"https://api.github.com/repos/Wikia/selenium-tests/git/commits{/sha}","comments_url":"https://api.github.com/repos/Wikia/selenium-tests/comments{/number}","issue_comment_url":"https://api.github.com/repos/Wikia/selenium-tests/issues/comments{/number}","contents_url":"https://api.github.com/repos/Wikia/selenium-tests/contents/{+path}","compare_url":"https://api.github.com/repos/Wikia/selenium-tests/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Wikia/selenium-tests/merges","archive_url":"https://api.github.com/repos/Wikia/selenium-tests/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Wikia/selenium-tests/downloads","issues_url":"https://api.github.com/repos/Wikia/selenium-tests/issues{/number}","pulls_url":"https://api.github.com/repos/Wikia/selenium-tests/pulls{/number}","milestones_url":"https://api.github.com/repos/Wikia/selenium-tests/milestones{/number}","notifications_url":"https://api.github.com/repos/Wikia/selenium-tests/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Wikia/selenium-tests/labels{/name}","releases_url":"https://api.github.com/repos/Wikia/selenium-tests/releases{/id}","deployments_url":"https://api.github.com/repos/Wikia/selenium-tests/deployments","created_at":"2012-10-18T08:06:11Z","updated_at":"2016-05-19T05:36:25Z","pushed_at":"2016-05-20T12:23:06Z","git_url":"git://github.com/Wikia/selenium-tests.git","ssh_url":"git@github.com:Wikia/selenium-tests.git","clone_url":"https://github.com/Wikia/selenium-tests.git","svn_url":"https://github.com/Wikia/selenium-tests","homepage":null,"size":131753,"stargazers_count":15,"watchers_count":15,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":6,"forks":13,"open_issues":6,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203"},"html":{"href":"https://github.com/Wikia/selenium-tests/pull/1203"},"issue":{"href":"https://api.github.com/repos/Wikia/selenium-tests/issues/1203"},"comments":{"href":"https://api.github.com/repos/Wikia/selenium-tests/issues/1203/comments"},"review_comments":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203/comments"},"review_comment":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Wikia/selenium-tests/pulls/1203/commits"},"statuses":{"href":"https://api.github.com/repos/Wikia/selenium-tests/statuses/6a7b8647599d69094121b8dd91cd5be77bda9537"}}}}
{"actor":{"display_login":"nikodamn"}}