Skip to content
Merged

Dev #1955

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
60b4986
Add AI Permission Group
ligovbc Jan 22, 2026
dcf11f5
feature/AB#31658-Fix-BasicEmail: harden basicEmail against ResizeObse…
Stephan-McColm Jan 23, 2026
57d8bf8
AB#29181: Block Javascript using HtmlAnalyzer and form.io noeval
aurelio-aot Jan 23, 2026
64c5e4f
AB#29181: Optimize HtmlSanitizer
aurelio-aot Jan 23, 2026
bfbf84b
AB#29181: Prevent CSS leak into CHEFS submission form using shadow DOM
aurelio-aot Jan 23, 2026
1cd28b7
AB#29181: Fix sonarqube issue
aurelio-aot Jan 23, 2026
b3cfcfe
Merge pull request #1946 from bcgov/feature/AB#31658-Fix-BasicEmail
DarylTodosichuk Jan 23, 2026
30fe646
Potential fix for code scanning alert no. 81: DOM text reinterpreted …
aurelio-aot Jan 23, 2026
a4d68cf
AB#31659 update custom exception classes to modern .NET 9
AndreGAot Jan 23, 2026
b8ad3e3
Merge pull request #1948 from bcgov/bugfix/AB#31659-custom-exception-…
AndreGAot Jan 23, 2026
b0102ee
AB#31662 dbmigrator appsettings
AndreGAot Jan 23, 2026
cca159e
Update applications/Unity.GrantManager/src/Unity.GrantManager.DbMigra…
AndreGAot Jan 23, 2026
6740d62
AB#31665 sonarqube cleanup
AndreGAot Jan 23, 2026
96a654a
Merge pull request #1950 from bcgov/bugfix/AB#31665-FakeCurrentPrinci…
AndreGAot Jan 23, 2026
113f9bd
AB#31140 - Add support for default DataTable ordering by column name
plavoie-BC Jan 23, 2026
17783d0
Merge branch 'dev' into bugfix/AB#31140-default-list-ordering
plavoie-BC Jan 23, 2026
0dfe493
AB#31140 - Add support for default DataTable ordering for more tables…
plavoie-BC Jan 23, 2026
7caab26
Merge branch 'bugfix/AB#31140-default-list-ordering' of https://githu…
plavoie-BC Jan 23, 2026
1b0aa69
AB#31666 consolidate nuget mixed versions
AndreGAot Jan 23, 2026
b424c68
AB#31140 - Apply sort order by index bugfixes
plavoie-BC Jan 23, 2026
b182f60
Merge pull request #1949 from bcgov/bugfix/AB#31662-dbmigrator-appset…
JamesPasta Jan 23, 2026
5f66a53
Merge pull request #1952 from bcgov/bugfix/AB#31666-nuget-consolidate
JamesPasta Jan 23, 2026
51a548a
Merge pull request #1951 from bcgov/bugfix/AB#31140-default-list-orde…
JamesPasta Jan 23, 2026
5efeeb7
AB#31667 update logic checks to be explicit for pii and developer exc…
AndreGAot Jan 23, 2026
20c55f8
AB#31667 try explicit function naming to show intent
AndreGAot Jan 23, 2026
5fea8ed
AB#31667 try GlobalSuppressions.cs for suppression
AndreGAot Jan 23, 2026
77b2677
Update applications/Unity.GrantManager/src/Unity.GrantManager.Web/Glo…
AndreGAot Jan 23, 2026
351b0aa
Merge pull request #1954 from bcgov/bugfix/AB#31667-web-pii-dev-excep…
JamesPasta Jan 23, 2026
6506ac9
AB#29181: Remove javascript suppression and fix sonarque issue
aurelio-aot Jan 23, 2026
eafd8fe
AB#29181: Fix sonarqube issue
aurelio-aot Jan 23, 2026
83cc1f3
AB#29959: Drop PaymentThreshold column from PaymentConfigurations
aurelio-aot Jan 26, 2026
64898a4
AB#31104: Create Contacts Table
aurelio-aot Jan 27, 2026
f584692
Merge branch 'dev' of https://github.com/bcgov/unity into feature/AB#…
ligovbc Jan 27, 2026
6977f37
Merge pull request #1958 from bcgov/feature/AB#31476-AI-PermisionGroup
ligovbc Jan 27, 2026
5a960b8
AB#31104: Nest ContactTypes
aurelio-aot Jan 27, 2026
0f527bd
AB#31104: Address review comments
aurelio-aot Jan 27, 2026
5c99622
AB#31104: Address review comments
aurelio-aot Jan 27, 2026
6ce00e7
AB#31104: Fix compile errors
aurelio-aot Jan 27, 2026
5f10b88
AB#31104: Fix sonarqube issues
aurelio-aot Jan 27, 2026
3ceb17f
AB#31104: Address review comment
aurelio-aot Jan 28, 2026
3074ecd
AB#31104: Rename Contacts field
aurelio-aot Jan 28, 2026
4ef4030
AB#31104 add more contact details and tests
AndreGAot Jan 28, 2026
1705639
AB#31104: Create EF Migration Scripts for Contacts Table
aurelio-aot Jan 28, 2026
29b8da2
Merge pull request #1957 from bcgov/feature/AB#31104-Add-Contacts-Table
JamesPasta Jan 28, 2026
cc29b43
Merge pull request #1956 from bcgov/feature/AB#29959-Remove-PaymentCo…
JamesPasta Jan 28, 2026
0078b36
Merge pull request #1947 from bcgov/feature/AB#29181-isolate-formio-c…
JamesPasta Jan 28, 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
113 changes: 93 additions & 20 deletions applications/Unity.AutoUI/cypress/e2e/basicEmail.cy.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
// cypress/e2e/basicEmail.cy.ts

