-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Fix change buttons in side accordions (#63)
* Fix logic for change buttons in side accordions * bootstrap business always have disabled change buttons in side accordions * update * fix label text for mailing address
1 parent
27d1f1a
commit 3f3a0b0
Showing
5 changed files
with
229 additions
and
46 deletions.
There are no files selected for viewing
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
54 changes: 45 additions & 9 deletions
54
cypress/e2e/components/directors-partners-proprietors.cy.ts
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,19 +1,55 @@ | ||
context('Business dashboard -> Side components: Current Directors, Partners, Proprietors', () => { | ||
it('Directors accordion is rendered', () => { | ||
cy.visitBusinessDash('BC0871427', 'BEN') | ||
cy.get('[data-cy="accordion_directors"]').should('exist') | ||
cy.get('[data-cy="accordion_directors"]').children().eq(0).children().should('have.length', 5) | ||
cy.visitBusinessDashFor('businessInfo/ben/active.json') | ||
cy.get('[data-cy="accordion_directors"]') | ||
.should('exist') | ||
.children().eq(0).children() | ||
.should('have.length', 5) | ||
.get('[data-cy="header_directors"]') | ||
.should('contain', 'Current Directors') | ||
|
||
cy.intercept('GET', '**/BC**/standalone-directors**').as('changeDirector') | ||
cy.get('[data-cy="change-button"]') | ||
.should('exist') | ||
.click() | ||
.wait('@changeDirector') | ||
}) | ||
|
||
it('Partners accordion is rendered', () => { | ||
cy.visitBusinessDash('FM1060265', 'GP') | ||
cy.get('[data-cy="accordion_partners"]').should('exist') | ||
cy.get('[data-cy="accordion_partners"]').children().eq(0).children().should('have.length', 3) | ||
cy.visitBusinessDashFor('businessInfo/gp/active.json') | ||
cy.get('[data-cy="accordion_partners"]') | ||
.should('exist') | ||
.children().eq(0).children() | ||
.should('have.length', 3) | ||
.get('[data-cy="header_partner"]') | ||
.should('contain', 'Partners') | ||
|
||
cy.intercept('GET', '**/FM**/change**').as('changePartner') | ||
cy.get('[data-cy="change-button"]').should('exist').click() | ||
cy.wait('@changePartner') | ||
}) | ||
|
||
it('Proprietors accordion is rendered', () => { | ||
cy.visitBusinessDash('FM1060270', 'SP') | ||
cy.get('[data-cy="accordion_proprietors"]').should('exist') | ||
cy.get('[data-cy="accordion_proprietors"]').children().eq(0).children().should('have.length', 1) | ||
cy.visitBusinessDashFor('businessInfo/sp/active.json') | ||
cy.get('[data-cy="accordion_proprietors"]') | ||
.should('exist') | ||
.children().eq(0).children() | ||
.should('have.length', 1) | ||
.get('[data-cy="header_proprietors"]') | ||
.should('contain', 'Proprietors') | ||
|
||
cy.intercept('GET', '**/FM**/change**').as('changeProprietor') | ||
cy.get('[data-cy="change-button"]').should('exist').click() | ||
cy.wait('@changeProprietor') | ||
}) | ||
|
||
it('Change button does not exist for historical businesses', () => { | ||
cy.visitBusinessDashFor('businessInfo/bc/historical.json') | ||
cy.get('[data-cy="change-button"]').should('not.exist') | ||
}) | ||
|
||
it('Change button is disabled when \'changeOfDirector\' is not in allowable actions', () => { | ||
cy.visitBusinessDashFor('businessInfo/ben/unable-to-change-address-and-party.json') | ||
cy.get('[data-cy="change-button"]').should('be.disabled') | ||
}) | ||
}) |
127 changes: 127 additions & 0 deletions
127
cypress/fixtures/businessInfo/ben/unable-to-change-address-and-party.json
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,127 @@ | ||
{ | ||
"business": { | ||
"adminFreeze": false, | ||
"allowedActions": { | ||
"digitalBusinessCard": false, | ||
"filing": { | ||
"filingSubmissionLink": "https://legal-api-dev.apps.silver.devops.gov.bc.ca/api/v2/BC0871427/filings", | ||
"filingTypes": [ | ||
{ | ||
"displayName": "Admin Freeze", | ||
"feeCode": "NOFEE", | ||
"name": "adminFreeze" | ||
}, | ||
{ | ||
"displayName": "Request for AGM Extension", | ||
"feeCode": "AGMDT", | ||
"name": "agmExtension" | ||
}, | ||
{ | ||
"displayName": "AGM Location Change", | ||
"feeCode": "AGMLC", | ||
"name": "agmLocationChange" | ||
}, | ||
{ | ||
"displayName": "Alteration", | ||
"feeCode": "ALTER", | ||
"name": "alteration" | ||
}, | ||
{ | ||
"displayName": "Amalgamation Application (Regular)", | ||
"feeCode": "AMALR", | ||
"name": "amalgamationApplication", | ||
"type": "regular" | ||
}, | ||
{ | ||
"displayName": "Amalgamation Application Short-form (Vertical)", | ||
"feeCode": "AMALV", | ||
"name": "amalgamationApplication", | ||
"type": "vertical" | ||
}, | ||
{ | ||
"displayName": "Amalgamation Application Short-form (Horizontal)", | ||
"feeCode": "AMALH", | ||
"name": "amalgamationApplication", | ||
"type": "horizontal" | ||
}, | ||
{ | ||
"displayName": "Annual Report", | ||
"feeCode": "BCANN", | ||
"name": "annualReport" | ||
}, | ||
{ | ||
"displayName": "6-Month Consent to Continue Out", | ||
"feeCode": "CONTO", | ||
"name": "consentContinuationOut" | ||
}, | ||
{ | ||
"displayName": "Register Correction Application", | ||
"feeCode": "CRCTN", | ||
"name": "correction" | ||
}, | ||
{ | ||
"displayName": "Court Order", | ||
"feeCode": "NOFEE", | ||
"name": "courtOrder" | ||
}, | ||
{ | ||
"displayName": "Voluntary Dissolution", | ||
"feeCode": "DIS_VOL", | ||
"name": "dissolution", | ||
"type": "voluntary" | ||
}, | ||
{ | ||
"displayName": "Administrative Dissolution", | ||
"feeCode": "DIS_ADM", | ||
"name": "dissolution", | ||
"type": "administrative" | ||
}, | ||
{ | ||
"displayName": "Registrar's Notation", | ||
"feeCode": "NOFEE", | ||
"name": "registrarsNotation" | ||
}, | ||
{ | ||
"displayName": "Registrar's Order", | ||
"feeCode": "NOFEE", | ||
"name": "registrarsOrder" | ||
}, | ||
{ | ||
"displayName": "Transition Application", | ||
"feeCode": "TRANS", | ||
"name": "transition" | ||
} | ||
] | ||
} | ||
}, | ||
"alternateNames": [], | ||
"arMaxDate": "2024-06-28", | ||
"arMinDate": "2024-06-27", | ||
"associationType": null, | ||
"complianceWarnings": [], | ||
"fiscalYearEndDate": "2023-06-27", | ||
"foundingDate": "2023-06-27T21:48:45.599278+00:00", | ||
"goodStanding": true, | ||
"hasCorrections": false, | ||
"hasCourtOrders": false, | ||
"hasRestrictions": false, | ||
"identifier": "BC0871427", | ||
"inDissolution": false, | ||
"lastAddressChangeDate": "2023-06-27", | ||
"lastAnnualGeneralMeetingDate": "", | ||
"lastAnnualReportDate": "", | ||
"lastDirectorChangeDate": "2024-05-22", | ||
"lastLedgerTimestamp": "2023-06-27T21:48:47.354364+00:00", | ||
"lastModified": "2024-05-22T16:22:39.006738+00:00", | ||
"legalName": "0871427 B.C. LTD.", | ||
"legalType": "BEN", | ||
"naicsCode": null, | ||
"naicsDescription": null, | ||
"naicsKey": null, | ||
"nextAnnualReport": "2024-06-27T07:00:00+00:00", | ||
"noDissolution": false, | ||
"state": "ACTIVE", | ||
"submitter": "bcsc/jocxgslo54oopxozrht4uuneaxzhubek", | ||
"warnings": [] | ||
} | ||
} |
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
Oops, something went wrong.