From 47743522a2e778eded16fdcd8e63d7a945959fc6 Mon Sep 17 00:00:00 2001 From: Brock Anderson Date: Thu, 17 Oct 2024 10:44:02 -0700 Subject: [PATCH] renamed 'submit' button to 'generate draft report'. added a note below the button that the draft won't be seen by the BC gov. updated e2e tests. --- frontend/e2e/pages/generate-report.ts | 12 ++++++------ frontend/src/components/InputForm.vue | 13 ++++++++++--- frontend/src/main.js | 3 ++- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/frontend/e2e/pages/generate-report.ts b/frontend/e2e/pages/generate-report.ts index bf314be0a..810f7ccec 100644 --- a/frontend/e2e/pages/generate-report.ts +++ b/frontend/e2e/pages/generate-report.ts @@ -55,7 +55,7 @@ export class GenerateReportPage extends PTPage { public endYearInput: Locator; public commentsInput: Locator; public dataConstraintsInput: Locator; - public submitButton: Locator; + public generateDraftButton: Locator; async setup() { await super.setup(); @@ -72,8 +72,8 @@ export class GenerateReportPage extends PTPage { this.commentsInput = await this.instance.locator('#comments'); this.dataConstraintsInput = await this.instance.locator('#dataConstraints'); - this.submitButton = await this.instance.getByRole('button', { - name: 'Submit', + this.generateDraftButton = await this.instance.getByRole('button', { + name: 'Generate Draft Report', }); } @@ -207,19 +207,19 @@ export class GenerateReportPage extends PTPage { } async submitForm(responseChecker?: (res: Response) => boolean) { - await this.submitButton.scrollIntoViewIfNeeded(); + await this.generateDraftButton.scrollIntoViewIfNeeded(); if (responseChecker) { const { report } = await waitForApiResponses( { report: this.instance.waitForResponse(responseChecker), }, async () => { - await this.submitButton.click(); + await this.generateDraftButton.click(); }, ); return report; } else { - await this.submitButton.click(); + await this.generateDraftButton.click(); } } diff --git a/frontend/src/components/InputForm.vue b/frontend/src/components/InputForm.vue index e3b1397a8..6411fa024 100644 --- a/frontend/src/components/InputForm.vue +++ b/frontend/src/components/InputForm.vue @@ -596,17 +596,24 @@ - Submit + Generate Draft Report - + Please check the form and correct all errors before submitting. - + + + Your CSV file and draft report will not be shared with the B.C. + Government. + + + + {{ alertMessage }} diff --git a/frontend/src/main.js b/frontend/src/main.js index 20ceeec69..50117dfd7 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -5,7 +5,7 @@ import App from './App.vue'; import router from './router'; import 'regenerator-runtime/runtime'; import { createPinia } from 'pinia'; -import * as colors from 'vuetify/lib/util/colors'; +import * as colors from 'vuetify/util/colors'; import 'vuetify/styles'; import * as labs from 'vuetify/labs/components'; import * as components from 'vuetify/components'; @@ -29,6 +29,7 @@ const myCustomLightTheme = { link: '#255A90', tab: '#1E5189', white: '#ffffff', + 'dark-gray': '424242', }, variables: { 'border-opacity': 0.24, //default 0.12