From f025d32d82062662a044464ffbd4a779b89c9f6f Mon Sep 17 00:00:00 2001 From: Hrvoje Fekete Date: Wed, 9 Oct 2024 10:31:41 -0700 Subject: [PATCH] 23439; 23197 - Bug fixing (#49) --- cypress/e2e/components/filings/section.cy.ts | 23 +++++++- .../filings/staffFiling/adminFreeze.ts | 59 +++++++++++++++++++ src/components/bcros/filing/List.vue | 13 ++-- src/lang/en.json | 1 + 4 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 cypress/fixtures/filings/staffFiling/adminFreeze.ts diff --git a/cypress/e2e/components/filings/section.cy.ts b/cypress/e2e/components/filings/section.cy.ts index 9c19ff9d..b7dcc94f 100644 --- a/cypress/e2e/components/filings/section.cy.ts +++ b/cypress/e2e/components/filings/section.cy.ts @@ -2,6 +2,7 @@ import { allFilings } from '../../../fixtures/filings/allFilings' import { directorChange } from '../../../fixtures/filings/directorChange/directorChange' import { administrativeDissolution } from '../../../fixtures/filings/dissolution/administrativeDissolution' import { courtOrder } from '../../../fixtures/filings/staffFiling/courtOrder' +import { adminFreeze, adminFreezeWithDisplayLedgerTrue } from '../../../fixtures/filings/staffFiling/adminFreeze' context('Filings history section', () => { it('Verifies filing history is displayed, and it shows data', () => { @@ -113,7 +114,7 @@ context('Filings history section', () => { cy.visitBusinessDashFor('businessInfo/cc/withCourtOrder.json', undefined, false, false, undefined, filings) // verify notification - cy.get('[data-cy="hasCourtOrdersNotificationCard"').should('exist') + cy.get('[data-cy="hasCourtOrdersNotificationCard"]').should('exist') // expand filing cy.get(`[data-cy="filingHistoryItem-staff-filing-${courtOrder.filingId}"]`) @@ -125,4 +126,24 @@ context('Filings history section', () => { cy.get(`[data-cy="filingHistoryItem-staff-filing-${courtOrder.filingId}"]`) .contains(`Court Order Number: ${courtOrder.data.order.fileNumber}`) }) + + it('Verifies that admin freeze is not displayed (when it has displayLedger set to false)', () => { + const filings = [courtOrder, courtOrder, adminFreeze] + cy.visitBusinessDashFor('businessInfo/cc/withCourtOrder.json', undefined, false, false, undefined, filings) + + // verify we cant see admin freeze + cy.contains('Admin Freeze').should('not.exist') + + cy.get('[data-cy*="filingHistoryItem-staff"]').should('have.length', 2) + }) + + it('Verifies that admin unfreeze is displayed when it has displayLedger set to true', () => { + const filings = [adminFreeze, adminFreezeWithDisplayLedgerTrue] + cy.visitBusinessDashFor('businessInfo/cc/withCourtOrder.json', undefined, false, false, undefined, filings) + + // verify we cant see admin freeze + cy.contains('Admin Freeze').should('exist') + + cy.get('[data-cy*="filingHistoryItem-staff"]').should('have.length', 1) + }) }) diff --git a/cypress/fixtures/filings/staffFiling/adminFreeze.ts b/cypress/fixtures/filings/staffFiling/adminFreeze.ts new file mode 100644 index 00000000..e16aeb53 --- /dev/null +++ b/cypress/fixtures/filings/staffFiling/adminFreeze.ts @@ -0,0 +1,59 @@ +export const adminFreeze = { + availableOnPaperOnly: false, + businessIdentifier: 'CP1002605', + commentsCount: 0, + commentsLink: + 'https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/CP1002605/filings/151402/comments', + data: { + adminFreeze: { + freeze: false + }, + applicationDate: '2024-10-08T00:23:55.027171+00:00', + legalFilings: [ + 'adminFreeze' + ] + }, + displayLedger: false, + displayName: 'Admin Freeze', + documentsLink: + 'https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/CP1002605/filings/151402/documents', + effectiveDate: 'Tue, 08 Oct 2024 00:23:56 GMT', + filingId: 151402, + filingLink: 'https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/CP1002605/filings/151402', + isFutureEffective: false, + name: 'adminFreeze', + paymentStatusCode: 'COMPLETED', + status: 'COMPLETED', + submittedDate: 'Tue, 08 Oct 2024 00:23:55 GMT', + submitter: 'Registry Staff' +} + +export const adminFreezeWithDisplayLedgerTrue = { + availableOnPaperOnly: false, + businessIdentifier: 'CP1002605', + commentsCount: 0, + commentsLink: + 'https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/CP1002605/filings/151402/comments', + data: { + adminFreeze: { + freeze: false + }, + applicationDate: '2024-10-08T00:22:55.027171+00:00', + legalFilings: [ + 'adminFreeze' + ] + }, + displayLedger: true, + displayName: 'Admin Freeze', + documentsLink: + 'https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/CP1002605/filings/151402/documents', + effectiveDate: 'Tue, 08 Oct 2024 00:23:56 GMT', + filingId: 151402, + filingLink: 'https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/businesses/CP1002605/filings/151402', + isFutureEffective: false, + name: 'adminFreeze', + paymentStatusCode: 'COMPLETED', + status: 'COMPLETED', + submittedDate: 'Tue, 08 Oct 2024 00:23:55 GMT', + submitter: 'Registry Staff' +} diff --git a/src/components/bcros/filing/List.vue b/src/components/bcros/filing/List.vue index 53f487a6..76571d98 100644 --- a/src/components/bcros/filing/List.vue +++ b/src/components/bcros/filing/List.vue @@ -83,12 +83,13 @@ const filingComponent = (filing: ApiResponseFilingI): Component => { {{ $t('text.filing.courtOrder.hasCourtOrders') }} - +
diff --git a/src/lang/en.json b/src/lang/en.json index 335a5335..e5d52b59 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -116,6 +116,7 @@ "CP": "BC Cooperative Association", "SP": "BC Sole Proprietorship", "GP": "BC General Partnership", + "ULC": "BC Unlimited Liability Company", "undefined": "N/A" } },