Skip to content

Commit

Permalink
- app version = 5.11.3 (#714)
Browse files Browse the repository at this point in the history
- imported latest correct-name shared component
- added CCC and CUL to numbered company suffix logic (2 places)
- added "LTD." to CCC numbered name (2 places)
- pass entity type to CorrectName so it can correctly show numbered name
- updated/added unit tests

Co-authored-by: Severin Beauvais <[email protected]>
  • Loading branch information
severinbeauvais and Severin Beauvais authored Jun 20, 2024
1 parent 36fab20 commit 77d9d78
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 26 deletions.
20 changes: 10 additions & 10 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-create-ui",
"version": "5.11.2",
"version": "5.11.3",
"private": true,
"appName": "Create UI",
"sbcName": "SBC Common Components",
Expand All @@ -23,7 +23,7 @@
"@bcrs-shared-components/confirm-dialog": "1.2.1",
"@bcrs-shared-components/contact-info": "1.2.15",
"@bcrs-shared-components/corp-type-module": "1.0.16",
"@bcrs-shared-components/correct-name": "1.0.46",
"@bcrs-shared-components/correct-name": "1.0.55",
"@bcrs-shared-components/court-order-poa": "3.0.11",
"@bcrs-shared-components/date-picker": "1.3.1",
"@bcrs-shared-components/document-delivery": "1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Amalgamation/ResultingBusinessName.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
:businessId="getBusinessId"
:companyName="companyName"
:correctionNameChoices="correctionNameChoices"
:entityType="null"
:entityType="getEntityType"
:fetchAndValidateNr="fetchAndValidateNr"
:formType="formType"
:nameRequest="getNameRequest"
Expand Down
1 change: 1 addition & 0 deletions src/components/common/MessageBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export default class MessageBox extends Vue {

<style lang="scss" scoped>
@import '@/assets/styles/theme.scss';
.v-card {
div {
font-size: $px-14;
Expand Down
8 changes: 5 additions & 3 deletions src/components/common/NameRequestInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -277,11 +277,13 @@ export default class NameRequestInfo extends Mixins(CommonMixin, DateMixin) {
@Getter(useStore) isAmalgamationFiling!: boolean
@Getter(useStore) isTypeBcCcc!: boolean
@Getter(useStore) isTypeBcUlcCompany!: boolean
@Getter(useStore) isTypeSoleProp: boolean
@Getter(useStore) isTypeCccContinueIn!: boolean
@Getter(useStore) isTypeSoleProp!: boolean
@Getter(useStore) isTypeUlcContinueIn!: boolean
get numberedCompanySuffix (): string {
if (this.isTypeBcCcc) return 'B.C. COMMUNITY CONTRIBUTION COMPANY'
if (this.isTypeBcUlcCompany) return 'B.C. UNLIMITED LIABILITY COMPANY'
if (this.isTypeBcCcc || this.isTypeCccContinueIn) return 'B.C. COMMUNITY CONTRIBUTION COMPANY LTD.'
if (this.isTypeBcUlcCompany || this.isTypeUlcContinueIn) return 'B.C. UNLIMITED LIABILITY COMPANY'
return 'B.C. LTD.'
}
Expand Down
13 changes: 9 additions & 4 deletions src/components/common/SummaryDefineCompany.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,9 @@ export default class SummaryDefineCompany extends Vue {
@Getter(useStore) isPremiumAccount!: boolean
@Getter(useStore) isTypeBcCcc!: boolean
@Getter(useStore) isTypeBcUlcCompany!: boolean
@Getter(useStore) isTypeCccContinueIn!: boolean
@Getter(useStore) isTypeCoop!: boolean
@Getter(useStore) isTypeUlcContinueIn!: boolean
/** Whether this section is invalid. */
get invalidSection (): boolean {
Expand All @@ -268,10 +270,13 @@ export default class SummaryDefineCompany extends Vue {
if (this.getNameRequestApprovedName) return this.getNameRequestApprovedName
// otherwise name will be created from new incorporation number
const prefix = '[Incorporation Number]'
if (this.isTypeBcCcc) return `${prefix} B.C. COMMUNITY CONTRIBUTION COMPANY`
if (this.isTypeBcUlcCompany) return `${prefix} B.C. UNLIMITED LIABILITY COMPANY`
return `${prefix} B.C. LTD.`
if (this.isTypeBcCcc || this.isTypeCccContinueIn) {
return '[Incorporation Number] B.C. COMMUNITY CONTRIBUTION COMPANY LTD.'
}
if (this.isTypeBcUlcCompany || this.isTypeUlcContinueIn) {
return '[Incorporation Number] B.C. UNLIMITED LIABILITY COMPANY'
}
return '[Incorporation Number] B.C. LTD.'
}
/** The entity description. */
Expand Down
59 changes: 53 additions & 6 deletions tests/unit/NameRequestInfo.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,7 @@ describe('Name Request Info component without a NR', () => {
let wrapper: any

beforeEach(() => {
// Entity type will always be set with or without an NR
store.stateModel.entityType = CorpTypeCd.BENEFIT_COMPANY
// Temp Id will always be set with or without an NR
store.stateModel.entityType = CorpTypeCd.BC_COMPANY
store.stateModel.tempId = 'T1234567'
store.stateModel.nameRequest.nrNum = null
store.stateModel.nameRequestApprovedName = null
Expand All @@ -286,16 +284,65 @@ describe('Name Request Info component without a NR', () => {
expect(wrapper.vm.$el.querySelector('.numbered-company-list-items')).toBeDefined()
})

it('renders the numbered company content', () => {
it('renders the numbered company content - BC Company', () => {
const listItems = wrapper.vm.$el.querySelectorAll('.numbered-company-list-items li')
expect(listItems.length).toEqual(5)

expect(listItems[0].textContent).toContain('[Incorporation Number] B.C. LTD.')
expect(listItems[1].textContent).toContain('Entity Type: BC Benefit Company')
expect(listItems[1].textContent).toContain('Entity Type: BC Limited Company')
expect(listItems[2].textContent).toContain(
'The company is to be incorporated with a name created by adding "B.C. LTD." after the incorporation number.')
expect(listItems[3].textContent).toContain(
'Your Incorporation Number will be generated at the end of the filing transaction.')
expect(listItems[4].textContent).toContain('It is not possible to request a specific Incorporation Number.')
})

it('renders the numbered company content - continued in BC', async () => {
store.setEntityType(CorpTypeCd.CONTINUE_IN)
await Vue.nextTick()

const listItems = wrapper.vm.$el.querySelectorAll('.numbered-company-list-items li')
expect(listItems.length).toEqual(5)
expect(listItems[0].textContent).toContain('[Incorporation Number] B.C. LTD.')
expect(listItems[1].textContent).toContain('Entity Type: BC Limited Company')
})

it('renders the numbered company content - Community Contribution Company', async () => {
store.setEntityType(CorpTypeCd.BC_CCC)
await Vue.nextTick()

const listItems = wrapper.vm.$el.querySelectorAll('.numbered-company-list-items li')
expect(listItems.length).toEqual(5)
expect(listItems[0].textContent).toContain('[Incorporation Number] B.C. COMMUNITY CONTRIBUTION COMPANY LTD.')
expect(listItems[1].textContent).toContain('Entity Type: BC Community Contribution Company')
})

it('renders the numbered company content - continued in CCC', async () => {
store.setEntityType(CorpTypeCd.CCC_CONTINUE_IN)
await Vue.nextTick()

const listItems = wrapper.vm.$el.querySelectorAll('.numbered-company-list-items li')
expect(listItems.length).toEqual(5)
expect(listItems[0].textContent).toContain('[Incorporation Number] B.C. COMMUNITY CONTRIBUTION COMPANY LTD.')
expect(listItems[1].textContent).toContain('Entity Type: BC Community Contribution Company')
})

it('renders the numbered company content - Unlimited Liability Company', async () => {
store.setEntityType(CorpTypeCd.BC_ULC_COMPANY)
await Vue.nextTick()

const listItems = wrapper.vm.$el.querySelectorAll('.numbered-company-list-items li')
expect(listItems.length).toEqual(5)
expect(listItems[0].textContent).toContain('[Incorporation Number] B.C. UNLIMITED LIABILITY COMPANY')
expect(listItems[1].textContent).toContain('Entity Type: BC Unlimited Liability Company')
})

it('renders the numbered company content - continued in ULC', async () => {
store.setEntityType(CorpTypeCd.ULC_CONTINUE_IN)
await Vue.nextTick()

const listItems = wrapper.vm.$el.querySelectorAll('.numbered-company-list-items li')
expect(listItems.length).toEqual(5)
expect(listItems[0].textContent).toContain('[Incorporation Number] B.C. UNLIMITED LIABILITY COMPANY')
expect(listItems[1].textContent).toContain('Entity Type: BC Unlimited Liability Company')
})
})

0 comments on commit 77d9d78

Please sign in to comment.