Add content navigation multivariate test #526
First pass at adding the content navigation multivariate test. This adds the logic to respond to test bucket, without any of the markup changes or variations.
Start with 4 variants matching https://github.com/alphagov/cdn-configs/pull/17
Guides and detailed guides form part of the upcoming multivariate content navigation test. The criteria for that test is “tagged to a taxon” and a restricted guidance subset. * Switch to document collection to test logic and avoid falling into test (document collection is classified as guidance for the taxonomy but isn’t in the stricter set used for content nav test)
Start with 4 variants: original, no nav, taxonomy nav, mainstream nav * Follow “concern” pattern setup in #513 for task list AB test * Only content with the document types listed are part of the test * The content must also be tagged to a taxon * Use a “universal_navigation” variant for all multivariate tests except original – they are largely the same, significant differences with original shouldn’t be repeated
The helper methods for checking the current variant (eg `universal_navigation_without_nav?`) were not checking whether the AB test applied or not. If the CDN set the response header and this method was used on a page that doesn’t qualify for the test, then it would give a false positive. * Add test to confirm expected behaviour * Update helpers to check AB test applies before checking variant