{"action":"created","comment":{"url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/comments/92948981","pull_request_review_id":13470765,"id":92948981,"diff_hunk":"@@ -0,0 +1,211 @@\n+# -*- coding: utf-8 -*-\n+\n+from selenium.webdriver.support.ui import WebDriverWait\n+from test_base import Page\n+from test_base import Component\n+from seismograph.ext import selenium\n+from base_case import BaseCase\n+\n+\n+class GroupPage(Page):\n+    PATH = \"/group/53389738115166\"\n+    CREATE_POST = \"//div[@class='input_placeholder']\"\n+\n+    @property\n+    def creating_post(self):\n+        self.driver.find_element_by_xpath(self.CREATE_POST).click()\n+        return NewPost(self.driver)\n+\n+    @property\n+    def get_last_post(self):\n+        return LastPost(self.driver)\n+\n+    def refresh_page(self):\n+        self.driver.refresh()\n+\n+\n+class NewPost(Component):\n+    TEXT_POST = \"//div[@id='posting_form_text_field']\"\n+    SUBMIT = \"//input[@value='Поделиться'][@class='button-pro']\"\n+    VISIBLE_BLOCK = \"//div[@class='posting-form']/div[@class='posting-form_overlay invisible']\"\n+\n+    MUSIC = \"//a[@id='openmusic']\"\n+    MUSIC_BLOCK = \"//div[@id='swtch'][@class='posting-form_controls  posting-form_controls__off']\"\n+    MUSIC_SEARCH = \"//div[@class='it_w search-input']/label/input[@class='search-input_it it'][@type='text']\"\n+    TRACK = \"//span[@class='posting-form_track_info ellip'][1]\"\n+    BUTTON_ADD_TRACK = \"//div[@class='form-actions __center']/a[@class='button-pro form-actions_yes']\"\n+\n+    ICO_SETTINGS = \"//span[@class='tico toggler lp']/i[@class='tico_img ic ic_settings']\"\n+    MENU_SETTINGS = \"//div[@class='jcol-l']/div[@class='iblock-cloud_dropdown h-mod __active']\"\n+    NO_COMMENT = \"//div[@class='nowrap']/input[@name='st.toggleComments']\"\n+\n+    def set_text(self, text):\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.VISIBLE_BLOCK)\n+        )\n+        self.driver.find_element_by_xpath(self.TEXT_POST).send_keys(text)\n+\n+    def set_music(self, search_text):\n+        self.driver.find_element_by_xpath(self.MUSIC).click()\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.MUSIC_BLOCK)\n+        )\n+        self.driver.find_element_by_xpath(self.MUSIC_SEARCH).send_keys(search_text)\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.TRACK)\n+        )\n+        self.driver.find_element_by_xpath(self.TRACK).click()\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.BUTTON_ADD_TRACK)\n+        )\n+        self.driver.find_element_by_xpath(self.BUTTON_ADD_TRACK).click()\n+\n+    def set_no_comment(self):\n+        self.driver.find_element_by_xpath(self.ICO_SETTINGS).click()\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.MENU_SETTINGS)\n+        )\n+        self.driver.find_element_by_xpath(self.NO_COMMENT).click()\n+\n+    def submit(self):\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.SUBMIT)\n+        )\n+        self.driver.find_element_by_xpath(self.SUBMIT).click()\n+\n+\n+class LastPost(Component):\n+    LAST_POST = \"//div[@class='groups_post-w __search-enabled'][1]//div[@class='media-text_cnt']//\" \\\n+                \"div[@class='media-text_cnt_tx textWrap']\"\n+    LAST_POST_A = \"//div[@class='groups_post-w __search-enabled'][1]//div[@class='media-text_cnt']/\" \\\n+                  \"div[@class='media-text_cnt_tx textWrap']/a[@class='media-text_a']\"\n+    FALLING_MENU = \"//div[@class='mlr_top_ac']/div[@class='ic12 ic12_arrow-down lp']\"\n+    DELETE_POST = \"//span[@class='tico']/i[@class='tico_img ic ic_delete']\"\n+\n+    ICO_X = \"//div[@class='media-layer_close']/div[@class='ic media-layer_close_ico']\"\n+    TEXT_POST_DELETED = \"//span[@class='delete-stub_info']\"\n+\n+    TRACK_IN_LAST_POST = \"//div[@class='groups_post-w __search-enabled'][1]//a[@class='track_song']\"\n+\n+    COMMENT_IN_LAST_POST = \"//div[@class='groups_post-w __search-enabled'][1]//a[@class='h-mod widget_cnt']\" \\\n+                           \"/span[@class='widget_ico ic12 ic12_comment']\"\n+    COMMENT_CLOSED = \"//div[@class='disc_simple_input_cont'][@style='display: block;']//\" \\\n+                     \"input[@class='disc_simple_input disc_simple_input__im']\"\n+\n+    def is_last_post_new_post(self, text):\n+        WebDriverWait(self.driver, 30, 0.1).until(\n+            lambda d: d.find_element_by_xpath(self.LAST_POST)\n+        )\n+        # print self.driver.find_element_by_xpath(self.LAST_POST).text\n+        # print text\n+        if self.driver.find_element_by_xpath(self.LAST_POST).text == text:\n+            return True\n+        else:\n+            return False","path":"tests/test_creation_post.py","position":null,"original_position":104,"commit_id":"d86440629a387bd1f6c36a149ecf473c7825fda1","original_commit_id":"e1a5153ede17815e2cce97583f8a3271a448f220","user":{"login":"snach","id":17140006,"avatar_url":"https://avatars.githubusercontent.com/u/17140006?v=3","gravatar_id":"","url":"https://api.github.com/users/snach","html_url":"https://github.com/snach","followers_url":"https://api.github.com/users/snach/followers","following_url":"https://api.github.com/users/snach/following{/other_user}","gists_url":"https://api.github.com/users/snach/gists{/gist_id}","starred_url":"https://api.github.com/users/snach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snach/subscriptions","organizations_url":"https://api.github.com/users/snach/orgs","repos_url":"https://api.github.com/users/snach/repos","events_url":"https://api.github.com/users/snach/events{/privacy}","received_events_url":"https://api.github.com/users/snach/received_events","type":"User","site_admin":false},"body":"у трека(ниже), тоже исправила","created_at":"2016-12-18T19:43:13Z","updated_at":"2016-12-18T19:43:13Z","html_url":"https://github.com/dkotegov/selenium-homework/pull/8#discussion_r92948981","pull_request_url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/comments/92948981"},"html":{"href":"https://github.com/dkotegov/selenium-homework/pull/8#discussion_r92948981"},"pull_request":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8","id":97631070,"html_url":"https://github.com/dkotegov/selenium-homework/pull/8","diff_url":"https://github.com/dkotegov/selenium-homework/pull/8.diff","patch_url":"https://github.com/dkotegov/selenium-homework/pull/8.patch","issue_url":"https://api.github.com/repos/dkotegov/selenium-homework/issues/8","number":8,"state":"open","locked":false,"title":"Команда mini_bikini","user":{"login":"snach","id":17140006,"avatar_url":"https://avatars.githubusercontent.com/u/17140006?v=3","gravatar_id":"","url":"https://api.github.com/users/snach","html_url":"https://github.com/snach","followers_url":"https://api.github.com/users/snach/followers","following_url":"https://api.github.com/users/snach/following{/other_user}","gists_url":"https://api.github.com/users/snach/gists{/gist_id}","starred_url":"https://api.github.com/users/snach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snach/subscriptions","organizations_url":"https://api.github.com/users/snach/orgs","repos_url":"https://api.github.com/users/snach/repos","events_url":"https://api.github.com/users/snach/events{/privacy}","received_events_url":"https://api.github.com/users/snach/received_events","type":"User","site_admin":false},"body":"Состав:\r\n\tСначева Ксения\r\n\tФилатов Степан\r\n\tЛавриненко Адександр\r\n\r\nЧеклист mini_bikini:\r\n\r\n\t1. Проверить настройки группы\r\n\t\ta. Переименовать группу\r\n\t\tb. Изменить описание группы\r\n\t\tс. Изменить город группы\r\n\t2. Проверить создание и удаление постов\r\n\t\ta. Пост с текстом\r\n\t\t\t1. Создать пост с текстом\r\n\t\t\t2. Удалить пост с текстом\r\n\t\tb. Пост с музыкой\r\n\t\t\t1. Создать пост с музыкой\r\n\t\t\t2. Удалить пост с музыкой\r\n\t\tс. Пост с выключенным режимом комментариев\r\n\t\t\t1. Создать пост с выключенным режимом комментариев\r\n\t\t\t2. Удалить пост с выключенным режимом комментариев\r\n\t3. Проверить навигацию по группам\r\n\t\tа. переход в группы\r\n\t\tb. Постраничная загрузка списка групп\r\n\t\tc. Возможность создания группы\r\n\t\td. Поиск по группам\r\n\t\te. Возможность перехода в группу из списка моих групп","created_at":"2016-12-12T20:53:19Z","updated_at":"2016-12-18T19:43:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fcfa17f0d40cec531d826312c09fc669af2978fb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8/commits","review_comments_url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8/comments","review_comment_url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dkotegov/selenium-homework/issues/8/comments","statuses_url":"https://api.github.com/repos/dkotegov/selenium-homework/statuses/d86440629a387bd1f6c36a149ecf473c7825fda1","head":{"label":"snach:master","ref":"master","sha":"d86440629a387bd1f6c36a149ecf473c7825fda1","user":{"login":"snach","id":17140006,"avatar_url":"https://avatars.githubusercontent.com/u/17140006?v=3","gravatar_id":"","url":"https://api.github.com/users/snach","html_url":"https://github.com/snach","followers_url":"https://api.github.com/users/snach/followers","following_url":"https://api.github.com/users/snach/following{/other_user}","gists_url":"https://api.github.com/users/snach/gists{/gist_id}","starred_url":"https://api.github.com/users/snach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snach/subscriptions","organizations_url":"https://api.github.com/users/snach/orgs","repos_url":"https://api.github.com/users/snach/repos","events_url":"https://api.github.com/users/snach/events{/privacy}","received_events_url":"https://api.github.com/users/snach/received_events","type":"User","site_admin":false},"repo":{"id":75070329,"name":"selenium-homework","full_name":"snach/selenium-homework","owner":{"login":"snach","id":17140006,"avatar_url":"https://avatars.githubusercontent.com/u/17140006?v=3","gravatar_id":"","url":"https://api.github.com/users/snach","html_url":"https://github.com/snach","followers_url":"https://api.github.com/users/snach/followers","following_url":"https://api.github.com/users/snach/following{/other_user}","gists_url":"https://api.github.com/users/snach/gists{/gist_id}","starred_url":"https://api.github.com/users/snach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/snach/subscriptions","organizations_url":"https://api.github.com/users/snach/orgs","repos_url":"https://api.github.com/users/snach/repos","events_url":"https://api.github.com/users/snach/events{/privacy}","received_events_url":"https://api.github.com/users/snach/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/snach/selenium-homework","description":null,"fork":true,"url":"https://api.github.com/repos/snach/selenium-homework","forks_url":"https://api.github.com/repos/snach/selenium-homework/forks","keys_url":"https://api.github.com/repos/snach/selenium-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/snach/selenium-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/snach/selenium-homework/teams","hooks_url":"https://api.github.com/repos/snach/selenium-homework/hooks","issue_events_url":"https://api.github.com/repos/snach/selenium-homework/issues/events{/number}","events_url":"https://api.github.com/repos/snach/selenium-homework/events","assignees_url":"https://api.github.com/repos/snach/selenium-homework/assignees{/user}","branches_url":"https://api.github.com/repos/snach/selenium-homework/branches{/branch}","tags_url":"https://api.github.com/repos/snach/selenium-homework/tags","blobs_url":"https://api.github.com/repos/snach/selenium-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/snach/selenium-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/snach/selenium-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/snach/selenium-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/snach/selenium-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/snach/selenium-homework/languages","stargazers_url":"https://api.github.com/repos/snach/selenium-homework/stargazers","contributors_url":"https://api.github.com/repos/snach/selenium-homework/contributors","subscribers_url":"https://api.github.com/repos/snach/selenium-homework/subscribers","subscription_url":"https://api.github.com/repos/snach/selenium-homework/subscription","commits_url":"https://api.github.com/repos/snach/selenium-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/snach/selenium-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/snach/selenium-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/snach/selenium-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/snach/selenium-homework/contents/{+path}","compare_url":"https://api.github.com/repos/snach/selenium-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/snach/selenium-homework/merges","archive_url":"https://api.github.com/repos/snach/selenium-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/snach/selenium-homework/downloads","issues_url":"https://api.github.com/repos/snach/selenium-homework/issues{/number}","pulls_url":"https://api.github.com/repos/snach/selenium-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/snach/selenium-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/snach/selenium-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/snach/selenium-homework/labels{/name}","releases_url":"https://api.github.com/repos/snach/selenium-homework/releases{/id}","deployments_url":"https://api.github.com/repos/snach/selenium-homework/deployments","created_at":"2016-11-29T10:28:39Z","updated_at":"2016-11-29T10:28:40Z","pushed_at":"2016-12-18T19:38:55Z","git_url":"git://github.com/snach/selenium-homework.git","ssh_url":"git@github.com:snach/selenium-homework.git","clone_url":"https://github.com/snach/selenium-homework.git","svn_url":"https://github.com/snach/selenium-homework","homepage":null,"size":19854,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"dkotegov:master","ref":"master","sha":"e127f105363dfe0fc6b68798a672b7410876d041","user":{"login":"dkotegov","id":11413412,"avatar_url":"https://avatars.githubusercontent.com/u/11413412?v=3","gravatar_id":"","url":"https://api.github.com/users/dkotegov","html_url":"https://github.com/dkotegov","followers_url":"https://api.github.com/users/dkotegov/followers","following_url":"https://api.github.com/users/dkotegov/following{/other_user}","gists_url":"https://api.github.com/users/dkotegov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkotegov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkotegov/subscriptions","organizations_url":"https://api.github.com/users/dkotegov/orgs","repos_url":"https://api.github.com/users/dkotegov/repos","events_url":"https://api.github.com/users/dkotegov/events{/privacy}","received_events_url":"https://api.github.com/users/dkotegov/received_events","type":"User","site_admin":false},"repo":{"id":74622555,"name":"selenium-homework","full_name":"dkotegov/selenium-homework","owner":{"login":"dkotegov","id":11413412,"avatar_url":"https://avatars.githubusercontent.com/u/11413412?v=3","gravatar_id":"","url":"https://api.github.com/users/dkotegov","html_url":"https://github.com/dkotegov","followers_url":"https://api.github.com/users/dkotegov/followers","following_url":"https://api.github.com/users/dkotegov/following{/other_user}","gists_url":"https://api.github.com/users/dkotegov/gists{/gist_id}","starred_url":"https://api.github.com/users/dkotegov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkotegov/subscriptions","organizations_url":"https://api.github.com/users/dkotegov/orgs","repos_url":"https://api.github.com/users/dkotegov/repos","events_url":"https://api.github.com/users/dkotegov/events{/privacy}","received_events_url":"https://api.github.com/users/dkotegov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dkotegov/selenium-homework","description":null,"fork":false,"url":"https://api.github.com/repos/dkotegov/selenium-homework","forks_url":"https://api.github.com/repos/dkotegov/selenium-homework/forks","keys_url":"https://api.github.com/repos/dkotegov/selenium-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkotegov/selenium-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkotegov/selenium-homework/teams","hooks_url":"https://api.github.com/repos/dkotegov/selenium-homework/hooks","issue_events_url":"https://api.github.com/repos/dkotegov/selenium-homework/issues/events{/number}","events_url":"https://api.github.com/repos/dkotegov/selenium-homework/events","assignees_url":"https://api.github.com/repos/dkotegov/selenium-homework/assignees{/user}","branches_url":"https://api.github.com/repos/dkotegov/selenium-homework/branches{/branch}","tags_url":"https://api.github.com/repos/dkotegov/selenium-homework/tags","blobs_url":"https://api.github.com/repos/dkotegov/selenium-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkotegov/selenium-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkotegov/selenium-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkotegov/selenium-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkotegov/selenium-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/dkotegov/selenium-homework/languages","stargazers_url":"https://api.github.com/repos/dkotegov/selenium-homework/stargazers","contributors_url":"https://api.github.com/repos/dkotegov/selenium-homework/contributors","subscribers_url":"https://api.github.com/repos/dkotegov/selenium-homework/subscribers","subscription_url":"https://api.github.com/repos/dkotegov/selenium-homework/subscription","commits_url":"https://api.github.com/repos/dkotegov/selenium-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkotegov/selenium-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkotegov/selenium-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkotegov/selenium-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkotegov/selenium-homework/contents/{+path}","compare_url":"https://api.github.com/repos/dkotegov/selenium-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkotegov/selenium-homework/merges","archive_url":"https://api.github.com/repos/dkotegov/selenium-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkotegov/selenium-homework/downloads","issues_url":"https://api.github.com/repos/dkotegov/selenium-homework/issues{/number}","pulls_url":"https://api.github.com/repos/dkotegov/selenium-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/dkotegov/selenium-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/dkotegov/selenium-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkotegov/selenium-homework/labels{/name}","releases_url":"https://api.github.com/repos/dkotegov/selenium-homework/releases{/id}","deployments_url":"https://api.github.com/repos/dkotegov/selenium-homework/deployments","created_at":"2016-11-23T23:43:51Z","updated_at":"2016-11-23T23:46:09Z","pushed_at":"2016-12-18T19:38:57Z","git_url":"git://github.com/dkotegov/selenium-homework.git","ssh_url":"git@github.com:dkotegov/selenium-homework.git","clone_url":"https://github.com/dkotegov/selenium-homework.git","svn_url":"https://github.com/dkotegov/selenium-homework","homepage":null,"size":1,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":8,"forks":17,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8"},"html":{"href":"https://github.com/dkotegov/selenium-homework/pull/8"},"issue":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/issues/8"},"comments":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/dkotegov/selenium-homework/statuses/d86440629a387bd1f6c36a149ecf473c7825fda1"}}}}
{"actor":{"display_login":"snach"}}