{"action":"created","comment":{"url":"https://api.github.com/repos/guardian/frontend/pulls/comments/85493599","pull_request_review_id":6205643,"id":85493599,"diff_hunk":"@@ -0,0 +1,157 @@\n+# Testing tips\n+\n+### Get credentials from janus\n+Before you do anything else on your local frontend build, navigate to the janus page\n+and follow the steps to get your credentials for Frontend and for CMS-Fronts.\n+This will save you grief later on.\n+\n+### Starting sbt\n+Its important to remember to use ./sbt to run the local build, not just sbt.\n+./sbt will pick up some presets that are important for running the build successfully.\n+\n+### What project to run\n+In general, the best project to run is \"dev-build\".  Dev-build: is a project that combines multiple applications for ease of testing.\n+Most of the time it is both convenient and reliable, however in some cases you might prefer to use the project containing the application you are changing.\n+See: https://github.com/guardian/frontend/blob/master/dev-build/conf/routes - to learn more about what is supported in dev-build.\n+\n+To test a particular application. See the following for guidance on what content is served by what application:\n+ https://github.com/guardian/frontend/blob/master/docs/02-architecture/01-applications-architecture.md\n+\n+### Running unit tests\n+To run the scala unit tests for a given application, navigate to the project\n+ that corresponds to the application in question and enter:\n+```\n+  test\n+```\n+To run all the scala unit tests. execute this command from the root project.\n+\n+To run only the tests for a particular test suite, use the command:\n+```\n+  test-only *<name-of-your-test-suite>\n+```\n+\n+### How to test your devices on local\n+- It is possible to use chrome emulator to get a good idea of how android devices behave and XCode the hardware simulators on XCode to do the same for iOS,\n+However for significant frontend changes you should test on devices as much as possible. To do this you need to be able to make your localhost accessible.\n+A tool called `ngrok` is a good way to make a local port accessible to external devices or computer (instructions on how to run ngrok [here](https://github.com/guardian/frontend/blob/master/docs/03-dev-howtos/09-testing-externally-on-localhost.md))\n+- To test on a variety of devices or to reproduce a bug on a particular set up, use https://www.browserstack.com. This site has a collection of computers and devices,\n+and many different versions of browsers. It is a very useful testing resource. Contact the dotcom team to get added to our user account for this tool\n+\n+### What to test on\n+A list of useful information on device testing follows\n+[Our browser support principals](https://github.com/guardian/frontend/blob/master/docs/04-quality/02-browser-support-principles.md);\n+[A list of what browsers we support](https://github.com/guardian/frontend/blob/master/docs/04-quality/01-browser-support.md);\n+[Ranking of the current top browsers](https://github.com/guardian/frontend/blob/master/docs/04-quality/01-browser-support.md)\n+[Breakdown of last seven days web traffic by type of device](https://dashboard.ophan.co.uk/graph/breakdown?days=7&device=Personal+computer&device=Smartphone&device=Tablet&by=device)\n+\n+### Good places/tricks to find bugs\n+- iPhone - Safari is the most popular browser on iOS (which makes it one of the most popular ways to view our site) and even Chrome on iOS has to use the iOS Webkit framework.\n+ It is interesting from a testing perspective because it is a different operating system, different browser setup and different screen-size from the machine you are developing on.\n+ This combination often throws up interesting layout problems. In addition Safari often has less support for new features compared with Chome, which can also lead to rendering errors.\n+\n+- IE9 - This is the second most popular IE version. IE is notorious for having less support for features and also being much less tolerant of small errors than Chrome, or Firefox. Often when a page renders on those browsers it will still have problems on IE\n+ Add to this the fact that it is much older than IE11 so supports even less features. IE9 is the oldest browser version that we expect to be fully supported. If it works on IE9 it is a good indication it will work on most other browsers.\n+\n+- Chrome and Firefox on windows 10 - IE10 is slowly overtaking Windows7 as our users most popular desktop OS. When Windows 10 originally came out, firefox had some rendering issues and Chrome and firefox periodically show redering issues there - especially with things like fonts.\n+\n+- Older devices - A common source of problems comes from older devices. Where the device is running the latest operating system, it will attempt to run all the latest features and give the fullest experience. This can be catastropihc if the device just doesnt have the memory or processing power to cope.\n+  This is especially important if your feature is very resource heavy. For reasons unknown, but possibly connected to the way safari manages memory, iOS devices have proved more susceptable\n+   Good examples of old devices to test on are iPhone 4S, iPad3 (both known to be prone to crashes) and the Samsung Galaxy S3.\n+    [Interesting page talking about iOS crashes](http://stackoverflow.com/questions/22039534/ios-browser-crashes-due-to-low-memory)\n+\n+- Devices with strange screen sizes. If you re interested in layout and rendering for your change, the iphone 5S is a popular device with an abnormally narrow screen,\n+    the Galaxy S4 mini is a miniaturised version of the GalaxyS4 with a very small screen. iPad Mini and Galaxy Note also have interesting dimensions and have shown layout issues from time to time\n+     -especially on fronts\n+\n+- Rotate your device - another layout trick that is always worth doing. Load the page and rotate from portrait to landscape.\n+   Refresh and rotate from landscape to portrait. This is a common cause of redrawing in the real world that can often show up issues.\n+    A good device to test this on is the Nexus7 - this is because the portrait and landscape views on this device correspond to different screen-width breakpoints.\n+\n+- Test on AMP! [Google are making amp the default in mobile search results](http://searchengineland.com/amp-live-in-google-259109).\n+Currently there are lots of dependencies and many changes that don't seem to be directly related to AMP will have an impact on the display of amp pages.\n+\n+### Testing AMP Pages on local build\n+Whenever you are making a significant frontend change - especially one that has any impact on any templates\n+you should be sure to check the display of an amp page to make sure it looks alright.\n+\n+When running frontend locally, the AMP version of pages can be viewed by adding the `?amp` querystring to the end of the URL. For example:\n+\n+```\n+http://localhost:9000/world/2015/oct/15/obama-delay-withdrawal-us-troops-afghanistan?amp\n+```\n+\n+### Amp validation on local\n+Amp pages must pass validation in order to be displayed in Google search results.\n+If an Amp page fails validation it is highly unlikely it will ever be served to a user.\n+It is important to test Amp pages pass validation as part of any checking for frontend changes.\n+\n+To test this on a page run from local, request an amp page as shown above, and add the fragment `#development=1` to the end of the URL. For example:\n+\n+```\n+http://localhost:9000/world/2015/oct/15/obama-delay-withdrawal-us-troops-afghanistan?amp#development=1\n+```\n+\n+Before committing any frontend changes, you should also run the Amp validation tests.\n+This is done by first running dev-build or article project on your local machine.\n+In a new terminal tab, navigate to the frontend project and run:\n+\n+```\n+make validate-amp\n+```\n+\n+### Testing Amp pages on the live website\n+Occasionally you might need to check something in production on the live website - for example display of a particular ad-tag\n+To see an amp page, navigate to:\n+                    https://amp.theguardian.com/<path-to-page>.\n+\n+To see the page as user from google would see it, on a mobile device (emulated or otherwise) navigate to:\n+                    https://www.google.co.uk/amp/s/amp.theguardian.com/<path-to-page>\n+Google will detect you are on a mobile device and serve you the amp page.\n+This is useful for tests where the path to the page matters. For instance any tests for ad tags should use this method\n+\n+### Amp validation on the live website\n+ For amp pages on the live site, you can append the \"#development=1\" fragment to the url to show validation in the developer console,\n+   or alternatively you can enter the page url on https://ampbench.appspot.com/\n+   This last is superior in the feedback it gives you as you can drill a bit more into validation errors.\n+\n+### Things to watch for on Amp pages\n+1) That you actually are on an amp page.\n+This is more relevant to testing on production where you might often be looking at the flow from\n+google-search result to the amp page. The following will indicate you are on an amp page:\n+    - In prod the url starts with `amp.` instead of `www.`\n+    - On code and on local, the url has the `?amp` querystring described above\n+    - The styling of the nav header is different\n+    - The developer tools console has a message \"Powered by AMP\"\n+2) That ads display ok.\n+3) That styling, especially that of badges and graphical punctuation, such as quotes  look ok\n+4) That images and other embeds display correctly - especially on narrow screens such as the iPhone5S\n+\n+### How to find examples of pages you want to test","path":"docs/01-start-here/06-testing-tips.md","position":129,"original_position":129,"commit_id":"85b264312c15553f595a6d29c29ea5224b3e0060","original_commit_id":"85b264312c15553f595a6d29c29ea5224b3e0060","user":{"login":"ScottPainterGNM","id":11922253,"avatar_url":"https://avatars.githubusercontent.com/u/11922253?v=3","gravatar_id":"","url":"https://api.github.com/users/ScottPainterGNM","html_url":"https://github.com/ScottPainterGNM","followers_url":"https://api.github.com/users/ScottPainterGNM/followers","following_url":"https://api.github.com/users/ScottPainterGNM/following{/other_user}","gists_url":"https://api.github.com/users/ScottPainterGNM/gists{/gist_id}","starred_url":"https://api.github.com/users/ScottPainterGNM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ScottPainterGNM/subscriptions","organizations_url":"https://api.github.com/users/ScottPainterGNM/orgs","repos_url":"https://api.github.com/users/ScottPainterGNM/repos","events_url":"https://api.github.com/users/ScottPainterGNM/events{/privacy}","received_events_url":"https://api.github.com/users/ScottPainterGNM/received_events","type":"User","site_admin":false},"body":"Should this section be further up the page and then amp as a separate section? See note above but think that would be clearer?","created_at":"2016-10-28T08:53:08Z","updated_at":"2016-10-28T08:59:13Z","html_url":"https://github.com/guardian/frontend/pull/14809#discussion_r85493599","pull_request_url":"https://api.github.com/repos/guardian/frontend/pulls/14809","_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments/85493599"},"html":{"href":"https://github.com/guardian/frontend/pull/14809#discussion_r85493599"},"pull_request":{"href":"https://api.github.com/repos/guardian/frontend/pulls/14809"}}},"pull_request":{"url":"https://api.github.com/repos/guardian/frontend/pulls/14809","id":91249538,"html_url":"https://github.com/guardian/frontend/pull/14809","diff_url":"https://github.com/guardian/frontend/pull/14809.diff","patch_url":"https://github.com/guardian/frontend/pull/14809.patch","issue_url":"https://api.github.com/repos/guardian/frontend/issues/14809","number":14809,"state":"open","locked":false,"title":"initial stab at testing documentation for frontend","user":{"login":"michaelwmcnamara","id":7239344,"avatar_url":"https://avatars.githubusercontent.com/u/7239344?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelwmcnamara","html_url":"https://github.com/michaelwmcnamara","followers_url":"https://api.github.com/users/michaelwmcnamara/followers","following_url":"https://api.github.com/users/michaelwmcnamara/following{/other_user}","gists_url":"https://api.github.com/users/michaelwmcnamara/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelwmcnamara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelwmcnamara/subscriptions","organizations_url":"https://api.github.com/users/michaelwmcnamara/orgs","repos_url":"https://api.github.com/users/michaelwmcnamara/repos","events_url":"https://api.github.com/users/michaelwmcnamara/events{/privacy}","received_events_url":"https://api.github.com/users/michaelwmcnamara/received_events","type":"User","site_admin":false},"body":"Adds some testing documentation to the frontend docs.\r\n","created_at":"2016-10-27T17:52:29Z","updated_at":"2016-10-28T08:59:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdc37785a252da9d283ae57b50e5a4085427f463","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/guardian/frontend/pulls/14809/commits","review_comments_url":"https://api.github.com/repos/guardian/frontend/pulls/14809/comments","review_comment_url":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guardian/frontend/issues/14809/comments","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/85b264312c15553f595a6d29c29ea5224b3e0060","head":{"label":"guardian:add-testing-page","ref":"add-testing-page","sha":"85b264312c15553f595a6d29c29ea5224b3e0060","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-10-28T03:13:06Z","pushed_at":"2016-10-27T17:52:29Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":550978,"stargazers_count":3377,"watchers_count":3377,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":359,"mirror_url":null,"open_issues_count":56,"forks":359,"open_issues":56,"watchers":3377,"default_branch":"master"}},"base":{"label":"guardian:master","ref":"master","sha":"0a0d21049334f3157234916da5591e02ab16758b","user":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"repo":{"id":4370755,"name":"frontend","full_name":"guardian/frontend","owner":{"login":"guardian","id":164318,"avatar_url":"https://avatars.githubusercontent.com/u/164318?v=3","gravatar_id":"","url":"https://api.github.com/users/guardian","html_url":"https://github.com/guardian","followers_url":"https://api.github.com/users/guardian/followers","following_url":"https://api.github.com/users/guardian/following{/other_user}","gists_url":"https://api.github.com/users/guardian/gists{/gist_id}","starred_url":"https://api.github.com/users/guardian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guardian/subscriptions","organizations_url":"https://api.github.com/users/guardian/orgs","repos_url":"https://api.github.com/users/guardian/repos","events_url":"https://api.github.com/users/guardian/events{/privacy}","received_events_url":"https://api.github.com/users/guardian/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guardian/frontend","description":"Source for theguardian.com","fork":false,"url":"https://api.github.com/repos/guardian/frontend","forks_url":"https://api.github.com/repos/guardian/frontend/forks","keys_url":"https://api.github.com/repos/guardian/frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guardian/frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guardian/frontend/teams","hooks_url":"https://api.github.com/repos/guardian/frontend/hooks","issue_events_url":"https://api.github.com/repos/guardian/frontend/issues/events{/number}","events_url":"https://api.github.com/repos/guardian/frontend/events","assignees_url":"https://api.github.com/repos/guardian/frontend/assignees{/user}","branches_url":"https://api.github.com/repos/guardian/frontend/branches{/branch}","tags_url":"https://api.github.com/repos/guardian/frontend/tags","blobs_url":"https://api.github.com/repos/guardian/frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guardian/frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guardian/frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/guardian/frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guardian/frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/guardian/frontend/languages","stargazers_url":"https://api.github.com/repos/guardian/frontend/stargazers","contributors_url":"https://api.github.com/repos/guardian/frontend/contributors","subscribers_url":"https://api.github.com/repos/guardian/frontend/subscribers","subscription_url":"https://api.github.com/repos/guardian/frontend/subscription","commits_url":"https://api.github.com/repos/guardian/frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/guardian/frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/guardian/frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/guardian/frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/guardian/frontend/contents/{+path}","compare_url":"https://api.github.com/repos/guardian/frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guardian/frontend/merges","archive_url":"https://api.github.com/repos/guardian/frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guardian/frontend/downloads","issues_url":"https://api.github.com/repos/guardian/frontend/issues{/number}","pulls_url":"https://api.github.com/repos/guardian/frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/guardian/frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/guardian/frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guardian/frontend/labels{/name}","releases_url":"https://api.github.com/repos/guardian/frontend/releases{/id}","deployments_url":"https://api.github.com/repos/guardian/frontend/deployments","created_at":"2012-05-18T15:39:15Z","updated_at":"2016-10-28T03:13:06Z","pushed_at":"2016-10-27T17:52:29Z","git_url":"git://github.com/guardian/frontend.git","ssh_url":"git@github.com:guardian/frontend.git","clone_url":"https://github.com/guardian/frontend.git","svn_url":"https://github.com/guardian/frontend","homepage":"http://www.theguardian.com","size":550978,"stargazers_count":3377,"watchers_count":3377,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":359,"mirror_url":null,"open_issues_count":56,"forks":359,"open_issues":56,"watchers":3377,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guardian/frontend/pulls/14809"},"html":{"href":"https://github.com/guardian/frontend/pull/14809"},"issue":{"href":"https://api.github.com/repos/guardian/frontend/issues/14809"},"comments":{"href":"https://api.github.com/repos/guardian/frontend/issues/14809/comments"},"review_comments":{"href":"https://api.github.com/repos/guardian/frontend/pulls/14809/comments"},"review_comment":{"href":"https://api.github.com/repos/guardian/frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guardian/frontend/pulls/14809/commits"},"statuses":{"href":"https://api.github.com/repos/guardian/frontend/statuses/85b264312c15553f595a6d29c29ea5224b3e0060"}}}}
{"actor":{"display_login":"ScottPainterGNM"}}