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

Vue 3 #258

Merged
merged 158 commits into from
Sep 10, 2024
Merged

Vue 3 #258

Show file tree
Hide file tree
Changes from 147 commits
Commits
Show all changes
158 commits
Select commit Hold shift + click to select a range
063b453
package updates, router, vuex, vuelidate partial updates
May 19, 2022
92c590b
remove filters from FPC widget
May 19, 2022
9c01570
update validator import path
May 19, 2022
faf62ae
update catchall pattern for new vue-router version
May 19, 2022
d876e69
update vuelidate syntac on MSP eligibility page
May 19, 2022
6e034cf
update eligibility pages
May 19, 2022
de14013
update syntax to use v$ for vuelidate
May 19, 2022
86e1abc
move from vue/compat to vue-3
May 19, 2022
0236231
vue-3 updates for personal info page, validator update, remove portal…
May 20, 2022
68313be
remove portal from sample image tipbox
May 20, 2022
cb7954c
fix router syntax for new version
May 20, 2022
53efa8a
fix fortawesome setup for vue 3:
May 20, 2022
2b4b448
update spouse page for vue 3
May 20, 2022
5632baf
cleanup comments, redundant vars
May 20, 2022
3c0c327
update vuelidate syntax for child info page
May 25, 2022
849779f
vuelidate updates for supp ben info page
May 25, 2022
7d3fd61
update documents page for vue-3
May 25, 2022
59bd201
update contact info page
May 25, 2022
13d195f
update router path syntax
May 25, 2022
fb52f81
update remaining pages
May 27, 2022
5204403
remove old dependency, update dev deps
May 30, 2022
053ec63
remove conditional requirement
May 30, 2022
0e5eb5d
fix date validator issues (clear dateData, use withParams consitently)
Jun 2, 2022
808ff4f
use common-lib-vue date formatter for comparing date values
Jun 2, 2022
4e41994
remove added text and fix incorrect validation syntax in child
Jun 2, 2022
616f078
add mutation observer for modal
Jun 2, 2022
6896e0a
remove ie check, vue-3 doesnt support
Jun 2, 2022
f2423b5
remove redundant id
Jun 2, 2022
887e2e2
fix incorrect validation syntax
Jun 3, 2022
658a956
update package-lock file
Jun 3, 2022
894407a
update unit test syntax for vue-3
Jun 9, 2022
9a45358
update date-fns import syntax
Jun 9, 2022
9e717f4
update node dependencies
Jun 9, 2022
f119977
remove npm link setup
Jun 9, 2022
168d1a0
add back missing test script
Jun 9, 2022
9d71646
merge in main
Jun 9, 2022
5039fe6
fix merged unit test syntax
Jun 9, 2022
747c5f6
run ci tests when test file changes
Jun 9, 2022
e4c99db
trigger checks re-run in CI
Jun 9, 2022
4d6e8cd
fix accidently merged reference for vuelidate
Jun 15, 2022
6d135af
remove errant debugger, bump common-lib version
Jul 21, 2022
9711f79
package-lockfile update
Jul 21, 2022
eda3119
Merge pull request #278 from bcgov/child-fix
jlangy Jul 22, 2022
04050a8
update lockfile
Jul 28, 2022
6d02bff
fix merge conflict
Jul 28, 2022
b3b39ed
fix lockfile
Jul 28, 2022
0899f62
fix double next() call in router
Jul 29, 2022
10bd2d3
fix base url
Jul 29, 2022
d517fed
Fix merge conflict
Jul 29, 2022
9b09122
Merge branch 'vue-3' of github.com:bcgov/MOH-MSP-Enrolment into vue-3
Jul 29, 2022
a2ba249
Update dependencies
bryce-mcmath Dec 5, 2022
61af267
Resolve mother of all merge conflicts
bryce-mcmath Dec 5, 2022
51957f9
Add missing tag and fix validator bug
bryce-mcmath Dec 5, 2022
6c4c46a
Update e2e tests
bryce-mcmath Dec 8, 2022
0228ade
Fix broken e2e tests
bryce-mcmath Dec 9, 2022
8190a0a
Fix merge conflict
bryce-mcmath Dec 9, 2022
48edf5c
run npm audit fix
bryce-mcmath Dec 9, 2022
a7970e8
Fix broken unit test
bryce-mcmath Dec 9, 2022
488e05d
update cypress tests to use dynamic data, update cypress version
stephanieharrison-maximus Jan 24, 2023
4a665c6
add partial validation test to e2e suite
stephanieharrison-maximus Feb 23, 2023
ca2fc8d
merge code updates into vue 3 branch
stephanieharrison-maximus Mar 21, 2023
220397a
update package lock after merge
stephanieharrison-maximus Mar 21, 2023
05bac4e
update caniuse database in package lock
stephanieharrison-maximus Mar 21, 2023
d994e97
add bc postal code validator tests to validators.spec.js
stephanieharrison-maximus Mar 21, 2023
a694d35
add yesValidator and nonBCValidator tests to validators.spec.js
stephanieharrison-maximus Mar 21, 2023
6451b0e
add nonCanadaValidator tests to validators.spec.js
stephanieharrison-maximus Mar 21, 2023
7cc1fc2
add dateDataRequiredValidator and dateDataValidator tests to validato…
stephanieharrison-maximus Mar 21, 2023
f7a5f76
add validators.spec.js unit tests
stephanieharrison-maximus Mar 23, 2023
4eacfac
add partially complete form helper tests
stephanieharrison-maximus Apr 12, 2023
69af805
update form-helpers copy power of attorney documents function tests
stephanieharrison-maximus May 4, 2023
9ecea2e
form-helpers.spec.js copyPowerOfAttorneyDocuments test
stephanieharrison-maximus May 5, 2023
3cc632e
add format currency number unit tests fpc-helpers.spec.js
stephanieharrison-maximus May 8, 2023
4576266
add getCoverageTier() unit tests
stephanieharrison-maximus May 9, 2023
25d96b8
add date tests for fpc-helpers.spec.js getCoverageTier() function
stephanieharrison-maximus May 12, 2023
28866d1
add getCoverageTier income tests
stephanieharrison-maximus May 15, 2023
f663f7c
add some getDistributionBarItems() tests
stephanieharrison-maximus May 17, 2023
e904d30
add getDistributionBarItems() color tests
stephanieharrison-maximus May 18, 2023
5c17c97
add formatServerData() unit tests
stephanieharrison-maximus May 18, 2023
98c4959
add url.spec.js tests
stephanieharrison-maximus May 19, 2023
6cf5dda
add scroll.js tests
stephanieharrison-maximus May 19, 2023
b3c5f04
add logService tests
skylermcnamee-hibc Jul 25, 2023
6d60478
add code coverage to npm test
skylermcnamee-hibc Jul 25, 2023
2b13aba
add page state service tests
skylermcnamee-hibc Jul 25, 2023
18e92a9
spa env service unit tests
skylermcnamee-hibc Jul 26, 2023
f6e08b4
remove unneeded .only from test suite
skylermcnamee-hibc Jul 26, 2023
f0d5f2b
update list of files excluded from jest test coverage
skylermcnamee-hibc Jul 26, 2023
5611de0
add page content mixin test
skylermcnamee-hibc Jul 26, 2023
9d49e24
add incomplete page stepper mixin tests
skylermcnamee-hibc Jul 27, 2023
d36621a
add supp-ben-data tests, add checks to codebase to prevent broken cod…
skylermcnamee-hibc Aug 1, 2023
1c2e1f4
SuppBenData getter/setter tests
skylermcnamee-hibc Aug 2, 2023
5338b4d
supp ben data getter tests
skylermcnamee-hibc Aug 3, 2023
f924383
add child/childcare deduction tests to supp ben data
skylermcnamee-hibc Aug 3, 2023
8406424
add ahDisabilityCreditDeduction() suppbendata tests, fix formatting
skylermcnamee-hibc Aug 4, 2023
925fdb7
add more supp-ben-data unit tests
skylermcnamee-hibc Aug 8, 2023
442eb0f
add more supp-ben-data tests
skylermcnamee-hibc Aug 10, 2023
81740c9
remove unneeded code
skylermcnamee-hibc Aug 10, 2023
387924c
add eqRoutes tests to routes.spec.js
skylermcnamee-hibc Aug 11, 2023
42eaa57
remove only from unit tests
skylermcnamee-hibc Aug 11, 2023
8392b23
export validators for unit testing
skylermcnamee-hibc Aug 14, 2023
0ed1de8
update form-helpers test, add Child component tests
skylermcnamee-hibc Aug 14, 2023
a90c21f
add birthDateYouthValidator() Child.vue tests
skylermcnamee-hibc Aug 14, 2023
34d9a25
add birthDateStudentValidator() unit tests
skylermcnamee-hibc Aug 15, 2023
3906be4
add beforeBirthdateValidator() unit tests for Child.spec.js
skylermcnamee-hibc Aug 15, 2023
819d40a
add dateOrderValidator() unit tests for Child.spec.js
skylermcnamee-hibc Aug 17, 2023
54475a2
add departureDateValidator() unit tests for Child.spec.js
skylermcnamee-hibc Aug 17, 2023
d21b859
add parseISO to unit test to prevent console warnings about date-fns …
skylermcnamee-hibc Oct 4, 2023
a0604de
add returnDateValidator() unit tests to Child component
skylermcnamee-hibc Oct 6, 2023
53cf056
add dischargeDateValidator() unit tests to Child component
skylermcnamee-hibc Oct 6, 2023
d819888
add permanentMoveValidator() unit tests to Child.spec.js
skylermcnamee-hibc Oct 10, 2023
2ff2083
add completePostalCodeValidator() unit tests to Child.spec.js
skylermcnamee-hibc Oct 10, 2023
9b40048
add addressLineContentValidator() unit tests to Child.spec.js
skylermcnamee-hibc Oct 11, 2023
bf2908d
add cityStateProvinceContentValidator() unit tests to Child.spec.js
skylermcnamee-hibc Oct 11, 2023
ea48423
add uniquePHNValidator() unit tests to Child.spec.js
skylermcnamee-hibc Oct 11, 2023
bed0455
fix child test dates, improve placeholder attachment structure
skylermcnamee-hibc Oct 13, 2023
1e3b2d1
export route collection so it can be used in unit tests
skylermcnamee-hibc Oct 13, 2023
c38937a
set requireConfigFile to false to clear console warnings in VS code
skylermcnamee-hibc Oct 13, 2023
35e8d86
add render test to Child.spec.js
skylermcnamee-hibc Oct 13, 2023
1cc18af
add created() unit tests
skylermcnamee-hibc Oct 16, 2023
1d63f05
add saveData() unit tests for Child.spec.js
skylermcnamee-hibc Oct 16, 2023
19a29bd
npm audit fix for axios, common lib, and postcss vulnerabilities
skylermcnamee-hibc Dec 4, 2023
dd6c19a
update axios version to fix vulnerability
skylermcnamee-hibc Dec 4, 2023
33af773
remove unneeded imports so tests don't fail in github
skylermcnamee-hibc Dec 4, 2023
0d0d77d
fix child last name validation format for vue 3
skylermcnamee-hibc Dec 4, 2023
c78e259
unit tests for Child.vue component
skylermcnamee-hibc Jun 25, 2024
c7cfedb
regenerate package-lock, update vue compiler version
skylermcnamee-hibc Jun 26, 2024
5da94e4
regenerate package lock again in node 14
skylermcnamee-hibc Jun 27, 2024
86282e1
migrate cypress tests over to cypress folder
skylermcnamee-hibc Jul 16, 2024
55ff00e
update unit tests to work with vite and vitest
skylermcnamee-hibc Jul 17, 2024
0615bd2
remove old cypress files that have been migrated to the cypress folder
skylermcnamee-hibc Jul 17, 2024
9a2efa1
vue to vite migration files
skylermcnamee-hibc Jul 17, 2024
0b095cf
update cypress test to no longer use a wait function
skylermcnamee-hibc Jul 17, 2024
7812569
update cypress tests for clarity and stability
skylermcnamee-hibc Jul 17, 2024
2cfacd8
update eslint parser
skylermcnamee-hibc Jul 17, 2024
fa96668
update references from button to buttonComponent
skylermcnamee-hibc Jul 18, 2024
07c8ba3
add cypress checks to make sure fileuploader works correctly before p…
skylermcnamee-hibc Jul 18, 2024
368005c
update common library component references
skylermcnamee-hibc Sep 3, 2024
07ef751
update package.json to use vite, vite-related tools, new common libra…
skylermcnamee-hibc Sep 3, 2024
e2e2b96
update README
skylermcnamee-hibc Sep 3, 2024
08e5dfd
add cypress validation test for msp eligibility + required data-cy va…
skylermcnamee-hibc Sep 4, 2024
99efa6d
add cypress fpc eligibility validations plus associated cypress ids
skylermcnamee-hibc Sep 4, 2024
518a80d
add supp ben eligibilty page validation tests and associated cypress ids
skylermcnamee-hibc Sep 4, 2024
af79404
add validation tests for applicant first, middle, and last name
skylermcnamee-hibc Sep 4, 2024
9d8dcbf
update e2e tests to work more easily with dev/test environments
skylermcnamee-hibc Sep 6, 2024
c157c22
remove unused packages/files, add headless e2e script
skylermcnamee-hibc Sep 6, 2024
c76ebe0
regenerate package lock
skylermcnamee-hibc Sep 6, 2024
6d54abf
add unit test comments for codeql
skylermcnamee-hibc Sep 9, 2024
0fda765
update pull request template
skylermcnamee-hibc Sep 9, 2024
b5d7c6a
rename .eslintrc.js to be a .cjs file
skylermcnamee-hibc Sep 9, 2024
6753196
eslint: add back plugin:vue/essential, add parserOptions, remove unus…
skylermcnamee-hibc Sep 9, 2024
b0bbee1
add api-service mock to unit tests
skylermcnamee-hibc Sep 9, 2024
ef6072a
update Cypress to latest version so it runs in Edge
skylermcnamee-hibc Sep 9, 2024
720d54a
add extra test data in case it's needed someday
skylermcnamee-hibc Sep 9, 2024
48ca710
add line for cypress/downloads, which is sometimes generated by headl…
skylermcnamee-hibc Sep 9, 2024
c416e34
update node version in build + workflow, add workflow tests
skylermcnamee-hibc Sep 9, 2024
f895af2
update node version in build action for workflow, add check to image-…
skylermcnamee-hibc Sep 9, 2024
e54e52f
regenerate package lock
skylermcnamee-hibc Sep 9, 2024
867a55a
version bump so this branch is caught up with main
skylermcnamee-hibc Sep 9, 2024
db1d14b
Merge branch 'main' into vue-3
skylermcnamee-hibc Sep 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
### Please check if the PR fulfills these requirements:

