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

Add living wage to wage calculator #2161

Merged
merged 21 commits into from
Dec 8, 2015
Merged

Conversation

chrisroos
Copy link
Contributor

This supersedes PR #2042.

I rebased the original changes on master and updated them now that we store questions in ERB templates (rather than i18n YAML files). I've opened a new PR (instead of force-pushing to the original) because I ended up rewriting some of the commits to separate out the generation of regression test artefacts from the actual changes to the flow. One downside of this is that the commits now appear to be authored by me rather than @erik-eide, but I've not actually changed anything about them other than splitting them up.

--- Original description below here ---

PT Story - https://www.pivotaltracker.com/story/show/106292374

Rationale

This change updates the "Am I getting minimum wage?" calculator with an option for people to check if they will receive the living wage when it goes live 1 April 2016.

All the logic remains the same and follows the path as if you were calculating a current rate, with only a minor change in the age question, asking how old will you be on 1 April 2016, instead of how old are you.

Those over 25 on 1 April 2016, who receive 7.20 or more per hour, will see that they will be receiving the living wage, and those receiving less than 7.20 per hour will see a message that they should be receiving the living wage.

Expected changes

  • Example URL
    • The start page should show a third choice "If you'll get the national living wage (from 1 April 2016)?

screen shot 2015-10-30 at 3 40 12 pm

