-
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.
UI - menu items in business tombstone (#48)
* menu options in tombstone; confirm dissolution dialog; small bug fixes * add cypress tests * clean-up * add new ticket number for future work
- Loading branch information
1 parent
a616897
commit 9d41e70
Showing
11 changed files
with
290 additions
and
87 deletions.
There are no files selected for viewing
32 changes: 0 additions & 32 deletions
32
cypress/e2e/components/tombstone/digital-credentials.cy.ts
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,95 @@ | ||
context('Business tombstone - action buttons in the dropdown menu', () => { | ||
it('Verify the Digital Business Cards button works', () => { | ||
// Intercept the GET request for the digital business card page | ||
cy.intercept('GET', '**/**/digital-credentials/**').as('getDigitalCredentials') | ||
|
||
cy.visitBusinessDashFor('businessInfo/sp/withDigitalCredential.json') | ||
|
||
cy.get('[data-cy="button.moreActions"]') | ||
.click() | ||
.find('[data-cy="button.digitalCredentials"]') | ||
.should('have.text', 'Digital Business Cards') | ||
.as('digitalBusinessCardsButton') | ||
|
||
cy.fixture('businessInfo/sp/withDigitalCredential.json').then((businessInfo) => { | ||
cy.get('@digitalBusinessCardsButton') | ||
.click() | ||
.wait('@getDigitalCredentials') | ||
.its('request.url').should('include', `/${businessInfo.business.identifier}/digital-credentials/`) | ||
}) | ||
}) | ||
|
||
it('The button should be hidden when allowedActions.digitalBusinessCard === false', () => { | ||
cy.visitBusinessDashFor('businessInfo/sp/active.json') | ||
|
||
cy.get('[data-cy="button.moreActions"]') | ||
.click() | ||
.find('[data-cy="button.digitalCredentials"]') | ||
.should('not.exist') | ||
}) | ||
|
||
it('Verify the action buttons in the dropdown menu', () => { | ||
// Intercept the request for Continuation Out, Request AGM Extension, Request AGM Location Change, and Amalgamate | ||
cy.intercept('GET', '**/**/consent-continuation-out?**filingId=0**').as('goToContinuationOut') | ||
cy.intercept('GET', '**/**/agm-extension?**filingId=0**').as('goToAgmExtension') | ||
cy.intercept('GET', '**/**/agm-location-chg?**filingId=0**').as('goToAgmLocationChange') | ||
cy.intercept('GET', '**/**/amalgamation-selection?**').as('goToAmalgamation') | ||
|
||
cy.visitBusinessDashFor('businessInfo/ben/active.json') | ||
.get('[data-cy="button.moreActions"]').as('moreActionsButton') | ||
.click() | ||
.find('[data-cy="button.consentToContinueOut"]') | ||
.should('have.text', 'Consent to Continue Out') | ||
.click() | ||
.wait('@goToContinuationOut') | ||
|
||
cy.visitBusinessDashFor('businessInfo/ben/active.json') | ||
.get('@moreActionsButton') | ||
.click() | ||
.find('[data-cy="button.requestAgmExtension"]') | ||
.should('have.text', 'Request AGM Extension') | ||
.click() | ||
.wait('@goToAgmExtension') | ||
|
||
cy.visitBusinessDashFor('businessInfo/ben/active.json') | ||
.get('@moreActionsButton') | ||
.click() | ||
.find('[data-cy="button.requestAgmLocationChange"]') | ||
.should('have.text', 'Request AGM Location Change') | ||
.click() | ||
.wait('@goToAgmLocationChange') | ||
|
||
cy.visitBusinessDashFor('businessInfo/ben/active.json') | ||
.get('@moreActionsButton') | ||
.click() | ||
.find('[data-cy="button.amalgamate"]') | ||
.should('have.text', 'Amalgamate') | ||
.click() | ||
.wait('@goToAmalgamation') | ||
}) | ||
|
||
it('Verify the dissolve business button works', () => { | ||
// open the dissolution confirm dialog for 'Voluntary Dissolution' for a BEN company | ||
cy.visitBusinessDashFor('businessInfo/ben/active.json') | ||
.get('[data-cy="button.moreActions"]') | ||
.click() | ||
.find('[data-cy="button.dissolveBusiness"]') | ||
.should('have.text', 'Dissolve this Business') | ||
.click() | ||
.get('[data-cy="bcros-dialog-confirmDissolution"]') | ||
.find('[data-cy="bcros-dialog-title"]') | ||
.should('have.text', 'Voluntary Dissolution') | ||
|
||
// open the dissolution confirm dialog for 'Dissolution' for a SP company | ||
cy.visitBusinessDashFor('businessInfo/sp/active.json') | ||
.get('[data-cy="button.moreActions"]') | ||
.click() | ||
.find('[data-cy="button.dissolveBusiness"]') | ||
.click() | ||
.get('[data-cy="bcros-dialog-confirmDissolution"]') | ||
.find('[data-cy="bcros-dialog-title"]') | ||
.should('have.text', 'Dissolution') | ||
|
||
// TO-DO: test the buttons and redirections in ticket #23467 | ||
}) | ||
}) |
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
Oops, something went wrong.