Skip to content

Commit f9e42ba

Browse files
Merge branch 'main' into alerts
2 parents 0b449c4 + a817c35 commit f9e42ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1270
-66
lines changed

.github/workflows/cd.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@ on:
1313
options:
1414
- dev
1515
- test
16-
- sandbox
1716
- prod
18-
tagname:
19-
description: "Specify a previous version (git tag) to deploy"
20-
required: false
21-
default: ""
2217

2318
jobs:
2419
bus-dash-ui-cd:

cypress.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from 'cypress'
22

33
export default defineConfig({
44
e2e: {
5-
baseUrl: 'http://localhost:3000/BC0871427',
5+
baseUrl: 'http://localhost:3000',
66
setupNodeEvents (on) {
77
on('task', {
88
log (message) {
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
context('Business dashboard -> Address side component', () => {
2+
it('Address accordion is rendered for Registered Office and Record Office', () => {
3+
cy.visitBusinessDash('BC0871427', 'BEN')
4+
5+
// the accordion exists
6+
cy.get('[data-cy="accordion_officeAddresses"]').should('exist')
7+
8+
// accordion headers exist
9+
cy.get('[data-cy="accordion_item_button_officeAddresses0"]').contains('Registered Office').should('be.visible')
10+
cy.get('[data-cy="accordion_item_button_officeAddresses1"]').contains('Records Office').should('be.visible')
11+
12+
// the first accordion item is expanded by default and it contain address information
13+
cy.get('[data-cy="officeAddresses_0"]').contains('Delivery Address').should('be.visible')
14+
cy.get('[data-cy="officeAddresses_0"]').contains('Mailing Address').should('be.visible')
15+
cy.get('[data-cy="officeAddresses_1"]').contains('Delivery Address').should('not.be.visible')
16+
cy.get('[data-cy="officeAddresses_1"]').contains('Mailing Address').should('not.be.visible')
17+
18+
// expand the second item
19+
cy.get('[data-cy="accordion_item_button_officeAddresses1"]').click()
20+
21+
// Note: the current config allow only one item to be expanded
22+
// This is different from the behavior of the old dashboard.
23+
cy.get('[data-cy="officeAddresses_0"]').contains('Delivery Address').should('not.be.visible')
24+
cy.get('[data-cy="officeAddresses_0"]').contains('Mailing Address').should('not.be.visible')
25+
cy.get('[data-cy="officeAddresses_1"]').contains('Delivery Address').should('be.visible')
26+
cy.get('[data-cy="officeAddresses_1"]').contains('Mailing Address').should('be.visible')
27+
})
28+
29+
it('Business Addresses section is rendered for SP and GP', () => {
30+
cy.visitBusinessDash('FM1060270', 'SP')
31+
cy.get('[data-cy="accordion_officeAddresses"]').should('not.exist')
32+
cy.get('[data-cy="businessAddresses"]').should('exist')
33+
34+
cy.visitBusinessDash('FM1060265', 'GP')
35+
cy.get('[data-cy="accordion_officeAddresses"]').should('not.exist')
36+
cy.get('[data-cy="businessAddresses"]').should('exist')
37+
})
38+
})
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
context('Business dashboard -> Custodian of Records components', () => {
2+
it('Custodian accordion is rendered for historical business', () => {
3+
// when parties contain a person with 'Custodian' role and the business is historical
4+
cy.visitBusinessDash('BC0871427', 'BEN', true)
5+
cy.get('[data-cy="accordion_custodian"]').should('exist')
6+
cy.get('[data-cy="accordion_custodian"]').children().eq(0).children().should('have.length', 1)
7+
8+
// non-historical business with no custodian of records
9+
cy.visitBusinessDash('BC0871427', 'BEN', false)
10+
cy.get('[data-cy="accordion_custodian"]').should('not.exist')
11+
})
12+
})
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
context('Business dashboard -> Side components: Current Directors, Partners, Proprietors', () => {
2+
it('Directors accordion is rendered', () => {
3+
cy.visitBusinessDash('BC0871427', 'BEN')
4+
cy.get('[data-cy="accordion_directors"]').should('exist')
5+
cy.get('[data-cy="accordion_directors"]').children().eq(0).children().should('have.length', 5)
6+
})
7+
8+
it('Partners accordion is rendered', () => {
9+
cy.visitBusinessDash('FM1060265', 'GP')
10+
cy.get('[data-cy="accordion_partners"]').should('exist')
11+
cy.get('[data-cy="accordion_partners"]').children().eq(0).children().should('have.length', 3)
12+
})
13+
14+
it('Proprietors accordion is rendered', () => {
15+
cy.visitBusinessDash('FM1060270', 'SP')
16+
cy.get('[data-cy="accordion_proprietors"]').should('exist')
17+
cy.get('[data-cy="accordion_proprietors"]').children().eq(0).children().should('have.length', 1)
18+
})
19+
})

cypress/fixtures/addressBEN.json

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
{
2+
"recordsOffice": {
3+
"deliveryAddress": {
4+
"addressCity": "Vancouver",
5+
"addressCountry": "CA",
6+
"addressRegion": "BC",
7+
"addressType": "delivery",
8+
"deliveryInstructions": "",
9+
"id": 2716699,
10+
"postalCode": "V6J 5L2",
11+
"streetAddress": "201-1768 8th Ave W",
12+
"streetAddressAdditional": ""
13+
},
14+
"mailingAddress": {
15+
"addressCity": "Vancouver",
16+
"addressCountry": "CA",
17+
"addressRegion": "BC",
18+
"addressType": "mailing",
19+
"deliveryInstructions": "",
20+
"id": 2716698,
21+
"postalCode": "V6J 5L2",
22+
"streetAddress": "201-1768 8th Ave W",
23+
"streetAddressAdditional": ""
24+
}
25+
},
26+
"registeredOffice": {
27+
"deliveryAddress": {
28+
"addressCity": "Vancouver",
29+
"addressCountry": "CA",
30+
"addressRegion": "BC",
31+
"addressType": "delivery",
32+
"deliveryInstructions": "",
33+
"id": 2716701,
34+
"postalCode": "V6J 5L2",
35+
"streetAddress": "201-1768 8th Ave W",
36+
"streetAddressAdditional": ""
37+
},
38+
"mailingAddress": {
39+
"addressCity": "Vancouver",
40+
"addressCountry": "CA",
41+
"addressRegion": "BC",
42+
"addressType": "mailing",
43+
"deliveryInstructions": "",
44+
"id": 2716700,
45+
"postalCode": "V6J 5L2",
46+
"streetAddress": "201-1768 8th Ave W",
47+
"streetAddressAdditional": ""
48+
}
49+
}
50+
}

cypress/fixtures/addressSPandGP.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"businessOffice": {
3+
"deliveryAddress": {
4+
"addressCity": "Prince Rupert",
5+
"addressCountry": "CA",
6+
"addressRegion": "BC",
7+
"addressType": "delivery",
8+
"deliveryInstructions": null,
9+
"id": 2776826,
10+
"postalCode": "V8J 4C5",
11+
"streetAddress": "153 Alpine Dr",
12+
"streetAddressAdditional": ""
13+
},
14+
"mailingAddress": {
15+
"addressCity": "Prince Rupert",
16+
"addressCountry": "CA",
17+
"addressRegion": "BC",
18+
"addressType": "mailing",
19+
"deliveryInstructions": null,
20+
"id": 2776825,
21+
"postalCode": "V8J 4C5",
22+
"streetAddress": "153 Alpine Dr",
23+
"streetAddressAdditional": ""
24+
}
25+
}
26+
}

cypress/fixtures/business.json renamed to cypress/fixtures/businessBEN.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"adminFreeze": false,
33
"goodStanding": true,
4-
"identifier": "BC0871427",
54
"legalName": "0871427 B.C. LTD.",
65
"legalType": "BEN",
76
"state": "ACTIVE",

cypress/fixtures/businessContact.json renamed to cypress/fixtures/businessContactBEN.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
{
2-
"businessIdentifier": "BC0871427",
32
"contacts": [
43
{
5-
"email": "test@test.com",
6-
"phone": "(123) 456 7890",
4+
"email": "test1@test.com",
5+
"phone": "(123) 456 7891",
76
"phoneExtension": ""
87
}
98
],
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"contacts": [
3+
{
4+
"email": "test3@test.com",
5+
"phone": "(123) 456 7893",
6+
"phoneExtension": ""
7+
}
8+
],
9+
"corpType": {
10+
"code": "GP",
11+
"default": false,
12+
"desc": "General Partnership"
13+
},
14+
"created": "2023-06-27T21:48:47+00:00",
15+
"modified": "2023-10-19T16:58:23+00:00",
16+
"modifiedBy": "Tester Fake Account",
17+
"name": "Test GP Company",
18+
"passCodeClaimed": false
19+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"contacts": [
3+
{
4+
"email": "test2@test.com",
5+
"phone": "(123) 456 7892",
6+
"phoneExtension": ""
7+
}
8+
],
9+
"corpType": {
10+
"code": "SP",
11+
"default": false,
12+
"desc": "Sole Proprietorship"
13+
},
14+
"created": "2023-06-27T21:48:47+00:00",
15+
"modified": "2023-10-19T16:58:23+00:00",
16+
"modifiedBy": "Tester Fake Account",
17+
"name": "Test SP Company",
18+
"passCodeClaimed": false
19+
}

cypress/fixtures/businessGP.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"adminFreeze": false,
3+
"goodStanding": true,
4+
"legalName": "Test GP Company",
5+
"legalType": "GP",
6+
"state": "ACTIVE",
7+
"taxId": "123456789BC0003"
8+
}

cypress/fixtures/businessSP.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"adminFreeze": false,
3+
"goodStanding": true,
4+
"legalName": "Test SP Company",
5+
"legalType": "SP",
6+
"state": "ACTIVE",
7+
"taxId": "123456789BC0002"
8+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"deliveryAddress": {
3+
"addressCity": "Burnaby",
4+
"addressCountry": "CA",
5+
"addressRegion": "BC",
6+
"deliveryInstructions": "",
7+
"id": 2902982,
8+
"postalCode": "V5E 3X4",
9+
"streetAddress": "7861 Welsley Dr",
10+
"streetAddressAdditional": ""
11+
},
12+
"mailingAddress": {
13+
"addressCity": "Burnaby",
14+
"addressCountry": "CA",
15+
"addressRegion": "BC",
16+
"deliveryInstructions": "",
17+
"id": 2902983,
18+
"postalCode": "V5E 3X4",
19+
"streetAddress": "7861 Welsley Dr",
20+
"streetAddressAdditional": ""
21+
},
22+
"officer": {
23+
"email": "vishnupreddy0422@gmail.com",
24+
"firstName": "VISH",
25+
"id": 584259,
26+
"lastName": "P",
27+
"partyType": "person"
28+
},
29+
"roles": [
30+
{
31+
"appointmentDate": "2024-06-19",
32+
"cessationDate": null,
33+
"roleType": "Custodian"
34+
}
35+
]
36+
}

0 commit comments

Comments
 (0)