From 07f8bcbd25d5c8a9c295e3e66fc443f65411c6de Mon Sep 17 00:00:00 2001 From: Rhys Lewis <88314925+RLCorp@users.noreply.github.com> Date: Tue, 26 Nov 2024 15:02:51 +0000 Subject: [PATCH] mes-9906-ionic8 (#1830) * WIP: Testing Ionic 8 * WIP: Fixed buttons to replicate old visuals * Rebase * update to 8.4.0 * Refactored to remove NavParams and replace with inputs * Refactored secondary button * updated cli * updated various dependencies * Refactored buttons to display properly * buttons changed to be taller and more consistent * Fixed button and icon spacing * removed wrapping from terminate test button * fixed spacing on multi-select ion select check mark * Fixed a bug where vehicle checks modal wasn't properly being passed data * linting * removed unneeded imports --- ios/App/Podfile.lock | 40 +-- package-lock.json | 284 +++++++----------- package.json | 38 +-- .../__tests__/candidate-details.page.spec.ts | 35 +-- .../candidate-details.page.html | 4 +- .../candidate-details.page.ts | 31 +- .../__tests__/submit-modal.spec.ts | 12 +- src/app/pages/dashboard/dashboard.page.html | 4 +- .../delegated-rekey-search.scss | 3 - .../pages/error-page/__tests__/error.spec.ts | 8 +- .../__tests__/health-declaration.page.spec.ts | 8 +- .../health-declaration-modal.spec.ts | 12 +- .../journal-early-start-modal.spec.ts | 20 +- .../journal-early-start-modal.ts | 14 +- .../journal-future-test-modal.spec.ts | 5 +- .../__tests__/journal-rekey-modal.spec.ts | 5 +- src/app/pages/journal/journal.module.ts | 3 +- .../cat-b/__tests__/office.cat-b.page.spec.ts | 5 +- .../pages/office/cat-b/office.cat-b.module.ts | 4 +- src/app/pages/office/office.page.scss | 2 +- .../__tests__/upload-rekey-modal.spec.ts | 8 +- .../upload-rekey-modal/upload-rekey-modal.ts | 12 +- src/app/pages/rekey-search/rekey-search.scss | 3 - .../__tests__/candidate-search-card.spec.ts | 5 +- .../test-report.cat-a-mod1.page.spec.ts | 8 +- .../__tests__/activity-code-4-modal.spec.ts | 9 +- .../__tests__/speed-check-modal.spec.ts | 8 +- .../test-report.cat-a-mod2.page.spec.ts | 8 +- .../test-report.cat-adi-part2.page.spec.ts | 8 +- .../test-report.cat-adi-part3.spec.ts | 8 +- .../__tests__/adi3-end-test-modal.spec.ts | 34 +-- .../adi3-end-test-modal.ts | 25 +- .../__tests__/test-report.cat-b.page.spec.ts | 8 +- .../__tests__/test-report.cat-c.page.spec.ts | 8 +- .../test-report.cat-cpc.page.spec.ts | 8 +- .../__tests__/cpc-end-test-modal.spec.ts | 7 +- .../cpc-end-test-modal.html | 2 +- .../cpc-end-test-modal/cpc-end-test-modal.ts | 22 +- .../question-footer/question-footer.html | 6 +- .../test-report.cat-home-test.page.spec.ts | 8 +- .../test-report.cat-manoeuvre.page.spec.ts | 8 +- .../__tests__/end-test-modal.spec.ts | 9 +- .../legal-requirements-modal.spec.ts | 9 +- .../legal-requirements-modal.ts | 16 +- .../__tests__/reverse-diagram-modal.spec.ts | 5 +- .../reverse-diagram-modal.ts | 10 +- .../special-legal-requirement-modal.spec.ts | 9 +- ...nalisation-invalid-test-data-modal.spec.ts | 18 +- ...st-finalisation-invalid-test-data-modal.ts | 12 +- .../test-report/components/timer/timer.html | 2 +- .../test-report/components/timer/timer.scss | 6 +- .../components/toolbar/toolbar.html | 8 +- .../components/toolbar/toolbar.scss | 13 +- .../advanced-search/advanced-search.scss | 3 - .../test-results-search.scss | 3 - ...hicle-checks-modal.cat-a-mod2.page.spec.ts | 9 +- .../vehicle-checks-modal.cat-a-mod2.page.ts | 9 +- .../__tests__/vehicle-checks.spec.ts | 5 +- ...le-checks-modal.cat-adi-part2.page.spec.ts | 8 +- ...vehicle-checks-modal.cat-adi-part2.page.ts | 12 +- .../vehicle-checks-modal.cat-c.page.spec.ts | 7 +- .../vehicle-checks-modal.cat-c.page.ts | 16 +- .../vehicle-checks-modal.cat-d.page.spec.ts | 7 +- .../vehicle-checks-modal.cat-d.page.ts | 17 +- ...vehicle-checks-modal.cat-home.page.spec.ts | 5 +- .../vehicle-checks-modal.cat-home.page.ts | 15 +- .../eyesight-failure-confirmation.html | 4 +- .../mot-failed-modal.component.spec.ts | 5 +- .../practice-mode-mot-modal.component.html | 2 +- .../__tests__/vehicle-checks.spec.ts | 5 +- .../vehicle-registration.html | 4 +- .../modal-activity-code-list.spec.ts | 5 +- .../modal-return-button.html | 2 +- .../modal-return-button.scss | 13 +- .../__tests__/terminate-test-modal.spec.ts | 5 +- .../terminate-test-modal.html | 2 +- .../terminate-test-modal.ts | 19 +- .../__tests__/modal-vrn-capture.spec.ts | 6 +- .../vrn-capture-modal/vrn-capture-modal.ts | 10 +- .../__tests__/test-outcome.spec.ts | 3 + .../test-slot/test-outcome/test-outcome.scss | 2 +- src/theme/sass-partials/_alert.scss | 2 +- src/theme/sass-partials/_buttons.scss | 67 ++--- 83 files changed, 397 insertions(+), 742 deletions(-) diff --git a/ios/App/Podfile.lock b/ios/App/Podfile.lock index fae7a784e6..65a5c43a8e 100644 --- a/ios/App/Podfile.lock +++ b/ios/App/Podfile.lock @@ -1,26 +1,26 @@ PODS: - - Capacitor (6.1.2): + - Capacitor (6.2.0): - CapacitorCordova - - CapacitorApp (6.0.1): + - CapacitorApp (6.0.2): - Capacitor - - CapacitorAppLauncher (6.0.2): + - CapacitorAppLauncher (6.0.3): - Capacitor - - CapacitorCommunityKeepAwake (5.0.0): + - CapacitorCommunityKeepAwake (5.0.1): - Capacitor - - CapacitorCordova (6.1.2) - - CapacitorDevice (6.0.1): + - CapacitorCordova (6.2.0) + - CapacitorDevice (6.0.2): - Capacitor - CapacitorNativeBiometric (0.0.1): - Capacitor - - CapacitorSplashScreen (6.0.2): + - CapacitorSplashScreen (6.0.3): - Capacitor - - CapacitorStatusBar (6.0.1): + - CapacitorStatusBar (6.0.2): - Capacitor - - CapacitorTextZoom (6.0.2): + - CapacitorTextZoom (6.0.3): - Capacitor - CapawesomeCapacitorManagedConfigurations (6.0.0): - Capacitor - - CapawesomeCapacitorScreenOrientation (6.0.0): + - CapawesomeCapacitorScreenOrientation (6.0.1): - Capacitor - CordovaPlugins (6.0.0): - CapacitorCordova @@ -97,18 +97,18 @@ EXTERNAL SOURCES: :path: "../../node_modules/@sentry/capacitor" SPEC CHECKSUMS: - Capacitor: 679f9673fdf30597493a6362a5d5bf233d46abc2 - CapacitorApp: 0bc633b4eae40a1f32cd2834788fad3bc42da6a1 - CapacitorAppLauncher: 9ac785e8d3936388249212b6e16cb32225960c5f - CapacitorCommunityKeepAwake: c820e5394a74ab73635107f0544378b026562243 - CapacitorCordova: f48c89f96c319101cd2f0ce8a2b7449b5fb8b3dd - CapacitorDevice: 7097a1deb4224b77fd13a6e60a355d0062a5d772 + Capacitor: 1f3c7b9802d958cd8c4eb63895fff85dff2e1eea + CapacitorApp: 2a8c3a0b0814322e5e6e15fe595f02c3808f0f8b + CapacitorAppLauncher: a9fb7da942e89fa9cb2bb1e579c8bd2ab81652a5 + CapacitorCommunityKeepAwake: e2ddd50812e3407f8dc3a2c28e97d66e9b59b2f5 + CapacitorCordova: b33e7f4aa4ed105dd43283acdd940964374a87d9 + CapacitorDevice: 1a215717f0b5061503b21a03508b0ec458a57d78 CapacitorNativeBiometric: b47637a8cd349bdac014424bb4ddcae9ee5d4919 - CapacitorSplashScreen: 250df9ef8014fac5c7c1fd231f0f8b1d8f0b5624 - CapacitorStatusBar: b81d4fb5d4e0064c712018071b3ab4b810b39a63 - CapacitorTextZoom: 013a8dd0887f6bd103171768c91845f2354414b6 + CapacitorSplashScreen: 68893659d77b5f82d753b3a70475082845e3039c + CapacitorStatusBar: 3b9ac7d0684770522c532d1158a1434512ab1477 + CapacitorTextZoom: be3bee30e5bf4bc623539877e6241dff861d631e CapawesomeCapacitorManagedConfigurations: e6dbcbcf45d7b1f7acfa9b54a02e15201604a803 - CapawesomeCapacitorScreenOrientation: 82675c41cb616a64630c834b06344515a2849ff3 + CapawesomeCapacitorScreenOrientation: 9cc68ecd085fcea2e1755475a3ed60d85e604a6c CordovaPlugins: c8d12d6cd20cf360d3711e2590712be33b6dbcf5 CordovaPluginsResources: 0c211f770ed91763a179ebcd9b9346e120b70662 CordovaPluginsStatic: 923a56e48bad79010d7c84d405625ec8d0b46b41 diff --git a/package-lock.json b/package-lock.json index b291e76306..3a86b0cf9c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,21 +17,21 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@angular/router": "^17.3.9", - "@awesome-cordova-plugins/core": "^6.4.0", - "@awesome-cordova-plugins/is-debug": "^6.4.0", - "@awesome-cordova-plugins/network": "^6.4.0", - "@awesome-cordova-plugins/secure-storage": "^6.4.0", - "@capacitor-community/keep-awake": "^5.0.0", - "@capacitor/app": "^6.0.1", - "@capacitor/app-launcher": "^6.0.2", - "@capacitor/core": "^6.1.2", - "@capacitor/device": "^6.0.1", - "@capacitor/ios": "^6.1.2", - "@capacitor/splash-screen": "^6.0.2", - "@capacitor/status-bar": "^6.0.1", - "@capacitor/text-zoom": "^6.0.2", + "@awesome-cordova-plugins/core": "^6.12.0", + "@awesome-cordova-plugins/is-debug": "^6.12.0", + "@awesome-cordova-plugins/network": "^6.12.0", + "@awesome-cordova-plugins/secure-storage": "^6.12.0", + "@capacitor-community/keep-awake": "^5.0.1", + "@capacitor/app": "^6.0.2", + "@capacitor/app-launcher": "^6.0.3", + "@capacitor/core": "^6.2.0", + "@capacitor/device": "^6.0.2", + "@capacitor/ios": "^6.2.0", + "@capacitor/splash-screen": "^6.0.3", + "@capacitor/status-bar": "^6.0.2", + "@capacitor/text-zoom": "^6.0.3", "@capawesome/capacitor-managed-configurations": "^6.0.0", - "@capawesome/capacitor-screen-orientation": "^6.0.0", + "@capawesome/capacitor-screen-orientation": "^6.0.1", "@dvsa/capacitor-plugin-asam": "^1.0.1", "@dvsa/mes-config-schema": "1.9.1", "@dvsa/mes-driver-schema": "^0.0.2", @@ -41,8 +41,8 @@ "@dvsa/mes-search-schema": "1.3.0", "@dvsa/mes-test-schema": "3.43.1", "@ionic-enterprise/auth": "3.9.5", - "@ionic/angular": "~7.5.7", - "@ionic/core": "~7.5.7", + "@ionic/angular": "^8.4.0", + "@ionic/core": "^8.4.0", "@ionic/storage-angular": "^4.0.0", "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@ngrx/effects": "^17.2.0", @@ -94,8 +94,8 @@ "@biomejs/biome": "1.8.3", "@capacitor/cli": "^6.0.0", "@dvsa/biome-config": "^0.1.0", - "@ionic/angular-toolkit": "^10.0.0", - "@ionic/cli": "^7.1.5", + "@ionic/angular-toolkit": "^11.0.0", + "@ionic/cli": "^7.2.0", "@sentry/cli": "^2.37.0", "@types/deep-diff": "^1.0.5", "@types/hammerjs": "^2.0.45", @@ -122,7 +122,7 @@ "snyk": "^1.1253.0", "sonar-scanner": "^3.1.0", "ts-node": "~10.9.1", - "typescript": "~5.2.2", + "typescript": "~5.4.5", "xml2js": "^0.6.2" }, "engines": { @@ -295,6 +295,22 @@ } } }, + "node_modules/@angular-devkit/build-angular/node_modules/@ngtools/webpack": { + "version": "17.3.7", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-17.3.7.tgz", + "integrity": "sha512-kQNS68jsPQlaWAnKcVeFKNHp6K90uQANvq+9oXb/i+JnYWzuBsHzn2r8bVdMmvjd1HdBRiGtg767XRk3u+jgRw==", + "dev": true, + "engines": { + "node": "^18.13.0 || >=20.9.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "@angular/compiler-cli": "^17.0.0", + "typescript": ">=5.2 <5.5", + "webpack": "^5.54.0" + } + }, "node_modules/@angular-devkit/build-angular/node_modules/postcss": { "version": "8.4.35", "dev": true, @@ -680,8 +696,9 @@ } }, "node_modules/@awesome-cordova-plugins/core": { - "version": "6.7.0", - "license": "MIT", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/core/-/core-6.12.0.tgz", + "integrity": "sha512-Kdc1I3up1QDBA1i6XecZtJ55bZFV9fbjVon7//xqUlZ4mdTSAM5JhLQypOjynMkT4LGdwenxVsxos6lPIMTL7w==", "dependencies": { "@types/cordova": "latest" }, @@ -690,8 +707,9 @@ } }, "node_modules/@awesome-cordova-plugins/is-debug": { - "version": "6.7.0", - "license": "MIT", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/is-debug/-/is-debug-6.12.0.tgz", + "integrity": "sha512-x+mkDXYnZ5yEkqw9fgt9MZcg7TMgjroBssukGv1s5zspJ+YFIBE0/idwWhcDKdQGGuuJpSM2G+W2lpECT7qJIQ==", "dependencies": { "@types/cordova": "latest" }, @@ -701,8 +719,9 @@ } }, "node_modules/@awesome-cordova-plugins/network": { - "version": "6.7.0", - "license": "MIT", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/network/-/network-6.12.0.tgz", + "integrity": "sha512-OfABeOxj2Uwrl/py+frSJs/g4nFheM62rkQnT1/bTG+hU8zZo8KqccsHQVekU0YCjRbTZ7uIKWtM+6L6DaekVw==", "dependencies": { "@types/cordova": "latest" }, @@ -712,8 +731,9 @@ } }, "node_modules/@awesome-cordova-plugins/secure-storage": { - "version": "6.7.0", - "license": "MIT", + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/@awesome-cordova-plugins/secure-storage/-/secure-storage-6.12.0.tgz", + "integrity": "sha512-p9lSVRg7tOGMogavX7hUug8dNhV/jTy2r1td3Snb+ZLfsgJMG2CQR/O6ybBnbKISYgguPQOZhbJ3OWRH1TbzGw==", "dependencies": { "@types/cordova": "latest" }, @@ -2517,24 +2537,25 @@ } }, "node_modules/@capacitor-community/keep-awake": { - "version": "5.0.0", - "license": "MIT", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@capacitor-community/keep-awake/-/keep-awake-5.0.1.tgz", + "integrity": "sha512-5ZeJ5DQE5Aa1NwzD1kKv8IkHoLwKhkGYlURWHh4/SDrug0KBaGocKuk1q1TAk1nsCs6ndbSsEvUt2LZDoPo9SQ==", "peerDependencies": { "@capacitor/core": "^6.0.0" } }, "node_modules/@capacitor/app": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@capacitor/app/-/app-6.0.1.tgz", - "integrity": "sha512-0kXbOl7LPPMFVcAii3u/7Ps0DvXlr7dtHT97r9J1faDlgdQLQUvtGp48tjvFm48gqHI0aOPRJnTBr5JXW4ETYg==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@capacitor/app/-/app-6.0.2.tgz", + "integrity": "sha512-SiGTGgslK4TbWJVImCUL1odul7/YFkVfkYtAYS9AAEzQpxBECBeRnuN3FFBcfZ9eiN1XxFBFchhiwpxtx/c7yQ==", "peerDependencies": { "@capacitor/core": "^6.0.0" } }, "node_modules/@capacitor/app-launcher": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@capacitor/app-launcher/-/app-launcher-6.0.2.tgz", - "integrity": "sha512-g1hLHTnb7240HYcM28TBN3HbCkc6HV4242sj5/xxQyQ4N4R61DfJLpZDLtp0Wq9WkLlFCJ2B2svHU7ZvA3Tvgg==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@capacitor/app-launcher/-/app-launcher-6.0.3.tgz", + "integrity": "sha512-gQFT2FUC/MD7VfIg4EZRfwJ8mpzsZxa/n7a9NAbFoFW+0WD252PpquGBvvno0w4r3OIiMBFh2C/DYfoxQAmXpg==", "peerDependencies": { "@capacitor/core": "^6.0.0" } @@ -2592,49 +2613,49 @@ } }, "node_modules/@capacitor/core": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.1.2.tgz", - "integrity": "sha512-xFy1/4qLFLp5WCIzIhtwUuVNNoz36+V7/BzHmLqgVJcvotc4MMjswW/TshnPQaLLujEOaLkA4h8ZJ0uoK3ImGg==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@capacitor/core/-/core-6.2.0.tgz", + "integrity": "sha512-B9IlJtDpUqhhYb+T8+cp2Db/3RETX36STgjeU2kQZBs/SLAcFiMama227o+msRjLeo3DO+7HJjWVA1+XlyyPEg==", "dependencies": { "tslib": "^2.1.0" } }, "node_modules/@capacitor/device": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@capacitor/device/-/device-6.0.1.tgz", - "integrity": "sha512-Tlz67DAO5GKb5YAfupXiENZxDww6mHnG9iKI+8D5SVF82VLpEv5r9qwKtiounuQB2y2HWiHV8tlOk7DqnLVUqQ==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@capacitor/device/-/device-6.0.2.tgz", + "integrity": "sha512-WDUxUkkuqEtbmE1YmyDzzGVJD8r5oRFgs/1zy+Xa7Da3MlBrgKaiQKZoRVdr6FTnAVyHnVP4LabN3w2sCuA3+A==", "peerDependencies": { "@capacitor/core": "^6.0.0" } }, "node_modules/@capacitor/ios": { - "version": "6.1.2", - "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-6.1.2.tgz", - "integrity": "sha512-HaeW68KisBd/7TmavzPDlL2bpoDK5AjR2ZYrqU4TlGwM88GtQfvduBCAlSCj20X0w/4+rWMkseD9dAAkacjiyQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/@capacitor/ios/-/ios-6.2.0.tgz", + "integrity": "sha512-gisvZBIrKT1siiumgpLPY63HmJe69Ed/dOmfQQ+U1MIJmOR5gWGWvfO7QSj/FMatVZS4Xt/8jCoUgzDD1U6kSw==", "peerDependencies": { - "@capacitor/core": "^6.1.0" + "@capacitor/core": "^6.2.0" } }, "node_modules/@capacitor/splash-screen": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@capacitor/splash-screen/-/splash-screen-6.0.2.tgz", - "integrity": "sha512-WC0KYZ+ev15up03xs4fTnoTKwBVUSxXsKKQr/8XAncvi/nAG8qrpanW8OlavSC5zF5e1IZZDLsI2GSv0SkZ7VQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@capacitor/splash-screen/-/splash-screen-6.0.3.tgz", + "integrity": "sha512-tpVljeNGSwVCIc8lMQkyiCQFokk2PwgYPdDtPnGjFthqmXW/WhIxW8QYl4MUqyLwwgwTEbp4u3Kcv2zqQu2L6Q==", "peerDependencies": { "@capacitor/core": "^6.0.0" } }, "node_modules/@capacitor/status-bar": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-6.0.1.tgz", - "integrity": "sha512-Usd9hZZQVAqy+jJfL7jRcYI7dcsxN09Na1yttwdl+F1bk3Ztoukk7CGPDm5VgKUSs53ihQBOy1+sczCACxhNiw==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/@capacitor/status-bar/-/status-bar-6.0.2.tgz", + "integrity": "sha512-AmRIX6QvFemItlY7/69ARkIAqitRQqJ2qwgZmD1KqgFb78pH+XFXm1guvS/a8CuOOm/IqZ4ddDbl20yxtBqzGA==", "peerDependencies": { "@capacitor/core": "^6.0.0" } }, "node_modules/@capacitor/text-zoom": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/@capacitor/text-zoom/-/text-zoom-6.0.2.tgz", - "integrity": "sha512-CP7CsdaN45zud6XAA/NKjZ9Gw0vX2KtMIj82oSW4GK93wkc+6qa8PiTB9ZeDYRoGWc6EaEA3UmL+15ktBP805w==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/@capacitor/text-zoom/-/text-zoom-6.0.3.tgz", + "integrity": "sha512-OaB92suKBzWnVufrCMNuuKCukbc5pv4RvHOV/jTN86CpTASva9TkLhv9uqPFwrhs/C09JouQOxpYNJ1Cyzbqcg==", "peerDependencies": { "@capacitor/core": "^6.0.0" } @@ -2657,7 +2678,9 @@ } }, "node_modules/@capawesome/capacitor-screen-orientation": { - "version": "6.0.0", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@capawesome/capacitor-screen-orientation/-/capacitor-screen-orientation-6.0.1.tgz", + "integrity": "sha512-NP6ERUkOTf5LslD3mVx6XBZi4l1CfHohpv+rkgay8101fpccsHdxELAAiMe62F+5nloUl/thWhNYAkgmqff88A==", "funding": [ { "type": "github", @@ -2668,7 +2691,6 @@ "url": "https://opencollective.com/capawesome" } ], - "license": "MIT", "peerDependencies": { "@capacitor/core": "^6.0.0" } @@ -2786,121 +2808,40 @@ } }, "node_modules/@ionic/angular": { - "version": "7.5.8", - "license": "MIT", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@ionic/angular/-/angular-8.4.0.tgz", + "integrity": "sha512-ivgHk76zpu6EZZlxXj5+FUqGwFKotWhDDA9YRltd2QCnQN+7kwacQk7KFInQ5Sd8RJT98mKFG3oOpyx5gFrBdA==", "dependencies": { - "@ionic/core": "7.5.8", + "@ionic/core": "8.4.0", "ionicons": "^7.0.0", "jsonc-parser": "^3.0.0", "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/core": ">=14.0.0", - "@angular/forms": ">=14.0.0", - "@angular/router": ">=14.0.0", + "@angular/core": ">=16.0.0", + "@angular/forms": ">=16.0.0", + "@angular/router": ">=16.0.0", "rxjs": ">=7.5.0", - "zone.js": ">=0.11.0" + "zone.js": ">=0.13.0" } }, "node_modules/@ionic/angular-toolkit": { - "version": "10.1.1", - "dev": true, - "license": "MIT", - "dependencies": { - "@angular-devkit/core": "^16.0.0", - "@angular-devkit/schematics": "^16.0.0", - "@schematics/angular": "^16.0.0" - } - }, - "node_modules/@ionic/angular-toolkit/node_modules/@angular-devkit/core": { - "version": "16.2.14", - "dev": true, - "license": "MIT", - "dependencies": { - "ajv": "8.12.0", - "ajv-formats": "2.1.1", - "jsonc-parser": "3.2.0", - "picomatch": "2.3.1", - "rxjs": "7.8.1", - "source-map": "0.7.4" - }, - "engines": { - "node": "^16.14.0 || >=18.10.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - }, - "peerDependencies": { - "chokidar": "^3.5.2" - }, - "peerDependenciesMeta": { - "chokidar": { - "optional": true - } - } - }, - "node_modules/@ionic/angular-toolkit/node_modules/@angular-devkit/schematics": { - "version": "16.2.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@angular-devkit/core": "16.2.14", - "jsonc-parser": "3.2.0", - "magic-string": "0.30.1", - "ora": "5.4.1", - "rxjs": "7.8.1" - }, - "engines": { - "node": "^16.14.0 || >=18.10.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, - "node_modules/@ionic/angular-toolkit/node_modules/@schematics/angular": { - "version": "16.2.14", - "dev": true, - "license": "MIT", - "dependencies": { - "@angular-devkit/core": "16.2.14", - "@angular-devkit/schematics": "16.2.14", - "jsonc-parser": "3.2.0" - }, - "engines": { - "node": "^16.14.0 || >=18.10.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - } - }, - "node_modules/@ionic/angular-toolkit/node_modules/jsonc-parser": { - "version": "3.2.0", - "dev": true, - "license": "MIT" - }, - "node_modules/@ionic/angular-toolkit/node_modules/magic-string": { - "version": "0.30.1", + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/@ionic/angular-toolkit/-/angular-toolkit-11.0.1.tgz", + "integrity": "sha512-dxx2RDbxDYM2nWRPIirKMJySHtqJ1u02T25PGbNb99W2Wlcmu1cza3+2/PQ8ga18yMz/dQqaGyEmPDf3ZSVO0w==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@ionic/angular-toolkit/node_modules/picomatch": { - "version": "2.3.1", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "@angular-devkit/core": "^17.0.0", + "@angular-devkit/schematics": "^17.0.0", + "@schematics/angular": "^17.0.0" } }, "node_modules/@ionic/cli": { "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@ionic/cli/-/cli-7.2.0.tgz", + "integrity": "sha512-IEms9Df8mJOoWPqgvZEXmqKztttHDFAz+9ewDPZGYv8Xx66Cj7zSen13O2Vf4FuLXhl+U95HXT9sAs4lDwFmcQ==", "dev": true, - "license": "MIT", "dependencies": { "@ionic/cli-framework": "6.0.1", "@ionic/cli-framework-output": "2.2.8", @@ -3306,11 +3247,12 @@ } }, "node_modules/@ionic/core": { - "version": "7.5.8", - "license": "MIT", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/@ionic/core/-/core-8.4.0.tgz", + "integrity": "sha512-mZ2Ni9QByFGWBNr5W/F/nyPV+cXLhK+6W5BRziy7QPX6YIS57KH8FpY+CjE7BEcpE78anyY49bZt3eOWcES02g==", "dependencies": { - "@stencil/core": "^4.8.1", - "ionicons": "^7.2.1", + "@stencil/core": "4.20.0", + "ionicons": "^7.2.2", "tslib": "^2.1.0" } }, @@ -3777,21 +3719,6 @@ "rxjs": "^6.5.3 || ^7.5.0" } }, - "node_modules/@ngtools/webpack": { - "version": "17.3.7", - "dev": true, - "license": "MIT", - "engines": { - "node": "^18.13.0 || >=20.9.0", - "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", - "yarn": ">= 1.13.0" - }, - "peerDependencies": { - "@angular/compiler-cli": "^17.0.0", - "typescript": ">=5.2 <5.5", - "webpack": "^5.54.0" - } - }, "node_modules/@ngx-translate/core": { "version": "15.0.0", "license": "SEE LICENSE IN LICENSE", @@ -4963,7 +4890,9 @@ "license": "MIT" }, "node_modules/@stencil/core": { - "version": "4.16.0", + "version": "4.20.0", + "resolved": "https://registry.npmjs.org/@stencil/core/-/core-4.20.0.tgz", + "integrity": "sha512-WPrTHFngvN081RY+dJPneKQLwnOFD60OMCOQGmmSHfCW0f4ujPMzzhwWU1gcSwXPWXz5O+8cBiiCaxAbJU7kAg==", "license": "MIT", "bin": { "stencil": "bin/stencil" @@ -9775,7 +9704,9 @@ } }, "node_modules/ionicons": { - "version": "7.3.1", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/ionicons/-/ionicons-7.4.0.tgz", + "integrity": "sha512-ZK94MMqgzMCPPMhmk8Ouu6goyVHFIlw/ACP6oe3FrikcI0N7CX0xcwVaEbUc0G/v3W0shI93vo+9ve/KpvcNhQ==", "license": "MIT", "dependencies": { "@stencil/core": "^4.0.3" @@ -16095,8 +16026,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "license": "Apache-2.0", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/package.json b/package.json index 242f21c824..751cb32d6f 100644 --- a/package.json +++ b/package.json @@ -57,21 +57,21 @@ "@angular/platform-browser": "^17.3.9", "@angular/platform-browser-dynamic": "^17.3.9", "@angular/router": "^17.3.9", - "@awesome-cordova-plugins/core": "^6.4.0", - "@awesome-cordova-plugins/is-debug": "^6.4.0", - "@awesome-cordova-plugins/network": "^6.4.0", - "@awesome-cordova-plugins/secure-storage": "^6.4.0", - "@capacitor-community/keep-awake": "^5.0.0", - "@capacitor/app": "^6.0.1", - "@capacitor/app-launcher": "^6.0.2", - "@capacitor/core": "^6.1.2", - "@capacitor/device": "^6.0.1", - "@capacitor/ios": "^6.1.2", - "@capacitor/splash-screen": "^6.0.2", - "@capacitor/status-bar": "^6.0.1", - "@capacitor/text-zoom": "^6.0.2", + "@awesome-cordova-plugins/core": "^6.12.0", + "@awesome-cordova-plugins/is-debug": "^6.12.0", + "@awesome-cordova-plugins/network": "^6.12.0", + "@awesome-cordova-plugins/secure-storage": "^6.12.0", + "@capacitor-community/keep-awake": "^5.0.1", + "@capacitor/app": "^6.0.2", + "@capacitor/app-launcher": "^6.0.3", + "@capacitor/core": "^6.2.0", + "@capacitor/device": "^6.0.2", + "@capacitor/ios": "^6.2.0", + "@capacitor/splash-screen": "^6.0.3", + "@capacitor/status-bar": "^6.0.2", + "@capacitor/text-zoom": "^6.0.3", "@capawesome/capacitor-managed-configurations": "^6.0.0", - "@capawesome/capacitor-screen-orientation": "^6.0.0", + "@capawesome/capacitor-screen-orientation": "^6.0.1", "@dvsa/capacitor-plugin-asam": "^1.0.1", "@dvsa/mes-config-schema": "1.9.1", "@dvsa/mes-driver-schema": "^0.0.2", @@ -81,8 +81,8 @@ "@dvsa/mes-search-schema": "1.3.0", "@dvsa/mes-test-schema": "3.43.1", "@ionic-enterprise/auth": "3.9.5", - "@ionic/angular": "~7.5.7", - "@ionic/core": "~7.5.7", + "@ionic/angular": "^8.4.0", + "@ionic/core": "^8.4.0", "@ionic/storage-angular": "^4.0.0", "@ng-bootstrap/ng-bootstrap": "^16.0.0", "@ngrx/effects": "^17.2.0", @@ -134,8 +134,8 @@ "@biomejs/biome": "1.8.3", "@capacitor/cli": "^6.0.0", "@dvsa/biome-config": "^0.1.0", - "@ionic/angular-toolkit": "^10.0.0", - "@ionic/cli": "^7.1.5", + "@ionic/angular-toolkit": "^11.0.0", + "@ionic/cli": "^7.2.0", "@sentry/cli": "^2.37.0", "@types/deep-diff": "^1.0.5", "@types/hammerjs": "^2.0.45", @@ -162,7 +162,7 @@ "snyk": "^1.1253.0", "sonar-scanner": "^3.1.0", "ts-node": "~10.9.1", - "typescript": "~5.2.2", + "typescript": "~5.4.5", "xml2js": "^0.6.2" }, "cordova": { diff --git a/src/app/pages/candidate-details/__tests__/candidate-details.page.spec.ts b/src/app/pages/candidate-details/__tests__/candidate-details.page.spec.ts index 4f8a6f00de..b467f804a2 100644 --- a/src/app/pages/candidate-details/__tests__/candidate-details.page.spec.ts +++ b/src/app/pages/candidate-details/__tests__/candidate-details.page.spec.ts @@ -1,12 +1,12 @@ import { ComponentFixture, TestBed, fakeAsync, waitForAsync } from '@angular/core/testing'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { Router } from '@angular/router'; import { DataRowCustomComponent } from '@components/common/data-row-custom/data-row-custom'; import { DataRowComponent } from '@components/common/data-row/data-row'; import { DisplayAddressComponent } from '@components/common/display-address/display-address'; import { InappropriateUseBannerComponent } from '@components/common/inappropriate-use-banner/inappropriate-use-banner'; -import { Application, TestSlot } from '@dvsa/mes-journal-schema'; +import { Application } from '@dvsa/mes-journal-schema'; import { SearchResultTestSchema } from '@dvsa/mes-search-schema'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; import { RouterMock } from '@mocks/angular-mocks/router-mock'; @@ -32,36 +32,6 @@ describe('CandidateDetailsPage', () => { let fixture: ComponentFixture; let store$: MockStore; - const mockNavParams = { - get: (param: string) => { - const data = { - slot: { - slotDetail: { - slotId: 123, - start: '123', - }, - booking: { - candidate: { - candidateName: { - firstName: 'Tim', - lastName: 'Burr', - title: 'Mr', - }, - driverNumber: 'ABC123', - }, - application: { - testCategory: TestCategory.B, - meetingPlace: 'Somewhere', - }, - business: {}, - }, - } as TestSlot, - slotChanged: false, - }; - return data[param]; - }, - }; - const initialState = { journal: { slots: { @@ -86,7 +56,6 @@ describe('CandidateDetailsPage', () => { providers: [ { provide: DateTimeProvider, useClass: DateTimeProviderMock }, { provide: ModalController, useClass: ModalControllerMock }, - { provide: NavParams, useValue: mockNavParams }, { provide: Router, useClass: RouterMock }, { provide: SlotProvider, useClass: SlotProvider }, { provide: AppConfigProvider, useClass: AppConfigProviderMock }, diff --git a/src/app/pages/candidate-details/candidate-details.page.html b/src/app/pages/candidate-details/candidate-details.page.html index a2446663a6..9fbe15957b 100644 --- a/src/app/pages/candidate-details/candidate-details.page.html +++ b/src/app/pages/candidate-details/candidate-details.page.html @@ -3,8 +3,8 @@ {{ restrictDetails ? 'ADI Enforcement Activities' : 'Test details - ' + pageState.name }} - - + + Close diff --git a/src/app/pages/candidate-details/candidate-details.page.ts b/src/app/pages/candidate-details/candidate-details.page.ts index 465f53f2e6..68fb87f459 100644 --- a/src/app/pages/candidate-details/candidate-details.page.ts +++ b/src/app/pages/candidate-details/candidate-details.page.ts @@ -1,10 +1,10 @@ -import { Component, OnDestroy, OnInit } from '@angular/core'; +import { Component, Input, OnDestroy, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { Business, TestSlot } from '@dvsa/mes-journal-schema'; import { ActivityCode, SearchResultTestSchema } from '@dvsa/mes-search-schema'; import { ApplicationReference } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { ModalController, NavParams, ViewDidEnter } from '@ionic/angular'; +import { ModalController, ViewDidEnter } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { SlotProvider } from '@providers/slot/slot'; import { formatApplicationReference } from '@shared/helpers/formatters'; @@ -47,12 +47,17 @@ interface CandidateDetailsPageState { styleUrls: ['candidate-details.page.scss'], }) export class CandidateDetailsPage implements OnInit, OnDestroy, ViewDidEnter { + @Input() + public slots: TestSlot[]; + @Input() + public slot: TestSlot; + @Input() + public slotChanged: boolean; + @Input() + public isTeamJournal: boolean; + pageState: CandidateDetailsPageState; selectedDate: string; - slot: TestSlot; - slots: TestSlot[]; - slotChanged = false; - isTeamJournal = false; testCategory: TestCategory = null; idPrefix = 'candidate-details'; prevSlot: TestSlot; @@ -62,7 +67,6 @@ export class CandidateDetailsPage implements OnInit, OnDestroy, ViewDidEnter { constructor( public modalController: ModalController, - public navParams: NavParams, public store$: Store, public router: Router, public slotProvider: SlotProvider @@ -74,19 +78,8 @@ export class CandidateDetailsPage implements OnInit, OnDestroy, ViewDidEnter { } ngOnInit(): void { - const navSlot = this.navParams.get('slot'); - const navSlots = this.navParams.get('slots'); - this.slotChanged = this.navParams.get('slotChanged'); - this.isTeamJournal = this.navParams.get('isTeamJournal'); - - // if `slot` is not defined, then use the slot value from `navParams` - // it will be undefined, when using the next/prev buttons as the value wouldn't be set via the Journal navigation - if (!this.slot) this.slot = navSlot; - // if `slots` is defined, we want to determine the prev/next slots using the navSlots - if (navSlots) { - if (!this.slots) this.slots = navSlots; - + if (this.slots) { // some slot types won't be displayed in the candidate details page (Corporate Connectivity), we remove those here this.slots = this.slots.filter((slot) => !!slot?.booking?.candidate); diff --git a/src/app/pages/confirm-test-details/components/confirm-submit-modal/__tests__/submit-modal.spec.ts b/src/app/pages/confirm-test-details/components/confirm-submit-modal/__tests__/submit-modal.spec.ts index 7a30e35216..4ca888d8d5 100644 --- a/src/app/pages/confirm-test-details/components/confirm-submit-modal/__tests__/submit-modal.spec.ts +++ b/src/app/pages/confirm-test-details/components/confirm-submit-modal/__tests__/submit-modal.spec.ts @@ -4,18 +4,14 @@ import { FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { provideMockStore } from '@ngrx/store/testing'; -import { JournalEarlyStartModalMock } from '@pages/journal/components/journal-early-start-modal/__mocks__/journal-early-start-modal.mock'; -import { NavParamsMock } from '@pages/journal/components/journal-early-start-modal/__mocks__/nav-params.mock'; import { ConfirmSubmitModal } from '../confirm-submit-modal'; describe('ConfirmSubmitModal', () => { let modalFixture: ComponentFixture; let modalComponent: ConfirmSubmitModal; - const mockFile: JournalEarlyStartModalMock = new JournalEarlyStartModalMock(); - const navMock: NavParamsMock = new NavParamsMock(); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ @@ -26,16 +22,10 @@ describe('ConfirmSubmitModal', () => { provide: ModalController, useClass: ModalControllerMock, }, - { - provide: NavParams, - useFactory: () => navMock, - }, provideMockStore({}), ], }); - const mockValue = mockFile.mockSlotDetail(); - spyOn(navMock, 'get').and.returnValue(mockValue); modalFixture = TestBed.createComponent(ConfirmSubmitModal); modalComponent = modalFixture.componentInstance; spyOn(modalComponent.modalController, 'dismiss').and.returnValue(Promise.resolve(true)); diff --git a/src/app/pages/dashboard/dashboard.page.html b/src/app/pages/dashboard/dashboard.page.html index 43019443fd..c2f0ada3e9 100644 --- a/src/app/pages/dashboard/dashboard.page.html +++ b/src/app/pages/dashboard/dashboard.page.html @@ -59,10 +59,10 @@

{{todaysDateFormatted}}

- + - + diff --git a/src/app/pages/delegated-rekey-search/delegated-rekey-search.scss b/src/app/pages/delegated-rekey-search/delegated-rekey-search.scss index da253a5d46..c6ac162485 100644 --- a/src/app/pages/delegated-rekey-search/delegated-rekey-search.scss +++ b/src/app/pages/delegated-rekey-search/delegated-rekey-search.scss @@ -50,9 +50,6 @@ } .search-icon { - display: inline-block; - position: relative; - top: 3px; padding-right: 3px; font-weight: bolder; } diff --git a/src/app/pages/error-page/__tests__/error.spec.ts b/src/app/pages/error-page/__tests__/error.spec.ts index 59fbd1c41a..abb2210293 100644 --- a/src/app/pages/error-page/__tests__/error.spec.ts +++ b/src/app/pages/error-page/__tests__/error.spec.ts @@ -2,8 +2,8 @@ import { ComponentFixture, TestBed, fakeAsync, waitForAsync } from '@angular/cor import { By } from '@angular/platform-browser'; import { ActivatedRoute, Router } from '@angular/router'; import { ErrorMessageComponent } from '@components/common/error-message/error-message'; -import { AlertController, IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ActivatedRouteMock, AlertControllerMock, NavParamsMock, RouterMock } from '@mocks/index.mock'; +import { AlertController, IonicModule, ModalController } from '@ionic/angular'; +import { ActivatedRouteMock, AlertControllerMock, RouterMock } from '@mocks/index.mock'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { provideMockStore } from '@ngrx/store/testing'; import { AuthenticationProviderMock } from '@providers/authentication/__mocks__/authentication.mock'; @@ -28,10 +28,6 @@ describe('ErrorPage', () => { provide: Router, useClass: RouterMock, }, - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: ModalController, useClass: ModalControllerMock, diff --git a/src/app/pages/health-declaration/__tests__/health-declaration.page.spec.ts b/src/app/pages/health-declaration/__tests__/health-declaration.page.spec.ts index 11e7a472dd..1d62d5cd29 100644 --- a/src/app/pages/health-declaration/__tests__/health-declaration.page.spec.ts +++ b/src/app/pages/health-declaration/__tests__/health-declaration.page.spec.ts @@ -7,8 +7,8 @@ import { AppModule } from '@app/app.module'; import { default as welshTranslations } from '@assets/i18n/cy.json'; import { ComponentsModule } from '@components/common/common-components.module'; import { TestSlotAttributes } from '@dvsa/mes-test-schema/categories/common'; -import { AlertController, NavController, NavParams, Platform } from '@ionic/angular'; -import { AlertControllerMock, NavControllerMock, NavParamsMock, PlatformMock, RouterMock } from '@mocks/index.mock'; +import { AlertController, NavController, Platform } from '@ionic/angular'; +import { AlertControllerMock, NavControllerMock, PlatformMock, RouterMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { TranslateModule, TranslateService } from '@ngx-translate/core'; import { HealthDeclarationComponent } from '@pages/health-declaration/components/health-declaration/health-declaration'; @@ -93,10 +93,6 @@ describe('HealthDeclarationPage', () => { provide: AlertController, useClass: AlertControllerMock, }, - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/health-declaration/components/health-declaration-modal/__tests__/health-declaration-modal.spec.ts b/src/app/pages/health-declaration/components/health-declaration-modal/__tests__/health-declaration-modal.spec.ts index 030e8344e0..cfa0fb1685 100644 --- a/src/app/pages/health-declaration/components/health-declaration-modal/__tests__/health-declaration-modal.spec.ts +++ b/src/app/pages/health-declaration/components/health-declaration-modal/__tests__/health-declaration-modal.spec.ts @@ -4,18 +4,14 @@ import { FormsModule } from '@angular/forms'; import { By } from '@angular/platform-browser'; import { RouterModule } from '@angular/router'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { provideMockStore } from '@ngrx/store/testing'; -import { JournalEarlyStartModalMock } from '@pages/journal/components/journal-early-start-modal/__mocks__/journal-early-start-modal.mock'; -import { NavParamsMock } from '@pages/journal/components/journal-early-start-modal/__mocks__/nav-params.mock'; import { HealthDeclarationModal } from '../health-declaration-modal'; describe('healthDeclarationModal', () => { let modalFixture: ComponentFixture; let modalComponent: HealthDeclarationModal; - const mockFile: JournalEarlyStartModalMock = new JournalEarlyStartModalMock(); - const navMock: NavParamsMock = new NavParamsMock(); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ @@ -26,16 +22,10 @@ describe('healthDeclarationModal', () => { provide: ModalController, useClass: ModalControllerMock, }, - { - provide: NavParams, - useFactory: () => navMock, - }, provideMockStore({}), ], }); - const mockValue = mockFile.mockSlotDetail(); - spyOn(navMock, 'get').and.returnValue(mockValue); modalFixture = TestBed.createComponent(HealthDeclarationModal); modalComponent = modalFixture.componentInstance; spyOn(modalComponent.modalController, 'dismiss').and.returnValue(Promise.resolve(true)); diff --git a/src/app/pages/journal/components/journal-early-start-modal/__tests__/journal-early-start-modal.spec.ts b/src/app/pages/journal/components/journal-early-start-modal/__tests__/journal-early-start-modal.spec.ts index 8175b45a19..71d094d635 100644 --- a/src/app/pages/journal/components/journal-early-start-modal/__tests__/journal-early-start-modal.spec.ts +++ b/src/app/pages/journal/components/journal-early-start-modal/__tests__/journal-early-start-modal.spec.ts @@ -5,32 +5,22 @@ import { By } from '@angular/platform-browser'; import { provideMockStore } from '@ngrx/store/testing'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { EarlyStartDidContinue, EarlyStartDidReturn } from '@store/journal/journal.actions'; -import { JournalEarlyStartModalMock } from '../__mocks__/journal-early-start-modal.mock'; -import { NavParamsMock } from '../__mocks__/nav-params.mock'; import { JournalEarlyStartModal } from '../journal-early-start-modal'; import { ModalEvent } from '../journal-early-start-modal.constants'; describe('JournalEarlyStartModal', () => { let modalFixture: ComponentFixture; let modalComponent: JournalEarlyStartModal; - const mockFile: JournalEarlyStartModalMock = new JournalEarlyStartModalMock(); - const navMock: NavParamsMock = new NavParamsMock(); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [JournalEarlyStartModal], imports: [CommonModule, FormsModule, IonicModule, ComponentsModule], - providers: [ - { provide: ModalController, useClass: ModalControllerMock }, - { provide: NavParams, useFactory: () => navMock }, - provideMockStore({}), - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }, provideMockStore({})], }); - const mockValue = mockFile.mockSlotDetail(); - spyOn(navMock, 'get').and.returnValue(mockValue); modalFixture = TestBed.createComponent(JournalEarlyStartModal); modalComponent = modalFixture.componentInstance; spyOn(modalComponent, 'getStartTime'); @@ -39,12 +29,6 @@ describe('JournalEarlyStartModal', () => { })); describe('DOM', () => { - it('should return slot details from nav param', () => { - modalFixture.detectChanges(); - const slotData = modalComponent.getSlotData(); - const mockValue = mockFile.mockSlotDetail(); - expect(slotData).toEqual(mockValue); - }); it('should call onStart when the Start test button is clicked', () => { modalFixture.detectChanges(); spyOn(modalComponent, 'onStart').and.callThrough(); diff --git a/src/app/pages/journal/components/journal-early-start-modal/journal-early-start-modal.ts b/src/app/pages/journal/components/journal-early-start-modal/journal-early-start-modal.ts index 9bdb98ede6..2fd71f3862 100644 --- a/src/app/pages/journal/components/journal-early-start-modal/journal-early-start-modal.ts +++ b/src/app/pages/journal/components/journal-early-start-modal/journal-early-start-modal.ts @@ -1,6 +1,6 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { SlotDetail } from '@dvsa/mes-journal-schema'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { Store } from '@ngrx/store'; import { StoreModel } from '@shared/models/store.model'; import { EarlyStartDidContinue, EarlyStartDidReturn } from '@store/journal/journal.actions'; @@ -13,19 +13,15 @@ import { ModalEvent } from './journal-early-start-modal.constants'; templateUrl: './journal-early-start-modal.html', styleUrls: ['./journal-early-start-modal.scss'], }) -export class JournalEarlyStartModal implements OnInit { +export class JournalEarlyStartModal { + @Input() private slotData: SlotDetail; constructor( public store$: Store, - public modalController: ModalController, - private params: NavParams + public modalController: ModalController ) {} - ngOnInit(): void { - this.slotData = this.params.get('slotData'); - } - getSlotData() { return this.slotData; } diff --git a/src/app/pages/journal/components/journal-future-test-modal/__tests__/journal-future-test-modal.spec.ts b/src/app/pages/journal/components/journal-future-test-modal/__tests__/journal-future-test-modal.spec.ts index 2b8ce1d565..e0a9135963 100644 --- a/src/app/pages/journal/components/journal-future-test-modal/__tests__/journal-future-test-modal.spec.ts +++ b/src/app/pages/journal/components/journal-future-test-modal/__tests__/journal-future-test-modal.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { ModalEvent } from '@pages/journal/components/journal-rekey-modal/journal-rekey-modal.constants'; import { DeviceProviderMock } from '@providers/device/__mocks__/device.mock'; import { DeviceProvider } from '@providers/device/device'; @@ -20,7 +20,6 @@ describe('JournalRekeyModal', () => { declarations: [JournalFutureTestModal], imports: [IonicModule, ComponentsModule], providers: [ - { provide: NavParams, useClass: NavParamsMock }, { provide: ModalController, useClass: ModalControllerMock }, { provide: DeviceProvider, useClass: DeviceProviderMock }, { provide: LogHelper, useClass: LogHelperMock }, diff --git a/src/app/pages/journal/components/journal-rekey-modal/__tests__/journal-rekey-modal.spec.ts b/src/app/pages/journal/components/journal-rekey-modal/__tests__/journal-rekey-modal.spec.ts index cdbce5f2a5..c5b5ebef69 100644 --- a/src/app/pages/journal/components/journal-rekey-modal/__tests__/journal-rekey-modal.spec.ts +++ b/src/app/pages/journal/components/journal-rekey-modal/__tests__/journal-rekey-modal.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { DeviceProviderMock } from '@providers/device/__mocks__/device.mock'; import { DeviceProvider } from '@providers/device/device'; import { LogHelperMock } from '@providers/logs/__mocks__/logs-helper.mock'; @@ -20,7 +20,6 @@ describe('JournalRekeyModal', () => { declarations: [JournalRekeyModal], imports: [IonicModule, ComponentsModule], providers: [ - { provide: NavParams, useClass: NavParamsMock }, { provide: ModalController, useClass: ModalControllerMock }, { provide: DeviceProvider, useClass: DeviceProviderMock }, { provide: LogHelper, useClass: LogHelperMock }, diff --git a/src/app/pages/journal/journal.module.ts b/src/app/pages/journal/journal.module.ts index 1587868413..1efa26661a 100644 --- a/src/app/pages/journal/journal.module.ts +++ b/src/app/pages/journal/journal.module.ts @@ -1,6 +1,6 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; -import { IonicModule, NavParams } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { EffectsModule } from '@ngrx/effects'; import { ComponentsModule } from '@components/common/common-components.module'; @@ -36,7 +36,6 @@ import { JournalPage } from './journal.page'; providers: [ OrientationMonitorProvider, JournalProvider, - NavParams, SlotProvider, SlotSelectorProvider, CompressionProvider, diff --git a/src/app/pages/office/cat-b/__tests__/office.cat-b.page.spec.ts b/src/app/pages/office/cat-b/__tests__/office.cat-b.page.spec.ts index a937f0dea2..de0a15fb35 100644 --- a/src/app/pages/office/cat-b/__tests__/office.cat-b.page.spec.ts +++ b/src/app/pages/office/cat-b/__tests__/office.cat-b.page.spec.ts @@ -4,8 +4,8 @@ import { By } from '@angular/platform-browser'; import { ActivityCodeComponent } from '@components/common/activity-code/activity-code'; import { ComponentsModule } from '@components/common/common-components.module'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavController, NavParams, Platform, ToastController } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, NavController, Platform, ToastController } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { DrivingFaultsComponent } from '@pages/office/components/driving-faults/driving-faults.component'; import { OfficeFooterComponent } from '@pages/office/components/office-footer/office-footer.component'; @@ -155,7 +155,6 @@ describe('OfficeCatBPage', () => { { provide: AuthenticationProvider, useClass: AuthenticationProviderMock }, { provide: NavController, useClass: NavControllerMock }, { provide: ToastController, useClass: ToastControllerMock }, - { provide: NavParams, useClass: NavParamsMock }, { provide: ModalController, useClass: ModalControllerMock }, { provide: OutcomeBehaviourMapProvider, useClass: OutcomeBehaviourMapProviderMock }, WeatherConditionProvider, diff --git a/src/app/pages/office/cat-b/office.cat-b.module.ts b/src/app/pages/office/cat-b/office.cat-b.module.ts index 92b6a7676f..f0e9bbce4e 100644 --- a/src/app/pages/office/cat-b/office.cat-b.module.ts +++ b/src/app/pages/office/cat-b/office.cat-b.module.ts @@ -2,7 +2,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { ReactiveFormsModule } from '@angular/forms'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, NavParams } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { EffectsModule } from '@ngrx/effects'; import { OfficeCatBPageRoutingModule } from '@pages/office/cat-b/office.cat-b-routing.module'; import { OfficeComponentsModule } from '@pages/office/components/office.components.module'; @@ -24,6 +24,6 @@ import { OfficeCatBPage } from './office.cat-b.page'; CommonModule, WaitingRoomToCarComponentsModule, ], - providers: [FaultSummaryProvider, NavParams], + providers: [FaultSummaryProvider], }) export class OfficeCatBPageModule {} diff --git a/src/app/pages/office/office.page.scss b/src/app/pages/office/office.page.scss index 9a67940f3a..d328705811 100644 --- a/src/app/pages/office/office.page.scss +++ b/src/app/pages/office/office.page.scss @@ -170,7 +170,7 @@ } .office-button { - width: 320px; + width: 344px; min-height: 56px; } diff --git a/src/app/pages/rekey-reason/components/upload-rekey-modal/__tests__/upload-rekey-modal.spec.ts b/src/app/pages/rekey-reason/components/upload-rekey-modal/__tests__/upload-rekey-modal.spec.ts index 6f49bade96..81ed90a3d0 100644 --- a/src/app/pages/rekey-reason/components/upload-rekey-modal/__tests__/upload-rekey-modal.spec.ts +++ b/src/app/pages/rekey-reason/components/upload-rekey-modal/__tests__/upload-rekey-modal.spec.ts @@ -1,7 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; import { AppModule } from '@app/app.module'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; @@ -15,10 +14,7 @@ describe('UploadRekeyModal', () => { TestBed.configureTestingModule({ declarations: [UploadRekeyModal], imports: [IonicModule, AppModule], - providers: [ - { provide: NavParams, useClass: NavParamsMock }, - { provide: ModalController, useClass: ModalControllerMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(UploadRekeyModal); diff --git a/src/app/pages/rekey-reason/components/upload-rekey-modal/upload-rekey-modal.ts b/src/app/pages/rekey-reason/components/upload-rekey-modal/upload-rekey-modal.ts index 18b6f772c8..29e324fa86 100644 --- a/src/app/pages/rekey-reason/components/upload-rekey-modal/upload-rekey-modal.ts +++ b/src/app/pages/rekey-reason/components/upload-rekey-modal/upload-rekey-modal.ts @@ -1,5 +1,5 @@ -import { Component } from '@angular/core'; -import { ModalController, NavParams } from '@ionic/angular'; +import { Component, Input } from '@angular/core'; +import { ModalController } from '@ionic/angular'; import { UploadRekeyModalEvent } from './upload-rekey-modal.constants'; @Component({ @@ -8,14 +8,10 @@ import { UploadRekeyModalEvent } from './upload-rekey-modal.constants'; styleUrls: ['upload-rekey-modal.scss'], }) export class UploadRekeyModal { + @Input() retryMode = false; - constructor( - private modalCtrl: ModalController, - public params: NavParams - ) { - this.retryMode = params.get('retryMode'); - } + constructor(private modalCtrl: ModalController) {} async onCancel(): Promise { await this.modalCtrl.dismiss(UploadRekeyModalEvent.CANCEL); diff --git a/src/app/pages/rekey-search/rekey-search.scss b/src/app/pages/rekey-search/rekey-search.scss index 1a9cf30d82..fbfe4c8409 100644 --- a/src/app/pages/rekey-search/rekey-search.scss +++ b/src/app/pages/rekey-search/rekey-search.scss @@ -50,9 +50,6 @@ } .search-icon { - display: inline-block; - position: relative; - top: 3px; padding-right: 3px; font-weight: bolder; } diff --git a/src/app/pages/test-centre-journal/components/candidate-search-card/__tests__/candidate-search-card.spec.ts b/src/app/pages/test-centre-journal/components/candidate-search-card/__tests__/candidate-search-card.spec.ts index e92ddeb9f0..577fb4ef42 100644 --- a/src/app/pages/test-centre-journal/components/candidate-search-card/__tests__/candidate-search-card.spec.ts +++ b/src/app/pages/test-centre-journal/components/candidate-search-card/__tests__/candidate-search-card.spec.ts @@ -1,10 +1,11 @@ import { CommonModule } from '@angular/common'; import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { provideMockStore } from '@ngrx/store/testing'; import { ComponentsModule } from '@components/common/common-components.module'; import { TestCentre } from '@dvsa/mes-journal-schema'; +import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { TestCentreDetailResponse } from '@shared/models/test-centre-journal.model'; import { TestCentreJournalComponentsModule } from '../../test-centre-journal-components.module'; import * as mockData from '../__mocks__/candidate-search-card.mock'; @@ -18,7 +19,7 @@ describe('CandidateSearchCardComponent', () => { TestBed.configureTestingModule({ declarations: [CandidateSearchCardComponent], imports: [IonicModule, CommonModule, ComponentsModule, TestCentreJournalComponentsModule], - providers: [provideMockStore({ initialState: {} })], + providers: [{ provide: ModalController, useClass: ModalControllerMock }, provideMockStore({ initialState: {} })], }); fixture = TestBed.createComponent(CandidateSearchCardComponent); diff --git a/src/app/pages/test-report/cat-a-mod1/__tests__/test-report.cat-a-mod1.page.spec.ts b/src/app/pages/test-report/cat-a-mod1/__tests__/test-report.cat-a-mod1.page.spec.ts index 3b70ca0dcf..ebd097addb 100644 --- a/src/app/pages/test-report/cat-a-mod1/__tests__/test-report.cat-a-mod1.page.spec.ts +++ b/src/app/pages/test-report/cat-a-mod1/__tests__/test-report.cat-a-mod1.page.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { MockComponent } from 'ng-mocks'; import { By } from '@angular/platform-browser'; @@ -87,10 +87,6 @@ describe('TestReportCatAMod1Page', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-a-mod1/components/activity-code-4-modal/__tests__/activity-code-4-modal.spec.ts b/src/app/pages/test-report/cat-a-mod1/components/activity-code-4-modal/__tests__/activity-code-4-modal.spec.ts index 4d7abbd319..d264dd0bab 100644 --- a/src/app/pages/test-report/cat-a-mod1/components/activity-code-4-modal/__tests__/activity-code-4-modal.spec.ts +++ b/src/app/pages/test-report/cat-a-mod1/components/activity-code-4-modal/__tests__/activity-code-4-modal.spec.ts @@ -2,9 +2,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { AppModule } from '@app/app.module'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; -import { NavParamsMock } from '@pages/journal/components/journal-early-start-modal/__mocks__/nav-params.mock'; import { ModalEvent } from '../../../../test-report.constants'; import { ActivityCode4Modal } from '../activity-code-4-modal'; @@ -12,16 +11,12 @@ describe('ActivityCode4Modal', () => { let fixture: ComponentFixture; let component: ActivityCode4Modal; let modalController: ModalController; - const navMock: NavParamsMock = new NavParamsMock(); beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [ActivityCode4Modal], imports: [AppModule, IonicModule, ComponentsModule], - providers: [ - { provide: NavParams, useFactory: () => navMock }, - { provide: ModalController, useClass: ModalControllerMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(ActivityCode4Modal); diff --git a/src/app/pages/test-report/cat-a-mod1/components/speed-check-modal/__tests__/speed-check-modal.spec.ts b/src/app/pages/test-report/cat-a-mod1/components/speed-check-modal/__tests__/speed-check-modal.spec.ts index 5950723f37..4a671e7c41 100644 --- a/src/app/pages/test-report/cat-a-mod1/components/speed-check-modal/__tests__/speed-check-modal.spec.ts +++ b/src/app/pages/test-report/cat-a-mod1/components/speed-check-modal/__tests__/speed-check-modal.spec.ts @@ -2,8 +2,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { AppModule } from '@app/app.module'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { ModalEvent } from '@pages/test-report/test-report.constants'; import { SpeedCheckModal } from '../speed-check-modal'; @@ -17,10 +16,7 @@ describe('SpeedCheckModal', () => { TestBed.configureTestingModule({ declarations: [SpeedCheckModal], imports: [AppModule, IonicModule, ComponentsModule], - providers: [ - { provide: NavParams, useClass: NavParamsMock }, - { provide: ModalController, useClass: ModalControllerMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(SpeedCheckModal); diff --git a/src/app/pages/test-report/cat-a-mod2/__tests__/test-report.cat-a-mod2.page.spec.ts b/src/app/pages/test-report/cat-a-mod2/__tests__/test-report.cat-a-mod2.page.spec.ts index d100c6846d..d6caa73459 100644 --- a/src/app/pages/test-report/cat-a-mod2/__tests__/test-report.cat-a-mod2.page.spec.ts +++ b/src/app/pages/test-report/cat-a-mod2/__tests__/test-report.cat-a-mod2.page.spec.ts @@ -4,8 +4,8 @@ import { AppModule } from '@app/app.module'; import { PracticeModeBanner } from '@components/common/practice-mode-banner/practice-mode-banner'; import { TickIndicatorComponent } from '@components/common/tick-indicator/tick-indicator'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { StoreModule } from '@ngrx/store'; import { SafetyAndBalanceComponent } from '@pages/test-report/cat-a-mod2/components/safety-and-balance/safety-and-balance'; import { AuthenticationProviderMock } from '@providers/authentication/__mocks__/authentication.mock'; @@ -69,10 +69,6 @@ describe('TestReportCatAMod2Page', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-adi-part2/__tests__/test-report.cat-adi-part2.page.spec.ts b/src/app/pages/test-report/cat-adi-part2/__tests__/test-report.cat-adi-part2.page.spec.ts index 346c9997ba..8d723dc77c 100644 --- a/src/app/pages/test-report/cat-adi-part2/__tests__/test-report.cat-adi-part2.page.spec.ts +++ b/src/app/pages/test-report/cat-adi-part2/__tests__/test-report.cat-adi-part2.page.spec.ts @@ -5,8 +5,8 @@ import { PracticeModeBanner } from '@components/common/practice-mode-banner/prac import { TickIndicatorComponent } from '@components/common/tick-indicator/tick-indicator'; import { CatADI2UniqueTypes } from '@dvsa/mes-test-schema/categories/ADI2'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { StoreModule } from '@ngrx/store'; import { ManoeuvresPopoverComponentAdiPart2 } from '@pages/test-report/cat-adi-part2/components/manoeuvres-popover/manoeuvres-popover'; import { ManoeuvresComponent } from '@pages/test-report/cat-adi-part2/components/manoeuvres/manoeuvres'; @@ -77,10 +77,6 @@ describe('TestReportCatADI2Page', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-adi-part3/__tests__/test-report.cat-adi-part3.spec.ts b/src/app/pages/test-report/cat-adi-part3/__tests__/test-report.cat-adi-part3.spec.ts index ea295bf533..9633a80db7 100644 --- a/src/app/pages/test-report/cat-adi-part3/__tests__/test-report.cat-adi-part3.spec.ts +++ b/src/app/pages/test-report/cat-adi-part3/__tests__/test-report.cat-adi-part3.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule, ModalController, NavController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, NavController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { MockComponent } from 'ng-mocks'; import { AppModule } from '@app/app.module'; @@ -72,10 +72,6 @@ describe('TestReportCatADI3Page', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/__tests__/adi3-end-test-modal.spec.ts b/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/__tests__/adi3-end-test-modal.spec.ts index 048d6e3c09..1dbe879331 100644 --- a/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/__tests__/adi3-end-test-modal.spec.ts +++ b/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/__tests__/adi3-end-test-modal.spec.ts @@ -1,6 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ReactiveFormsModule } from '@angular/forms'; -import { IonicModule, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { provideMockStore } from '@ngrx/store/testing'; import { Adi3EndTestModal } from '@pages/test-report/cat-adi-part3/components/adi3-end-test-modal/adi3-end-test-modal'; import { ADI3AssessmentProvider } from '@providers/adi3-assessment/adi3-assessment'; @@ -11,27 +12,12 @@ describe('Adi3EndTestModal', () => { let fixture: ComponentFixture; let component: Adi3EndTestModal; - const mockNavParams = { - get: (param: string) => { - const data = { - testData: { totalScore: 10 }, - testResult: { activityCode: '1', grade: 'grade' }, - totalScore: 10, - feedback: 'feedback', - isValidDashboard: false, - isTestReportPopulated: true, - riskToPublicSafety: false, - }; - return data[param]; - }, - }; - beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [IonicModule, ReactiveFormsModule], providers: [ + { provide: ModalController, useClass: ModalControllerMock }, { provide: ADI3AssessmentProvider, useClass: ADI3AssessmentProvider }, - { provide: NavParams, useValue: mockNavParams }, provideMockStore({ ...{} }), ], }); @@ -60,20 +46,6 @@ describe('Adi3EndTestModal', () => { }); }); - describe('ngOnInit', () => { - it('should allocate variables correctly', () => { - component.ngOnInit(); - - expect(component.testData).toEqual({ totalScore: 10 }); - expect(component.testResult).toEqual({ activityCode: '1', grade: 'grade' }); - expect(component.totalScore).toBe(10); - expect(component.feedback).toBe('feedback'); - expect(component.isValidDashboard).toBe(false); - expect(component.isTestReportPopulated).toBe(true); - expect(component.riskToPublicSafety).toBe(false); - }); - }); - describe('onContinue', () => { it('should call dismiss with ModalEvent.CANCEL', () => { spyOn(component.modalCtrl, 'dismiss').and.returnValue(Promise.resolve(true)); diff --git a/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/adi3-end-test-modal.ts b/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/adi3-end-test-modal.ts index d59d15a427..06b61ae09d 100644 --- a/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/adi3-end-test-modal.ts +++ b/src/app/pages/test-report/cat-adi-part3/components/adi3-end-test-modal/adi3-end-test-modal.ts @@ -1,7 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { TestData } from '@dvsa/mes-test-schema/categories/ADI3'; import { ActivityCode } from '@dvsa/mes-test-schema/categories/common'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { ADI3AssessmentProvider } from '@providers/adi3-assessment/adi3-assessment'; import { ActivityCodes } from '@shared/models/activity-codes'; import { ModalEvent } from '../../../test-report.constants'; @@ -11,32 +11,29 @@ import { ModalEvent } from '../../../test-report.constants'; templateUrl: 'adi3-end-test-modal.html', styleUrls: ['adi3-end-test-modal.scss'], }) -export class Adi3EndTestModal implements OnInit { +export class Adi3EndTestModal { testState: number; + + @Input() testData: TestData; + @Input() testResult: { activityCode?: ActivityCode; grade?: string } = {}; + @Input() totalScore: number; + @Input() feedback: string; + @Input() isValidDashboard: boolean; + @Input() isTestReportPopulated: boolean; + @Input() riskToPublicSafety: boolean; constructor( public modalCtrl: ModalController, - private navParams: NavParams, public adi3AssessmentProvider: ADI3AssessmentProvider ) {} - ngOnInit(): void { - this.testData = this.navParams.get('testData'); - this.testResult = this.navParams.get('testResult'); - this.totalScore = this.navParams.get('totalScore'); - this.feedback = this.navParams.get('feedback'); - this.isValidDashboard = this.navParams.get('isValidDashboard'); - this.isTestReportPopulated = this.navParams.get('isTestReportPopulated'); - this.riskToPublicSafety = this.navParams.get('riskToPublicSafety'); - } - async onCancel(): Promise { await this.modalCtrl.dismiss(ModalEvent.CANCEL); } diff --git a/src/app/pages/test-report/cat-b/__tests__/test-report.cat-b.page.spec.ts b/src/app/pages/test-report/cat-b/__tests__/test-report.cat-b.page.spec.ts index 2a17c8ffcd..b42fdf7abb 100644 --- a/src/app/pages/test-report/cat-b/__tests__/test-report.cat-b.page.spec.ts +++ b/src/app/pages/test-report/cat-b/__tests__/test-report.cat-b.page.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { MockComponent } from 'ng-mocks'; import { AppModule } from '@app/app.module'; @@ -64,10 +64,6 @@ describe('TestReportCatBPage', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-c/__tests__/test-report.cat-c.page.spec.ts b/src/app/pages/test-report/cat-c/__tests__/test-report.cat-c.page.spec.ts index b678ea88f0..9fedf98e61 100644 --- a/src/app/pages/test-report/cat-c/__tests__/test-report.cat-c.page.spec.ts +++ b/src/app/pages/test-report/cat-c/__tests__/test-report.cat-c.page.spec.ts @@ -3,8 +3,8 @@ import { AppModule } from '@app/app.module'; import { PracticeModeBanner } from '@components/common/practice-mode-banner/practice-mode-banner'; import { TickIndicatorComponent } from '@components/common/tick-indicator/tick-indicator'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { StoreModule } from '@ngrx/store'; import { VehicleChecksComponent } from '@pages/test-report/cat-c/components/vehicle-checks/vehicle-checks'; import { ReverseLeftPopoverComponent } from '@pages/test-report/components/reverse-left-popover/reverse-left-popover'; @@ -76,10 +76,6 @@ describe('TestReportCatCPage', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-cpc/__tests__/test-report.cat-cpc.page.spec.ts b/src/app/pages/test-report/cat-cpc/__tests__/test-report.cat-cpc.page.spec.ts index 3e9393ed9e..234797e4f2 100644 --- a/src/app/pages/test-report/cat-cpc/__tests__/test-report.cat-cpc.page.spec.ts +++ b/src/app/pages/test-report/cat-cpc/__tests__/test-report.cat-cpc.page.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { MockComponent } from 'ng-mocks'; import { Subscription, of } from 'rxjs'; @@ -93,10 +93,6 @@ describe('TestReportCatCPCPage', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/__tests__/cpc-end-test-modal.spec.ts b/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/__tests__/cpc-end-test-modal.spec.ts index 32502a5a32..f2577f4d1b 100644 --- a/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/__tests__/cpc-end-test-modal.spec.ts +++ b/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/__tests__/cpc-end-test-modal.spec.ts @@ -1,8 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { AppModule } from '@app/app.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { ActivityCodes } from '@shared/models/activity-codes'; import { TestOutcome } from '@store/tests/tests.constants'; @@ -21,10 +20,6 @@ describe('CPCEndTestModal', () => { declarations: [CPCEndTestModal, MockComponent(ModalResultItemComponent)], imports: [AppModule, IonicModule], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: ModalController, useClass: ModalControllerMock, diff --git a/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/cpc-end-test-modal.html b/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/cpc-end-test-modal.html index 558d8d71ed..8741b6ad0a 100644 --- a/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/cpc-end-test-modal.html +++ b/src/app/pages/test-report/cat-cpc/components/cpc-end-test-modal/cpc-end-test-modal.html @@ -7,7 +7,7 @@ { await this.modalCtrl.dismiss(ModalEvent.CANCEL); diff --git a/src/app/pages/test-report/cat-cpc/components/question-footer/question-footer.html b/src/app/pages/test-report/cat-cpc/components/question-footer/question-footer.html index cf7b7f4db3..41e9e3c079 100644 --- a/src/app/pages/test-report/cat-cpc/components/question-footer/question-footer.html +++ b/src/app/pages/test-report/cat-cpc/components/question-footer/question-footer.html @@ -2,17 +2,17 @@ - Previous question + Previous question - Next question + Next question - View test summary + View test summary diff --git a/src/app/pages/test-report/cat-home-test/__tests__/test-report.cat-home-test.page.spec.ts b/src/app/pages/test-report/cat-home-test/__tests__/test-report.cat-home-test.page.spec.ts index 3b502aa309..4af9bc8f8a 100644 --- a/src/app/pages/test-report/cat-home-test/__tests__/test-report.cat-home-test.page.spec.ts +++ b/src/app/pages/test-report/cat-home-test/__tests__/test-report.cat-home-test.page.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { IonicModule, ModalController, NavParams, Platform } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, Platform } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { MockComponent } from 'ng-mocks'; import { AppModule } from '@app/app.module'; @@ -80,10 +80,6 @@ describe('TestReportCatHomeTestPage', () => { StoreModule.forFeature('testReport', testReportReducer), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/cat-manoeuvre/__tests__/test-report.cat-manoeuvre.page.spec.ts b/src/app/pages/test-report/cat-manoeuvre/__tests__/test-report.cat-manoeuvre.page.spec.ts index acdb18c9cc..39aad61676 100644 --- a/src/app/pages/test-report/cat-manoeuvre/__tests__/test-report.cat-manoeuvre.page.spec.ts +++ b/src/app/pages/test-report/cat-manoeuvre/__tests__/test-report.cat-manoeuvre.page.spec.ts @@ -1,8 +1,8 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ComponentFixture, TestBed } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { ModalController, NavParams, Platform, ToastController } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { ModalController, Platform, ToastController } from '@ionic/angular'; +import { ModalControllerMock, PlatformMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { MockComponent } from 'ng-mocks'; @@ -63,10 +63,6 @@ describe('TestReportCatManoeuvrePage', () => { })), ], providers: [ - { - provide: NavParams, - useClass: NavParamsMock, - }, { provide: Platform, useClass: PlatformMock, diff --git a/src/app/pages/test-report/components/end-test-modal/__tests__/end-test-modal.spec.ts b/src/app/pages/test-report/components/end-test-modal/__tests__/end-test-modal.spec.ts index 3f25a3b4ae..120293d9a4 100644 --- a/src/app/pages/test-report/components/end-test-modal/__tests__/end-test-modal.spec.ts +++ b/src/app/pages/test-report/components/end-test-modal/__tests__/end-test-modal.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { ModalEvent } from '@pages/test-report/test-report.constants'; import { AppModule } from 'src/app/app.module'; import { EndTestModal } from '../end-test-modal'; @@ -15,10 +15,7 @@ describe('EndTestModal', () => { TestBed.configureTestingModule({ declarations: [EndTestModal], imports: [AppModule, IonicModule], - providers: [ - { provide: NavParams, useClass: NavParamsMock }, - { provide: ModalController, useClass: ModalControllerMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(EndTestModal); diff --git a/src/app/pages/test-report/components/legal-requirements-modal/__tests__/legal-requirements-modal.spec.ts b/src/app/pages/test-report/components/legal-requirements-modal/__tests__/legal-requirements-modal.spec.ts index 934d4399d2..bc04ee5225 100644 --- a/src/app/pages/test-report/components/legal-requirements-modal/__tests__/legal-requirements-modal.spec.ts +++ b/src/app/pages/test-report/components/legal-requirements-modal/__tests__/legal-requirements-modal.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { AppModule } from 'src/app/app.module'; import { ModalEvent } from '../../../test-report.constants'; import { LegalRequirementsModal } from '../legal-requirements-modal'; @@ -16,10 +16,7 @@ describe('LegalRequirementsModal', () => { TestBed.configureTestingModule({ declarations: [LegalRequirementsModal], imports: [AppModule, IonicModule, ComponentsModule], - providers: [ - { provide: NavParams, useClass: NavParamsMock }, - { provide: ModalController, useClass: ModalControllerMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(LegalRequirementsModal); diff --git a/src/app/pages/test-report/components/legal-requirements-modal/legal-requirements-modal.ts b/src/app/pages/test-report/components/legal-requirements-modal/legal-requirements-modal.ts index eb63256290..d55dade0c2 100644 --- a/src/app/pages/test-report/components/legal-requirements-modal/legal-requirements-modal.ts +++ b/src/app/pages/test-report/components/legal-requirements-modal/legal-requirements-modal.ts @@ -1,5 +1,5 @@ -import { Component } from '@angular/core'; -import { ModalController, NavParams } from '@ionic/angular'; +import { Component, Input } from '@angular/core'; +import { ModalController } from '@ionic/angular'; import { legalRequirementsLabels } from '@shared/constants/legal-requirements/legal-requirements.constants'; import { ModalEvent } from '../../test-report.constants'; @@ -9,15 +9,15 @@ import { ModalEvent } from '../../test-report.constants'; styleUrls: ['legal-requirements-modal.scss'], }) export class LegalRequirementsModal { + @Input() legalRequirements: legalRequirementsLabels[]; + @Input() isDelegated: boolean; - constructor( - private modalCtrl: ModalController, - private navParams: NavParams - ) { - this.legalRequirements = this.navParams.get('legalRequirements'); - this.isDelegated = this.navParams.get('isDelegated') === null ? false : this.navParams.get('isDelegated'); + constructor(private modalCtrl: ModalController) { + if (this.isDelegated === null) { + this.isDelegated = false; + } } async onContinue() { diff --git a/src/app/pages/test-report/components/reverse-diagram-modal/__tests__/reverse-diagram-modal.spec.ts b/src/app/pages/test-report/components/reverse-diagram-modal/__tests__/reverse-diagram-modal.spec.ts index 4fbad6badb..f0e0d70e17 100644 --- a/src/app/pages/test-report/components/reverse-diagram-modal/__tests__/reverse-diagram-modal.spec.ts +++ b/src/app/pages/test-report/components/reverse-diagram-modal/__tests__/reverse-diagram-modal.spec.ts @@ -1,7 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, NavController, NavParams, Platform } from '@ionic/angular'; -import { NavControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, NavController, Platform } from '@ionic/angular'; +import { NavControllerMock, PlatformMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { ReversingDistancesProvider } from '@providers/reversing-distances/reversing-distances'; import { StoreModel } from '@shared/models/store.model'; @@ -63,7 +63,6 @@ describe('reverseDiagramModal', () => { ], providers: [ { provide: Platform, useClass: PlatformMock }, - { provide: NavParams, useClass: NavParamsMock }, { provide: NavController, useClass: NavControllerMock }, { provide: AppComponent, useClass: MockAppComponent }, ReversingDistancesProvider, diff --git a/src/app/pages/test-report/components/reverse-diagram-modal/reverse-diagram-modal.ts b/src/app/pages/test-report/components/reverse-diagram-modal/reverse-diagram-modal.ts index 5186ce0072..0a6b816df3 100644 --- a/src/app/pages/test-report/components/reverse-diagram-modal/reverse-diagram-modal.ts +++ b/src/app/pages/test-report/components/reverse-diagram-modal/reverse-diagram-modal.ts @@ -1,7 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { CategoryCode } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { NavParams } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { ReversingDistancesProvider } from '@providers/reversing-distances/reversing-distances'; import { VehicleDetailsByCategoryProvider } from '@providers/vehicle-details-by-category/vehicle-details-by-category'; @@ -30,6 +29,9 @@ export class ReverseDiagramPage implements OnInit { @Input() vehicleLength: number; + @Input() + onClose: OnCloseFunc; + @Input() vehicleWidth: number; @@ -42,16 +44,12 @@ export class ReverseDiagramPage implements OnInit { reversingWidth: number; multiplierText: string; category: TestCategory; - onClose: OnCloseFunc; constructor( - private navParams: NavParams, public store$: Store, public reversingDistancesProvider: ReversingDistancesProvider, public vehicleDetailsProvider: VehicleDetailsByCategoryProvider - ) { - this.onClose = this.navParams.get('onClose'); - } + ) {} ngOnInit(): void { const currentTest$ = this.store$.pipe(select(getTests), select(getCurrentTest)); diff --git a/src/app/pages/test-report/components/special-legal-requirement-modal/__tests__/special-legal-requirement-modal.spec.ts b/src/app/pages/test-report/components/special-legal-requirement-modal/__tests__/special-legal-requirement-modal.spec.ts index fedf1d09c7..99130977f7 100644 --- a/src/app/pages/test-report/components/special-legal-requirement-modal/__tests__/special-legal-requirement-modal.spec.ts +++ b/src/app/pages/test-report/components/special-legal-requirement-modal/__tests__/special-legal-requirement-modal.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { ComponentsModule } from '@components/common/common-components.module'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { ModalEvent } from '@pages/test-report/test-report.constants'; import { AppModule } from 'src/app/app.module'; import { SpecialLegalRequirementModal } from '../special-legal-requirement-modal'; @@ -16,10 +16,7 @@ describe('LegalRequirementsModal', () => { TestBed.configureTestingModule({ declarations: [SpecialLegalRequirementModal], imports: [AppModule, IonicModule, ComponentsModule], - providers: [ - { provide: NavParams, useClass: NavParamsMock }, - { provide: ModalController, useClass: ModalControllerMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(SpecialLegalRequirementModal); diff --git a/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/__tests__/test-finalisation-invalid-test-data-modal.spec.ts b/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/__tests__/test-finalisation-invalid-test-data-modal.spec.ts index 156c66fa88..b8d08b21fd 100644 --- a/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/__tests__/test-finalisation-invalid-test-data-modal.spec.ts +++ b/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/__tests__/test-finalisation-invalid-test-data-modal.spec.ts @@ -1,31 +1,15 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule, NavParams } from '@ionic/angular'; +import { IonicModule } from '@ionic/angular'; import { TestFinalisationInvalidTestDataModal } from '@pages/test-report/components/test-finalisation-invalid-test-data-modal/test-finalisation-invalid-test-data-modal'; describe('TestFinalisationInvalidTestDataModal', () => { let fixture: ComponentFixture; let component: TestFinalisationInvalidTestDataModal; - const mockNavParams = { - get: (param: string) => { - const data = { - onCancel: () => { - return 1; - }, - onReturnToTestReport: () => { - return 2; - }, - message: 'test3', - }; - return data[param]; - }, - }; - beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ declarations: [TestFinalisationInvalidTestDataModal], imports: [IonicModule], - providers: [{ provide: NavParams, useValue: mockNavParams }], }); fixture = TestBed.createComponent(TestFinalisationInvalidTestDataModal); diff --git a/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/test-finalisation-invalid-test-data-modal.ts b/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/test-finalisation-invalid-test-data-modal.ts index 937cad9410..483743feba 100644 --- a/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/test-finalisation-invalid-test-data-modal.ts +++ b/src/app/pages/test-report/components/test-finalisation-invalid-test-data-modal/test-finalisation-invalid-test-data-modal.ts @@ -1,5 +1,4 @@ -import { Component } from '@angular/core'; -import { NavParams } from '@ionic/angular'; +import { Component, Input } from '@angular/core'; @Component({ selector: 'test-finalisation-invalid-test-data-modal', @@ -7,13 +6,12 @@ import { NavParams } from '@ionic/angular'; styleUrls: ['test-finalisation-invalid-test-data-modal.scss'], }) export class TestFinalisationInvalidTestDataModal { + @Input() onCancel: Function; + @Input() onReturnToTestReport: Function; + @Input() message: string; - constructor(public navParams: NavParams) { - this.onCancel = this.navParams.get('onCancel'); - this.onReturnToTestReport = this.navParams.get('onReturnToTestReport'); - this.message = this.navParams.get('message'); - } + constructor() {} } diff --git a/src/app/pages/test-report/components/timer/timer.html b/src/app/pages/test-report/components/timer/timer.html index 4a741c518c..2627f420dc 100644 --- a/src/app/pages/test-report/components/timer/timer.html +++ b/src/app/pages/test-report/components/timer/timer.html @@ -6,7 +6,7 @@ (click)="toggleTimer()" *ngIf="showStartTimerButton" > - Start timer + Start timer
- + - + {{ isRemoveFaultMode ? 'Exit remove mode' : 'Remove'}} - + - + diff --git a/src/app/pages/test-report/components/toolbar/toolbar.scss b/src/app/pages/test-report/components/toolbar/toolbar.scss index fc78b135dd..1285a64ca3 100644 --- a/src/app/pages/test-report/components/toolbar/toolbar.scss +++ b/src/app/pages/test-report/components/toolbar/toolbar.scss @@ -27,12 +27,16 @@ } &.inactive { background-color: var(--mes-white); - color: var(--gds-black); + ion-text { + color: var(--gds-black) !important; + } box-shadow: 0 1px 0 0 var(--gds-grey-1); } &.active { background-color: var(--gds-black); - color: var(--mes-white); + ion-text { + color: var(--mes-white) !important; + } } } @@ -43,6 +47,11 @@ padding-bottom: 6px; } + .remove-fault-button { + font-size: 20px; + font-weight: normal; + } + #serious-button { width: 88px; height: 43px; diff --git a/src/app/pages/test-results-search/components/advanced-search/advanced-search.scss b/src/app/pages/test-results-search/components/advanced-search/advanced-search.scss index d84583092a..3f9501d827 100644 --- a/src/app/pages/test-results-search/components/advanced-search/advanced-search.scss +++ b/src/app/pages/test-results-search/components/advanced-search/advanced-search.scss @@ -45,9 +45,6 @@ } .search-icon { - display: inline-block; - position: relative; - top: 3px; padding-right: 3px; font-weight: bolder; } diff --git a/src/app/pages/test-results-search/test-results-search.scss b/src/app/pages/test-results-search/test-results-search.scss index a0208ed7d3..b2f4bb836a 100644 --- a/src/app/pages/test-results-search/test-results-search.scss +++ b/src/app/pages/test-results-search/test-results-search.scss @@ -40,9 +40,6 @@ } .search-icon { - display: inline-block; - position: relative; - top: 3px; padding-right: 3px; font-weight: bolder; } diff --git a/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-a-mod2.page.spec.ts b/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-a-mod2.page.spec.ts index 0a4de1a57d..ebcabe4151 100644 --- a/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-a-mod2.page.spec.ts +++ b/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-a-mod2.page.spec.ts @@ -2,8 +2,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AppModule } from '@app/app.module'; import { WarningBannerComponent } from '@components/common/warning-banner/warning-banner'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { VehicleChecksQuestionCatAMod2Component } from '@pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-question/vehicle-checks-question'; import { StoreModel } from '@shared/models/store.model'; @@ -31,10 +31,7 @@ describe('VehicleChecksCatAMod2Modal', () => { WarningBannerComponent, ], imports: [IonicModule, AppModule, StoreModule.forRoot({})], - providers: [ - { provide: ModalController, useClass: ModalControllerMock }, - { provide: NavParams, useClass: NavParamsMock }, - ], + providers: [{ provide: ModalController, useClass: ModalControllerMock }], }); fixture = TestBed.createComponent(VehicleChecksCatAMod2Modal); diff --git a/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/vehicle-checks-modal.cat-a-mod2.page.ts b/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/vehicle-checks-modal.cat-a-mod2.page.ts index 4d7a796589..24e8fe47f7 100644 --- a/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/vehicle-checks-modal.cat-a-mod2.page.ts +++ b/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/vehicle-checks-modal.cat-a-mod2.page.ts @@ -1,8 +1,8 @@ -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { ModalController, NavController, NavParams } from '@ionic/angular'; +import { ModalController, NavController } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { FaultCountProvider } from '@providers/fault-count/fault-count'; import { QuestionProvider } from '@providers/question/question'; @@ -42,6 +42,7 @@ interface VehicleChecksModalState { export class VehicleChecksCatAMod2Modal { pageState: VehicleChecksModalState; formGroup: UntypedFormGroup; + @Input() submitClicked: boolean; safetyQuestions: VehicleChecksQuestion[]; @@ -59,11 +60,9 @@ export class VehicleChecksCatAMod2Modal { private navController: NavController, private faultCountProvider: FaultCountProvider, public modalCtrl: ModalController, - questionProvider: QuestionProvider, - params: NavParams + questionProvider: QuestionProvider ) { this.formGroup = new UntypedFormGroup({}); - this.submitClicked = params.get('submitClicked'); this.safetyQuestions = questionProvider.getSafetyQuestions(TestCategory.EUAM2); this.balanceQuestions = questionProvider.getBalanceQuestions(TestCategory.EUAM2); } diff --git a/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks/__tests__/vehicle-checks.spec.ts b/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks/__tests__/vehicle-checks.spec.ts index 105c3e4960..078246b080 100644 --- a/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks/__tests__/vehicle-checks.spec.ts +++ b/src/app/pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks/__tests__/vehicle-checks.spec.ts @@ -3,9 +3,9 @@ import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { DrivingFaultsBadgeComponent } from '@components/common/driving-faults-badge/driving-faults-badge'; import { SeriousFaultBadgeComponent } from '@components/common/serious-fault-badge/serious-fault-badge'; import { TickIndicatorComponent } from '@components/common/tick-indicator/tick-indicator'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { OverlayEventDetail } from '@ionic/core'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { ModalControllerMock } from '@mocks/index.mock'; import { Store } from '@ngrx/store'; import { VehicleChecksCatAMod2Modal } from '@pages/waiting-room-to-car/cat-a-mod2/components/vehicle-checks-modal/vehicle-checks-modal.cat-a-mod2.page'; import { AccessibilityServiceMock } from '@providers/accessibility/__mocks__/accessibility-service.mock'; @@ -34,7 +34,6 @@ describe('VehicleChecksCatAMod2Component', () => { { provide: ModalController, useClass: ModalControllerMock }, { provide: AccessibilityService, useClass: AccessibilityServiceMock }, { provide: Store, useClass: MockStore }, - { provide: NavParams, useClass: NavParamsMock }, ], }); diff --git a/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-adi-part2.page.spec.ts b/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-adi-part2.page.spec.ts index 94456ce4b6..0ba4d6bedf 100644 --- a/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-adi-part2.page.spec.ts +++ b/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-adi-part2.page.spec.ts @@ -4,8 +4,8 @@ import { WarningBannerComponent } from '@components/common/warning-banner/warnin import { CatADI2UniqueTypes } from '@dvsa/mes-test-schema/categories/ADI2'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavController, NavParams } from '@ionic/angular'; -import { NavControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController, NavController } from '@ionic/angular'; +import { NavControllerMock } from '@mocks/index.mock'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { Store, StoreModule } from '@ngrx/store'; import { provideMockStore } from '@ngrx/store/testing'; @@ -114,10 +114,6 @@ describe('VehicleChecksCatADIPart2Modal', () => { provide: NavController, useClass: NavControllerMock, }, - { - provide: NavParams, - useClass: NavParamsMock, - }, provideMockStore({ initialState }), ], }); diff --git a/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/vehicle-checks-modal.cat-adi-part2.page.ts b/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/vehicle-checks-modal.cat-adi-part2.page.ts index 3e2c0cd42c..077e2ab1f3 100644 --- a/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/vehicle-checks-modal.cat-adi-part2.page.ts +++ b/src/app/pages/waiting-room-to-car/cat-adi-part2/components/vehicle-checks-modal/vehicle-checks-modal.cat-adi-part2.page.ts @@ -1,8 +1,8 @@ -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { FaultCountProvider } from '@providers/fault-count/fault-count'; import { QuestionProvider } from '@providers/question/question'; @@ -45,21 +45,21 @@ export class VehicleChecksCatADIPart2Modal { readonly tellMeQuestionsNumberArray: number[] = Array(NUMBER_OF_TELL_ME_QUESTIONS); vehicleChecksScore: VehicleChecksScore; subscription: Subscription; + @Input() submitClicked: boolean; constructor( public store$: Store, private faultCountProvider: FaultCountProvider, public modalCtrl: ModalController, - questionProvider: QuestionProvider, - params: NavParams + public questionProvider: QuestionProvider ) { - this.submitClicked = params.get('submitClicked'); this.formGroup = new UntypedFormGroup({}); - this.tellMeQuestions = questionProvider.getTellMeQuestions(TestCategory.ADI2); } ngOnInit(): void { + this.tellMeQuestions = this.questionProvider.getTellMeQuestions(TestCategory.ADI2); + const currentTest$ = this.store$.pipe(select(getTests), select(getCurrentTest)); this.pageState = { candidateName$: currentTest$.pipe(select(getJournalData), select(getCandidate), select(getUntitledCandidateName)), diff --git a/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-c.page.spec.ts b/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-c.page.spec.ts index d1e07faf9c..9777daa97b 100644 --- a/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-c.page.spec.ts +++ b/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-c.page.spec.ts @@ -4,8 +4,7 @@ import { WarningBannerComponent } from '@components/common/warning-banner/warnin import { CatCUniqueTypes } from '@dvsa/mes-test-schema/categories/C'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { Store, StoreModule } from '@ngrx/store'; import { provideMockStore } from '@ngrx/store/testing'; @@ -171,10 +170,6 @@ describe('VehicleChecksCatCModal', () => { provide: ModalController, useClass: ModalControllerMock, }, - { - provide: NavParams, - useClass: NavParamsMock, - }, provideMockStore({ initialState }), ], }); diff --git a/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/vehicle-checks-modal.cat-c.page.ts b/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/vehicle-checks-modal.cat-c.page.ts index 1c41c455fd..b4c02d6e5f 100644 --- a/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/vehicle-checks-modal.cat-c.page.ts +++ b/src/app/pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/vehicle-checks-modal.cat-c.page.ts @@ -1,8 +1,8 @@ -import { ChangeDetectionStrategy, ChangeDetectorRef, Component } from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { FaultCountProvider } from '@providers/fault-count/fault-count'; import { QuestionProvider } from '@providers/question/question'; @@ -68,7 +68,9 @@ export class VehicleChecksCatCModal { showMeQuestions: VehicleChecksQuestion[]; tellMeQuestions: VehicleChecksQuestion[]; + @Input() category: TestCategory; + @Input() submitClicked: boolean; fullLicenceHeld: boolean = null; showMeQuestionsNumberArray: number[]; @@ -83,17 +85,15 @@ export class VehicleChecksCatCModal { private faultCountProvider: FaultCountProvider, private ref: ChangeDetectorRef, public modalCtrl: ModalController, - questionProvider: QuestionProvider, - params: NavParams + public questionProvider: QuestionProvider ) { - this.category = params.get('category'); - this.submitClicked = params.get('submitClicked'); this.formGroup = new UntypedFormGroup({}); - this.showMeQuestions = questionProvider.getShowMeQuestions(this.category); - this.tellMeQuestions = questionProvider.getTellMeQuestions(this.category); } ngOnInit(): void { + this.showMeQuestions = this.questionProvider.getShowMeQuestions(this.category); + this.tellMeQuestions = this.questionProvider.getTellMeQuestions(this.category); + const currentTest$ = this.store$.pipe(select(getTests), select(getCurrentTest)); this.pageState = { candidateName$: currentTest$.pipe(select(getJournalData), select(getCandidate), select(getUntitledCandidateName)), diff --git a/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-d.page.spec.ts b/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-d.page.spec.ts index 0cdcf12a84..970c9e8b26 100644 --- a/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-d.page.spec.ts +++ b/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-d.page.spec.ts @@ -1,8 +1,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { AppModule } from '@app/app.module'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; -import { NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { Store, StoreModule } from '@ngrx/store'; import { StoreModel } from '@shared/models/store.model'; @@ -169,10 +168,6 @@ describe('VehicleChecksCatDModal', () => { provide: AccessibilityService, useClass: AccessibilityServiceMock, }, - { - provide: NavParams, - useClass: NavParamsMock, - }, provideMockStore({ initialState }), ], }); diff --git a/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/vehicle-checks-modal.cat-d.page.ts b/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/vehicle-checks-modal.cat-d.page.ts index 65e7187c8d..fd9b3466b6 100644 --- a/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/vehicle-checks-modal.cat-d.page.ts +++ b/src/app/pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/vehicle-checks-modal.cat-d.page.ts @@ -1,4 +1,4 @@ -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { QuestionOutcome, QuestionResult, SafetyQuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; @@ -29,7 +29,7 @@ import { SafetyQuestionOutcomeChanged } from '@store/tests/test-data/cat-d/safet import { NUMBER_OF_SAFETY_QUESTIONS } from '@shared/constants/safety-questions.cat-d.constants'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { FaultCountProvider } from '@providers/fault-count/fault-count'; import { NUMBER_OF_SHOW_ME_QUESTIONS as NUMBER_OF_SHOW_ME_QUESTIONS_TRAILER, @@ -82,7 +82,9 @@ export class VehicleChecksCatDModal { tellMeQuestions: VehicleChecksQuestion[]; safetyQuestions: SafetyQuestion[]; + @Input() category: TestCategory; + @Input() submitClicked: boolean; showMeQuestionsNumberArray: number[]; @@ -102,19 +104,16 @@ export class VehicleChecksCatDModal { public store$: Store, private faultCountProvider: FaultCountProvider, public modalCtrl: ModalController, - questionProvider: QuestionProvider, - params: NavParams + public questionProvider: QuestionProvider ) { - this.category = params.get('category'); - this.submitClicked = params.get('submitClicked'); this.formGroup = new UntypedFormGroup({}); this.safetyQuestionsNumberArray = Array(NUMBER_OF_SAFETY_QUESTIONS); - this.showMeQuestions = questionProvider.getShowMeQuestions(this.category); - this.tellMeQuestions = questionProvider.getTellMeQuestions(this.category); - this.safetyQuestions = questionProvider.getVocationalSafetyQuestions(this.category); } ngOnInit(): void { + this.showMeQuestions = this.questionProvider.getShowMeQuestions(this.category); + this.tellMeQuestions = this.questionProvider.getTellMeQuestions(this.category); + this.safetyQuestions = this.questionProvider.getVocationalSafetyQuestions(this.category); const currentTest$ = this.store$.pipe(select(getTests), select(getCurrentTest)); this.pageState = { candidateName$: currentTest$.pipe(select(getJournalData), select(getCandidate), select(getUntitledCandidateName)), diff --git a/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-home.page.spec.ts b/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-home.page.spec.ts index 5a789c5f38..a7d1780bfc 100644 --- a/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-home.page.spec.ts +++ b/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/__tests__/vehicle-checks-modal.cat-home.page.spec.ts @@ -5,7 +5,8 @@ import { FormsModule, ReactiveFormsModule, UntypedFormGroup } from '@angular/for import { ComponentsModule } from '@components/common/common-components.module'; import { CatFUniqueTypes } from '@dvsa/mes-test-schema/categories/F'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { StoreModule } from '@ngrx/store'; import { provideMockStore } from '@ngrx/store/testing'; import { VehicleChecksCatHomeTestModal } from '@pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/vehicle-checks-modal.cat-home.page'; @@ -88,7 +89,7 @@ describe('VehicleChecksCatHomeTestModal', () => { StoreModule, ], providers: [ - NavParams, + { provide: ModalController, useClass: ModalControllerMock }, { provide: RouteByCategoryProvider, useClass: RouteByCategoryProviderMock, diff --git a/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/vehicle-checks-modal.cat-home.page.ts b/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/vehicle-checks-modal.cat-home.page.ts index 7b4b1bcef2..c76a17b876 100644 --- a/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/vehicle-checks-modal.cat-home.page.ts +++ b/src/app/pages/waiting-room-to-car/cat-home-test/components/vehicle-checks-modal/vehicle-checks-modal.cat-home.page.ts @@ -1,8 +1,8 @@ -import { Component } from '@angular/core'; +import { Component, Input } from '@angular/core'; import { UntypedFormGroup } from '@angular/forms'; import { QuestionOutcome, QuestionResult } from '@dvsa/mes-test-schema/categories/common'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { FaultCountProvider } from '@providers/fault-count/fault-count'; import { QuestionProvider } from '@providers/question/question'; @@ -48,7 +48,9 @@ export class VehicleChecksCatHomeTestModal { formGroup: UntypedFormGroup; showMeQuestions: VehicleChecksQuestion[]; tellMeQuestions: VehicleChecksQuestion[]; + @Input() category: TestCategory; + @Input() submitClicked: boolean; readonly showMeQuestionsNumberArray: number[] = Array(NUMBER_OF_SHOW_ME_QUESTIONS); readonly tellMeQuestionsNumberArray: number[] = Array(NUMBER_OF_TELL_ME_QUESTIONS); @@ -59,17 +61,14 @@ export class VehicleChecksCatHomeTestModal { public store$: Store, public modalCtrl: ModalController, private faultCountProvider: FaultCountProvider, - private questionProvider: QuestionProvider, - params: NavParams + private questionProvider: QuestionProvider ) { - this.category = params.get('category'); - this.submitClicked = params.get('submitClicked'); this.formGroup = new UntypedFormGroup({}); - this.showMeQuestions = this.questionProvider.getShowMeQuestions(this.category); - this.tellMeQuestions = this.questionProvider.getTellMeQuestions(this.category); } ngOnInit(): void { + this.showMeQuestions = this.questionProvider.getShowMeQuestions(this.category); + this.tellMeQuestions = this.questionProvider.getTellMeQuestions(this.category); const currentTest$ = this.store$.pipe(select(getTests), select(getCurrentTest)); this.pageState = { diff --git a/src/app/pages/waiting-room-to-car/components/eyesight-failure-confirmation/eyesight-failure-confirmation.html b/src/app/pages/waiting-room-to-car/components/eyesight-failure-confirmation/eyesight-failure-confirmation.html index f334446d8c..af3aa1f7ea 100644 --- a/src/app/pages/waiting-room-to-car/components/eyesight-failure-confirmation/eyesight-failure-confirmation.html +++ b/src/app/pages/waiting-room-to-car/components/eyesight-failure-confirmation/eyesight-failure-confirmation.html @@ -21,12 +21,12 @@
- + - + diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/__tests__/mot-failed-modal.component.spec.ts b/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/__tests__/mot-failed-modal.component.spec.ts index 32f777aad2..dd6665ac85 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/__tests__/mot-failed-modal.component.spec.ts +++ b/src/app/pages/waiting-room-to-car/components/mot-components/mot-failed-modal/__tests__/mot-failed-modal.component.spec.ts @@ -1,9 +1,10 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { IonicModule } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { CommonModule } from '@angular/common'; import { ReactiveFormsModule, UntypedFormControl } from '@angular/forms'; import { ModalAlertTitleComponent } from '@components/common/modal-alert-title/modal-alert-title'; +import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { Store, StoreModule } from '@ngrx/store'; import { StoreModel } from '@shared/models/store.model'; import { MockComponent } from 'ng-mocks'; @@ -18,7 +19,7 @@ describe('MotFailedModal', () => { TestBed.configureTestingModule({ declarations: [MotFailedModal, MockComponent(ModalAlertTitleComponent)], imports: [IonicModule, CommonModule, StoreModule.forRoot(), ReactiveFormsModule], - providers: [Store], + providers: [Store, { provide: ModalController, useClass: ModalControllerMock }], }).compileComponents(); fixture = TestBed.createComponent(MotFailedModal); diff --git a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html index d62aa4092c..1e059186f7 100644 --- a/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html +++ b/src/app/pages/waiting-room-to-car/components/mot-components/practice-mode-mot-modal/practice-mode-mot-modal.component.html @@ -22,7 +22,7 @@ Fail - + No Details diff --git a/src/app/pages/waiting-room-to-car/components/vehicle-checks/__tests__/vehicle-checks.spec.ts b/src/app/pages/waiting-room-to-car/components/vehicle-checks/__tests__/vehicle-checks.spec.ts index e9d95f1fb6..8ea90f5de4 100644 --- a/src/app/pages/waiting-room-to-car/components/vehicle-checks/__tests__/vehicle-checks.spec.ts +++ b/src/app/pages/waiting-room-to-car/components/vehicle-checks/__tests__/vehicle-checks.spec.ts @@ -4,9 +4,9 @@ import { DrivingFaultsBadgeComponent } from '@components/common/driving-faults-b import { SeriousFaultBadgeComponent } from '@components/common/serious-fault-badge/serious-fault-badge'; import { TickIndicatorComponent } from '@components/common/tick-indicator/tick-indicator'; import { TestCategory } from '@dvsa/mes-test-schema/category-definitions/common/test-category'; -import { IonicModule, ModalController, NavParams } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; import { OverlayEventDetail } from '@ionic/core'; -import { ModalControllerMock, NavParamsMock } from '@mocks/index.mock'; +import { ModalControllerMock } from '@mocks/index.mock'; import { Store, StoreModule } from '@ngrx/store'; import { VehicleChecksCatCModal } from '@pages/waiting-room-to-car/cat-c/components/vehicle-checks-modal/vehicle-checks-modal.cat-c.page'; import { VehicleChecksCatDModal } from '@pages/waiting-room-to-car/cat-d/components/vehicle-checks-modal/vehicle-checks-modal.cat-d.page'; @@ -45,7 +45,6 @@ describe('VehicleChecksComponent', () => { providers: [ { provide: AccessibilityService, useClass: AccessibilityServiceMock }, { provide: ModalController, useClass: ModalControllerMock }, - { provide: NavParams, useClass: NavParamsMock }, Store, ], }); diff --git a/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.html b/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.html index 7e396e6ced..8f425a8e4a 100644 --- a/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.html +++ b/src/app/pages/waiting-room-to-car/components/vehicle-registration/vehicle-registration.html @@ -30,14 +30,14 @@ pasteSanitiser > - + - Check MOT + Check MOT diff --git a/src/components/common/modal-activity-code-list/__tests__/modal-activity-code-list.spec.ts b/src/components/common/modal-activity-code-list/__tests__/modal-activity-code-list.spec.ts index 650e58a778..d8847508f1 100644 --- a/src/components/common/modal-activity-code-list/__tests__/modal-activity-code-list.spec.ts +++ b/src/components/common/modal-activity-code-list/__tests__/modal-activity-code-list.spec.ts @@ -1,7 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { ActivityCodeModalEvent } from '@components/common/activity-code/acitivity-code-modal-event'; import { ModalActivityCodeListComponent } from '@components/common/modal-activity-code-list/modal-activity-code-list'; -import { IonicModule } from '@ionic/angular'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { provideMockStore } from '@ngrx/store/testing'; import { ActivityCodeDescription } from '@shared/constants/activity-code/activity-code.constants'; import { ActivityCodes } from '@shared/models/activity-codes'; @@ -13,7 +14,7 @@ describe('ModalActivityCodeListComponent', () => { beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ imports: [IonicModule], - providers: [provideMockStore({ ...{} })], + providers: [{ provide: ModalController, useClass: ModalControllerMock }, provideMockStore({ ...{} })], }); fixture = TestBed.createComponent(ModalActivityCodeListComponent); diff --git a/src/components/common/modal-return-button/modal-return-button.html b/src/components/common/modal-return-button/modal-return-button.html index 0ba7f90c6b..b38a7e9fe3 100644 --- a/src/components/common/modal-return-button/modal-return-button.html +++ b/src/components/common/modal-return-button/modal-return-button.html @@ -1,3 +1,3 @@ - + diff --git a/src/components/common/modal-return-button/modal-return-button.scss b/src/components/common/modal-return-button/modal-return-button.scss index 44d76c01e1..6e254a5db2 100644 --- a/src/components/common/modal-return-button/modal-return-button.scss +++ b/src/components/common/modal-return-button/modal-return-button.scss @@ -1,22 +1,11 @@ @import "src/theme/sass-partials/buttons"; :host { - .button-padding { - position: absolute; - top: 13px; - } - .modal-return-button { - @extend .generic-button; + @extend .mes-grey-button; margin-top: 20px; margin-bottom: 40px; width: 100%; height: 56px; - --background: var(--gds-grey-3); - --box-shadow: inset 0 -2px 0 0 var(--gds-grey-1); - --background-activated: var(--gds-grey-2); - .des-header-style-3 { - color: var(--gds-black); - } } } diff --git a/src/components/common/terminate-test-modal/__tests__/terminate-test-modal.spec.ts b/src/components/common/terminate-test-modal/__tests__/terminate-test-modal.spec.ts index 9ec9fddaae..d300991d23 100644 --- a/src/components/common/terminate-test-modal/__tests__/terminate-test-modal.spec.ts +++ b/src/components/common/terminate-test-modal/__tests__/terminate-test-modal.spec.ts @@ -1,8 +1,8 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { AppModule } from '@app/app.module'; -import { IonicModule, NavController, NavParams, Platform } from '@ionic/angular'; -import { NavControllerMock, NavParamsMock, PlatformMock } from '@mocks/index.mock'; +import { IonicModule, NavController, Platform } from '@ionic/angular'; +import { NavControllerMock, PlatformMock } from '@mocks/index.mock'; import { AuthenticationProviderMock } from '@providers/authentication/__mocks__/authentication.mock'; import { AuthenticationProvider } from '@providers/authentication/authentication'; import { DateTimeProviderMock } from '@providers/date-time/__mocks__/date-time.mock'; @@ -22,7 +22,6 @@ describe('TerminateTestModal', () => { imports: [IonicModule, AppModule], providers: [ { provide: NavController, useClass: NavControllerMock }, - { provide: NavParams, useClass: NavParamsMock }, { provide: Platform, useClass: PlatformMock }, { provide: AuthenticationProvider, useClass: AuthenticationProviderMock }, { provide: DateTimeProvider, useClass: DateTimeProviderMock }, diff --git a/src/components/common/terminate-test-modal/terminate-test-modal.html b/src/components/common/terminate-test-modal/terminate-test-modal.html index 8a97a26adb..f9d9deb556 100644 --- a/src/components/common/terminate-test-modal/terminate-test-modal.html +++ b/src/components/common/terminate-test-modal/terminate-test-modal.html @@ -13,7 +13,7 @@ - + Terminate test diff --git a/src/components/common/terminate-test-modal/terminate-test-modal.ts b/src/components/common/terminate-test-modal/terminate-test-modal.ts index 793541e4ca..773c4af29a 100644 --- a/src/components/common/terminate-test-modal/terminate-test-modal.ts +++ b/src/components/common/terminate-test-modal/terminate-test-modal.ts @@ -1,5 +1,4 @@ -import { Component } from '@angular/core'; -import { NavParams } from '@ionic/angular'; +import { Component, Input } from '@angular/core'; import { DeviceAuthenticationProvider } from '@providers/device-authentication/device-authentication'; @Component({ @@ -8,22 +7,16 @@ import { DeviceAuthenticationProvider } from '@providers/device-authentication/d styleUrls: ['./terminate-test-modal.scss'], }) export class TerminateTestModal { + @Input() onCancel: Function; - + @Input() onTerminate: Function; - + @Input() shouldAuthenticate = true; + @Input() isPracticeMode = false; - constructor( - private navParams: NavParams, - private deviceAuthenticationProvider: DeviceAuthenticationProvider - ) { - this.onCancel = this.navParams.get('onCancel'); - this.onTerminate = this.navParams.get('onTerminate'); - this.shouldAuthenticate = this.navParams.get('shouldAuthenticate'); - this.isPracticeMode = this.navParams.get('isPracticeMode'); - } + constructor(private deviceAuthenticationProvider: DeviceAuthenticationProvider) {} /** * Fired when the termination of the test is confirmed. diff --git a/src/components/common/vrn-capture-modal/__tests__/modal-vrn-capture.spec.ts b/src/components/common/vrn-capture-modal/__tests__/modal-vrn-capture.spec.ts index 8881dbb9c5..cdbc6c64ab 100644 --- a/src/components/common/vrn-capture-modal/__tests__/modal-vrn-capture.spec.ts +++ b/src/components/common/vrn-capture-modal/__tests__/modal-vrn-capture.spec.ts @@ -4,8 +4,8 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { MockAppComponent } from '@app/__mocks__/app.component.mock'; import { AppComponent } from '@app/app.component'; import { VRNCaptureModal } from '@components/common/vrn-capture-modal/vrn-capture-modal'; -import { IonicModule, NavParams } from '@ionic/angular'; -import { NavParamsMock } from '@mocks/index.mock'; +import { IonicModule, ModalController } from '@ionic/angular'; +import { ModalControllerMock } from '@mocks/index.mock'; import { Store } from '@ngrx/store'; describe('VRNCaptureModal', () => { @@ -19,7 +19,7 @@ describe('VRNCaptureModal', () => { declarations: [VRNCaptureModal], imports: [FormsModule, ReactiveFormsModule, IonicModule, CommonModule], providers: [ - { provide: NavParams, useClass: NavParamsMock }, + { provide: ModalController, useClass: ModalControllerMock }, { provide: Store, useClass: StoreMock }, { provide: AppComponent, useClass: MockAppComponent }, ], diff --git a/src/components/common/vrn-capture-modal/vrn-capture-modal.ts b/src/components/common/vrn-capture-modal/vrn-capture-modal.ts index 7e492a73a6..833fd9fc6e 100644 --- a/src/components/common/vrn-capture-modal/vrn-capture-modal.ts +++ b/src/components/common/vrn-capture-modal/vrn-capture-modal.ts @@ -1,7 +1,7 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, Input, OnInit } from '@angular/core'; import { AbstractControl, UntypedFormControl, UntypedFormGroup, Validators } from '@angular/forms'; import { AppComponent } from '@app/app.component'; -import { ModalController, NavParams } from '@ionic/angular'; +import { ModalController } from '@ionic/angular'; import { Store, select } from '@ngrx/store'; import { FieldValidators, @@ -26,6 +26,8 @@ interface ComponentState { styleUrls: ['./vrn-capture-modal.scss'], }) export class VRNCaptureModal implements OnInit { + @Input() + public textZoom: string; componentState: ComponentState; merged$: Observable; subscription: Subscription; @@ -33,15 +35,13 @@ export class VRNCaptureModal implements OnInit { formGroup: UntypedFormGroup; vehicleRegistrationFormControlName = 'vehicleRegistration'; formInvalid = false; - textZoom: string = this.navParams.get('textZoom'); readonly registrationNumberValidator: FieldValidators = getRegistrationNumberValidator(); constructor( public modalController: ModalController, private store$: Store, - public appComponent: AppComponent, - public navParams: NavParams + public appComponent: AppComponent ) { this.formGroup = new UntypedFormGroup({}); this.formGroup.addControl( diff --git a/src/components/test-slot/test-outcome/__tests__/test-outcome.spec.ts b/src/components/test-slot/test-outcome/__tests__/test-outcome.spec.ts index 259ad4249b..c747c2e4e9 100644 --- a/src/components/test-slot/test-outcome/__tests__/test-outcome.spec.ts +++ b/src/components/test-slot/test-outcome/__tests__/test-outcome.spec.ts @@ -23,7 +23,9 @@ import { JournalModel } from '@store/journal/journal.model'; import { TestStatus } from '@store/tests/test-status/test-status.model'; import { ActivateTest, StartTest } from '@store/tests/tests.actions'; +import { ModalController } from '@ionic/angular'; import { RouterMock } from '@mocks/angular-mocks/router-mock'; +import { ModalControllerMock } from '@mocks/ionic-mocks/modal-controller.mock'; import { AccessibilityServiceMock } from '@providers/accessibility/__mocks__/accessibility-service.mock'; import { AccessibilityService } from '@providers/accessibility/accessibility.service'; import { SetExaminerBooked } from '@store/tests/examiner-booked/examiner-booked.actions'; @@ -158,6 +160,7 @@ describe('TestOutcomeComponent', () => { TestSlotComponentsModule, ], providers: [ + { provide: ModalController, useClass: ModalControllerMock }, { provide: LogHelper, useClass: LogHelperMock, diff --git a/src/components/test-slot/test-outcome/test-outcome.scss b/src/components/test-slot/test-outcome/test-outcome.scss index ec5849497c..0fe010f25a 100644 --- a/src/components/test-slot/test-outcome/test-outcome.scss +++ b/src/components/test-slot/test-outcome/test-outcome.scss @@ -5,7 +5,7 @@ .mes-rekey-button { --background: var(--gds-blue); - --color: var(--mes-white); + color: var(--mes-white); --box-shadow: 0px 2px 0px 0px rgba(0, 0, 0, 0.5); } diff --git a/src/theme/sass-partials/_alert.scss b/src/theme/sass-partials/_alert.scss index 3a4e60bf45..6c05f38814 100644 --- a/src/theme/sass-partials/_alert.scss +++ b/src/theme/sass-partials/_alert.scss @@ -83,8 +83,8 @@ div.alert-checkbox-inner { width: 13px; height: 22px; - margin-left: 4px; border-width: 0 5px 5px 0; + inset: 15% 0 0 33% !important; background-color: var(--gds-dark-green); } } diff --git a/src/theme/sass-partials/_buttons.scss b/src/theme/sass-partials/_buttons.scss index 0427b6559c..bc917c5007 100644 --- a/src/theme/sass-partials/_buttons.scss +++ b/src/theme/sass-partials/_buttons.scss @@ -12,63 +12,43 @@ ion-modal { } } .generic-button { + min-height: 56px; --border-radius: 10px; - margin: 0 0.2rem; + margin: 0 3.2px; --outline: none; - .des-header-style-3 { - color: var(--mes-white); + color: var(--gds-black); - .text-zoom-regular &, - .text-zoom-large &, - .text-zoom-x-large & { - line-height: 2em; - } + &::part(native) { + padding-inline-start: 0.8em !important; + padding-inline-end: 0.8em !important; + } - min-height: 44px; - padding-top: 1px + ion-text { + display: flex; + align-items: center; + color: var(--gds-black); + line-height: 2em; + min-height: 57px; + padding: 1px 0 0 0; } } .mes-primary-button { + @extend .generic-button; --background: var(--gds-dark-green); --background-activated: var(--gds-dark-green-2); --box-shadow: inset 0 -2px 0 0 var(--gds-green); - --border-radius: 10px; - margin: 0 0.2rem; - --outline: none; - .des-header-style-3 { + font-size: 15px; + ion-text { color: var(--mes-white) !important; - - .text-zoom-regular &, - .text-zoom-large &, - .text-zoom-x-large & { - line-height: 2em; - } - - min-height: 44px; - padding-top: 1px } } .mes-secondary-button { + @extend .generic-button; --background: var(--gds-yellow); --background-activated: var(--gds-yellow-darken-15); --box-shadow: 0 2px 0 0 rgba(0, 0, 0, 0.5); - --border-radius: 10px; - margin: 0 0.2em; - height: initial; - .des-header-style-3 { - color: var(--gds-black) !important; - - .text-zoom-regular &, - .text-zoom-large &, - .text-zoom-x-large & { - line-height: 2em; - } - - min-height: 44px; - padding-top: 1px - } } .mes-neutral-button { @@ -76,13 +56,9 @@ ion-modal { --background: var(--mes-white); --box-shadow: 0 0px 0 0 rgba(0, 0, 0, 0.5); --background-activated: var(--gds-grey-1); - &.activated { background: var(--gds-grey-1); } - .des-header-style-3 { - color: var(--mes-black); - } } .mes-transparent-button { @@ -105,11 +81,7 @@ ion-modal { @extend .generic-button; --background: var(--gds-grey-3); --background-activated: var(--gds-grey-1); - color: var(--gds-black); --box-shadow: inset 0 -2px 0 0 rgba(0, 0, 0, 0.5); - .des-header-style-3 { - color: var(--gds-black) !important; - } } .mes-link-button { @@ -132,8 +104,7 @@ ion-modal { --background-activated: var(--gds-grey-2); --box-shadow: inset 0 -2px 0 0 var(--gds-grey-1); --border-radius: 10px; - margin: 0 0.2rem; - margin-bottom: 36px; + margin: 0 0.2rem 36px; width: 100%; height: 56px; .des-header-style-3 {