Skip to content

Commit

Permalink
renamed 'submit' button to 'generate draft report'. added a note belo…
Browse files Browse the repository at this point in the history
…w the button that the draft won't be seen by the BC gov. updated e2e tests.
  • Loading branch information
banders committed Oct 17, 2024
1 parent f930114 commit 4774352
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
12 changes: 6 additions & 6 deletions frontend/e2e/pages/generate-report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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',
});
}

Expand Down Expand Up @@ -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();
}
}

Expand Down
13 changes: 10 additions & 3 deletions frontend/src/components/InputForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -596,17 +596,24 @@
<v-row class="mt-6">
<v-col class="d-flex justify-center">
<v-btn id="submitButton" class="btn-primary" type="submit">
Submit
Generate Draft Report
</v-btn>
</v-col>
</v-row>
<v-row v-if="isSubmit && !formReady" dense>
<v-row v-if="isSubmit && !formReady" dense class="mt-4">
<v-col class="text-error d-flex justify-center">
Please check the form and correct all errors before submitting.
</v-col>
</v-row>

<v-row class="mt-3">
<v-row dense class="mt-4">
<v-col class="text-dark-gray d-flex justify-center">
Your CSV file and draft report will not be shared with the B.C.
Government.
</v-col>
</v-row>

<v-row class="mt-4">
<v-col>
<v-alert v-if="alertMessage" :class="alertType" class="mb-3">
{{ alertMessage }}
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -29,6 +29,7 @@ const myCustomLightTheme = {
link: '#255A90',
tab: '#1E5189',
white: '#ffffff',
'dark-gray': '424242',
},
variables: {
'border-opacity': 0.24, //default 0.12
Expand Down

0 comments on commit 4774352

Please sign in to comment.