alphagov / calculators

Serves the Child benefit tax calculator on GOV.UK
https://docs.publishing.service.gov.uk/apps/calculators.html
MIT License
11 stars 13 forks source link

Remove years prior than 4 years ago #853

Closed AlanGabbianelli closed 4 years ago

AlanGabbianelli commented 4 years ago

For question 2: The options removed are years from 2012/2013 to 2015/2016, leaving only options for years from 2016/2017 to 2020/2021.

For question 3: The options removed are the years from 2011 to 2015, leaving only options for years from 2016 to 2021.

When removing those options, we also refactored the code so that we don't have to remove or add options in the future. Now, the provided options are always:

https://trello.com/c/ht73Q7At/1894-show-only-current-and-4-previous-years-in-child-benefit-calculator

benjamineskola commented 4 years ago

I'm not very sure of the best way to fix some of these tests: some of them are fine to just have the years changed into one we now support (i.e., no more than 4 years before the date set by Timecop), but others have actual figures in which are naturally going to differ from year to year.

Some of them are clearly testing special-case behaviour for certain tax years and can be dropped; with others, it's less clear whether they're checking behaviour specific to a given year (and can be dropped) or just the general behaviour (and therefore should have their results updated).

thomasleese commented 4 years ago

Can you link to the Trello card in the PR description?