{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/14293","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/14293/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/14293/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/14293/events","html_url":"https://github.com/magento/magento2/pull/14293","id":308115460,"number":14293,"title":"Moved Google Analytics block code to head tag #8837","user":{"login":"KravetsAndriy","id":16411240,"avatar_url":"https://avatars0.githubusercontent.com/u/16411240?v=4","gravatar_id":"","url":"https://api.github.com/users/KravetsAndriy","html_url":"https://github.com/KravetsAndriy","followers_url":"https://api.github.com/users/KravetsAndriy/followers","following_url":"https://api.github.com/users/KravetsAndriy/following{/other_user}","gists_url":"https://api.github.com/users/KravetsAndriy/gists{/gist_id}","starred_url":"https://api.github.com/users/KravetsAndriy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KravetsAndriy/subscriptions","organizations_url":"https://api.github.com/users/KravetsAndriy/orgs","repos_url":"https://api.github.com/users/KravetsAndriy/repos","events_url":"https://api.github.com/users/KravetsAndriy/events{/privacy}","received_events_url":"https://api.github.com/users/KravetsAndriy/received_events","type":"User","site_admin":false},"labels":[{"id":703232382,"url":"https://api.github.com/repos/magento/magento2/labels/2.2-develop","name":"2.2-develop","color":"fbca04","default":false},{"id":161563561,"url":"https://api.github.com/repos/magento/magento2/labels/needs%20update","name":"needs update","color":"b60205","default":false}],"state":"open","locked":false,"assignee":{"login":"orlangur","id":642698,"avatar_url":"https://avatars2.githubusercontent.com/u/642698?v=4","gravatar_id":"","url":"https://api.github.com/users/orlangur","html_url":"https://github.com/orlangur","followers_url":"https://api.github.com/users/orlangur/followers","following_url":"https://api.github.com/users/orlangur/following{/other_user}","gists_url":"https://api.github.com/users/orlangur/gists{/gist_id}","starred_url":"https://api.github.com/users/orlangur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlangur/subscriptions","organizations_url":"https://api.github.com/users/orlangur/orgs","repos_url":"https://api.github.com/users/orlangur/repos","events_url":"https://api.github.com/users/orlangur/events{/privacy}","received_events_url":"https://api.github.com/users/orlangur/received_events","type":"User","site_admin":false},"assignees":[{"login":"orlangur","id":642698,"avatar_url":"https://avatars2.githubusercontent.com/u/642698?v=4","gravatar_id":"","url":"https://api.github.com/users/orlangur","html_url":"https://github.com/orlangur","followers_url":"https://api.github.com/users/orlangur/followers","following_url":"https://api.github.com/users/orlangur/following{/other_user}","gists_url":"https://api.github.com/users/orlangur/gists{/gist_id}","starred_url":"https://api.github.com/users/orlangur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlangur/subscriptions","organizations_url":"https://api.github.com/users/orlangur/orgs","repos_url":"https://api.github.com/users/orlangur/repos","events_url":"https://api.github.com/users/orlangur/events{/privacy}","received_events_url":"https://api.github.com/users/orlangur/received_events","type":"User","site_admin":false},{"login":"ihor-sviziev","id":1873745,"avatar_url":"https://avatars1.githubusercontent.com/u/1873745?v=4","gravatar_id":"","url":"https://api.github.com/users/ihor-sviziev","html_url":"https://github.com/ihor-sviziev","followers_url":"https://api.github.com/users/ihor-sviziev/followers","following_url":"https://api.github.com/users/ihor-sviziev/following{/other_user}","gists_url":"https://api.github.com/users/ihor-sviziev/gists{/gist_id}","starred_url":"https://api.github.com/users/ihor-sviziev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihor-sviziev/subscriptions","organizations_url":"https://api.github.com/users/ihor-sviziev/orgs","repos_url":"https://api.github.com/users/ihor-sviziev/repos","events_url":"https://api.github.com/users/ihor-sviziev/events{/privacy}","received_events_url":"https://api.github.com/users/ihor-sviziev/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/magento/magento2/milestones/14","html_url":"https://github.com/magento/magento2/milestone/14","labels_url":"https://api.github.com/repos/magento/magento2/milestones/14/labels","id":3152085,"number":14,"title":"March 2018","description":"Pull Requests processed in March 2018","creator":{"login":"okorshenko","id":7325075,"avatar_url":"https://avatars1.githubusercontent.com/u/7325075?v=4","gravatar_id":"","url":"https://api.github.com/users/okorshenko","html_url":"https://github.com/okorshenko","followers_url":"https://api.github.com/users/okorshenko/followers","following_url":"https://api.github.com/users/okorshenko/following{/other_user}","gists_url":"https://api.github.com/users/okorshenko/gists{/gist_id}","starred_url":"https://api.github.com/users/okorshenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/okorshenko/subscriptions","organizations_url":"https://api.github.com/users/okorshenko/orgs","repos_url":"https://api.github.com/users/okorshenko/repos","events_url":"https://api.github.com/users/okorshenko/events{/privacy}","received_events_url":"https://api.github.com/users/okorshenko/received_events","type":"User","site_admin":false},"open_issues":82,"closed_issues":158,"state":"open","created_at":"2018-03-01T00:46:51Z","updated_at":"2018-03-24T12:08:07Z","due_on":"2018-03-01T08:00:00Z","closed_at":null},"comments":2,"created_at":"2018-03-23T17:22:16Z","updated_at":"2018-03-24T12:48:20Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/magento/magento2/pulls/14293","html_url":"https://github.com/magento/magento2/pull/14293","diff_url":"https://github.com/magento/magento2/pull/14293.diff","patch_url":"https://github.com/magento/magento2/pull/14293.patch"},"body":"### Description\r\nMoved Google Analytics block to head tag.\r\n\r\n### Fixed Issues (if relevant)\r\nhttps://github.com/magento/magento2/issues/8837 - Google Analytics code being placed in body instead of head.\r\n\r\n### Manual testing scenarios\r\n1. Enable Google Analytics in Magento by going to Stores->Configuration->Sales->Google API.\r\n2. Put related variables.\r\n3. See, that Google Analytics script is being generated in head tag.\r\n\r\n### Tests\r\nAdded integration tests on Google Analytics block to ensure, that it has been moved.\r\n\r\n### Contribution checklist\r\n - [ ] Pull request has a meaningful description of its purpose\r\n - [ ] All commits are accompanied by meaningful commit messages\r\n - [ ] All new or changed code is covered with unit/integration tests (if applicable)\r\n - [ ] All automated tests passed successfully (all builds on Travis CI are green)\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/375886951","html_url":"https://github.com/magento/magento2/pull/14293#issuecomment-375886951","issue_url":"https://api.github.com/repos/magento/magento2/issues/14293","id":375886951,"user":{"login":"igrybkov","id":228986,"avatar_url":"https://avatars3.githubusercontent.com/u/228986?v=4","gravatar_id":"","url":"https://api.github.com/users/igrybkov","html_url":"https://github.com/igrybkov","followers_url":"https://api.github.com/users/igrybkov/followers","following_url":"https://api.github.com/users/igrybkov/following{/other_user}","gists_url":"https://api.github.com/users/igrybkov/gists{/gist_id}","starred_url":"https://api.github.com/users/igrybkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrybkov/subscriptions","organizations_url":"https://api.github.com/users/igrybkov/orgs","repos_url":"https://api.github.com/users/igrybkov/repos","events_url":"https://api.github.com/users/igrybkov/events{/privacy}","received_events_url":"https://api.github.com/users/igrybkov/received_events","type":"User","site_admin":false},"created_at":"2018-03-24T12:48:20Z","updated_at":"2018-03-24T12:48:20Z","author_association":"CONTRIBUTOR","body":"@orlangur, @KravetsAndriy is right that best practice for testing is to perform single assertion in the test. Sebastian Bergmann, the creator of the PHPUnit, recommends avoiding tests that doing too much. There is his presentation of best practices: https://cdn.oreillystatic.com/en/assets/1/event/45/PHPUnit%20Best%20Practices%20Presentation.pdf\r\nAlso, the name of the test `testBlockIsPresentInHeadAndAbsentInBody` now says that something went wrong with its responsibility.\r\nI recommend to roll back last changes and create two independent tests with their clear single purpose."}}
{"actor":{"display_login":"igrybkov"}}