{"action":"created","comment":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/60572895","id":60572895,"diff_hunk":"@@ -30,76 +32,89 @@ public function __construct($session, $pageFactory, $parameters = [])\n             $this->elements,\n             [\n                 'Main context selector' => [\n-                    'css'        => '#attribute-buttons',\n+                    'css'        => '.tab-container .product-attributes .attribute-edit-actions .context-selectors',\n                     'decorators' => [\n                         'Pim\\Behat\\Decorator\\ContextSwitcherDecorator'\n                     ]\n-                ]\n+                ],\n+                'Add attributes button' => [\n+                    'css'        => '.add-attribute',\n+                    'decorators' => [\n+                        'Pim\\Behat\\Decorator\\Attribute\\AttributeAdderDecorator'\n+                    ]\n+                ],\n+                'Attribute inputs' => [\n+                    'css'        => '.tab-pane.product-values',\n+                    'decorators' => [\n+                        'Pim\\Behat\\Decorator\\InputDecorator'\n+                    ]\n+                ],\n+                'Save' => ['css' => 'button.save'],\n             ]\n         );\n     }\n \n     /**\n-     * @param string $name\n-     *\n-     * @throws ElementNotFoundException\n+     * {@inheritdoc}\n+     */\n+    public function fillField($field, $value, Element $element = null)\n+    {\n+        $this->getElement('Attribute inputs')->fillField($field, $value, $element);\n+    }\n+\n+    /**\n+     * @param string $field\n      *\n      * @return NodeElement\n      */\n-    public function findField($name)\n+    public function getRemoveLinkFor($field)\n     {\n-        $currency = null;\n-        if (1 === preg_match('/in (.{1,3})$/', $name)) {\n-            // Price in EUR\n-            list($name, $currency) = explode(' in ', $name);\n+        return $this->getElement('Attribute inputs')->getRemoveLinkFor($field);\n+    }\n \n-            return $this->findPriceField($name, $currency);\n-        } elseif (1 < str_word_count($name)) {\n-            // mobile Description\n-            $words = explode(' ', $name);\n-            $scope = array_shift($words);\n-            $name = implode(' ', $words);\n-            // Check that it is really a scoped field, not a field with a two word label\n-            if (strtolower($scope) === $scope) {\n-                return $this->findScopedField($name, $scope);\n-            }\n-        }\n-        $label = $this->find('css', sprintf('label:contains(\"%s\")', $name));\n-        if (!$label) {\n-            throw new ElementNotFoundException($this->getSession(), 'form label ', 'value', $name);\n-        }\n-        $field = $label->getParent()->find('css', 'input,textarea');\n-        if (!$field) {\n-            throw new ElementNotFoundException($this->getSession(), 'form field ', 'id|name|label|value', $name);\n-        }\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function save()\n+    {\n+        $element = $this->getElement('Save');\n+\n+        $this->spin(function () use ($element) {\n+            return $element->isVisible();\n+        }, \"Waiting for save button to be visible\");\n \n-        return $field;\n+        $element->click();\n+\n+        $this->spin(function () {\n+            return null === $this->find(\n+                'css',\n+                '*:not(.hash-loading-mask):not(.grid-container):not(.loading-mask) > .loading-mask'\n+            );\n+        });\n     }\n \n     /**\n-     * Find field container\n-     *\n-     * @param string $label\n+     * Find a validation tooltip containing a text\n      *\n-     * @throws ElementNotFoundException\n+     * @param string $text\n      *\n-     * @return NodeElement\n+     * @return null|Element\n      */\n-    public function findFieldContainer($label)\n+    public function findValidationTooltip($text)\n     {\n-        $field = $this->findField($label);\n-\n-        return $field->getParent();\n+        return $this->spin(function () use ($text) {\n+            return $this->find('css', sprintf('.validation-errors span.error-message:contains(\"%s\")', $text));\n+        });","path":"features/Context/Page/VariantGroup/Edit.php","position":136,"original_position":136,"commit_id":"0f25c149f464fc6b087b4bc41b11fa03c1b79749","original_commit_id":"57b1f66497a8683b81807b754102510fc6b48826","user":{"login":"willy-ahva","id":7206368,"avatar_url":"https://avatars.githubusercontent.com/u/7206368?v=3","gravatar_id":"","url":"https://api.github.com/users/willy-ahva","html_url":"https://github.com/willy-ahva","followers_url":"https://api.github.com/users/willy-ahva/followers","following_url":"https://api.github.com/users/willy-ahva/following{/other_user}","gists_url":"https://api.github.com/users/willy-ahva/gists{/gist_id}","starred_url":"https://api.github.com/users/willy-ahva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willy-ahva/subscriptions","organizations_url":"https://api.github.com/users/willy-ahva/orgs","repos_url":"https://api.github.com/users/willy-ahva/repos","events_url":"https://api.github.com/users/willy-ahva/events{/privacy}","received_events_url":"https://api.github.com/users/willy-ahva/received_events","type":"User","site_admin":false},"body":"add message please","created_at":"2016-04-21T12:45:45Z","updated_at":"2016-04-21T12:45:45Z","html_url":"https://github.com/akeneo/pim-community-dev/pull/4285#discussion_r60572895","pull_request_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285","_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments/60572895"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/4285#discussion_r60572895"},"pull_request":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285"}}},"pull_request":{"url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285","id":65298523,"html_url":"https://github.com/akeneo/pim-community-dev/pull/4285","diff_url":"https://github.com/akeneo/pim-community-dev/pull/4285.diff","patch_url":"https://github.com/akeneo/pim-community-dev/pull/4285.patch","issue_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4285","number":4285,"state":"open","locked":false,"title":"[PIM-5558-POC] POC to apply Product Edit Form components to Variant Groups","user":{"login":"pierallard","id":1590933,"avatar_url":"https://avatars.githubusercontent.com/u/1590933?v=3","gravatar_id":"","url":"https://api.github.com/users/pierallard","html_url":"https://github.com/pierallard","followers_url":"https://api.github.com/users/pierallard/followers","following_url":"https://api.github.com/users/pierallard/following{/other_user}","gists_url":"https://api.github.com/users/pierallard/gists{/gist_id}","starred_url":"https://api.github.com/users/pierallard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pierallard/subscriptions","organizations_url":"https://api.github.com/users/pierallard/orgs","repos_url":"https://api.github.com/users/pierallard/repos","events_url":"https://api.github.com/users/pierallard/events{/privacy}","received_events_url":"https://api.github.com/users/pierallard/received_events","type":"User","site_admin":false},"body":"| Q                                 | A\r\n| --------------------------------- | ---\r\n| Added Specs                       |\r\n| Added Behats                      |\r\n| Changelog updated                 |\r\n| Review and 2 GTM                  |\r\n| Micro Demo to the PO (Story only) |\r\n| Migration script                  |\r\n| Tech Doc                          |\r\n\r\n## Goal\r\nIn this PR we use the same javascript form used in the product edit page in the variant group page. The functionalities should be the same as the product edit form.\r\n\r\n## Remaining work\r\n- [ ] Write a migration for mongo users (normalizedData changed)\r\n- [ ] Fix remaining behats\r\n- [x] Fix rights permissions (+ add behat for this case as it looks not covered)\r\n- [ ] Fix issue were label shows \"null\" instead of the code (+ add a behat)\r\n- [ ] Update UPGRADE.md / CHANGELOG.md\r\n- [ ] Fix code review\r\n- [ ] Fix travis\r\n- [ ] Squasher the commits\r\n","created_at":"2016-04-05T12:49:11Z","updated_at":"2016-04-21T12:45:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"02955ee25bce41e416cb8712058df2837e348ff7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285/commits","review_comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285/comments","review_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4285/comments","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/0f25c149f464fc6b087b4bc41b11fa03c1b79749","head":{"label":"akeneo:PIM-5558-poc","ref":"PIM-5558-poc","sha":"0f25c149f464fc6b087b4bc41b11fa03c1b79749","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"[Community Development Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","deployments_url":"https://api.github.com/repos/akeneo/pim-community-dev/deployments","created_at":"2012-08-10T09:27:26Z","updated_at":"2016-04-14T14:29:57Z","pushed_at":"2016-04-21T12:43:28Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://www.akeneo.com","size":140481,"stargazers_count":304,"watchers_count":304,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":99,"forks":158,"open_issues":99,"watchers":304,"default_branch":"master"}},"base":{"label":"akeneo:master","ref":"master","sha":"3f147d1270f39b11c20fbf8ed0905435d6391f8b","user":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"repo":{"id":5367323,"name":"pim-community-dev","full_name":"akeneo/pim-community-dev","owner":{"login":"akeneo","id":2510186,"avatar_url":"https://avatars.githubusercontent.com/u/2510186?v=3","gravatar_id":"","url":"https://api.github.com/users/akeneo","html_url":"https://github.com/akeneo","followers_url":"https://api.github.com/users/akeneo/followers","following_url":"https://api.github.com/users/akeneo/following{/other_user}","gists_url":"https://api.github.com/users/akeneo/gists{/gist_id}","starred_url":"https://api.github.com/users/akeneo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akeneo/subscriptions","organizations_url":"https://api.github.com/users/akeneo/orgs","repos_url":"https://api.github.com/users/akeneo/repos","events_url":"https://api.github.com/users/akeneo/events{/privacy}","received_events_url":"https://api.github.com/users/akeneo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/akeneo/pim-community-dev","description":"[Community Development Repository] The open source Product Information Management (PIM)","fork":false,"url":"https://api.github.com/repos/akeneo/pim-community-dev","forks_url":"https://api.github.com/repos/akeneo/pim-community-dev/forks","keys_url":"https://api.github.com/repos/akeneo/pim-community-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/akeneo/pim-community-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/akeneo/pim-community-dev/teams","hooks_url":"https://api.github.com/repos/akeneo/pim-community-dev/hooks","issue_events_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/events{/number}","events_url":"https://api.github.com/repos/akeneo/pim-community-dev/events","assignees_url":"https://api.github.com/repos/akeneo/pim-community-dev/assignees{/user}","branches_url":"https://api.github.com/repos/akeneo/pim-community-dev/branches{/branch}","tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/tags","blobs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/akeneo/pim-community-dev/languages","stargazers_url":"https://api.github.com/repos/akeneo/pim-community-dev/stargazers","contributors_url":"https://api.github.com/repos/akeneo/pim-community-dev/contributors","subscribers_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscribers","subscription_url":"https://api.github.com/repos/akeneo/pim-community-dev/subscription","commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/akeneo/pim-community-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/akeneo/pim-community-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/akeneo/pim-community-dev/contents/{+path}","compare_url":"https://api.github.com/repos/akeneo/pim-community-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/akeneo/pim-community-dev/merges","archive_url":"https://api.github.com/repos/akeneo/pim-community-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/akeneo/pim-community-dev/downloads","issues_url":"https://api.github.com/repos/akeneo/pim-community-dev/issues{/number}","pulls_url":"https://api.github.com/repos/akeneo/pim-community-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/akeneo/pim-community-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/akeneo/pim-community-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/akeneo/pim-community-dev/labels{/name}","releases_url":"https://api.github.com/repos/akeneo/pim-community-dev/releases{/id}","deployments_url":"https://api.github.com/repos/akeneo/pim-community-dev/deployments","created_at":"2012-08-10T09:27:26Z","updated_at":"2016-04-14T14:29:57Z","pushed_at":"2016-04-21T12:43:28Z","git_url":"git://github.com/akeneo/pim-community-dev.git","ssh_url":"git@github.com:akeneo/pim-community-dev.git","clone_url":"https://github.com/akeneo/pim-community-dev.git","svn_url":"https://github.com/akeneo/pim-community-dev","homepage":"http://www.akeneo.com","size":140481,"stargazers_count":304,"watchers_count":304,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":158,"mirror_url":null,"open_issues_count":99,"forks":158,"open_issues":99,"watchers":304,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285"},"html":{"href":"https://github.com/akeneo/pim-community-dev/pull/4285"},"issue":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4285"},"comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/issues/4285/comments"},"review_comments":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285/comments"},"review_comment":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/pulls/4285/commits"},"statuses":{"href":"https://api.github.com/repos/akeneo/pim-community-dev/statuses/0f25c149f464fc6b087b4bc41b11fa03c1b79749"}}}}