Skip to content

Commit

Permalink
Grad Path - Fix failing cypress test
Browse files Browse the repository at this point in the history
- Change url-params test to use fixtures data
- Update tests to reflect new test data
  • Loading branch information
chuckwerner committed Feb 3, 2025
1 parent 1358275 commit 30ec8df
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@ const page = new PfcFinancialPathToGraduation();

describe('Your Financial Path to Graduation (url parameter functionality)', () => {
beforeEach(() => {
const apiConstants =

Check failure on line 7 in test/cypress/integration/paying-for-college/your-financial-path-to-graduation/url-params.cy.js

View workflow job for this annotation

GitHub Actions / frontend

'apiConstants' is assigned a value but never used
'/paying-for-college2/understanding-your-financial-aid-offer/api/constants/';
const apiSchoolOne =

Check failure on line 9 in test/cypress/integration/paying-for-college/your-financial-path-to-graduation/url-params.cy.js

View workflow job for this annotation

GitHub Actions / frontend

'apiSchoolOne' is assigned a value but never used
'/paying-for-college2/understanding-your-financial-aid-offer/api/school/166027/';

cy.visit(
'/paying-for-college/your-financial-path-to-graduation/?iped=163286&pid=4502-3&houp=onCampus&typp=bachelors&prop=0&lenp=3&ratp=inState&depp=dependent&cobs=n&tuit=10595&hous=12809&diro=13&book=1250&indo=55&tran=44&pelg=11&seog=12&fedg=13&stag=14&schg=15&tuig=16&othg=17&mta=18&gi=19&othm=20&stas=21&schs=22&oths=23&wkst=33&subl=299&unsl=399&insl=599&insr=0.06&insf=0.02&stal=499&star=0.05&staf=0.01&npol=699&npor=0.07&npof=0.03&pers=81&fams=82&529p=83&offj=84&onj=85&eta=86&othf=87&houx=31&fdx=32&clhx=33&trnx=34&hltx=35&entx=36&retx=37&taxx=38&chcx=39&dbtx=40&othx=41&prin=48k-75k',
'/paying-for-college/your-financial-path-to-graduation/?iped=166027&pid=2301-3&houp=onCampus&typp=bachelors&prop=0&lenp=3&ratp=inState&depp=dependent&cobs=n&tuit=10595&hous=12809&diro=13&book=1250&indo=55&tran=44&pelg=11&seog=12&fedg=13&stag=14&schg=15&tuig=16&othg=17&mta=18&gi=19&othm=20&stas=21&schs=22&oths=23&wkst=33&subl=299&unsl=399&insl=599&insr=0.06&insf=0.02&stal=499&star=0.05&staf=0.01&npol=699&npor=0.07&npof=0.03&pers=81&fams=82&529p=83&offj=84&onj=85&eta=86&othf=87&houx=31&fdx=32&clhx=33&trnx=34&hltx=35&entx=36&retx=37&taxx=38&chcx=39&dbtx=40&othx=41&prin=48k-75k',
);
});

it('should set the first page correctly', () => {
cy.get('#search__school-input').should(
'have.value',
'University of Maryland-College Park',
'Harvard University',
);
cy.get('input[name="programType"]:checked').should(
'have.value',
Expand All @@ -27,10 +32,10 @@ describe('Your Financial Path to Graduation (url parameter functionality)', () =
'have.value',
'dependent',
);
cy.get('#program-select option:checked').should('have.value', '4502-3');
cy.get('#program-select option:checked').should('have.value', '2301-3');
cy.get('#program-select option:checked').should(
'contain',
"Bachelor's degree - Anthropology",
"English Language and Literature, General",
);
cy.get('#program-income').should('have.value', '48k-75k');
});
Expand All @@ -39,24 +44,24 @@ describe('Your Financial Path to Graduation (url parameter functionality)', () =
page.nextToSchoolCosts();
cy.get('span[data-financial-item="total_costOfProgram"]').should(
'contain',
'$51,447',
'$1,614',
);

page.clickLeftNav('review-plan');

cy.get('p[data-financial-item="total_costs"]').should('contain', '$17,149');
cy.get('p[data-financial-item="total_costs"]').should('contain', '$538');
cy.get('p[data-financial-item="total_funding"]').should('contain', '$842');
cy.get('p[data-financial-item="debt_totalAtGrad"]').should(
'contain',
'$55,239',
'$2,743',
);
cy.get('p[data-financial-item="debt_tenYearInterest"]').should(
'contain',
'$11,026',
'$1,000',
);
cy.get('p[data-financial-item="debt_tenYearMonthly"]').should(
'contain',
'$552',
'$31',
);
});
});

0 comments on commit 30ec8df

Please sign in to comment.