Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Education navigation ab testing #256

Merged
merged 3 commits into from
Feb 23, 2017
Merged

Conversation

alecgibson
Copy link
Contributor

This extends the styling changes made in #237 to also encompass the following content item schemas:

  • document_collection
  • publication

The changes are to:

  • Add a meta tag to these documents to indicate that they are in an A/B test (when their content is tagged to a taxon)
  • Set the Vary header on responses from these documents
  • Move the content for these documents into the left two thirds of the page (when the user is in the "B" group)

Trello

https://trello.com/c/jd56fcgd/338-changes-to-education-related-content-pages-as-part-of-the-new-navigation-in-government-frontend-part-2

@boffbowsh boffbowsh temporarily deployed to government-frontend-pr-256 February 23, 2017 16:14 Inactive
@@ -137,15 +137,13 @@ class ContentItemsControllerTest < ActionController::TestCase

content_store_has_item(content_item['base_path'], content_item)

with_variant EducationNavigation: "A" do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the issue with using with_variant here? Is it something we should change in the A/B gem?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's just that I incorrectly added the meta tag and response headers before, where they shouldn't be applied if we've not got content tagged to a taxon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, you could include the assert_response_not_modified_for_ab_test assertion, which will check that the meta tag and response headers haven't been added.

Copy link
Contributor

@suzannehamilton suzannehamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything that you want to be reviewed in particular in the templates? Are they worth reviewing in depth, or are they very similar to some other version?

get :show, params: { path: path_for(content_item) }
assert_equal [], @request.variant
end
setup_ab_variant('educationnavigation', 'A')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be EducationNavigation to match the casing elsewhere.

get :show, params: { path: path_for(content_item) }
assert_equal [], @request.variant
end
setup_ab_variant('educationnavigation', 'B')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

@alecgibson alecgibson force-pushed the education-navigation-ab-testing branch from e9bff05 to 6b6e732 Compare February 23, 2017 16:45
@boffbowsh boffbowsh temporarily deployed to government-frontend-pr-256 February 23, 2017 16:45 Inactive
@alecgibson
Copy link
Contributor Author

@suzannehamilton the templates are probably worth reviewing in case I missed anything. Sorry the diffing isn't easier.

@@ -0,0 +1,3 @@
<div class="national-statistics-logo">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does this logo need a new_navigation file? Is it different in the A and B versions?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - it was in a one-third-column div

@alecgibson alecgibson merged commit 30fc83c into master Feb 23, 2017
@alecgibson alecgibson deleted the education-navigation-ab-testing branch February 23, 2017 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants