Skip to content
Merged

Dev #2837

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
89923b6
[AB33234] Add renewal link support to ApplicationForm and DTOs
plavoie-BC Aug 12, 2026
f6cb782
[AB#33234] Add renewal link DbMigration
plavoie-BC Aug 12, 2026
37d836e
Merge remote-tracking branch 'origin/dev' into feature/AB#33234-renew…
plavoie-BC Aug 12, 2026
6c7ef82
Revert "[AB#33234] Add renewal link DbMigration"
plavoie-BC Aug 13, 2026
b09d4b4
[AB#33234] Add ExternalLinks collection to DbMigration
plavoie-BC Aug 13, 2026
869c87d
[AB#33234] Map External Links to Submission Info Data Provider
plavoie-BC Aug 13, 2026
95c825e
[AB#33234] Fix ExternalLinkType reference
plavoie-BC Aug 13, 2026
080403b
[AB#33234] Reset migration to resolve conflict
plavoie-BC Aug 13, 2026
498b766
[AB#33234] Refactor ExternalLink
plavoie-BC Aug 13, 2026
e24e7c8
[AB#33234] Add EligibleForRenewal to Application
plavoie-BC Aug 13, 2026
b0251e5
[AB#33234] Optimize ExternalLink queries to DB
plavoie-BC Aug 13, 2026
af5728b
[AB#33234] Related Links should sort ascending except for negatives
plavoie-BC Aug 13, 2026
f3edea2
[AB#33234] Add backend ExternalLink AppService and Validation
plavoie-BC Aug 13, 2026
3b230f0
[AB#33234] Fix ExternalLink default in JSON column
plavoie-BC Aug 13, 2026
2b6aa72
[AB#33234] Add UI for managing applicant portal external links
plavoie-BC Aug 13, 2026
fe85aa2
[AB#33234] Form Configuration UI Changes
plavoie-BC Aug 13, 2026
61888fc
AB#34056 update policy for user assignment
AndreGAot Aug 14, 2026
d2b629a
AB#33864 propagate worksheet generation failures
jacobwillsmith Aug 14, 2026
05d1eba
AB#33864 preserve deferred scoresheet review action
jacobwillsmith Aug 14, 2026
d014fdc
AB#33864 split scoresheet generate and review actions
jacobwillsmith Aug 14, 2026
48355b2
AB#33864 use native JSON parsing in mapping
jacobwillsmith Aug 14, 2026
27ffddb
AB#33864 log saved mapping apply failures
jacobwillsmith Aug 14, 2026
ba2096e
inital commit
Aug 14, 2026
af0f2ba
Make ApprovalFlow.cy.ts self-seeding and fix transient CAS token failure
Aug 14, 2026
bf86bce
Merge pull request #2822 from bcgov/bugfix/AB#34108_fix_approval_flow…
DarylTodosichuk Aug 17, 2026
a792001
[AB#33234] Fix ApplicationForm Unit Tests
plavoie-BC Aug 17, 2026
eded394
Merge remote-tracking branch 'origin/dev' into feature/AB#33234-renew…
plavoie-BC Aug 17, 2026
6da1cc2
Merge pull request #2818 from bcgov/feature/AB#33864-sonar-issue-cleanup
JamesPasta Aug 17, 2026
6f45237
initial commit to push the changes to fix the approval flow seeder
Aug 17, 2026
db2f6f8
AB#26913: Send Bulk Emails - Initial Draft
aurelio-aot Aug 10, 2026
bad5f42
AB#26913: Add Fields from Bulk Approval Modal
aurelio-aot Aug 11, 2026
feb1dce
AB#26913: Fix sonarqube issues
aurelio-aot Aug 12, 2026
9180e1d
AB#26913: Fix sonarqube and CodeQL findings
aurelio-aot Aug 12, 2026
01990e2
AB#26913: Edit Draft Email When Sending Bulk Emails
aurelio-aot Aug 17, 2026
b089f9d
Merge pull request #2823 from bcgov/feature/AB#34056-new-tenant-creat…
JamesPasta Aug 17, 2026
3f5c01d
AB#26913: Fix sonarqube issues
aurelio-aot Aug 17, 2026
0a990d8
bugfix/AB#34018_fix_approval_seeder - Multi-platform compatibility. N…
Stephan-McColm Aug 17, 2026
ae8afee
AB#33864 AI form scoresheet/worksheet/mapping flow standardization
jacobwillsmith Aug 17, 2026
107943c
AB#26913: Put draggable divider in Send Email Notification dialog box
aurelio-aot Aug 18, 2026
ec8b41f
AB#33864 Fix AI workflow review findings
jacobwillsmith Aug 18, 2026
f259a42
AB#33864 Simplify AI button guards
jacobwillsmith Aug 18, 2026
e34fa99
Merge pull request #2825 from bcgov/feature/AB#33864-pending-ai-score…
jacobwillsmith Aug 18, 2026
5c1c2d4
Merge pull request #2824 from bcgov/bugfix/AB#34108_fix_approval_seeder
DarylTodosichuk Aug 18, 2026
2ff04d8
[AB#33234] Code Quality Fixes
plavoie-BC Aug 18, 2026
2627d16
Merge remote-tracking branch 'origin/dev' into feature/AB#33234-renew…
plavoie-BC Aug 18, 2026
c02afd3
[AB#33234] Application Forms UI Small Fixes
plavoie-BC Aug 18, 2026
347d370
Merge pull request #2806 from bcgov/feature/AB#33234-renewal-link
AndreGAot Aug 18, 2026
365e89e
AB#26913: Add comment for the sonarqube issues
aurelio-aot Aug 18, 2026
2f8eea0
feature/AB#33297_Modify_Cypress_Launcher: Improved support for local …
Stephan-McColm Aug 18, 2026
e6643f4
Merge pull request #2826 from bcgov/feature/AB#33297_Modify_Cypress_L…
DarylTodosichuk Aug 18, 2026
0b62d54
AB#33935 update links structure for Applicant Portal
AndreGAot Aug 18, 2026
770d436
AB#33935 add migration for application forms extra properties
AndreGAot Aug 18, 2026
b8edc82
AB#33935 fix unit tests
AndreGAot Aug 18, 2026
e28373d
AB#33935 update migration
AndreGAot Aug 18, 2026
c14effd
Merge pull request #2827 from bcgov/feature/AB#33935-renewal-link-upd…
AndreGAot Aug 18, 2026
8324c30
AB#26913: Fix bugs on bulk send email
aurelio-aot Aug 18, 2026
939fb13
AB#26913: Fix sonarqube issue
aurelio-aot Aug 18, 2026
d4999bf
AB#26913: Add Confirmation dialog when removing applications and send…
aurelio-aot Aug 18, 2026
0ea9e5d
feature/AB#34135-InsantMessaging
JamesPasta Aug 19, 2026
85596e8
feature/AB#34135-InsantMessaging-LogsFix
JamesPasta Aug 19, 2026
047a6a4
feature/AB#34135-InsantMessaging-LogsFix
JamesPasta Aug 19, 2026
fa92f1f
AB#34136 Add Cypress Environment Selection and Console Output Line
DarylTodosichuk Aug 19, 2026
423df08
feature/AB#34135-InsantMessaging-Sonar
JamesPasta Aug 19, 2026
5eec13d
Merge pull request #2830 from bcgov/bugfix/AB#34136-cypress-environme…
DarylTodosichuk Aug 19, 2026
8b0ab4c
AB#33553: Error Page For Unfound ApplicationID and ApplicantID
aurelio-aot Aug 19, 2026
ff6a453
bugfix/AB#34117-CommentsEmail
JamesPasta Aug 19, 2026
ba175fc
Merge pull request #2832 from bcgov/bugfix/AB#33553-No-Application-In…
JamesPasta Aug 19, 2026
90c85c4
bugfix/AB#34117-CommentsEmailTo
JamesPasta Aug 19, 2026
85f3518
Merge pull request #2834 from bcgov/bugfix/AB#34117-CommentsEmailTo
JamesPasta Aug 19, 2026
df06be3
bugfix/AB#34117-CommentsEmailTo-Sonar
JamesPasta Aug 19, 2026
f67e654
Merge pull request #2835 from bcgov/feature/AB#34135-InstantMessaging
JamesPasta Aug 19, 2026
7231748
Merge pull request #2789 from bcgov/feature/AB#26913-Sending-Bulk-Emails
JamesPasta Aug 19, 2026
aa1e864
Merge remote-tracking branch 'origin/dev' into bugfix/AB#34117-Commen…
JamesPasta Aug 19, 2026
e7d7792
Merge pull request #2836 from bcgov/bugfix/AB#34117-CommentsEmailTo
JamesPasta Aug 19, 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
15 changes: 15 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"permissions": {
"allow": [
"WebFetch(domain:abp.io)",
"Bash(abp help *)",
"Bash(abp add-package *)",
"Bash(abp install-libs *)",
"Bash(grep -o \"Bundling\\\\\\\\\\\\\\\\[A-Za-z]*\\\\.cs\" \"C:\\\\Users\\\\JPASTA\\\\.claude\\\\projects\\\\c--Work-Economy-UnityOnGit-Unity\\\\99eba763-b7c1-4034-93ab-933cde9f37db\\\\tool-results\\\\by1m66sl2.txt\")",
"Bash(find 'C:\\\\Users\\\\JPASTA/.nuget/packages/volo.abp.aspnetcore.mvc.ui' -iname *.dll)",
"Bash(find 'C:\\\\Users\\\\JPASTA/.nuget/packages' -maxdepth 1 -iname *bundl*)",
"Bash(find 'C:\\\\Users\\\\JPASTA/.nuget/packages/volo.abp.aspnetcore.mvc.ui.theme.shared' -iname *.dll)",
"Bash(tasklist //FI \"PID eq 19060\")"
]
}
}
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ bld/
[Oo]bj/
[Ll]og/
[Ll]ogs/
!applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Application/Logs/
!applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Application.Contracts/Logs/
!applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Domain/Logs/
!applications/Unity.GrantManager/modules/Unity.Notifications/src/Unity.Notifications.Domain.Shared/Logs/

# Visual Studio cache/options directory
.vs/
Expand Down Expand Up @@ -118,4 +122,9 @@ appsettings.json

/applications/Orchestrator
*.env
/applications/Unity.GrantManager/src/Unity.GrantManager.Web/package-lock.json
/applications/Unity.GrantManager/src/Unity.GrantManager.Web/package-lock.json
/applications/Unity.AutoUI/cypress/config/dev.json
/applications/Unity.AutoUI/cypress/config/dev2.json
/applications/Unity.AutoUI/cypress/config/test.json
/applications/Unity.AutoUI/cypress/config/uat.json
/applications/Unity.AutoUI/cypress/config/prod.json
3 changes: 2 additions & 1 deletion applications/Unity.AutoUI/CypressTestLauncher.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@echo off
@echo off
setlocal
cd /d "%~dp0"

powershell -NoProfile -ExecutionPolicy Bypass -NoExit -Command "$ErrorActionPreference='Stop';$ProgressPreference='SilentlyContinue';Add-Type -AssemblyName System.Windows.Forms;Add-Type -AssemblyName System.Drawing;$projectPath=(Get-Location).Path;$form=New-Object System.Windows.Forms.Form;$form.Text='Cypress Test Launcher';$form.Size=New-Object System.Drawing.Size(420,240);$form.StartPosition='CenterScreen';$form.AutoScaleMode=[System.Windows.Forms.AutoScaleMode]::None;$envLabel=New-Object System.Windows.Forms.Label;$envLabel.Text='Select Environment:';$envLabel.AutoSize=$true;$envLabel.Location=New-Object System.Drawing.Point(15,15);$envBox=New-Object System.Windows.Forms.ComboBox;$envBox.Location=New-Object System.Drawing.Point(15,35);$envBox.Size=New-Object System.Drawing.Size(380,25);$envBox.DropDownStyle='DropDownList';$envBox.Items.Add('Please select an environment');$envBox.Items.Add('DEV');$envBox.Items.Add('DEV2');$envBox.Items.Add('TEST');$envBox.Items.Add('UAT');$envBox.Items.Add('PROD');$envBox.SelectedIndex=0;$modeLabel=New-Object System.Windows.Forms.Label;$modeLabel.Text='Select Mode:';$modeLabel.AutoSize=$true;$modeLabel.Location=New-Object System.Drawing.Point(15,70);$modeBox=New-Object System.Windows.Forms.ComboBox;$modeBox.Location=New-Object System.Drawing.Point(15,90);$modeBox.Size=New-Object System.Drawing.Size(380,25);$modeBox.DropDownStyle='DropDownList';$modeBox.Items.Add('Please select a mode');$modeBox.Items.Add('GUI');$modeBox.Items.Add('Headless');$modeBox.SelectedIndex=0;$run=New-Object System.Windows.Forms.Button;$run.Text='Launch Cypress';$run.Location=New-Object System.Drawing.Point(15,135);$run.Size=New-Object System.Drawing.Size(380,32);$run.Add_Click({try{if($envBox.SelectedIndex -eq 0 -or $modeBox.SelectedIndex -eq 0){[System.Windows.Forms.MessageBox]::Show('Please select both an environment and a mode.','Missing Selection');return};Set-Location $projectPath;$envName=$envBox.SelectedItem;$envFile='.\\cypress.'+$envName+'.env.json';if(Test-Path $envFile){Copy-Item $envFile '.\\cypress.env.json' -Force}else{[System.Windows.Forms.MessageBox]::Show('Environment file not found: '+$envFile,'Missing Env File');return};if($modeBox.SelectedItem -eq 'Headless'){Start-Process powershell -ArgumentList '-NoExit','-Command',\"cd '$projectPath'; npx cypress run\"}else{Start-Process powershell -ArgumentList '-NoExit','-Command',\"cd '$projectPath'; npx cypress open\"}}catch{[System.Windows.Forms.MessageBox]::Show($_.Exception.Message,'Cypress Launcher Error')}});$form.Controls.Add($envLabel);$form.Controls.Add($envBox);$form.Controls.Add($modeLabel);$form.Controls.Add($modeBox);$form.Controls.Add($run);$form.ShowDialog()"
powershell -NoProfile -ExecutionPolicy Bypass -NoExit -Command "$ErrorActionPreference='Stop';$ProgressPreference='SilentlyContinue';Add-Type -AssemblyName System.Windows.Forms;Add-Type -AssemblyName System.Drawing;$projectPath=(Get-Location).Path;$form=New-Object System.Windows.Forms.Form;$form.Text='Cypress Test Launcher';$form.Size=New-Object System.Drawing.Size(420,240);$form.StartPosition='CenterScreen';$form.AutoScaleMode=[System.Windows.Forms.AutoScaleMode]::None;$envLabel=New-Object System.Windows.Forms.Label;$envLabel.Text='Select Environment:';$envLabel.AutoSize=$true;$envLabel.Location=New-Object System.Drawing.Point(15,15);$envBox=New-Object System.Windows.Forms.ComboBox;$envBox.Location=New-Object System.Drawing.Point(15,35);$envBox.Size=New-Object System.Drawing.Size(380,25);$envBox.DropDownStyle='DropDownList';$envBox.Items.Add('Please select an environment');$envBox.Items.Add('DEV');$envBox.Items.Add('DEV2');$envBox.Items.Add('TEST');$envBox.Items.Add('UAT');$envBox.Items.Add('PROD');$envBox.SelectedIndex=0;$modeLabel=New-Object System.Windows.Forms.Label;$modeLabel.Text='Select Mode:';$modeLabel.AutoSize=$true;$modeLabel.Location=New-Object System.Drawing.Point(15,70);$modeBox=New-Object System.Windows.Forms.ComboBox;$modeBox.Location=New-Object System.Drawing.Point(15,90);$modeBox.Size=New-Object System.Drawing.Size(380,25);$modeBox.DropDownStyle='DropDownList';$modeBox.Items.Add('Please select a mode');$modeBox.Items.Add('GUI');$modeBox.Items.Add('Headless');$modeBox.SelectedIndex=0;$run=New-Object System.Windows.Forms.Button;$run.Text='Launch Cypress';$run.Location=New-Object System.Drawing.Point(15,135);$run.Size=New-Object System.Drawing.Size(380,32);$run.Add_Click({try{if($envBox.SelectedIndex -eq 0 -or $modeBox.SelectedIndex -eq 0){[System.Windows.Forms.MessageBox]::Show('Please select both an environment and a mode.','Missing Selection');return};Set-Location $projectPath;$envName=$envBox.SelectedItem.ToString().ToLowerInvariant();$envFile=Join-Path $projectPath ('cypress\config\'+$envName+'.json');if(-not (Test-Path $envFile)){[System.Windows.Forms.MessageBox]::Show('Environment file not found: '+$envFile,'Missing Env File');return};if($modeBox.SelectedItem -eq 'Headless'){Start-Process powershell -ArgumentList '-NoExit','-ExecutionPolicy','Bypass','-Command',\"`$env:UNITY_CYPRESS_ENV='$envName'; cd '$projectPath'; node .\\scripts\\run-cypress.js run --browser chrome\"}else{Start-Process powershell -ArgumentList '-NoExit','-ExecutionPolicy','Bypass','-Command',\"`$env:UNITY_CYPRESS_ENV='$envName'; cd '$projectPath'; node .\\scripts\\run-cypress.js open --browser chrome\"}}catch{[System.Windows.Forms.MessageBox]::Show($_.Exception.Message,'Cypress Launcher Error')}});$form.Controls.Add($envLabel);$form.Controls.Add($envBox);$form.Controls.Add($modeLabel);$form.Controls.Add($modeBox);$form.Controls.Add($run);$form.ShowDialog()"
70 changes: 69 additions & 1 deletion applications/Unity.AutoUI/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,67 @@ import FormData from "form-data";
import fs from "fs";
import path from "path";

function loadLocalEnvironmentConfig(requestedEnvironment?: string): {
environmentName: string;
environmentSource: string;
environmentConfig: Record<string, unknown>;
} {
let environmentName: string;
let environmentSource: string;

if (requestedEnvironment) {
environmentName = requestedEnvironment.toLowerCase();
environmentSource = "--env environment";
} else if (process.env.UNITY_CYPRESS_ENV) {
environmentName = process.env.UNITY_CYPRESS_ENV.toLowerCase();
environmentSource = "UNITY_CYPRESS_ENV";
} else {
environmentName = "dev";
environmentSource = "default";
}

const environmentFilePath = path.resolve(
"cypress",
"config",
`${environmentName}.json`,
);

try {
const content = fs.readFileSync(environmentFilePath, "utf-8");
return {
environmentName,
environmentSource,
environmentConfig: JSON.parse(content) as Record<string, unknown>,
};
} catch {
return { environmentName, environmentSource, environmentConfig: {} };
}
}

// https://docs.cypress.io/guides/references/configuration
export default defineConfig({
e2e: {
setupNodeEvents(on) {
setupNodeEvents(on, config) {
// Supports selecting the environment either via Cypress's native
// `--env environment=<name>` CLI flag or the UNITY_CYPRESS_ENV OS
// environment variable (the flag takes precedence).
const { environmentName, environmentSource, environmentConfig } =
loadLocalEnvironmentConfig(
config.env?.environment as string | undefined,
);

// eslint-disable-next-line no-console
console.log(
`\n[Cypress] Running against environment: ${environmentName} (source: ${environmentSource})\n`,
);

on("after:run", () => {
// eslint-disable-next-line no-console
console.log(
`\n[Cypress] Finished run against environment: ${environmentName} (source: ${environmentSource})\n`,
);
});

on("task", {
readJsonIfExists(filePath: string): Record<string, unknown> | null {
try {
Expand Down Expand Up @@ -59,6 +116,17 @@ export default defineConfig({
return response.json();
},
});

return {
...config,
baseUrl:
(environmentConfig["webapp.url"] as string | undefined) ||
config.baseUrl,
env: {
...config.env,
...environmentConfig,
},
};
},
specPattern: [
"cypress/e2e/**/*.cy.{js,jsx,ts,tsx}",
Expand Down
3 changes: 2 additions & 1 deletion applications/Unity.AutoUI/cypress/config/dev.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"test2password": "",
"TEST_EMAIL_TO": "",
"TEST_EMAIL_CC": "",
"TEST_EMAIL_BCC": ""
"TEST_EMAIL_BCC": "",
"chefsApiKey": ""
}
3 changes: 2 additions & 1 deletion applications/Unity.AutoUI/cypress/config/test.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"test2password": "",
"TEST_EMAIL_TO": "",
"TEST_EMAIL_CC": "",
"TEST_EMAIL_BCC": ""
"TEST_EMAIL_BCC": "",
"chefsApiKey": ""
}
3 changes: 2 additions & 1 deletion applications/Unity.AutoUI/cypress/config/uat.json.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"test2password": "",
"TEST_EMAIL_TO": "",
"TEST_EMAIL_CC": "",
"TEST_EMAIL_BCC": ""
"TEST_EMAIL_BCC": "",
"chefsApiKey": ""
}
4 changes: 2 additions & 2 deletions applications/Unity.AutoUI/cypress/e2e/login.cy.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="cypress" />
import { LoginPageInstance, NavigationPageInstance } from "../utilities";

describe('Grant Manager Login and Logout', () => {
Expand All @@ -8,10 +9,9 @@ describe('Grant Manager Login and Logout', () => {
loginPage.login()
loginPage.verifyOnGrantApplications()

// Verify Default Grant Program tenant is selected
navPage.switchToDefaultGrantsProgramIfAvailable()
navPage.verifyCurrentTenant('Default Grants Program')

// Logout (terminal action)
loginPage.quickLogout()
})
})
3 changes: 1 addition & 2 deletions applications/Unity.AutoUI/cypress/e2e/navigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ describe('Grant Manager Login and Top Navigation', () => {

it('Verify navigation options in the top banner', () => {

// 3.) Verify Default Grant Program tenant is selected.
navPage.switchToDefaultGrantsProgramIfAvailable()
navPage.verifyCurrentTenant('Default Grants Program')

// 4.) Ensure all expected headings are present.
navPage.verifyAllNavItemsExist()

// 5.) Applications
Expand Down
2 changes: 1 addition & 1 deletion applications/Unity.AutoUI/cypress/fixtures/metabase.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
{
"unityEnv": "PROD",
"baseURL": "https://unity-reporting.apps.gold.devops.gov.bc.ca/"
"baseURL": "https://unity-reporting.apps.silver.devops.gov.bc.ca/"
}
]
}
40 changes: 37 additions & 3 deletions applications/Unity.AutoUI/cypress/regression/ApprovalFlow.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,10 +506,25 @@ const APPLICATIONS_PATH = "GrantApplications";
return;
}

// Priority 3: fetch the latest matching submission from the Unity API
// Priority 3: fetch the latest matching submission from the Unity API,
// falling back to seeding a fresh one via CHEFS if none currently
// match (e.g. every existing seeded submission has already been
// approved by a prior run) — so this spec is self-sufficient and
// doesn't depend on a separate seed step running first.
cy.fetchDynamicSubmission(TEST_CONFIG.fetchOptions).then((id) => {
submissionId = id;
cy.log(`✅ Fetched dynamic submission ID: ${submissionId}`);
if (id) {
submissionId = id;
cy.log(`✅ Fetched dynamic submission ID: ${submissionId}`);
return;
}

cy.log(
"⚠️ No matching submission found — seeding a fresh one via CHEFS",
);
cy.seedApprovalFlowSubmission().then((seededId) => {
submissionId = seededId;
cy.log(`✅ Seeded and using submission ID: ${submissionId}`);
});
});
},
);
Expand Down Expand Up @@ -619,6 +634,25 @@ const APPLICATIONS_PATH = "GrantApplications";
.enterSupplierNumber(TEST_CONFIG.supplierNumber)
.clickElsewhere()
.clickPaymentInfoSave();

// Saving the supplier number calls out to CAS to resolve it, which can
// transiently fail with "GetAuthTokenAsync: Error retrieving Token".
// When that happens the save silently doesn't attach a supplier, leaving
// SupplierId empty for the rest of the flow — dismiss and retry once.
cy.get("body").then(($body) => {
const hasTokenError =
$body.text().includes("GetAuthTokenAsync") ||
$body.text().includes("Error retrieving Token");

if (hasTokenError) {
cy.log("⚠️ Transient CAS token error on payment save — retrying once");
detailsPage.dismissErrorModalIfPresent();
detailsPage
.enterSupplierNumber(TEST_CONFIG.supplierNumber)
.clickElsewhere()
.clickPaymentInfoSave();
}
});
});

// Must use function() (not arrow) so this.skip() is accessible
Expand Down
42 changes: 26 additions & 16 deletions applications/Unity.AutoUI/cypress/scripts/chefs-api-config.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,31 @@
{
"environments": {
"test": {
"baseURL": "https://chefs-test.apps.silver.devops.gov.bc.ca",
"formId": "46e25863-0ead-4aa8-897f-51e45f79e137",
"versionId": "4ef52ead-2cc3-4bdb-a7b7-73be983a7838"
},
"dev": {
"baseURL": "https://chefs-dev.apps.silver.devops.gov.bc.ca",
"formId": "233f47f9-b566-46c3-926a-73d565bf710f",
"versionId": "1e209d6b-46f5-4ddb-bc79-6e04033231cb"
},
"uat": {
"baseURL": "https://chefs-test.apps.silver.devops.gov.bc.ca",
"formId": "f2f45aa7-62c5-49ca-8846-b214e02adb46",
"versionId": "1d4d73ec-00e7-4b57-98c9-49d1e0c7d15b"
}
"environments": {
"dev": {
"baseURL": "https://chefs-dev.apps.silver.devops.gov.bc.ca",
"formId": "233f47f9-b566-46c3-926a-73d565bf710f",
"versionId": "1e209d6b-46f5-4ddb-bc79-6e04033231cb"
},
"dev2": {
"baseURL": "https://chefs-dev.apps.silver.devops.gov.bc.ca",
"formId": "92c0df4c-34f9-4a9a-a1b4-61c12495749c",
"versionId": "8218c285-7fa3-42df-b445-7e8ae835fad0"
},
"test": {
"baseURL": "https://chefs-test.apps.silver.devops.gov.bc.ca",
"formId": "46e25863-0ead-4aa8-897f-51e45f79e137",
"versionId": "4ef52ead-2cc3-4bdb-a7b7-73be983a7838"
},
"uat": {
"baseURL": "https://chefs-test.apps.silver.devops.gov.bc.ca",
"formId": "f2f45aa7-62c5-49ca-8846-b214e02adb46",
"versionId": "1d4d73ec-00e7-4b57-98c9-49d1e0c7d15b"
},
"prod": {
"baseURL": "https://submit.digital.gov.bc.ca",
"formId": "4defd3bf-f57c-4969-94a1-ced745a99ccf",
"versionId": "d8736cde-a11a-41be-8800-084f2dfcb825"
}
},
"headers": {
"Accept": "application/json",
"Content-Type": "application/json"
Expand Down
Loading
Loading