Skip to content
Merged

Dev #2154

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7a6b71d
initial commit
Mar 5, 2026
b04db3e
Dynamic submission id
Mar 6, 2026
e21c930
Merge branch 'dev' into feature/AB#32212-RegressionTestsApprovalFlow
Mar 11, 2026
27fb63f
Merge branch 'dev' into feature/AB#32212-RegressionTestsApprovalFlow
Mar 12, 2026
f25da77
fixing the attachment
Mar 12, 2026
4c1d89c
fixing copilot reviews
Mar 13, 2026
265e171
Merge branch 'dev' into feature/AB#32212-RegressionTestsApprovalFlow
Mar 18, 2026
dccef3d
fixing the bugs
Mar 18, 2026
f25015a
comment details
Mar 18, 2026
4d40b5a
AB#28800 update payment number mapping
AndreGAot Mar 19, 2026
7e0a1c8
AB#28800 fix unit tests for updated mapping
AndreGAot Mar 19, 2026
fbaeaf4
AB#28800 codeQL suggestion
AndreGAot Mar 19, 2026
709dbd2
Merge pull request #2148 from bcgov/feature/AB#28800-portal-payments
AndreGAot Mar 19, 2026
59432a5
Adding conditional for PROD not to run approval flow
Mar 19, 2026
4b7320a
AB#29602
DavidBrightBcGov Mar 19, 2026
39af4ac
AB#29602
DavidBrightBcGov Mar 19, 2026
4eaa0f0
Reloading value fix to adjust decimal issue
DavidBrightBcGov Mar 19, 2026
46b70a4
feature/AB#32212 - A fix for the CHEFS api call
Stephan-McColm Mar 19, 2026
8020bba
Applied sonarqube requirements
DavidBrightBcGov Mar 19, 2026
e472fa5
Merge pull request #2127 from bcgov/feature/AB#32212-RegressionTestsA…
DarylTodosichuk Mar 19, 2026
d3e6972
Merge pull request #2150 from bcgov/bugfix/AB#29602-payment-threshold…
DavidBrightBcGov Mar 20, 2026
d2a9c7e
feature/AB#32325-BackgroundJobAuditing-FixUsers
JamesPasta Mar 20, 2026
3d2c2dd
Merge pull request #2153 from bcgov/feature/AB#32325-AddInBacgroundJo…
JamesPasta Mar 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 65 additions & 15 deletions applications/Unity.AutoUI/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,22 +1,72 @@
import { defineConfig } from 'cypress';
import { defineConfig } from "cypress";
import FormData from "form-data";
import fs from "fs";
import path from "path";

// https://docs.cypress.io/guides/references/configuration
export default defineConfig({
e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
setupNodeEvents(on) {
on("task", {
async uploadChefsFile({
baseURL,
authToken,
filePath,
}: {
baseURL: string;
authToken: string;
filePath: string;
}) {
const fileBuffer = fs.readFileSync(filePath);
const fileName = path.basename(filePath);

const form = new FormData();
form.append("files", fileBuffer, {
filename: fileName,
contentType: "text/plain",
});

// Use getBuffer() so fetch receives a complete binary buffer
// rather than a piped stream (which causes "Unexpected end of form")
const formBuffer = form.getBuffer();
const formHeaders = form.getHeaders();

const response = await fetch(`${baseURL}/app/api/v1/files`, {
method: "POST",
headers: {
Authorization: `Bearer ${authToken}`,
...formHeaders,
},
body: formBuffer as unknown as BodyInit,
});

if (!response.ok) {
throw new Error(
`File upload failed: ${response.status} ${await response.text()}`,
);
}

return response.json();
},
});
},
baseUrl: 'https://developer.gov.bc.ca/',
specPattern: [
"cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
"cypress/scripts/**/*.cy.{js,jsx,ts,tsx}",
"cypress/regression/**/*.cy.{js,jsx,ts,tsx}",
],
baseUrl: "https://dev-unity.apps.silver.devops.gov.bc.ca/",
defaultCommandTimeout: 20000, // Time, in milliseconds, to wait until most DOM based commands are considered timed out.
viewportWidth: 1440, // Default width in pixels.
viewportHeight: 900, // Default height in pixels.
viewportWidth: 1440, // Default width in pixels.
viewportHeight: 900, // Default height in pixels.
chromeWebSecurity: false, // Chromium-based browser's Web Security for same-origin policy and insecure mixed content.
testIsolation: false, // Set true to ensure a clean browser context between test cases.
retries: // The number of times to retry a failing test.
{
"runMode": 3,
"openMode": 0
},
testIsolation: false, // Set true to ensure a clean browser context between test cases.
// The number of times to retry a failing test.
retries: {
runMode: 3,
openMode: 0,
},
experimentalMemoryManagement: true,
numTestsKeptInMemory: 3
}
});
numTestsKeptInMemory: 3,
},
});
15 changes: 9 additions & 6 deletions applications/Unity.AutoUI/cypress/e2e/basicEmail.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,20 +306,23 @@ describe("Send an email", () => {
});

it("Select Email Template", () => {
cy.intercept("GET", "/api/app/template/*/template-by-id").as(
"loadTemplate",
);

cy.get("#template", { timeout: STANDARD_TIMEOUT })
.should("exist")
.should("be.visible")
.select(TEMPLATE_NAME);

cy.wait("@loadTemplate", { timeout: STANDARD_TIMEOUT });

cy.get("#template")
.find("option:selected")
.should("have.text", TEMPLATE_NAME);

// #EmailBody is a hidden textarea backing the rich-text editor.
// Template selection populates the visible RTE but does not auto-sync
// the backing field — trigger the change manually if still empty.
cy.get("#EmailBody", { timeout: STANDARD_TIMEOUT }).then(($el) => {
if (($el.val() as string).trim() === "") {
cy.wrap($el).invoke("val", "Test email body").trigger("change");
}
});
});

it("Set Email To address", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Maple Ridge Community Resource Development Initiative
Test Attachment - Automated Regression Submission
Generated by Cypress automation script.
Loading
Loading