Skip to content

Commit

Permalink
- app version = 4.11.15 (#609)
Browse files Browse the repository at this point in the history
- updated example env file
- updated vaults config
- renamed "dashboard URL" -> "business dash URL"
- renamed "registry dashboard" -> "bc registries dashboard"
- updated unit tests

Co-authored-by: Severin Beauvais <[email protected]>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Jan 16, 2025
1 parent 208a566 commit 463fcb2
Show file tree
Hide file tree
Showing 18 changed files with 73 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VUE_APP_ADDRESS_COMPLETE_KEY=
VUE_APP_REGISTRY_HOME_URL="https://dev.bcregistry.gov.bc.ca/"
VUE_APP_AUTH_WEB_URL="https://dev.account.bcregistry.gov.bc.ca/"
VUE_APP_BUSINESSES_URL="https://dev.account.bcregistry.gov.bc.ca/"
VUE_APP_DASHBOARD_URL="https://dev.business.bcregistry.gov.bc.ca/"
VUE_APP_BUSINESS_DASH_URL="https://dev.business-dashboard.bcregistry.gov.bc.ca/"
VUE_APP_NAME_REQUEST_URL="https://dev.names.bcregistry.gov.bc.ca/"
VUE_APP_SITEMINDER_LOGOUT_URL="https://logontest7.gov.bc.ca/clp-cgi/logoff.cgi"

Expand Down
2 changes: 1 addition & 1 deletion devops/vaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ VUE_APP_ADDRESS_COMPLETE_KEY="op://canadapost/$APP_ENV/address-key/ADDRESS_COMPL
VUE_APP_REGISTRY_HOME_URL="op://web-url/$APP_ENV/registry/REGISTRY_HOME_URL"
VUE_APP_AUTH_WEB_URL="op://web-url/$APP_ENV/auth-web/AUTH_WEB_URL"
VUE_APP_BUSINESSES_URL="op://web-url/$APP_ENV/business/BUSINESSES_URL"
VUE_APP_DASHBOARD_URL="op://web-url/$APP_ENV/business/DASHBOARD_URL"
VUE_APP_BUSINESS_DASH_URL="op://web-url/$APP_ENV/business-dash/BUSINESS_DASH_URL"
VUE_APP_NAME_REQUEST_URL="op://web-url/$APP_ENV/name-request/NAME_REQUEST_URL"
VUE_APP_SITEMINDER_LOGOUT_URL="op://web-url/$APP_ENV/siteminder/SITEMINDER_LOGOUT_URL"

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.11.14",
"version": "4.11.15",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
8 changes: 4 additions & 4 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ import { AccountInformationIF, ConfirmDialogType } from '@/interfaces/'
import { BreadcrumbIF, CompletingPartyIF } from '@bcrs-shared-components/interfaces/'
import { SessionStorageKeys } from 'sbc-common-components/src/util/constants'
import { FilingTypes, RouteNames } from '@/enums/'
import { getEntityDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegistryDashboardBreadcrumb,
import { getBusinessDashboardBreadcrumb, getMyBusinessRegistryBreadcrumb, getRegistryDashboardBreadcrumb,
getStaffDashboardBreadcrumb } from '@/resources/BreadCrumbResources'
import DateUtilities from '@/services/date-utilities'
import { useStore } from '@/store/store'
Expand Down Expand Up @@ -232,7 +232,7 @@ export default class App extends Mixins(CommonMixin, FilingTemplateMixin) {
/** The route breadcrumbs list. */
get breadcrumbs (): Array<BreadcrumbIF> {
const crumbs: Array<BreadcrumbIF> = [
getEntityDashboardBreadcrumb(),
getBusinessDashboardBreadcrumb(),
{
text: this.$route.meta?.title || 'Unknown Filing',
to: { name: this.$route.name }
Expand Down Expand Up @@ -495,9 +495,9 @@ export default class App extends Mixins(CommonMixin, FilingTemplateMixin) {
Navigate(manageBusinessUrl)
}
/** Called to navigate to dashboard. */
/** Called to navigate to Business Dashboard. */
async goToDashboard (force = false): Promise<void> {
const dashboardUrl = sessionStorage.getItem('DASHBOARD_URL') + this.getBusinessId
const dashboardUrl = sessionStorage.getItem('BUSINESS_DASH_URL') + this.getBusinessId
// check if there are no data changes
if (!this.haveUnsavedChanges || force) {
Expand Down
6 changes: 3 additions & 3 deletions src/components/ViewWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,9 @@ export default class ViewWrapper extends Mixins(CommonMixin, FilingTemplateMixin
Navigate(manageBusinessUrl)
}
/** Called to navigate to dashboard. */
/** Called to navigate to Business Dashboard. */
private async goToDashboard (force = false): Promise<void> {
const dashboardUrl = sessionStorage.getItem('DASHBOARD_URL') + this.getBusinessId
const dashboardUrl = sessionStorage.getItem('BUSINESS_DASH_URL') + this.getBusinessId
// check if there are no data changes
if (!this.haveUnsavedChanges || force) {
Expand Down Expand Up @@ -366,7 +366,7 @@ export default class ViewWrapper extends Mixins(CommonMixin, FilingTemplateMixin
if (paymentToken && filingId) {
const isPaymentActionRequired: boolean = filingComplete.header?.isPaymentActionRequired
const returnUrl = sessionStorage.getItem('DASHBOARD_URL') + this.getBusinessId +
const returnUrl = sessionStorage.getItem('BUSINESS_DASH_URL') + this.getBusinessId +
`?filing_id=${filingId}`
// if payment action is required, navigate to Pay URL
Expand Down
2 changes: 1 addition & 1 deletion src/components/common/Actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export default class Actions extends Mixins(DateMixin, FilingTemplateMixin, Name
const paymentToken = filingComplete?.header?.paymentToken
if (paymentToken) {
const isPaymentActionRequired: boolean = filingComplete.header?.isPaymentActionRequired
const returnUrl = sessionStorage.getItem('DASHBOARD_URL') + this.getBusinessId +
const returnUrl = sessionStorage.getItem('BUSINESS_DASH_URL') + this.getBusinessId +
`?filing_id=${this.getFilingId}`
// if payment action is required, navigate to Pay URL
Expand Down
8 changes: 4 additions & 4 deletions src/resources/BreadCrumbResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ function getParams (): string {
return accountId ? `?accountid=${accountId}` : ''
}

/** Returns the breadcrumb to the entity (business) dashboard. */
export function getEntityDashboardBreadcrumb (): BreadcrumbIF {
/** Returns the breadcrumb to the Business Dashboard. */
export function getBusinessDashboardBreadcrumb (): BreadcrumbIF {
const getOriginalLegalName = store.getOriginalLegalName
const getBusinessId = store.getBusinessId
return {
text: getOriginalLegalName || 'Numbered Benefit Company',
href: `${sessionStorage.getItem('DASHBOARD_URL')}${getBusinessId}/${getParams()}`
href: `${sessionStorage.getItem('BUSINESS_DASH_URL')}${getBusinessId}/${getParams()}`
}
}

/** Returns the breadcrumb to the BC Registries dashboard. */
/** Returns the breadcrumb to the BC Registries Dashboard. */
export function getRegistryDashboardBreadcrumb (): BreadcrumbIF {
return {
text: 'BC Registries Dashboard',
Expand Down
4 changes: 2 additions & 2 deletions src/utils/FetchConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ export async function FetchConfig (): Promise<any> {
const businessesUrl: string = import.meta.env.VUE_APP_BUSINESSES_URL
sessionStorage.setItem('BUSINESSES_URL', businessesUrl)

const dashboardUrl: string = import.meta.env.VUE_APP_DASHBOARD_URL
sessionStorage.setItem('DASHBOARD_URL', dashboardUrl)
const businessDashUrl: string = import.meta.env.VUE_APP_BUSINESS_DASH_URL
sessionStorage.setItem('BUSINESS_DASH_URL', businessDashUrl)

const legalApiUrl: string = (import.meta.env.VUE_APP_LEGAL_API_URL +
import.meta.env.VUE_APP_LEGAL_API_VERSION_2 + '/')
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/Actions.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@ describe.skip('Emits error event if NR validation fails in file and pay', () =>
let wrapper: any
const { assign } = window.location

sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')

beforeEach(async () => {
// mock the window.location.assign function
Expand Down Expand Up @@ -302,8 +302,8 @@ describe.skip('Actions component - Filing Functionality', () => {
const effectiveDate = new Date(new Date().setDate(new Date().getDate() + 5))
const formattedEffectiveDate = effectiveDate.toISOString().replace('Z', '+00:00')

sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')

// the filing body that would get sent to the API
const filing = {
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/Alteration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ describe('Alteration component', () => {
const { assign } = window.location

// Define Session
sessionStorage.setItem('PAY_API_URL', 'https://pay.api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth.api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('PAY_API_URL', 'https://pay-api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth-api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')
sessionStorage.setItem('KEYCLOAK_TOKEN', 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJUbWdtZUk0MnVsdUZ0N3' +
'FQbmUtcTEzdDUwa0JDbjF3bHF6dHN0UGdUM1dFIn0.eyJqdGkiOiIzZDQ3YjgwYy01MTAzLTRjMTYtOGNhZC0yMjU4NDMwZGYwZTciLCJle' +
'HAiOjE1Njg0ODk1NTksIm5iZiI6MCwiaWF0IjoxNTY4NDAzMTYwLCJpc3MiOiJodHRwczovL3Nzby1kZXYucGF0aGZpbmRlci5nb3YuYmMuY2' +
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Alteration component', () => {
const get = sinon.stub(axios, 'get')

// GET payment fee for immediate alteration
get.withArgs('https://pay.api.url/fees/BEN/ALTER')
get.withArgs('https://pay-api.url/fees/BEN/ALTER')
.returns(Promise.resolve({
data: {
'filingFees': 100.0,
Expand All @@ -86,7 +86,7 @@ describe('Alteration component', () => {
}))

// GET payment fee for future alteration
get.withArgs('https://pay.api.url/fees/BEN/ALTER?futureEffective=true')
get.withArgs('https://pay-api.url/fees/BEN/ALTER?futureEffective=true')
.returns(Promise.resolve({
data: {
'filingFees': 100.0,
Expand Down Expand Up @@ -241,7 +241,7 @@ describe('Alteration component', () => {
}))

// GET auth info
get.withArgs('https://auth.api.url/entities/BC1234567')
get.withArgs('https://auth-api.url/entities/BC1234567')
.returns(Promise.resolve({
data: {
contacts: [
Expand Down
12 changes: 6 additions & 6 deletions tests/unit/App.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ const KEYCLOAK_TOKEN_USER = 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJ
describe.skip('Numbered company setup', () => {
let wrapper: any
const { assign } = window.location
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth.api.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth-api.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')

beforeEach(async () => {
// mock the window.location.assign function
Expand Down Expand Up @@ -407,9 +407,9 @@ describe.skip('Numbered company setup', () => {
describe.skip('App component', () => {
let wrapper: any
const { assign } = window.location
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth.api.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth-api.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')

beforeEach(async () => {
// mock the window.location.assign function
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/Change.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ describe('Change component', () => {
const { assign } = window.location

// Define Session
sessionStorage.setItem('PAY_API_URL', 'https://pay.api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth.api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('PAY_API_URL', 'https://pay-api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth-api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')
sessionStorage.setItem('KEYCLOAK_TOKEN', 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJUbWdtZUk0MnVsdUZ0N3' +
'FQbmUtcTEzdDUwa0JDbjF3bHF6dHN0UGdUM1dFIn0.eyJqdGkiOiIzZDQ3YjgwYy01MTAzLTRjMTYtOGNhZC0yMjU4NDMwZGYwZTciLCJle' +
'HAiOjE1Njg0ODk1NTksIm5iZiI6MCwiaWF0IjoxNTY4NDAzMTYwLCJpc3MiOiJodHRwczovL3Nzby1kZXYucGF0aGZpbmRlci5nb3YuYmMuY2' +
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Change component', () => {
const get = sinon.stub(axios, 'get')

// GET payment fee for immediate change
get.withArgs('https://pay.api.url/fees/FM/CHANGE')
get.withArgs('https://pay-api.url/fees/FM/CHANGE')
.returns(Promise.resolve({
data: {
'filingFees': 100.0,
Expand All @@ -86,7 +86,7 @@ describe('Change component', () => {
}))

// GET payment fee for future change
get.withArgs('https://pay.api.url/fees/FM/CHANGE?futureEffective=true')
get.withArgs('https://pay-api.url/fees/FM/CHANGE?futureEffective=true')
.returns(Promise.resolve({
data: {
'filingFees': 100.0,
Expand Down Expand Up @@ -138,7 +138,7 @@ describe('Change component', () => {
}))

// GET auth info
get.withArgs('https://auth.api.url/entities/FM1234567')
get.withArgs('https://auth-api.url/entities/FM1234567')
.returns(Promise.resolve({
data: {
contacts: [
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/Conversion.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ describe('Conversion component', () => {
const { assign } = window.location

// Define Session
sessionStorage.setItem('PAY_API_URL', 'https://pay.api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth.api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('PAY_API_URL', 'https://pay-api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth-api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')
sessionStorage.setItem('KEYCLOAK_TOKEN', 'eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJUbWdtZUk0MnVsdUZ0N3' +
'FQbmUtcTEzdDUwa0JDbjF3bHF6dHN0UGdUM1dFIn0.eyJqdGkiOiIzZDQ3YjgwYy01MTAzLTRjMTYtOGNhZC0yMjU4NDMwZGYwZTciLCJle' +
'HAiOjE1Njg0ODk1NTksIm5iZiI6MCwiaWF0IjoxNTY4NDAzMTYwLCJpc3MiOiJodHRwczovL3Nzby1kZXYucGF0aGZpbmRlci5nb3YuYmMuY2' +
Expand Down Expand Up @@ -67,7 +67,7 @@ describe('Conversion component', () => {
const get = sinon.stub(axios, 'get')

// GET payment fee for immediate alteration
get.withArgs('https://pay.api.url/fees/FM/CONVERSION')
get.withArgs('https://pay-api.url/fees/FM/CONVERSION')
.returns(Promise.resolve({
data: {
'filingFees': 100.0,
Expand All @@ -86,7 +86,7 @@ describe('Conversion component', () => {
}))

// GET payment fee for future conversion
get.withArgs('https://pay.api.url/fees/FM/CONVERSION?futureEffective=true')
get.withArgs('https://pay-api.url/fees/FM/CONVERSION?futureEffective=true')
.returns(Promise.resolve({
data: {
'filingFees': 100.0,
Expand Down Expand Up @@ -205,7 +205,7 @@ describe('Conversion component', () => {
}))

// GET auth info
get.withArgs('https://auth.api.url/entities/BC1234567')
get.withArgs('https://auth-api.url/entities/BC1234567')
.returns(Promise.resolve({
data: {
contacts: [
Expand Down
14 changes: 7 additions & 7 deletions tests/unit/CorpCorrection.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ describe('Corp Correction component', () => {
const { assign } = window.location

// Define Session
sessionStorage.setItem('PAY_API_URL', 'https://pay.api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth.api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth.web.url/')
sessionStorage.setItem('DASHBOARD_URL', 'https://dashboard.url/')
sessionStorage.setItem('PAY_API_URL', 'https://pay-api.url/')
sessionStorage.setItem('AUTH_API_URL', 'https://auth-api.url/')
sessionStorage.setItem('AUTH_WEB_URL', 'https://auth-web.url/')
sessionStorage.setItem('BUSINESS_DASH_URL', 'https://business-dash.url/')

store.stateModel.tombstone.entityType = CorpTypeCd.BENEFIT_COMPANY
store.stateModel.tombstone.businessId = 'BC1234567'
Expand All @@ -47,7 +47,7 @@ describe('Corp Correction component', () => {

// FUTURE
// GET payment fee for immediate correction
// get.withArgs('https://pay.api.url/fees/BEN/CORRECTION')
// get.withArgs('https://pay-api.url/fees/BEN/CORRECTION')
// .returns(Promise.resolve({
// data: {
// 'filingFees': 100.0,
Expand All @@ -67,7 +67,7 @@ describe('Corp Correction component', () => {

// FUTURE
// GET payment fee for future correction
// get.withArgs('https://pay.api.url/fees/BEN/CORRECTION?futureEffective=true')
// get.withArgs('https://pay-api.url/fees/BEN/CORRECTION?futureEffective=true')
// .returns(Promise.resolve({
// data: {
// 'filingFees': 100.0,
Expand All @@ -92,7 +92,7 @@ describe('Corp Correction component', () => {
}))

// GET auth info
get.withArgs('https://auth.api.url/entities/BC1234567')
get.withArgs('https://auth-api.url/entities/BC1234567')
.returns(Promise.resolve({
data: {
contacts: [
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/FetchConfig.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ describe('Fetch Config', () => {
import.meta.env.VUE_APP_AUTH_WEB_URL = 'auth web url'
import.meta.env.VUE_APP_BUSINESSES_URL = 'businesses url'
import.meta.env.VUE_APP_BUSINESS_EDIT_LD_CLIENT_ID = 'business edit ld client id'
import.meta.env.VUE_APP_DASHBOARD_URL = 'dashboard url'
import.meta.env.VUE_APP_BUSINESS_DASH_URL = 'business dash url'
import.meta.env.VUE_APP_LEGAL_API_URL = 'legal api url'
import.meta.env.VUE_APP_LEGAL_API_VERSION_2 = '/legal api version 2'
import.meta.env.VUE_APP_NAICS_API_URL = 'naics api url'
Expand Down Expand Up @@ -51,7 +51,7 @@ describe('Fetch Config', () => {
expect(sessionStorage.getItem('AUTH_API_URL')).toBe('auth api url/auth api version/')
expect(sessionStorage.getItem('AUTH_WEB_URL')).toBe('auth web url')
expect(sessionStorage.getItem('BUSINESSES_URL')).toBe('businesses url')
expect(sessionStorage.getItem('DASHBOARD_URL')).toBe('dashboard url')
expect(sessionStorage.getItem('BUSINESS_DASH_URL')).toBe('business dash url')
expect(sessionStorage.getItem('NAICS_URL')).toBe('naics api url/naics api version/')
expect(sessionStorage.getItem('PAY_API_URL')).toBe('pay api url/pay api version/')
expect(sessionStorage.getItem('REGISTRY_HOME_URL')).toBe('registry home url')
Expand Down
Loading

0 comments on commit 463fcb2

Please sign in to comment.