{"action":"created","comment":{"url":"https://api.github.com/repos/autoschool/practice2016/pulls/comments/60950543","id":60950543,"diff_hunk":"@@ -14,25 +22,76 @@\n  */\n public class DefaultSteps {\n \n-    public static final String MAIN_PAGE = \"http://weather.lanwen.ru/#?cities=%s\";\n+    private static final String MAIN_PAGE_FOR_CITY = \"http://weather.lanwen.ru/#?cities=%s\";\n+    private static final String EMPTY_MAIN_PAGE = \"http://weather.lanwen.ru\";\n \n     private WebDriver driver;\n+    private Actions mouseActions;\n+    public WebDriverWait wait;\n \n     public DefaultSteps(WebDriver driver) {\n         this.driver = driver;\n+        this.mouseActions = new Actions(driver);\n+        this.wait = new WebDriverWait(driver, 3);\n+    }\n+\n+    @Step(\"Открываем пустую главную страницу\")\n+    public void openEmptyMainPage() {\n+        driver.get(EMPTY_MAIN_PAGE);\n     }\n \n     @Step(\"Открываем главную страницу для города «{0}»\")\n     public void openMainPageWithCity(String city) {\n-        driver.get(format(MAIN_PAGE, city));\n+        driver.get(format(MAIN_PAGE_FOR_CITY, city));\n+    }\n+\n+    @Step(\"Кликаем по элементу {0}\")\n+    public void click(WebElement element) {\n+        element.click();\n+    }\n+\n+    @Step(\"Наводим курсор мыши на элемент {0}\")\n+    public void hover(WebElement element) {\n+        mouseActions.moveToElement(element).perform();\n     }\n \n     @Step(\"Должны видеть на странице «{0}»\")\n     public void shouldSee(WebElement element) {\n         assertThat(\"Должны видеть элемент\", element, isDisplayed());\n     }\n \n+    @Step(\"Количество виджетов на странице должно быть {0}\")\n+    public void shouldSeeWidgetsQuantity(int i) {\n+        assertThat(\"Количество виджетов на странице должно быть другим\",\n+                onMainPage().getWeatherWidgetList().size(), is(i));\n+    }\n+\n+    @Step(\"Должны видеть у элемента {0} текст {1}\")\n+    public void shouldSeeText(HtmlElement element, String expectedText) {\n+        assertThat(\"Текст у элемента должен быть другим\", element.getText(), is(expectedText));\n+    }\n+\n+    @Step(\"Должны видеть строку {0} в формате, который соответствует {1}\")\n+    public void shouldMatchRegex(String checkedString, String regex) {\n+        assertThat(\"Текст не соответствует ожидаемому формату\", checkedString, matchesPattern(regex));\n+    }\n+\n+    @Step(\"Должны видеть у элемента {0} цвета {1}\")\n+    public void shouldSeeColor(WebElement element, String color) {\n+        assertThat(\"Не тот цвет у элемента\", element.getCssValue(\"background-color\"), is(color));\n+    }\n+\n     private MainPage onMainPage() {\n         return new MainPage(driver);\n     }\n+\n+    @Step(\"Меняем текст в поле названия города кликом по нему, удалением старого текста и вводом нового текста\")","path":"steps-module/src/main/java/ru/qatools/school/steps/websteps/DefaultSteps.java","position":89,"original_position":89,"commit_id":"8fb5dfac12469780df472d5ccf551a63c62f11eb","original_commit_id":"8fb5dfac12469780df472d5ccf551a63c62f11eb","user":{"login":"totallynotkate","id":10925292,"avatar_url":"https://avatars.githubusercontent.com/u/10925292?v=3","gravatar_id":"","url":"https://api.github.com/users/totallynotkate","html_url":"https://github.com/totallynotkate","followers_url":"https://api.github.com/users/totallynotkate/followers","following_url":"https://api.github.com/users/totallynotkate/following{/other_user}","gists_url":"https://api.github.com/users/totallynotkate/gists{/gist_id}","starred_url":"https://api.github.com/users/totallynotkate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totallynotkate/subscriptions","organizations_url":"https://api.github.com/users/totallynotkate/orgs","repos_url":"https://api.github.com/users/totallynotkate/repos","events_url":"https://api.github.com/users/totallynotkate/events{/privacy}","received_events_url":"https://api.github.com/users/totallynotkate/received_events","type":"User","site_admin":false},"body":"@OneginES начало падать, переписала, теперь вроде падать не должно","created_at":"2016-04-25T17:12:14Z","updated_at":"2016-04-25T17:12:14Z","html_url":"https://github.com/autoschool/practice2016/pull/47#discussion_r60950543","pull_request_url":"https://api.github.com/repos/autoschool/practice2016/pulls/47","_links":{"self":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/comments/60950543"},"html":{"href":"https://github.com/autoschool/practice2016/pull/47#discussion_r60950543"},"pull_request":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/47"}}},"pull_request":{"url":"https://api.github.com/repos/autoschool/practice2016/pulls/47","id":67632093,"html_url":"https://github.com/autoschool/practice2016/pull/47","diff_url":"https://github.com/autoschool/practice2016/pull/47.diff","patch_url":"https://github.com/autoschool/practice2016/pull/47.patch","issue_url":"https://api.github.com/repos/autoschool/practice2016/issues/47","number":47,"state":"open","locked":false,"title":"Add automated tests for smoke suite","user":{"login":"totallynotkate","id":10925292,"avatar_url":"https://avatars.githubusercontent.com/u/10925292?v=3","gravatar_id":"","url":"https://api.github.com/users/totallynotkate","html_url":"https://github.com/totallynotkate","followers_url":"https://api.github.com/users/totallynotkate/followers","following_url":"https://api.github.com/users/totallynotkate/following{/other_user}","gists_url":"https://api.github.com/users/totallynotkate/gists{/gist_id}","starred_url":"https://api.github.com/users/totallynotkate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totallynotkate/subscriptions","organizations_url":"https://api.github.com/users/totallynotkate/orgs","repos_url":"https://api.github.com/users/totallynotkate/repos","events_url":"https://api.github.com/users/totallynotkate/events{/privacy}","received_events_url":"https://api.github.com/users/totallynotkate/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-24T09:10:31Z","updated_at":"2016-04-25T17:12:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0c54eea392cc12b7dc8892c2de70b4dff57dd32","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/autoschool/practice2016/pulls/47/commits","review_comments_url":"https://api.github.com/repos/autoschool/practice2016/pulls/47/comments","review_comment_url":"https://api.github.com/repos/autoschool/practice2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/autoschool/practice2016/issues/47/comments","statuses_url":"https://api.github.com/repos/autoschool/practice2016/statuses/8fb5dfac12469780df472d5ccf551a63c62f11eb","head":{"label":"totallynotkate:testpalm","ref":"testpalm","sha":"8fb5dfac12469780df472d5ccf551a63c62f11eb","user":{"login":"totallynotkate","id":10925292,"avatar_url":"https://avatars.githubusercontent.com/u/10925292?v=3","gravatar_id":"","url":"https://api.github.com/users/totallynotkate","html_url":"https://github.com/totallynotkate","followers_url":"https://api.github.com/users/totallynotkate/followers","following_url":"https://api.github.com/users/totallynotkate/following{/other_user}","gists_url":"https://api.github.com/users/totallynotkate/gists{/gist_id}","starred_url":"https://api.github.com/users/totallynotkate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totallynotkate/subscriptions","organizations_url":"https://api.github.com/users/totallynotkate/orgs","repos_url":"https://api.github.com/users/totallynotkate/repos","events_url":"https://api.github.com/users/totallynotkate/events{/privacy}","received_events_url":"https://api.github.com/users/totallynotkate/received_events","type":"User","site_admin":false},"repo":{"id":55731432,"name":"practice2016","full_name":"totallynotkate/practice2016","owner":{"login":"totallynotkate","id":10925292,"avatar_url":"https://avatars.githubusercontent.com/u/10925292?v=3","gravatar_id":"","url":"https://api.github.com/users/totallynotkate","html_url":"https://github.com/totallynotkate","followers_url":"https://api.github.com/users/totallynotkate/followers","following_url":"https://api.github.com/users/totallynotkate/following{/other_user}","gists_url":"https://api.github.com/users/totallynotkate/gists{/gist_id}","starred_url":"https://api.github.com/users/totallynotkate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/totallynotkate/subscriptions","organizations_url":"https://api.github.com/users/totallynotkate/orgs","repos_url":"https://api.github.com/users/totallynotkate/repos","events_url":"https://api.github.com/users/totallynotkate/events{/privacy}","received_events_url":"https://api.github.com/users/totallynotkate/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/totallynotkate/practice2016","description":"Practical part of lessons","fork":true,"url":"https://api.github.com/repos/totallynotkate/practice2016","forks_url":"https://api.github.com/repos/totallynotkate/practice2016/forks","keys_url":"https://api.github.com/repos/totallynotkate/practice2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/totallynotkate/practice2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/totallynotkate/practice2016/teams","hooks_url":"https://api.github.com/repos/totallynotkate/practice2016/hooks","issue_events_url":"https://api.github.com/repos/totallynotkate/practice2016/issues/events{/number}","events_url":"https://api.github.com/repos/totallynotkate/practice2016/events","assignees_url":"https://api.github.com/repos/totallynotkate/practice2016/assignees{/user}","branches_url":"https://api.github.com/repos/totallynotkate/practice2016/branches{/branch}","tags_url":"https://api.github.com/repos/totallynotkate/practice2016/tags","blobs_url":"https://api.github.com/repos/totallynotkate/practice2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/totallynotkate/practice2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/totallynotkate/practice2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/totallynotkate/practice2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/totallynotkate/practice2016/statuses/{sha}","languages_url":"https://api.github.com/repos/totallynotkate/practice2016/languages","stargazers_url":"https://api.github.com/repos/totallynotkate/practice2016/stargazers","contributors_url":"https://api.github.com/repos/totallynotkate/practice2016/contributors","subscribers_url":"https://api.github.com/repos/totallynotkate/practice2016/subscribers","subscription_url":"https://api.github.com/repos/totallynotkate/practice2016/subscription","commits_url":"https://api.github.com/repos/totallynotkate/practice2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/totallynotkate/practice2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/totallynotkate/practice2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/totallynotkate/practice2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/totallynotkate/practice2016/contents/{+path}","compare_url":"https://api.github.com/repos/totallynotkate/practice2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/totallynotkate/practice2016/merges","archive_url":"https://api.github.com/repos/totallynotkate/practice2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/totallynotkate/practice2016/downloads","issues_url":"https://api.github.com/repos/totallynotkate/practice2016/issues{/number}","pulls_url":"https://api.github.com/repos/totallynotkate/practice2016/pulls{/number}","milestones_url":"https://api.github.com/repos/totallynotkate/practice2016/milestones{/number}","notifications_url":"https://api.github.com/repos/totallynotkate/practice2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/totallynotkate/practice2016/labels{/name}","releases_url":"https://api.github.com/repos/totallynotkate/practice2016/releases{/id}","deployments_url":"https://api.github.com/repos/totallynotkate/practice2016/deployments","created_at":"2016-04-07T22:08:13Z","updated_at":"2016-04-07T22:08:14Z","pushed_at":"2016-04-25T17:10:36Z","git_url":"git://github.com/totallynotkate/practice2016.git","ssh_url":"git@github.com:totallynotkate/practice2016.git","clone_url":"https://github.com/totallynotkate/practice2016.git","svn_url":"https://github.com/totallynotkate/practice2016","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"autoschool:master","ref":"master","sha":"f25538516332a8c0d609eda202f755d16d4861ac","user":{"login":"autoschool","id":9036536,"avatar_url":"https://avatars.githubusercontent.com/u/9036536?v=3","gravatar_id":"","url":"https://api.github.com/users/autoschool","html_url":"https://github.com/autoschool","followers_url":"https://api.github.com/users/autoschool/followers","following_url":"https://api.github.com/users/autoschool/following{/other_user}","gists_url":"https://api.github.com/users/autoschool/gists{/gist_id}","starred_url":"https://api.github.com/users/autoschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autoschool/subscriptions","organizations_url":"https://api.github.com/users/autoschool/orgs","repos_url":"https://api.github.com/users/autoschool/repos","events_url":"https://api.github.com/users/autoschool/events{/privacy}","received_events_url":"https://api.github.com/users/autoschool/received_events","type":"Organization","site_admin":false},"repo":{"id":55640208,"name":"practice2016","full_name":"autoschool/practice2016","owner":{"login":"autoschool","id":9036536,"avatar_url":"https://avatars.githubusercontent.com/u/9036536?v=3","gravatar_id":"","url":"https://api.github.com/users/autoschool","html_url":"https://github.com/autoschool","followers_url":"https://api.github.com/users/autoschool/followers","following_url":"https://api.github.com/users/autoschool/following{/other_user}","gists_url":"https://api.github.com/users/autoschool/gists{/gist_id}","starred_url":"https://api.github.com/users/autoschool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autoschool/subscriptions","organizations_url":"https://api.github.com/users/autoschool/orgs","repos_url":"https://api.github.com/users/autoschool/repos","events_url":"https://api.github.com/users/autoschool/events{/privacy}","received_events_url":"https://api.github.com/users/autoschool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/autoschool/practice2016","description":"Practical part of lessons","fork":false,"url":"https://api.github.com/repos/autoschool/practice2016","forks_url":"https://api.github.com/repos/autoschool/practice2016/forks","keys_url":"https://api.github.com/repos/autoschool/practice2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autoschool/practice2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autoschool/practice2016/teams","hooks_url":"https://api.github.com/repos/autoschool/practice2016/hooks","issue_events_url":"https://api.github.com/repos/autoschool/practice2016/issues/events{/number}","events_url":"https://api.github.com/repos/autoschool/practice2016/events","assignees_url":"https://api.github.com/repos/autoschool/practice2016/assignees{/user}","branches_url":"https://api.github.com/repos/autoschool/practice2016/branches{/branch}","tags_url":"https://api.github.com/repos/autoschool/practice2016/tags","blobs_url":"https://api.github.com/repos/autoschool/practice2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autoschool/practice2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autoschool/practice2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/autoschool/practice2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autoschool/practice2016/statuses/{sha}","languages_url":"https://api.github.com/repos/autoschool/practice2016/languages","stargazers_url":"https://api.github.com/repos/autoschool/practice2016/stargazers","contributors_url":"https://api.github.com/repos/autoschool/practice2016/contributors","subscribers_url":"https://api.github.com/repos/autoschool/practice2016/subscribers","subscription_url":"https://api.github.com/repos/autoschool/practice2016/subscription","commits_url":"https://api.github.com/repos/autoschool/practice2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/autoschool/practice2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/autoschool/practice2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/autoschool/practice2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/autoschool/practice2016/contents/{+path}","compare_url":"https://api.github.com/repos/autoschool/practice2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autoschool/practice2016/merges","archive_url":"https://api.github.com/repos/autoschool/practice2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autoschool/practice2016/downloads","issues_url":"https://api.github.com/repos/autoschool/practice2016/issues{/number}","pulls_url":"https://api.github.com/repos/autoschool/practice2016/pulls{/number}","milestones_url":"https://api.github.com/repos/autoschool/practice2016/milestones{/number}","notifications_url":"https://api.github.com/repos/autoschool/practice2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autoschool/practice2016/labels{/name}","releases_url":"https://api.github.com/repos/autoschool/practice2016/releases{/id}","deployments_url":"https://api.github.com/repos/autoschool/practice2016/deployments","created_at":"2016-04-06T21:00:54Z","updated_at":"2016-04-15T04:23:45Z","pushed_at":"2016-04-25T17:10:37Z","git_url":"git://github.com/autoschool/practice2016.git","ssh_url":"git@github.com:autoschool/practice2016.git","clone_url":"https://github.com/autoschool/practice2016.git","svn_url":"https://github.com/autoschool/practice2016","homepage":null,"size":489,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":24,"forks":30,"open_issues":24,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/47"},"html":{"href":"https://github.com/autoschool/practice2016/pull/47"},"issue":{"href":"https://api.github.com/repos/autoschool/practice2016/issues/47"},"comments":{"href":"https://api.github.com/repos/autoschool/practice2016/issues/47/comments"},"review_comments":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/47/comments"},"review_comment":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/autoschool/practice2016/pulls/47/commits"},"statuses":{"href":"https://api.github.com/repos/autoschool/practice2016/statuses/8fb5dfac12469780df472d5ccf551a63c62f11eb"}}}}