- [Example URL](https://www.gov.uk/am-i-getting-minimum-wage/y/current_payment_april_2016) - Show question 'Will you be in the first year of an apprenticeship on 1 April 2016?'

screen shot 2015-12-07 at 13 04 07

  • Example URL
    • Should now ask "How old will you be on 1 April 2016?"

screen shot 2015-10-30 at 3 41 05 pm

- [Example URL](https://www.gov.uk/am-i-getting-minimum-wage/y/current_payment_april_2016/25/7/40.0/300.0/0.0/no) - Outcome should say "You will be getting the national living wage"

screen shot 2015-10-30 at 3 43 57 pm

- [Example URL](https://www.gov.uk/am-i-getting-minimum-wage/y/current_payment_april_2016/25/7/40.0/280.0/0.0/no) - Outcome should include "You are getting the National Minimum wage but your pay should be increased to at least the national living wage from 1 April 2016."

screen shot 2015-10-30 at 3 45 10 pm

- [Example URL](https://www.gov.uk/am-i-getting-minimum-wage/y/current_payment_april_2016/25/7/40.0/200.0/0.0/no) - Outcome should include callout "Your actual pay should increase to at least £7.20 per hour from 1 April 2016."

screen shot 2015-10-30 at 3 47 48 pm

- [Example URL](https://www.gov.uk/am-i-getting-minimum-wage/y/current_payment/not_an_apprentice/33/5/33.0/333.0/3.0/3.0/no) - Asac helpline should be in bold text, and on separate line

screen shot 2015-11-10 at 10 43 40 am

@chrisroos
Copy link
Contributor Author

I've just rebased on master, resolved some minor conflicts, and force pushed.

@erkde erkde force-pushed the add-living-wage-to-wage-calculator-v2 branch from b7643ed to 9ce8de4 Compare December 4, 2015 10:10
@erkde
Copy link
Contributor

erkde commented Dec 4, 2015

Just rebased with master and forced pushed

@erkde
Copy link
Contributor

erkde commented Dec 4, 2015

Now approved for release, has one additional commit needing review

@erkde erkde force-pushed the add-living-wage-to-wage-calculator-v2 branch from 2e92b32 to 346c41f Compare December 7, 2015 13:13
@erkde
Copy link
Contributor

erkde commented Dec 7, 2015

Have rebased with master again and forced pushed

@chrisroos
Copy link
Contributor Author

It looks like you need to update the following files for minimum-wage-calculator-employers:

  • minimum-wage-calculator-employers-questions-and-responses.yml
  • minimum-wage-calculator-employers-responses-and-expected-results.yml
  • minimum-wage-calculator-employers-files.yml
  • minimum-wage-calculator-employers regression test artefacts

@chrisroos
Copy link
Contributor Author

Aside from updating the minimum-wage-calculator-employers files, the changes themselves all look good to me.

@chrisroos
Copy link
Contributor Author

To expand on my comments from yesterday. The regression test for minimum-wage-calculator-employer currently fails with the following:

SmartAnswersRegressionTest#test_: Smart Answer: minimum-wage-calculator-employers should ensure all nodes are being exercised.  [test/regression/smart_answers_regression_test.rb:96]:
Not all nodes are being exercised: [:does_not_apply_to_first_year_apprentices, :will_you_be_a_first_year_apprentice?].
Expected: true
  Actual: false

Having chatted to @erkede I now understand that the changes in this PR should only apply to am-i-getting-minimum-wage. I think that means that the :will_you_be_a_first_year_apprentice? question and :does_not_apply_to_first_year_apprentices outcome node should be defined in am-i-getting-minimum-wage.rb rather than in the shared minimum_wage.rb. Making this change fixes the failing test listed above.

@erkde erkde force-pushed the add-living-wage-to-wage-calculator-v2 branch from 9786d45 to 0dcf190 Compare December 8, 2015 11:39
@erkde
Copy link
Contributor

erkde commented Dec 8, 2015

I've just rebased this with master and forced pushed

chrisroos and others added 13 commits December 8, 2015 12:22
Add the new 'current_payment_april_2016' option.
So that they include the 'current_payment_april_2016' option added in
the previous commit.

Updated using:

    $ rails r \
    script/generate-responses-and-expected-results-for-smart-answer.rb \
    am-i-getting-minimum-wage
    $ RUN_REGRESSION_TESTS=am-i-getting-minimum-wage \
    ruby test/regression/smart_answers_regression_test.rb
    $ RUN_REGRESSION_TESTS=am-i-getting-minimum-wage \
    ruby test/regression/smart_answers_regression_test.rb
To `#what_to_check` in order to be more communicative about its purpose.
Add validation to ensure people are over 25 when checking for the
national living wage.
Updated using:

    $ rails r \
    script/generate-responses-and-expected-results-for-smart-answer.rb \
    am-i-getting-minimum-wage
Updated using:

    $ RUN_REGRESSION_TESTS=am-i-getting-minimum-wage \
    ruby test/regression/smart_answers_regression_test.rb
Add Acas helpline hours and update markdown formatting for multiple line
display.
This updates the test artefacts so that they include the changes to the
_acas_information.govspeak.erb partial. I confirmed that these were the
only changes by running:

    $ git show --unified=0 | \
    grep -v "^[^+-]" | \
    grep -v "^+++" | \
    grep -v "^---" | \
    sort | uniq

Updated using:

    $ RUN_REGRESSION_TESTS=am-i-getting-minimum-wage \
    ruby test/regression/smart_answers_regression_test.rb
This updates the test artefacts so that they include the changes to the
_acas_information.govspeak.erb partial. I confirmed that these were the
only changes by running:

        $ git show --unified=0 | \
        grep -v "^[^+-]" | \
        grep -v "^+++" | \
        grep -v "^---" | \
        sort | uniq

Updated using:

    $ RUN_REGRESSION_TESTS=minimum-wage-calculator-employers \
    ruby test/regression/smart_answers_regression_test.rb
chrisroos and others added 8 commits December 8, 2015 12:22
Replace colon with a full stop.
This updates the test artefacts so that they include the changes to the
_acas_information.govspeak.erb partial. I confirmed that these were the
only changes by running:

    $ git show --unified=0 | \
    grep -v "^[^+-]" | \
    grep -v "^+++" | \
    grep -v "^---" | \
    sort | uniq

Updated using:

    $ RUN_REGRESSION_TESTS=am-i-getting-minimum-wage \
    ruby test/regression/smart_answers_regression_test.rb
This updates the test artefacts so that they include the changes to the
_acas_information.govspeak.erb partial. I confirmed that these were the
only changes by running:

    $ git show --unified=0 | \
    grep -v "^[^+-]" | \
    grep -v "^+++" | \
    grep -v "^---" | \
    sort | uniq

Updated using:

    $ RUN_REGRESSION_TESTS=minimum-wage-calculator-employers \
    ruby test/regression/smart_answers_regression_test.rb
Updated using:

    $ rails r script/generate-checksums-for-smart-answer.rb \
    am-i-getting-minimum-wage

    $ rails r script/generate-checksums-for-smart-answer.rb \
    minimum-wage-calculator-employers
First year apprentices, regardless of age will not
qualify for the national living wage from April
2016.

This commit introduces this question and directs
the user to an outcome indicating as such when
they answer yes.
The smart answers “Am I getting minimum wage” and 
“Minimum wage calculator employers” now have
slightly different questions, and this commit
simply moves those specific questions and outcome,
out of the shared logic file, and into respective 
flow files.
Execute:

 rails r script/generate-checksums-for-smart-answer.rb am-i-getting-minimum-wage
Execute:

 rails r script/generate-checksums-for-smart-answer.rb minimum-wage-calculator-employers
@erkde erkde force-pushed the add-living-wage-to-wage-calculator-v2 branch from 0dcf190 to 486c309 Compare December 8, 2015 12:23
erkde pushed a commit that referenced this pull request Dec 8, 2015
…ator-v2

Add living wage to minimum wage calculator
@erkde erkde merged commit 8711546 into master Dec 8, 2015
@erkde erkde deleted the add-living-wage-to-wage-calculator-v2 branch December 8, 2015 12:27
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