{"action":"created","comment":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/55694003","id":55694003,"diff_hunk":"@@ -0,0 +1,120 @@\n+<?php\n+\n+/*\n+ * This file is part of the Sylius package.\n+ *\n+ * (c) Paweł Jędrzejewski\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Sylius\\Behat\\Page\\Admin\\Crud;\n+\n+use Behat\\Mink\\Session;\n+use Sylius\\Behat\\Page\\SymfonyPage;\n+use Sylius\\Behat\\TableManipulatorInterface;\n+use Symfony\\Component\\Routing\\RouterInterface;\n+\n+/**\n+ * @author Arkadiusz Krakowiak <arkadiusz.krakowiak@lakion.com>\n+ */\n+class IndexPage extends SymfonyPage implements IndexPageInterface\n+{\n+    /**\n+     * @var string\n+     */\n+    protected $resourceName;\n+\n+    /**\n+     * @var TableManipulatorInterface\n+     */\n+    protected $tableManipulator;\n+\n+    /**\n+     * @var array\n+     */\n+    protected $elements = [\n+        'message' => '.message',\n+        'messageContent' => '.message > .content',\n+        'table' => '.table',\n+    ];\n+\n+    /**\n+     * @param Session $session\n+     * @param array $parameters\n+     * @param RouterInterface $router\n+     * @param TableManipulatorInterface $tableManipulator\n+     * @param string $resourceName\n+     */\n+    public function __construct(\n+        Session $session,\n+        array $parameters,\n+        RouterInterface $router,\n+        TableManipulatorInterface $tableManipulator,\n+        $resourceName\n+    ) {\n+        parent::__construct($session, $parameters, $router);\n+\n+        $this->tableManipulator = $tableManipulator;\n+        $this->resourceName = $resourceName;\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function hasSuccessMessage()\n+    {\n+        return $this->getElement('message')->hasClass('positive');\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function isSuccessfullyCreated()\n+    {\n+        return $this->hasMessage(sprintf('Success %s has been successfully created.', ucfirst($this->resourceName)));\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function isSuccessfullyUpdated()\n+    {\n+        return $this->hasMessage(sprintf('Success %s has been successfully updated.', ucfirst($this->resourceName)));\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function isSuccessfullyDeleted()\n+    {\n+        return $this->hasMessage(sprintf('Success %s has been successfully deleted.', ucfirst($this->resourceName)));\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function isResourceOnPage(array $parameters)\n+    {\n+        $rows = $this->tableManipulator->getRowsWithFields($this->getElement('table'), $parameters);\n+\n+        return !empty($rows);","path":"src/Sylius/Behat/Page/Admin/Crud/IndexPage.php","position":102,"original_position":102,"commit_id":"e26485329e8c5b8e50b5daa1914786386fab6202","original_commit_id":"e26485329e8c5b8e50b5daa1914786386fab6202","user":{"login":"pamil","id":1897953,"avatar_url":"https://avatars.githubusercontent.com/u/1897953?v=3","gravatar_id":"","url":"https://api.github.com/users/pamil","html_url":"https://github.com/pamil","followers_url":"https://api.github.com/users/pamil/followers","following_url":"https://api.github.com/users/pamil/following{/other_user}","gists_url":"https://api.github.com/users/pamil/gists{/gist_id}","starred_url":"https://api.github.com/users/pamil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pamil/subscriptions","organizations_url":"https://api.github.com/users/pamil/orgs","repos_url":"https://api.github.com/users/pamil/repos","events_url":"https://api.github.com/users/pamil/events{/privacy}","received_events_url":"https://api.github.com/users/pamil/received_events","type":"User","site_admin":false},"body":"`0 === count($rows)`, wdyt?","created_at":"2016-03-10T15:19:25Z","updated_at":"2016-03-10T15:19:25Z","html_url":"https://github.com/Sylius/Sylius/pull/4395#discussion_r55694003","pull_request_url":"https://api.github.com/repos/Sylius/Sylius/pulls/4395","_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments/55694003"},"html":{"href":"https://github.com/Sylius/Sylius/pull/4395#discussion_r55694003"},"pull_request":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/4395"}}},"pull_request":{"url":"https://api.github.com/repos/Sylius/Sylius/pulls/4395","id":61720983,"html_url":"https://github.com/Sylius/Sylius/pull/4395","diff_url":"https://github.com/Sylius/Sylius/pull/4395.diff","patch_url":"https://github.com/Sylius/Sylius/pull/4395.patch","issue_url":"https://api.github.com/repos/Sylius/Sylius/issues/4395","number":4395,"state":"open","locked":false,"title":"[Admin] Adding countries","user":{"login":"Arminek","id":6368946,"avatar_url":"https://avatars.githubusercontent.com/u/6368946?v=3","gravatar_id":"","url":"https://api.github.com/users/Arminek","html_url":"https://github.com/Arminek","followers_url":"https://api.github.com/users/Arminek/followers","following_url":"https://api.github.com/users/Arminek/following{/other_user}","gists_url":"https://api.github.com/users/Arminek/gists{/gist_id}","starred_url":"https://api.github.com/users/Arminek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arminek/subscriptions","organizations_url":"https://api.github.com/users/Arminek/orgs","repos_url":"https://api.github.com/users/Arminek/repos","events_url":"https://api.github.com/users/Arminek/events{/privacy}","received_events_url":"https://api.github.com/users/Arminek/received_events","type":"User","site_admin":false},"body":"| Q               | A\r\n| --------------- | ---\r\n| Bug fix?        | no\r\n| New feature?    | no\r\n| BC breaks?      | no\r\n| Deprecations?   | no\r\n| Related tickets | #4374 \r\n| License         | MIT","created_at":"2016-03-04T14:46:30Z","updated_at":"2016-03-10T15:19:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a184a09795dd4481185287b3d3918286b9fb865","assignee":null,"milestone":{"url":"https://api.github.com/repos/Sylius/Sylius/milestones/5","html_url":"https://github.com/Sylius/Sylius/milestones/v0.18.0","labels_url":"https://api.github.com/repos/Sylius/Sylius/milestones/5/labels","id":1104563,"number":5,"title":"v0.18.0","description":"Version v0.18.0 of Sylius platform.","creator":{"login":"pjedrzejewski","id":614970,"avatar_url":"https://avatars.githubusercontent.com/u/614970?v=3","gravatar_id":"","url":"https://api.github.com/users/pjedrzejewski","html_url":"https://github.com/pjedrzejewski","followers_url":"https://api.github.com/users/pjedrzejewski/followers","following_url":"https://api.github.com/users/pjedrzejewski/following{/other_user}","gists_url":"https://api.github.com/users/pjedrzejewski/gists{/gist_id}","starred_url":"https://api.github.com/users/pjedrzejewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjedrzejewski/subscriptions","organizations_url":"https://api.github.com/users/pjedrzejewski/orgs","repos_url":"https://api.github.com/users/pjedrzejewski/repos","events_url":"https://api.github.com/users/pjedrzejewski/events{/privacy}","received_events_url":"https://api.github.com/users/pjedrzejewski/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":14,"state":"open","created_at":"2015-05-11T11:10:22Z","updated_at":"2016-03-10T15:04:55Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/Sylius/Sylius/pulls/4395/commits","review_comments_url":"https://api.github.com/repos/Sylius/Sylius/pulls/4395/comments","review_comment_url":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Sylius/Sylius/issues/4395/comments","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/e26485329e8c5b8e50b5daa1914786386fab6202","head":{"label":"Arminek:managing_countries","ref":"managing_countries","sha":"e26485329e8c5b8e50b5daa1914786386fab6202","user":{"login":"Arminek","id":6368946,"avatar_url":"https://avatars.githubusercontent.com/u/6368946?v=3","gravatar_id":"","url":"https://api.github.com/users/Arminek","html_url":"https://github.com/Arminek","followers_url":"https://api.github.com/users/Arminek/followers","following_url":"https://api.github.com/users/Arminek/following{/other_user}","gists_url":"https://api.github.com/users/Arminek/gists{/gist_id}","starred_url":"https://api.github.com/users/Arminek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arminek/subscriptions","organizations_url":"https://api.github.com/users/Arminek/orgs","repos_url":"https://api.github.com/users/Arminek/repos","events_url":"https://api.github.com/users/Arminek/events{/privacy}","received_events_url":"https://api.github.com/users/Arminek/received_events","type":"User","site_admin":false},"repo":{"id":38776658,"name":"Sylius","full_name":"Arminek/Sylius","owner":{"login":"Arminek","id":6368946,"avatar_url":"https://avatars.githubusercontent.com/u/6368946?v=3","gravatar_id":"","url":"https://api.github.com/users/Arminek","html_url":"https://github.com/Arminek","followers_url":"https://api.github.com/users/Arminek/followers","following_url":"https://api.github.com/users/Arminek/following{/other_user}","gists_url":"https://api.github.com/users/Arminek/gists{/gist_id}","starred_url":"https://api.github.com/users/Arminek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Arminek/subscriptions","organizations_url":"https://api.github.com/users/Arminek/orgs","repos_url":"https://api.github.com/users/Arminek/repos","events_url":"https://api.github.com/users/Arminek/events{/privacy}","received_events_url":"https://api.github.com/users/Arminek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Arminek/Sylius","description":"Modern e-commerce for PHP, based on the Symfony2 framework.","fork":true,"url":"https://api.github.com/repos/Arminek/Sylius","forks_url":"https://api.github.com/repos/Arminek/Sylius/forks","keys_url":"https://api.github.com/repos/Arminek/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Arminek/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Arminek/Sylius/teams","hooks_url":"https://api.github.com/repos/Arminek/Sylius/hooks","issue_events_url":"https://api.github.com/repos/Arminek/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/Arminek/Sylius/events","assignees_url":"https://api.github.com/repos/Arminek/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/Arminek/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/Arminek/Sylius/tags","blobs_url":"https://api.github.com/repos/Arminek/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Arminek/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Arminek/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/Arminek/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Arminek/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/Arminek/Sylius/languages","stargazers_url":"https://api.github.com/repos/Arminek/Sylius/stargazers","contributors_url":"https://api.github.com/repos/Arminek/Sylius/contributors","subscribers_url":"https://api.github.com/repos/Arminek/Sylius/subscribers","subscription_url":"https://api.github.com/repos/Arminek/Sylius/subscription","commits_url":"https://api.github.com/repos/Arminek/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/Arminek/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/Arminek/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/Arminek/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/Arminek/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/Arminek/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Arminek/Sylius/merges","archive_url":"https://api.github.com/repos/Arminek/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Arminek/Sylius/downloads","issues_url":"https://api.github.com/repos/Arminek/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/Arminek/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/Arminek/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/Arminek/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Arminek/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/Arminek/Sylius/releases{/id}","deployments_url":"https://api.github.com/repos/Arminek/Sylius/deployments","created_at":"2015-07-08T19:59:32Z","updated_at":"2016-01-31T16:53:25Z","pushed_at":"2016-03-10T14:48:31Z","git_url":"git://github.com/Arminek/Sylius.git","ssh_url":"git@github.com:Arminek/Sylius.git","clone_url":"https://github.com/Arminek/Sylius.git","svn_url":"https://github.com/Arminek/Sylius","homepage":"Sylius.org","size":26434,"stargazers_count":0,"watchers_count":0,"language":"PHP","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":"Sylius:master","ref":"master","sha":"d271702ddf726db1bf59a964cde9ee834956467f","user":{"login":"Sylius","id":719423,"avatar_url":"https://avatars.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"repo":{"id":2717549,"name":"Sylius","full_name":"Sylius/Sylius","owner":{"login":"Sylius","id":719423,"avatar_url":"https://avatars.githubusercontent.com/u/719423?v=3","gravatar_id":"","url":"https://api.github.com/users/Sylius","html_url":"https://github.com/Sylius","followers_url":"https://api.github.com/users/Sylius/followers","following_url":"https://api.github.com/users/Sylius/following{/other_user}","gists_url":"https://api.github.com/users/Sylius/gists{/gist_id}","starred_url":"https://api.github.com/users/Sylius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sylius/subscriptions","organizations_url":"https://api.github.com/users/Sylius/orgs","repos_url":"https://api.github.com/users/Sylius/repos","events_url":"https://api.github.com/users/Sylius/events{/privacy}","received_events_url":"https://api.github.com/users/Sylius/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Sylius/Sylius","description":"eCommerce PHP framework built on top of Symfony with component-based architecture and format-agnostic rendering. (HTML/JSON/XML)","fork":false,"url":"https://api.github.com/repos/Sylius/Sylius","forks_url":"https://api.github.com/repos/Sylius/Sylius/forks","keys_url":"https://api.github.com/repos/Sylius/Sylius/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Sylius/Sylius/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Sylius/Sylius/teams","hooks_url":"https://api.github.com/repos/Sylius/Sylius/hooks","issue_events_url":"https://api.github.com/repos/Sylius/Sylius/issues/events{/number}","events_url":"https://api.github.com/repos/Sylius/Sylius/events","assignees_url":"https://api.github.com/repos/Sylius/Sylius/assignees{/user}","branches_url":"https://api.github.com/repos/Sylius/Sylius/branches{/branch}","tags_url":"https://api.github.com/repos/Sylius/Sylius/tags","blobs_url":"https://api.github.com/repos/Sylius/Sylius/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Sylius/Sylius/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Sylius/Sylius/git/refs{/sha}","trees_url":"https://api.github.com/repos/Sylius/Sylius/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Sylius/Sylius/statuses/{sha}","languages_url":"https://api.github.com/repos/Sylius/Sylius/languages","stargazers_url":"https://api.github.com/repos/Sylius/Sylius/stargazers","contributors_url":"https://api.github.com/repos/Sylius/Sylius/contributors","subscribers_url":"https://api.github.com/repos/Sylius/Sylius/subscribers","subscription_url":"https://api.github.com/repos/Sylius/Sylius/subscription","commits_url":"https://api.github.com/repos/Sylius/Sylius/commits{/sha}","git_commits_url":"https://api.github.com/repos/Sylius/Sylius/git/commits{/sha}","comments_url":"https://api.github.com/repos/Sylius/Sylius/comments{/number}","issue_comment_url":"https://api.github.com/repos/Sylius/Sylius/issues/comments{/number}","contents_url":"https://api.github.com/repos/Sylius/Sylius/contents/{+path}","compare_url":"https://api.github.com/repos/Sylius/Sylius/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Sylius/Sylius/merges","archive_url":"https://api.github.com/repos/Sylius/Sylius/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Sylius/Sylius/downloads","issues_url":"https://api.github.com/repos/Sylius/Sylius/issues{/number}","pulls_url":"https://api.github.com/repos/Sylius/Sylius/pulls{/number}","milestones_url":"https://api.github.com/repos/Sylius/Sylius/milestones{/number}","notifications_url":"https://api.github.com/repos/Sylius/Sylius/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Sylius/Sylius/labels{/name}","releases_url":"https://api.github.com/repos/Sylius/Sylius/releases{/id}","deployments_url":"https://api.github.com/repos/Sylius/Sylius/deployments","created_at":"2011-11-05T22:05:52Z","updated_at":"2016-03-10T10:59:45Z","pushed_at":"2016-03-10T15:12:43Z","git_url":"git://github.com/Sylius/Sylius.git","ssh_url":"git@github.com:Sylius/Sylius.git","clone_url":"https://github.com/Sylius/Sylius.git","svn_url":"https://github.com/Sylius/Sylius","homepage":"http://Sylius.org","size":57448,"stargazers_count":2203,"watchers_count":2203,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":804,"mirror_url":null,"open_issues_count":580,"forks":804,"open_issues":580,"watchers":2203,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/4395"},"html":{"href":"https://github.com/Sylius/Sylius/pull/4395"},"issue":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/4395"},"comments":{"href":"https://api.github.com/repos/Sylius/Sylius/issues/4395/comments"},"review_comments":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/4395/comments"},"review_comment":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Sylius/Sylius/pulls/4395/commits"},"statuses":{"href":"https://api.github.com/repos/Sylius/Sylius/statuses/e26485329e8c5b8e50b5daa1914786386fab6202"}}}}