describe('Send an email', () => {
const TEST_EMAIL_TO = 'grantmanagementsupport@gov.bc.ca'
const TEST_EMAIL_CC = 'UnitySupport@gov.bc.ca'
const TEST_EMAIL_BCC = 'UNITYSUP@Victoria1.gov.bc.ca'
const TEMPLATE_NAME = 'Test Case 1'
const STANDARD_TIMEOUT = 20000

// Only suppress the noisy ResizeObserver error that Unity throws in TEST.
// Everything else should still fail the test.
Cypress.on('uncaught:exception', (err) => {
const msg = err && err.message ? err.message : ''
if (msg.indexOf('ResizeObserver loop limit exceeded') >= 0) {
return false
}
return true
})

const now = new Date()
const timestamp =
now.getFullYear() +
Expand All @@ -23,8 +35,6 @@ describe('Send an email', () => {

function switchToDefaultGrantsProgramIfAvailable() {
cy.get('body').then(($body) => {
// If we are already on GrantPrograms (or can navigate there), try. Otherwise skip quietly.
// Key point: never .should() an optional element.
const hasUserInitials = $body.find('.unity-user-initials').length > 0

if (!hasUserInitials) {
Expand All @@ -41,7 +51,6 @@ describe('Send an email', () => {

if (switchLink.length === 0) {
cy.log('Skipping tenant switch: "Switch Grant Programs" not present for this user/session')
// Close dropdown so it does not block clicks later
cy.get('body').click(0, 0)
return
}
Expand Down Expand Up @@ -74,6 +83,81 @@ describe('Send an email', () => {
})
}

function openSavedEmailFromHistoryBySubject(subject: string) {
cy.get('body', { timeout: STANDARD_TIMEOUT }).then(($body) => {
const historyTableById = $body.find('#EmailHistoryTable')
if (historyTableById.length > 0) {
cy.get('#EmailHistoryTable', { timeout: STANDARD_TIMEOUT })
.should('be.visible')
.within(() => {
cy.contains('td', subject, { timeout: STANDARD_TIMEOUT })
.should('exist')
.click()
})
return
}

// Fallback: find the subject anywhere in a TD (scoped to avoid brittle class names)
cy.contains('td', subject, { timeout: STANDARD_TIMEOUT })
.should('exist')
.click()
})
}

function confirmSendDialogIfPresent() {
// Wait until either a bootstrap modal is shown, or SweetAlert container appears, or confirm button exists.
cy.get('body', { timeout: STANDARD_TIMEOUT }).should(($b) => {
const hasBootstrapShownModal = $b.find('.modal.show').length > 0
const hasSwal = $b.find('.swal2-container').length > 0
const hasConfirmBtn = $b.find('#btn-confirm-send').length > 0
expect(hasBootstrapShownModal || hasSwal || hasConfirmBtn).to.eq(true)
})

cy.get('body', { timeout: STANDARD_TIMEOUT }).then(($b) => {
const hasSwal = $b.find('.swal2-container').length > 0
if (hasSwal) {
// SweetAlert2 style
cy.get('.swal2-container', { timeout: STANDARD_TIMEOUT }).should('be.visible')
cy.contains('.swal2-container', 'Are you sure', { timeout: STANDARD_TIMEOUT }).should('exist')

// Typical confirm button class, with fallback to text match
if ($b.find('.swal2-confirm').length > 0) {
cy.get('.swal2-confirm', { timeout: STANDARD_TIMEOUT }).should('be.visible').click()
} else {
cy.contains('.swal2-container button', 'Yes', { timeout: STANDARD_TIMEOUT }).click()
}
return
}

const hasBootstrapShownModal = $b.find('.modal.show').length > 0
if (hasBootstrapShownModal) {
// Bootstrap modal: assert the shown modal, not the inner content div
cy.get('.modal.show', { timeout: STANDARD_TIMEOUT })
.should('be.visible')
.within(() => {
cy.contains('Are you sure you want to send this email?', { timeout: STANDARD_TIMEOUT })
.should('exist')

// Prefer the known id if present, otherwise click a button with expected intent text
if (Cypress.$('#btn-confirm-send').length > 0) {
cy.get('#btn-confirm-send', { timeout: STANDARD_TIMEOUT })
.should('exist')
.should('be.visible')
.click()
} else {
cy.contains('button', 'Confirm', { timeout: STANDARD_TIMEOUT }).click()
}
})
return
}

// Last resort: confirm button exists but modal might not be "visible" by Cypress standards
cy.get('#btn-confirm-send', { timeout: STANDARD_TIMEOUT })
.should('exist')
.click({ force: true })
})
}

it('Login', () => {
cy.login()
})
Expand Down Expand Up @@ -189,38 +273,27 @@ describe('Send an email', () => {
})

it('Select saved email from Email History', () => {
cy.contains('td.data-table-header', TEST_EMAIL_SUBJECT, { timeout: STANDARD_TIMEOUT })
.should('exist')
.click()
openSavedEmailFromHistoryBySubject(TEST_EMAIL_SUBJECT)

cy.get('#EmailTo', { timeout: STANDARD_TIMEOUT }).should('be.visible')
cy.get('#EmailCC').should('be.visible')
cy.get('#EmailBCC').should('be.visible')
cy.get('#EmailSubject').should('be.visible')

cy.get('#btn-send').should('be.visible')
cy.get('#btn-save').should('be.visible')
cy.get('#btn-send', { timeout: STANDARD_TIMEOUT }).should('exist')
cy.get('#btn-save', { timeout: STANDARD_TIMEOUT }).should('exist')
})

it('Send the email', () => {
cy.get('#btn-send', { timeout: STANDARD_TIMEOUT })
.should('exist')
.should('be.visible')
.should('not.be.disabled')
.click()
})

it('Confirm send email in modal', () => {
cy.get('#modal-content', { timeout: STANDARD_TIMEOUT })
.should('exist')
.should('be.visible')

cy.contains('Are you sure you want to send this email?', { timeout: STANDARD_TIMEOUT })
.should('exist')

cy.get('#btn-confirm-send', { timeout: STANDARD_TIMEOUT })
.should('exist')
.should('be.visible')
.click()
it('Confirm send email in dialog', () => {
confirmSendDialogIfPresent()
})

it('Verify Logout', () => {
Expand Down
3 changes: 3 additions & 0 deletions applications/Unity.GrantManager/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ src/Unity.GrantManager.DbMigrator/Logs/*
src/Unity.GrantManager.Blazor.Server/Logs/*
src/Unity.GrantManager.Blazor.Server.Tiered/Logs/*

# Development settings with sensitive information
**/appsettings.Development.json

# Use abp install-libs to restore.
**/wwwroot/libs/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Unity.Flex.Application\Unity.Flex.Application.csproj" />
<ProjectReference Include="..\Unity.Flex.TestBase\Unity.Flex.TestBase.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Security.Claims;
using System.Security.Claims;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Security.Claims;

Expand All @@ -13,14 +12,14 @@ protected override ClaimsPrincipal GetClaimsPrincipal()
return GetPrincipal();
}

private ClaimsPrincipal GetPrincipal()
private static ClaimsPrincipal GetPrincipal()
{
return new ClaimsPrincipal(new ClaimsIdentity(new List<Claim>
{
return new ClaimsPrincipal(new ClaimsIdentity(
[
new Claim(AbpClaimTypes.UserId, "2e701e62-0953-4dd3-910b-dc6cc93ccb0d"),
new Claim(AbpClaimTypes.UserName, "admin"),
new Claim(AbpClaimTypes.Email, "admin@abp.io")
}
]
)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Unity.Notifications.Application\Unity.Notifications.Application.csproj" />
<ProjectReference Include="..\Unity.Notifications.Domain.Tests\Unity.Notifications.Domain.Tests.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.104.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Http.Resilience" Version="9.5.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,10 @@ $(function () {
defaultVisibleColumns,
listColumns,
maxRowsPerPage: 25,
defaultSortColumn: 0,
defaultSortColumn: {
name: 'userName',
dir: 'asc'
},
dataEndpoint: unity.grantManager.payments.paymentSettings.getL2ApproversThresholds,
data: {},
responseCallback,
Expand Down Expand Up @@ -251,7 +254,10 @@ $(function () {
defaultVisibleColumns,
listColumns,
maxRowsPerPage: 25,
defaultSortColumn: 0,
defaultSortColumn: {
name: 'ministryClient',
dir: 'asc'
},
dataEndpoint: unity.grantManager.payments.accountCoding.getList,
data: {},
responseCallback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ $(function () {
defaultVisibleColumns,
listColumns,
maxRowsPerPage: 10,
defaultSortColumn: 13,
defaultSortColumn: {
name: 'requestedOn',
dir: 'desc'
},
dataEndpoint: unity.payments.paymentRequests.paymentRequest.getList,
data: {},
responseCallback,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.1.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@
defaultVisibleColumns,
listColumns,
maxRowsPerPage: 10,
defaultSortColumn: 3,
defaultSortColumn: {
name: 'requestedOn',
dir: 'desc'
},
dataEndpoint:
unity.payments.paymentRequests.paymentRequest
.getListByApplicationId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ProjectReference Include="..\..\src\Unity.Payments.Shared\Unity.Payments.Shared.csproj" />
<ProjectReference Include="..\..\src\Unity.Payments.Web\Unity.Payments.Web.csproj" />
<ProjectReference Include="..\Unity.Payments.TestBase\Unity.Payments.TestBase.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
<PackageReference Include="NSubstitute" Version="5.3.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="9.1.3" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="9.1.3" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="9.1.3" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Unity.Reporting.Application\Unity.Reporting.Application.csproj" />
<ProjectReference Include="..\Unity.Reporting.TestBase\Unity.Reporting.TestBase.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<ItemGroup>
<ProjectReference Include="..\Unity.TenantManagement.TestBase\Unity.TenantManagement.TestBase.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="System.Text.Json" Version="9.0.5" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.0" />
Expand Down
Loading
Loading