- [ ] After these changes, the app was run and still works as expected
- [ ] Unit tests for these changes were added (if applicable)
- [ ] Tests for these changes were added (if applicable)
- [ ] `npm audit` was checked, applicable vulnerabilities were updated
- [ ] `npm run build` passes
- [ ] `npm run lint` has no unexpected errors
- [ ] `npm run format` was run on changed files
- [ ] All existing unit tests were run and still pass
- [ ] End-to-end tests were run and still pass in Chrome, Firefox, and Edge without unexpected console errors (`npm run test:e2e`)


### Please specify the type of change this PR introduces (Bug fix, feature addition, content update, chore, etc.):

Expand Down
8 changes: 3 additions & 5 deletions jha/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
module.exports = {
root: true,
env: {
node: true
node: true,
es2022: true,
},
'extends': [
'plugin:vue/essential',
'eslint:recommended'
],
parserOptions: {
parser: "@babel/eslint-parser",
},
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off'
Expand Down
12 changes: 10 additions & 2 deletions jha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,17 @@ npm run test:e2e
```
npm run lint
```
This project uses ESLint for linting.

```sh
npm run format
```

This project uses Prettier for code formatting.

### Dev Settings
Adjust the values in `src/settings.js` to more easily walk through the application during development

### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
### Other important notes

This library requires a minimum of node 18 for compatibility with Vite and other dependencies, and a minimum of node 22 for compatibility with the pdf-js package used by the common library dependency.
5 changes: 0 additions & 5 deletions jha/babel.config.js

This file was deleted.

13 changes: 13 additions & 0 deletions jha/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { defineConfig } from "cypress";
import vitePreprocessor from 'cypress-vite'

export default defineConfig({
e2e: {
baseUrl: 'http://172.25.129.209:5173/ahdc/',
experimentalRunAllSpecs: true,
testIsolation: false, //to prevent Cypress errors
setupNodeEvents(on) {
on('file:preprocessor', vitePreprocessor())
},
},
});
3 changes: 0 additions & 3 deletions jha/cypress.json

This file was deleted.

File renamed without changes.
25 changes: 20 additions & 5 deletions jha/tests/e2e/specs/FPC.js → jha/cypress/e2e/FPC.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { generateRequestObject } from '../fixtures/fpcStandaloneRequest';
import { removeUniqueFields } from '../helpers';
import { removeUniqueFields } from '../support/helpers';
import envData from '../fixtures/env-data.js'

describe('FPC only application', () => {
const options = { includeFPC: true }
Expand All @@ -12,15 +13,26 @@ describe('FPC only application', () => {
});

it('Accepts valid information for the spouse page', () => {
cy.fillSpousePage(options)
if (envData.skipSpouse) {
cy.skipSpousePage();
} else {
cy.fillSpousePage(options);
}
});

it('Accepts valid information for the child page', () => {
cy.fillChildPage(options)
if (envData.skipChild) {
cy.skipChildPage();
} else {
cy.fillChildPage(options)
}
})

it('Accepts valid information for the FPC info page', () => {
cy.fillFPCInfoPage()
cy.location().should((loc) => {
expect(loc.pathname).to.eq("/ahdc/contact-info");
});
})

it('Accepts valid information for the contact info page', () => {
Expand All @@ -35,14 +47,17 @@ describe('FPC only application', () => {
it('Submits with the expected payload', () => {
cy.fillConsent(options);
cy.submitApplication();
cy.wait('@submitApplication')
if (envData.enableIntercepts) {
//in the local environment, we want to check that the intercepted API response matches what it should
cy.wait('@submitApplication')
.then(interception => {
expect(removeUniqueFields(interception.request.body)).to.deep.equal(removeUniqueFields(generateRequestObject()))
});
}
});

it('Redirects user to confirmation page when successful', () => {
cy.url().should('include', 'submission');
cy.url({ timeout: 20000 }).should('include', 'submission');
cy.contains('Confirmation of submission')
});
});
19 changes: 11 additions & 8 deletions jha/tests/e2e/specs/MSP.js → jha/cypress/e2e/MSP.cy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { generateRequestObject } from '../fixtures/mspStandaloneRequest.js';
import { removeUniqueFields } from '../helpers';
import { removeUniqueFields } from '../support/helpers';
import envData from '../fixtures/env-data.js'

describe('MSP only application', () => {
const options = {includeMSP: true}
it('Fills eligibility questionnaire', () => {
cy.fillEligibilityQuestionnaire(options)
})
});

it('Accepts valid information for the personal-info page', () => {
cy.fillPersonalInfoPage(options)
Expand All @@ -17,29 +18,31 @@ describe('MSP only application', () => {

it('Accepts valid information for the child page', () => {
cy.fillChildPage(options)
})
});

it('Accepts valid information for the contact info page', () => {
cy.fillResidentialAddress()
})
});

it('Displays the phone number with contact information', () => {
cy.contains('(555) 555-5555')
cy.continue();
})
});

it('submits form with expected payload', () => {
cy.fillConsent(options)
cy.submitApplication()
cy.wait('@submitApplication')
if (envData.enableIntercepts) {
//in the local environment, we want to check that the intercepted API response matches what it should
cy.wait('@submitApplication')
.then(interception => {
expect(removeUniqueFields(interception.request.body)).to.deep.equal(removeUniqueFields(generateRequestObject()))
})
}
});

it('Redirects user to confirmation page when successful', () => {
cy.url().should('include', 'submission');
cy.url({ timeout: 20000 }).should('include', 'submission');
cy.contains('Confirmation of submission')
});

});
17 changes: 12 additions & 5 deletions jha/tests/e2e/specs/SB.js → jha/cypress/e2e/SB.cy.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { generateRequestObject } from '../fixtures/sbStandaloneRequest.js';
import { removeUniqueFields } from '../helpers';
import { removeUniqueFields } from '../support/helpers';
import envData from '../fixtures/env-data.js'

describe('SB only application', () => {
const options = {includeSB: true}
it('Fills eligibility questionnaire', () => {
cy.fillEligibilityQuestionnaire(options)
})
});

it('Accepts valid information for the personal-info page', () => {
cy.fillPersonalInfoPage(options)
Expand All @@ -21,6 +22,9 @@ describe('SB only application', () => {

it('Accepts valid information for the documents page', () => {
cy.fillDocumentsPage()
cy.location().should((loc) => {
expect(loc.pathname).to.eq("/ahdc/contact-info");
});
});

it('Accepts valid information for the contact info page', () => {
Expand All @@ -30,19 +34,22 @@ describe('SB only application', () => {
it('Displays the phone number with contact information', () => {
cy.contains('(555) 555-5555')
cy.continue();
})
});

it('submits form with expected payload', () => {
cy.fillConsent(options)
cy.submitApplication()
cy.wait('@submitApplication')
if (envData.enableIntercepts) {
//in the local environment, we want to check that the intercepted API response matches what it should
cy.wait('@submitApplication')
.then(interception => {
expect(removeUniqueFields(interception.request.body)).to.deep.equal(removeUniqueFields(generateRequestObject()))
})
}
});

it('Redirects user to confirmation page when successful', () => {
cy.url().should('include', 'submission');
cy.url({ timeout: 20000 }).should('include', 'submission');
cy.contains('Confirmation of submission')
});
});
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { generateRequestObject } from '../fixtures/fullApplication.js';
import { removeUniqueFields } from '../helpers';
import { removeUniqueFields } from '../support/helpers';
import envData from '../fixtures/env-data.js'

describe('Full application for MSP FPC and SB', () => {
const options = {includeMSP: true, includeFPC: false, includeSB: true}
it('Fills eligibility questionnaire', () => {
cy.fillEligibilityQuestionnaire(options)
})
});

it('Accepts valid information for the personal-info page', () => {
cy.fillPersonalInfoPage(options)
Expand All @@ -29,24 +30,27 @@ describe('Full application for MSP FPC and SB', () => {

it('Accepts valid information for the contact info page', () => {
cy.fillResidentialAddress()
})
});

it('Displays the phone number with contact information', () => {
cy.contains('(555) 555-5555')
cy.continue();
})
});

it('submits form with expected payload', () => {
cy.fillConsent(options)
cy.submitApplication()
cy.wait('@submitApplication')
//in the local environment, we want to check that the intercepted API response matches what it should
if (envData.enableIntercepts) {
cy.wait('@submitApplication')
.then(interception => {
expect(removeUniqueFields(interception.request.body)).to.deep.equal(removeUniqueFields(generateRequestObject()))
})
}
});

it('Redirects user to confirmation page when successful', () => {
cy.url().should('include', 'submission');
cy.url({ timeout: 20000 }).should('include', 'submission');
cy.contains('Confirmation of submission')
});
});
Loading
Loading