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

Fix the tests for example user profiles (red-green refactor) #136

Closed
2 of 4 tasks
thadk opened this issue Dec 25, 2019 · 1 comment
Closed
2 of 4 tasks

Fix the tests for example user profiles (red-green refactor) #136

thadk opened this issue Dec 25, 2019 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@thadk
Copy link
Member

thadk commented Dec 25, 2019

There have been several tests created for XML earning history profiles that we received from the Social Security website. These were merged in #129 but the tests are still "red" in TravisCI because the values from this app do not match the Prototype Observable Notebook. That is a bit strange because the calculation functions were taken directly out of that, though the AIME function was updated/improved.

Run the tests with npm test.

Test suites

  • John Q. Public (Full Retirement.xml) - these work in the observable calculator but we don't really trust the values to be authoritative because it is not a real person and the values in the XML do not match the values for the same earnings in Detailed Calculator linked below. It is not WEP affected.
  • Sample 20, this one is from the official Social Security detail calculator Windows app and one of the ones we truly know the values for. It is WEP affected and make sure you notice it has 1,500.00 monthly pension.
  • getAIMEFromEarnings test solo function, this is a stripped down example test.

To Do's

  • Fix the tests about substantial earnings: getYearsSE() needs to be able to parse the XML-like JSON object, not just simple key-values. Right now it is always returning 20 which is bad.
  • (harder) If any differences remain, figure out why any other of the above tests from Improve Test Suite (WIP) #129 are not matching the observable values and make them run green.
  • Write a test suite if there isn't one and figure out why people with fewer than 35 years of income cannot use the app in one of the test cases (see AIME Calculations fails on sub-35 earnings records #108)
  • (easiest) Add the three new tests below from the Social Security detail calculator

We also have three fresh new files from the detailed calculator at https://cfb-public.slack.com/archives/CRBK25C2G/p1575918023000400 which you could convert to JSON by adding a new cell like fastXml.parse(\` to the observable notebook, running the cell, and clicking the little button on the left to download the JSON and copy/paste it into a test.
image

@thadk thadk added the help wanted Extra attention is needed label Dec 25, 2019
@thadk
Copy link
Member Author

thadk commented Jul 5, 2020

@nvanwitt implemented the (easiest) Add the three new tests below from the Social Security detail calculator somewhere at a hacknight. maybe he can push that to https://github.com/nvanwitt/windfall-elimination/commits/dev, otherwise closing this.

@thadk thadk closed this as completed Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant