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

Failing browser tests #326

Closed
chosak opened this issue Aug 15, 2018 · 4 comments
Closed

Failing browser tests #326

chosak opened this issue Aug 15, 2018 · 4 comments

Comments

@chosak
Copy link
Member

chosak commented Aug 15, 2018

The JavaScript functional (browser) tests documented here currently fail with numerous errors.

At first glance this appears to be due to a mismatch between the test data and the browser tests. For example, the browser tests load this local page:

http://localhost:8000/paying-for-college2/understanding-your-financial-aid-offer/offer/?iped=408039&pid=981&oid=f38283b5b7c939a058889f997949efa566c616c5&totl=45000&tuit=38976&hous=3000&book=650&tran=500&othr=500&pelg=1500&schg=2000&stag=2000&othg=100&ta=3000&mta=3000&gib=3000&wkst=3000&parl=14000&perl=3000&subl=15000&unsl=2000&ppl=1000&gpl=1000&prvl=3000&prvi=4.55&prvf=1.01&insl=3000&insi=4.55&inst=8

(note pid=981)

When this page is loaded, this error message is displayed instead of a functional page:

The information your school provided is missing the program ID, which is vital information for this tool to work. Please contact your school and ask them to ensure they are sending us the right program ID and it's in the correct format.

Once your school provides you with an updated URL link, you will be able to return here so you can continue reviewing the information in the tool.

The test data (which can be loaded with ./manage.py loaddata collegedata) does not include a program with program_code=981, so it fails the test here.

Looking back in the git history for this repo, the browser tests were last updated in #248 on August 4, 2016. The test data was last updated in #285 on October 11, 2016. Perhaps the tests were not updated when the test data was -- if so, the test URL will need to be updated to work properly against the current test data.

These failures were also mentioned on #322 here.

@chosak chosak mentioned this issue Aug 15, 2018
6 tasks
@higs4281
Copy link
Member

higs4281 commented Aug 16, 2018

A clarification: The collegedata fixture is not a test fixture, but a snapshot of the latest national-level school values. It doesn't include any school-level program data, which is where program_code values live.

There is a much smaller program test fixture that provides a single school object and a program object carrying the program_code 981.

@chosak
Copy link
Member Author

chosak commented Aug 16, 2018

@higs4281 thanks! This fixes some of the tests, although there are still some that fail:

Ran 81 of 90 specs
81 specs, 52 failures, 3 pending specs
Finished in 185.172 seconds

So at a minimum we'll want to update the testing instructions to add a ./manage.py loaddata test_program command.

Unfortunately, while some of the errors seem maybe to be due to logic timing (Expected 'Updating...' to equal '43,626'), some of them seem to be numerical things (ex: Expected '$24,818' to equal '$29,971'). Do you think it's likely that the new data load in #285 made some values incompatible with the tests from #248?

@higs4281
Copy link
Member

I don't think #285 would have affected tests. I'll have to get more familiar with the tests.

@chosak
Copy link
Member Author

chosak commented Sep 11, 2018

Fixed by #330, #331, #332.

@chosak chosak closed this as completed Sep 11, 2018
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

No branches or pull requests

2 participants