diff --git a/doc/frontend-testing.rst b/doc/frontend-testing.rst index 318a5c79177..a202d88e21d 100644 --- a/doc/frontend-testing.rst +++ b/doc/frontend-testing.rst @@ -1,15 +1,15 @@ Front-end Testing ================= -All CKAN features should be coded so that they work in the +All new CKAN features should be coded so that they work in the following browsers: * Internet Explorer: 9, 8 and 7 * Firefox: Latest * Chrome: Latest -These browsers are determined by whatever has >=1% share -on this page +These browsers are determined by whatever has >= 1% share on this +page: http://data.gov.uk/data/site-usage?month=2012-11 Install browser virtual machines ================================ @@ -19,25 +19,40 @@ all the above browser versions. Firefox and Chrome should be easy whatever platform you are on. Internet Explorer is a little trickier. You'll need Virtual Machines. -We suggest you use to get an +We suggest you use https://github.com/xdissent/ievms to get your Internet Explorer virtual machines. Testing methodology =================== -Soon... +Firstly we have a primer page. If you've touched any of the core +front-end code you'll need to check if the primer is rendering +correctly. The primer is located at: +http://localhost:5000/testing/primer and it should look like: +https://dl.dropbox.com/s/69y9ecpf3u3zkpe/ckan-primer.png + +Secondly whilst writing a new feature you should endeavour to test +in at least in your core browser and an alternative browser as often +as you can. + +Thirdly you should fully test all new features that have a front-end +element in all browsers before making your pull request into +CKAN master. Common pitfulls & their fixes ============================= -Reserver JS keywords +Here's a few of the most common front end bugs and a list of their +fixes. + +Reserved JS keywords -------------------- Since IE has a stricter language definition in JS it really doesn't like you using JS reserved keywords method names, variables, etc... This is a good list of keywords not to use in your JavaScript: - +https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Reserved_Words Unclosed JS arrays / objects ---------------------------- @@ -59,4 +74,4 @@ Will break. However: bar: 'Test' }; -Will not break. \ No newline at end of file +Will not break.