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

Convert childcare-costs-for-tax-credits to use ERB templates for questions #2131

Conversation

floehopper
Copy link
Contributor

No description provided.

@chrisroos
Copy link
Contributor

Looks good to me.

@chrisroos chrisroos self-assigned this Nov 19, 2015
@chrisroos chrisroos added the LGTM label Nov 19, 2015
I ran the following command:

    $ rails r script/convert-question-i18-yaml-to-erb-templates.rb lib/smart_answer_flows/childcare-costs-for-tax-credits
    Writing template: currently_claiming.govspeak.erb
    Writing template: how_often_use_childcare.govspeak.erb
    Writing template: have_costs_changed.govspeak.erb
    Writing template: how_often_pay_1.govspeak.erb
    Writing template: how_often_pay_2.govspeak.erb
    Writing template: how_much_12_months_1.govspeak.erb
    Writing template: how_much_52_weeks_1.govspeak.erb
    Writing template: how_much_52_weeks_2.govspeak.erb
    Writing template: how_much_12_months_2.govspeak.erb
    Writing template: how_much_each_month.govspeak.erb
    Writing template: pay_same_each_time.govspeak.erb
    Writing template: how_often_pay_providers.govspeak.erb
    Writing template: how_much_fortnightly.govspeak.erb
    Writing template: how_much_4_weeks.govspeak.erb
    Writing template: how_much_yearly.govspeak.erb
    Writing template: how_much_spent_last_12_months.govspeak.erb
    Writing template: new_weekly_costs.govspeak.erb
    Writing template: old_weekly_amount_1.govspeak.erb
    Writing template: new_monthly_cost.govspeak.erb
    Writing template: old_weekly_amount_2.govspeak.erb
    Writing template: old_weekly_amount_3.govspeak.erb

    Deleting i18n YAML: childcare-costs-for-tax-credits.yml

    Now insert `use_erb_templates_for_questions` at top of flow: childcare-costs-for-tax-credits.rb
Since #2098 & #2112, apostrophes rendered via `SmartAnswer::ErbRenderer` have
not been HTML-escaped. Now that we are rendering question content via this
renderer, we need to update the regression test artefacts for question pages
accordingly.

I ran the following commands to do this:

    $ find test/artefacts/childcare-costs-for-tax-credits -name '*.html' | xargs sed -i .bak "s/'/'/g"
    $ git clean -fd test/artefacts/childcare-costs-for-tax-credits/**/*.bak
The change to ERB templates has introduced a few extra newlines in the
question page HTML, but none of them affect the content viewable by the user.

I verified that the changes were all only blank lines using the following
command:

    $ git diff --ignore-blank-lines
Re-generating the checksums has removed the i18n YAML file and added the new
question templates as I expected.
@chrisroos chrisroos force-pushed the convert-childcare-costs-for-tax-credits-to-use-erb-templates-for-questions branch from f8d3349 to c5ad6fc Compare November 19, 2015 16:22
@chrisroos
Copy link
Contributor

I've rebased on master and force pushed in preparation for merging.

chrisroos added a commit that referenced this pull request Nov 19, 2015
…x-credits-to-use-erb-templates-for-questions

Convert childcare-costs-for-tax-credits to use ERB templates for questions
@chrisroos chrisroos merged commit 3af6cfa into master Nov 19, 2015
@chrisroos chrisroos deleted the convert-childcare-costs-for-tax-credits-to-use-erb-templates-for-questions branch November 19, 2015 16:25
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.

2 participants