{"action":"created","comment":{"url":"https://api.github.com/repos/Cognifide/bobcat/pulls/comments/76054136","id":76054136,"diff_hunk":"@@ -0,0 +1,191 @@\n+/*\n+ * Copyright 2016 Cognifide Ltd..\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *      http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+package com.cognifide.qa.bb.aem.touch.siteadmin.aem61;\n+\n+import com.cognifide.qa.bb.provider.selenium.BobcatWait;\n+import com.cognifide.qa.bb.qualifier.Global;\n+import com.cognifide.qa.bb.qualifier.PageObject;\n+import com.cognifide.qa.bb.utils.WebElementUtils;\n+import com.google.inject.Inject;\n+\n+import java.time.LocalDateTime;\n+import java.util.List;\n+\n+import org.openqa.selenium.By;\n+import org.openqa.selenium.WebDriver;\n+import org.openqa.selenium.WebElement;\n+import org.openqa.selenium.support.FindBy;\n+\n+@PageObject\n+public class SiteadminToolbar {\n+\n+  private static final String PUBLISH_LBL = \"Publish\";\n+\n+  private static final String UNPUBLISH_LBL = \"Unpublish\";\n+\n+  private static final String DELETE_LBL = \"Delete\";\n+\n+  private static final String BTN_LIST_SELECTOR = \"div.coral-Popover-content > div.endor-List > a\";\n+\n+  @Inject\n+  private WebDriver driver;\n+\n+  @Inject\n+  private WebElementUtils webElementUtils;\n+\n+  @Inject\n+  private BobcatWait wait;\n+\n+  @FindBy(css = \"button.cq-siteadmin-admin-actions-edit-activator[title='Open']\")\n+  private WebElement openButton;\n+\n+  @FindBy(css = \"form.cq-siteadmin-admin-createpage\")\n+  private CreatePageActions createPageActions;\n+\n+  @FindBy(css = \"button.coral-Button--graniteActionBar.cq-wcm-paste-activator\")\n+  private WebElement pastePageBtn;\n+\n+  @FindBy(css = \"i.coral-Icon.coral-Icon--delete\")\n+  @Global\n+  private WebElement deleteBtn;\n+\n+  @Global\n+  @FindBy(css = \"form.activation-wizard\")\n+  private CoralWizard activationWizard;\n+\n+  @Global\n+  @FindBy(css = \"form.activation-wizard\")\n+  private ReplicateLaterWindow replicateLaterWindow;\n+\n+  @Global\n+  @FindBy(css = \"form.move-page-wizard\")\n+  private MovePageWizard movePageWizard;\n+\n+  @Global\n+  @FindBy(css = \"div.coral-Modal.coral-Modal--notice\")\n+  private WebElement confirmationModal;\n+\n+  @Global\n+  @FindBy(css = \"div.foundation-ui-notification.coral-Alert.coral-Alert--info\")\n+  private WebElement successInfo;\n+\n+  public void openPage() {\n+    openButton.click();\n+  }\n+\n+  public void publishPage() {\n+    getMoreBtn().click();\n+    getPublishBtn().click();\n+    clickButtonFromMoreSection(PUBLISH_LBL);\n+    if (!successInfoAppeared()) {\n+      activationWizard.submit();\n+    }\n+  }\n+\n+  private boolean successInfoAppeared() {\n+    return driver.findElements(\n+        By.cssSelector(\"div.foundation-ui-notification.coral-Alert.coral-Alert--info\")).\n+        size() > 0;\n+  }\n+\n+  private WebElement getMoreBtn() {\n+    return driver.findElement(By.cssSelector(\"i.coral-Icon.coral-Icon--more\"));\n+  }\n+\n+  private WebElement getPublishBtn() {\n+    return driver.findElement(By.\n+        cssSelector(\"a.cq-siteadmin-admin-actions-publish-activator[title='Publish']\"));\n+  }\n+\n+  private WebElement getDeleteBtn() {\n+    if (!deleteBtn.isDisplayed()) {\n+      getMoreBtn().click();\n+      wait.withTimeout(1);","path":"bobcat/bb-aem-touch-ui/src/main/java/com/cognifide/qa/bb/aem/touch/siteadmin/aem61/SiteadminToolbar.java","position":116,"original_position":116,"commit_id":"f548949d3657174f648b7332f19fb502e1fc6c3b","original_commit_id":"f548949d3657174f648b7332f19fb502e1fc6c3b","user":{"login":"youngeagle87","id":6848498,"avatar_url":"https://avatars.githubusercontent.com/u/6848498?v=3","gravatar_id":"","url":"https://api.github.com/users/youngeagle87","html_url":"https://github.com/youngeagle87","followers_url":"https://api.github.com/users/youngeagle87/followers","following_url":"https://api.github.com/users/youngeagle87/following{/other_user}","gists_url":"https://api.github.com/users/youngeagle87/gists{/gist_id}","starred_url":"https://api.github.com/users/youngeagle87/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youngeagle87/subscriptions","organizations_url":"https://api.github.com/users/youngeagle87/orgs","repos_url":"https://api.github.com/users/youngeagle87/repos","events_url":"https://api.github.com/users/youngeagle87/events{/privacy}","received_events_url":"https://api.github.com/users/youngeagle87/received_events","type":"User","site_admin":false},"body":"Actually the case is about different flows depending on how many pages is selected. When single page is selected, there is no need to click getMoreButton.","created_at":"2016-08-24T13:19:05Z","updated_at":"2016-08-24T13:19:05Z","html_url":"https://github.com/Cognifide/bobcat/pull/80#discussion_r76054136","pull_request_url":"https://api.github.com/repos/Cognifide/bobcat/pulls/80","_links":{"self":{"href":"https://api.github.com/repos/Cognifide/bobcat/pulls/comments/76054136"},"html":{"href":"https://github.com/Cognifide/bobcat/pull/80#discussion_r76054136"},"pull_request":{"href":"https://api.github.com/repos/Cognifide/bobcat/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/Cognifide/bobcat/pulls/80","id":82363877,"html_url":"https://github.com/Cognifide/bobcat/pull/80","diff_url":"https://github.com/Cognifide/bobcat/pull/80.diff","patch_url":"https://github.com/Cognifide/bobcat/pull/80.patch","issue_url":"https://api.github.com/repos/Cognifide/bobcat/issues/80","number":80,"state":"open","locked":false,"title":"71 siteadmin touch ui","user":{"login":"kkarolk","id":2323048,"avatar_url":"https://avatars.githubusercontent.com/u/2323048?v=3","gravatar_id":"","url":"https://api.github.com/users/kkarolk","html_url":"https://github.com/kkarolk","followers_url":"https://api.github.com/users/kkarolk/followers","following_url":"https://api.github.com/users/kkarolk/following{/other_user}","gists_url":"https://api.github.com/users/kkarolk/gists{/gist_id}","starred_url":"https://api.github.com/users/kkarolk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kkarolk/subscriptions","organizations_url":"https://api.github.com/users/kkarolk/orgs","repos_url":"https://api.github.com/users/kkarolk/repos","events_url":"https://api.github.com/users/kkarolk/events{/privacy}","received_events_url":"https://api.github.com/users/kkarolk/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-23T13:25:03Z","updated_at":"2016-08-24T13:19:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a9b8842a14c8f8a0635548a280164fec05e0ba5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Cognifide/bobcat/pulls/80/commits","review_comments_url":"https://api.github.com/repos/Cognifide/bobcat/pulls/80/comments","review_comment_url":"https://api.github.com/repos/Cognifide/bobcat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cognifide/bobcat/issues/80/comments","statuses_url":"https://api.github.com/repos/Cognifide/bobcat/statuses/f548949d3657174f648b7332f19fb502e1fc6c3b","head":{"label":"Cognifide:71-siteadmin-touch-ui","ref":"71-siteadmin-touch-ui","sha":"f548949d3657174f648b7332f19fb502e1fc6c3b","user":{"login":"Cognifide","id":932257,"avatar_url":"https://avatars.githubusercontent.com/u/932257?v=3","gravatar_id":"","url":"https://api.github.com/users/Cognifide","html_url":"https://github.com/Cognifide","followers_url":"https://api.github.com/users/Cognifide/followers","following_url":"https://api.github.com/users/Cognifide/following{/other_user}","gists_url":"https://api.github.com/users/Cognifide/gists{/gist_id}","starred_url":"https://api.github.com/users/Cognifide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cognifide/subscriptions","organizations_url":"https://api.github.com/users/Cognifide/orgs","repos_url":"https://api.github.com/users/Cognifide/repos","events_url":"https://api.github.com/users/Cognifide/events{/privacy}","received_events_url":"https://api.github.com/users/Cognifide/received_events","type":"Organization","site_admin":false},"repo":{"id":62303580,"name":"bobcat","full_name":"Cognifide/bobcat","owner":{"login":"Cognifide","id":932257,"avatar_url":"https://avatars.githubusercontent.com/u/932257?v=3","gravatar_id":"","url":"https://api.github.com/users/Cognifide","html_url":"https://github.com/Cognifide","followers_url":"https://api.github.com/users/Cognifide/followers","following_url":"https://api.github.com/users/Cognifide/following{/other_user}","gists_url":"https://api.github.com/users/Cognifide/gists{/gist_id}","starred_url":"https://api.github.com/users/Cognifide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cognifide/subscriptions","organizations_url":"https://api.github.com/users/Cognifide/orgs","repos_url":"https://api.github.com/users/Cognifide/repos","events_url":"https://api.github.com/users/Cognifide/events{/privacy}","received_events_url":"https://api.github.com/users/Cognifide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cognifide/bobcat","description":"Bobcat is an automated testing framework for functional testing of web applications.","fork":false,"url":"https://api.github.com/repos/Cognifide/bobcat","forks_url":"https://api.github.com/repos/Cognifide/bobcat/forks","keys_url":"https://api.github.com/repos/Cognifide/bobcat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cognifide/bobcat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cognifide/bobcat/teams","hooks_url":"https://api.github.com/repos/Cognifide/bobcat/hooks","issue_events_url":"https://api.github.com/repos/Cognifide/bobcat/issues/events{/number}","events_url":"https://api.github.com/repos/Cognifide/bobcat/events","assignees_url":"https://api.github.com/repos/Cognifide/bobcat/assignees{/user}","branches_url":"https://api.github.com/repos/Cognifide/bobcat/branches{/branch}","tags_url":"https://api.github.com/repos/Cognifide/bobcat/tags","blobs_url":"https://api.github.com/repos/Cognifide/bobcat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cognifide/bobcat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cognifide/bobcat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cognifide/bobcat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cognifide/bobcat/statuses/{sha}","languages_url":"https://api.github.com/repos/Cognifide/bobcat/languages","stargazers_url":"https://api.github.com/repos/Cognifide/bobcat/stargazers","contributors_url":"https://api.github.com/repos/Cognifide/bobcat/contributors","subscribers_url":"https://api.github.com/repos/Cognifide/bobcat/subscribers","subscription_url":"https://api.github.com/repos/Cognifide/bobcat/subscription","commits_url":"https://api.github.com/repos/Cognifide/bobcat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cognifide/bobcat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cognifide/bobcat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cognifide/bobcat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cognifide/bobcat/contents/{+path}","compare_url":"https://api.github.com/repos/Cognifide/bobcat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cognifide/bobcat/merges","archive_url":"https://api.github.com/repos/Cognifide/bobcat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cognifide/bobcat/downloads","issues_url":"https://api.github.com/repos/Cognifide/bobcat/issues{/number}","pulls_url":"https://api.github.com/repos/Cognifide/bobcat/pulls{/number}","milestones_url":"https://api.github.com/repos/Cognifide/bobcat/milestones{/number}","notifications_url":"https://api.github.com/repos/Cognifide/bobcat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cognifide/bobcat/labels{/name}","releases_url":"https://api.github.com/repos/Cognifide/bobcat/releases{/id}","deployments_url":"https://api.github.com/repos/Cognifide/bobcat/deployments","created_at":"2016-06-30T10:54:10Z","updated_at":"2016-08-24T09:53:54Z","pushed_at":"2016-08-24T07:23:58Z","git_url":"git://github.com/Cognifide/bobcat.git","ssh_url":"git@github.com:Cognifide/bobcat.git","clone_url":"https://github.com/Cognifide/bobcat.git","svn_url":"https://github.com/Cognifide/bobcat","homepage":"","size":2996,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":4,"default_branch":"master"}},"base":{"label":"Cognifide:master","ref":"master","sha":"95d2f874f51ee364d244f82d9cf2763363a57879","user":{"login":"Cognifide","id":932257,"avatar_url":"https://avatars.githubusercontent.com/u/932257?v=3","gravatar_id":"","url":"https://api.github.com/users/Cognifide","html_url":"https://github.com/Cognifide","followers_url":"https://api.github.com/users/Cognifide/followers","following_url":"https://api.github.com/users/Cognifide/following{/other_user}","gists_url":"https://api.github.com/users/Cognifide/gists{/gist_id}","starred_url":"https://api.github.com/users/Cognifide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cognifide/subscriptions","organizations_url":"https://api.github.com/users/Cognifide/orgs","repos_url":"https://api.github.com/users/Cognifide/repos","events_url":"https://api.github.com/users/Cognifide/events{/privacy}","received_events_url":"https://api.github.com/users/Cognifide/received_events","type":"Organization","site_admin":false},"repo":{"id":62303580,"name":"bobcat","full_name":"Cognifide/bobcat","owner":{"login":"Cognifide","id":932257,"avatar_url":"https://avatars.githubusercontent.com/u/932257?v=3","gravatar_id":"","url":"https://api.github.com/users/Cognifide","html_url":"https://github.com/Cognifide","followers_url":"https://api.github.com/users/Cognifide/followers","following_url":"https://api.github.com/users/Cognifide/following{/other_user}","gists_url":"https://api.github.com/users/Cognifide/gists{/gist_id}","starred_url":"https://api.github.com/users/Cognifide/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cognifide/subscriptions","organizations_url":"https://api.github.com/users/Cognifide/orgs","repos_url":"https://api.github.com/users/Cognifide/repos","events_url":"https://api.github.com/users/Cognifide/events{/privacy}","received_events_url":"https://api.github.com/users/Cognifide/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cognifide/bobcat","description":"Bobcat is an automated testing framework for functional testing of web applications.","fork":false,"url":"https://api.github.com/repos/Cognifide/bobcat","forks_url":"https://api.github.com/repos/Cognifide/bobcat/forks","keys_url":"https://api.github.com/repos/Cognifide/bobcat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cognifide/bobcat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cognifide/bobcat/teams","hooks_url":"https://api.github.com/repos/Cognifide/bobcat/hooks","issue_events_url":"https://api.github.com/repos/Cognifide/bobcat/issues/events{/number}","events_url":"https://api.github.com/repos/Cognifide/bobcat/events","assignees_url":"https://api.github.com/repos/Cognifide/bobcat/assignees{/user}","branches_url":"https://api.github.com/repos/Cognifide/bobcat/branches{/branch}","tags_url":"https://api.github.com/repos/Cognifide/bobcat/tags","blobs_url":"https://api.github.com/repos/Cognifide/bobcat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cognifide/bobcat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cognifide/bobcat/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cognifide/bobcat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cognifide/bobcat/statuses/{sha}","languages_url":"https://api.github.com/repos/Cognifide/bobcat/languages","stargazers_url":"https://api.github.com/repos/Cognifide/bobcat/stargazers","contributors_url":"https://api.github.com/repos/Cognifide/bobcat/contributors","subscribers_url":"https://api.github.com/repos/Cognifide/bobcat/subscribers","subscription_url":"https://api.github.com/repos/Cognifide/bobcat/subscription","commits_url":"https://api.github.com/repos/Cognifide/bobcat/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cognifide/bobcat/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cognifide/bobcat/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cognifide/bobcat/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cognifide/bobcat/contents/{+path}","compare_url":"https://api.github.com/repos/Cognifide/bobcat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cognifide/bobcat/merges","archive_url":"https://api.github.com/repos/Cognifide/bobcat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cognifide/bobcat/downloads","issues_url":"https://api.github.com/repos/Cognifide/bobcat/issues{/number}","pulls_url":"https://api.github.com/repos/Cognifide/bobcat/pulls{/number}","milestones_url":"https://api.github.com/repos/Cognifide/bobcat/milestones{/number}","notifications_url":"https://api.github.com/repos/Cognifide/bobcat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cognifide/bobcat/labels{/name}","releases_url":"https://api.github.com/repos/Cognifide/bobcat/releases{/id}","deployments_url":"https://api.github.com/repos/Cognifide/bobcat/deployments","created_at":"2016-06-30T10:54:10Z","updated_at":"2016-08-24T09:53:54Z","pushed_at":"2016-08-24T07:23:58Z","git_url":"git://github.com/Cognifide/bobcat.git","ssh_url":"git@github.com:Cognifide/bobcat.git","clone_url":"https://github.com/Cognifide/bobcat.git","svn_url":"https://github.com/Cognifide/bobcat","homepage":"","size":2996,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":22,"forks":0,"open_issues":22,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cognifide/bobcat/pulls/80"},"html":{"href":"https://github.com/Cognifide/bobcat/pull/80"},"issue":{"href":"https://api.github.com/repos/Cognifide/bobcat/issues/80"},"comments":{"href":"https://api.github.com/repos/Cognifide/bobcat/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/Cognifide/bobcat/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/Cognifide/bobcat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cognifide/bobcat/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/Cognifide/bobcat/statuses/f548949d3657174f648b7332f19fb502e1fc6c3b"}}}}
{"actor":{"display_login":"youngeagle87"}}