alphagov / govuk-browser-extension

Chrome and Firefox extension for developers working on GOV.UK.
25 stars 5 forks source link

Allow users to select an A/B bucket on Integration and Staging #47

Closed suzannehamilton closed 7 years ago

suzannehamilton commented 7 years ago

Make the A/B test buckets interactive, so that a user can select the version that they want to see. This works by appending a custom HTTP header to the request, which will only work against origin servers - it will be overridden by Varnish configuration if the request passes through the CDN. A future commit will add the same functionality using a cookie, which will work with the CDN.

Note that the selected A/B buckets are not persisted when the browser is closed. I expect this will be fine for our purposes, which is to view different versions of the page during development in Dev and Integration. We can always add persistence if it turns out to be useful - it just didn't seem worth adding it now, but let me know if you disagree!

The Production version of this will use cookies, which will be persisted because we'll be setting the value of a cookie.

https://trello.com/c/jra1OClm/320-make-it-easy-to-test-experiments-in-non-prod-environments

suzannehamilton commented 7 years ago

@tijmenb: Oops, I should have been clearer in this PR that the base branch was a dev branch containing some preparatory work. I was going to switch the base branch to master once #46 was reviewed, but you were too quick for me. 🙂

I've raised #48 instead - it's identical to this PR, but the base branch is master. Is it OK for me to merge it?