generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into ORV2-2857-be-refund-t…
…o-multiple-payment-methods
- Loading branch information
Showing
135 changed files
with
16,199 additions
and
29,850 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
name: E2E Regression Tests | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['PR Opened'] | ||
types: [completed] | ||
workflow_dispatch: | ||
inputs: | ||
### Required | ||
target: | ||
description: 'PR number, test, uat or prod.' | ||
default: 'test' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
vars: | ||
name: Set Variables | ||
outputs: | ||
target: ${{ steps.env.outputs.target }} | ||
environment: ${{ steps.env.outputs.environment }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: env | ||
id: env | ||
run: | | ||
pr="${{github.event.workflow_run.pull_requests[0].number}}" | ||
if [[ $pr ]]; then | ||
target="$pr" | ||
environment="dev" | ||
else | ||
target=${{inputs.target}} | ||
environment=${{inputs.target}} | ||
fi | ||
echo "target=$target" >> $GITHUB_OUTPUT | ||
echo "environment=$environment" >> $GITHUB_OUTPUT | ||
e2e-tests: | ||
name: ${{matrix.test}} | ||
needs: [vars] | ||
environment: ${{needs.vars.outputs.environment}} | ||
runs-on: ubuntu-22.04 | ||
defaults: | ||
run: | ||
working-directory: tests/ | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
browser: | ||
- chrome | ||
#- edge | ||
#- firefox | ||
test: | ||
- 'bceid-crud-power-units.cy.js' | ||
- 'bceid-crud-trailers.cy.js' | ||
- 'bceid-new-term-oversize.cy.js' | ||
- 'bceid-new-term-overweight.cy.js' | ||
- 'bceid-update-term-oversize.cy.js' | ||
- 'idir-amend-term-oversize.cy.js' | ||
- 'idir-void-term-oversize.cy.js' | ||
|
||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: cypress-io/[email protected] | ||
name: Cypress run | ||
env: | ||
CYPRESS_baseUrl: https://${{ github.event.repository.name }}-${{ needs.vars.outputs.target || 'test' }}-frontend.apps.silver.devops.gov.bc.ca/ | ||
CYPRESS_bceid_username: ${{vars.BCEID_USERNAME}} | ||
CYPRESS_bceid_password: ${{secrets.BCEID_PASSWORD}} | ||
CYPRESS_idir_username: ${{vars.IDIR_USERNAME}} | ||
CYPRESS_idir_password: ${{secrets.IDIR_PASSWORD}} | ||
with: | ||
browser: ${{ matrix.browser }} | ||
config: pageLoadTimeout=10000,video=true | ||
spec: cypress/e2e/${{matrix.test}} | ||
working-directory: tests | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: ${{matrix.test}}-${{matrix.browser}} screenshot | ||
path: tests/cypress/screenshots/ | ||
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn` | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: ${{matrix.test}}-${{matrix.browser}} video | ||
path: tests/cypress/videos/ | ||
overwrite: true | ||
if-no-files-found: ignore # 'warn' or 'error' are also available, defaults to `warn` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: PR | ||
name: PR Opened | ||
|
||
on: | ||
pull_request: | ||
|
46 changes: 44 additions & 2 deletions
46
database/mssql/scripts/sampledata/dbo.ORBC_POLICY_CONFIGURATION.Table.sql
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
97 changes: 97 additions & 0 deletions
97
database/mssql/scripts/versions/revert/v_51_ddl_revert.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
SET ANSI_NULLS ON | ||
GO | ||
SET QUOTED_IDENTIFIER ON | ||
GO | ||
SET NOCOUNT ON | ||
GO | ||
|
||
SET XACT_ABORT ON | ||
GO | ||
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE | ||
GO | ||
BEGIN TRANSACTION | ||
GO | ||
|
||
-- Remove the indexes on the new columns | ||
IF EXISTS (SELECT * FROM sys.indexes WHERE name = 'IX_ORBC_POLICY_CONFIGURATION_UQ_IS_PRIMARY_DRAFT') | ||
DROP INDEX IX_ORBC_POLICY_CONFIGURATION_UQ_IS_PRIMARY_DRAFT ON ORBC_POLICY_CONFIGURATION; | ||
IF EXISTS (SELECT * FROM sys.indexes WHERE name = 'IX_FK_ORBC_POLICY_CONFIGURATION_ORIGIN_ID') | ||
DROP INDEX IX_FK_ORBC_POLICY_CONFIGURATION_ORIGIN_ID ON ORBC_POLICY_CONFIGURATION; | ||
IF EXISTS (SELECT * FROM sys.indexes WHERE name = 'IX_ORBC_POLICY_CONFIGURATION_IS_DRAFT') | ||
DROP INDEX IX_ORBC_POLICY_CONFIGURATION_IS_DRAFT ON ORBC_POLICY_CONFIGURATION; | ||
IF EXISTS (SELECT * FROM sys.indexes WHERE name = 'IX_ORBC_POLICY_CONFIGURATION_EFFECTIVE_DATE') | ||
DROP INDEX IX_ORBC_POLICY_CONFIGURATION_EFFECTIVE_DATE ON ORBC_POLICY_CONFIGURATION; | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Drop the columns from main and history tables | ||
ALTER TABLE [dbo].[ORBC_POLICY_CONFIGURATION] | ||
DROP CONSTRAINT FK_ORBC_POLICY_CONFIGURATION_ORIGIN_ID | ||
ALTER TABLE [dbo].[ORBC_POLICY_CONFIGURATION] | ||
DROP COLUMN ORIGIN_ID | ||
ALTER TABLE [dbo].[ORBC_POLICY_CONFIGURATION] | ||
DROP COLUMN IS_PRIMARY_DRAFT | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Revert the trigger changes to remove the added columns | ||
ALTER TRIGGER [dbo].[ORBC_POLCFG_A_S_IUD_TR] ON [dbo].[ORBC_POLICY_CONFIGURATION] FOR INSERT, UPDATE, DELETE AS | ||
SET NOCOUNT ON | ||
BEGIN TRY | ||
DECLARE @curr_date datetime; | ||
SET @curr_date = getutcdate(); | ||
IF NOT EXISTS(SELECT * FROM inserted) AND NOT EXISTS(SELECT * FROM deleted) | ||
RETURN; | ||
|
||
-- historical | ||
IF EXISTS(SELECT * FROM deleted) | ||
update [dbo].[ORBC_POLICY_CONFIGURATION_HIST] set END_DATE_HIST = @curr_date where POLICY_CONFIGURATION_ID in (select POLICY_CONFIGURATION_ID from deleted) and END_DATE_HIST is null; | ||
|
||
IF EXISTS(SELECT * FROM inserted) | ||
insert into [dbo].[ORBC_POLICY_CONFIGURATION_HIST] ([POLICY_CONFIGURATION_ID], [EFFECTIVE_DATE], [IS_DRAFT], [CHANGE_DESCRIPTION], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [CONCURRENCY_CONTROL_NUMBER], [DB_CREATE_USERID], [DB_CREATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], _POLICY_CONFIGURATION_HIST_ID, END_DATE_HIST, EFFECTIVE_DATE_HIST) | ||
select [POLICY_CONFIGURATION_ID], [EFFECTIVE_DATE], [IS_DRAFT], [CHANGE_DESCRIPTION], [APP_CREATE_TIMESTAMP], [APP_CREATE_USERID], [APP_CREATE_USER_GUID], [APP_CREATE_USER_DIRECTORY], [APP_LAST_UPDATE_TIMESTAMP], [APP_LAST_UPDATE_USER_GUID], [APP_LAST_UPDATE_USER_DIRECTORY], [CONCURRENCY_CONTROL_NUMBER], [DB_CREATE_USERID], [DB_CREATE_TIMESTAMP], [DB_LAST_UPDATE_USERID], [DB_LAST_UPDATE_TIMESTAMP], (next value for [dbo].[ORBC_POLICY_CONFIGURATION_H_ID_SEQ]) as [_POLICY_CONFIGURATION_HIST_ID], null as [END_DATE_HIST], @curr_date as [EFFECTIVE_DATE_HIST] from inserted; | ||
|
||
END TRY | ||
BEGIN CATCH | ||
IF @@trancount > 0 ROLLBACK TRANSACTION | ||
EXEC orbc_error_handling | ||
END CATCH; | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
-- Remove the added policy configuration | ||
DELETE FROM [dbo].[ORBC_POLICY_CONFIGURATION] | ||
WHERE POLICY_CONFIGURATION_ID = (SELECT MAX(POLICY_CONFIGURATION_ID) FROM [dbo].[ORBC_POLICY_CONFIGURATION]) | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
DECLARE @VersionDescription VARCHAR(255) | ||
SET @VersionDescription = 'Reverting updates to policy configuration table for config versioning' | ||
|
||
INSERT [dbo].[ORBC_SYS_VERSION] ([VERSION_ID], [DESCRIPTION], [RELEASE_DATE]) VALUES (50, @VersionDescription, getutcdate()) | ||
GO | ||
|
||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
|
||
COMMIT TRANSACTION | ||
GO | ||
IF @@ERROR <> 0 SET NOEXEC ON | ||
GO | ||
DECLARE @Success AS BIT | ||
SET @Success = 1 | ||
SET NOEXEC OFF | ||
IF (@Success = 1) PRINT 'The database revert succeeded' | ||
ELSE BEGIN | ||
IF @@TRANCOUNT > 0 ROLLBACK TRANSACTION | ||
PRINT 'The database revert failed' | ||
END | ||
GO |
Oops, something went wrong.