Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

15951 - Special Resolution Correction - QA / UX fixes #509

Merged
merged 11 commits into from
Jul 6, 2023
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "business-edit-ui",
"version": "4.4.6",
"version": "4.4.7",
"private": true,
"appName": "Edit UI",
"sbcName": "SBC Common Components",
Expand Down
15 changes: 9 additions & 6 deletions src/components/SpecialResolution/Rules.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@
</div>
<div v-else>
<div
class="px-4 pt-0 section-container info-text"
class="pt-0 instructional-text section-container"
:class="{'error-text': rulesEditingInvalid}"
>
You can update the rules of association in one of the following ways:
</div>
<v-divider class="mx-4" />
<v-divider class="mx-8" />
<section
class="px-4 py-4 section-container"
class="py-4 section-container"
>
<v-btn
id="btn-describe-rules"
Expand Down Expand Up @@ -128,9 +128,9 @@
</template>
</v-checkbox>
</section>
<v-divider class="mx-4" />
<v-divider class="mx-8" />
<section
class="pa-4 section-container"
class="section-container"
>
<v-btn
id="btn-upload-rules"
Expand Down Expand Up @@ -189,7 +189,7 @@
</header>
</v-expand-transition>
</section>
<v-divider class="mx-4" />
<v-divider class="mx-8" />

<v-row
id="rules-confirmation-buttons"
Expand Down Expand Up @@ -575,5 +575,8 @@ a {
:deep(.v-label) {
font-weight: normal;
}
.instructional-text {
color: $gray7;
}

</style>
12 changes: 11 additions & 1 deletion src/mixins/filing-template-mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,17 @@ export default class FilingTemplateMixin extends DateMixin {

if (this.isCoopCorrectionFiling) {
this.storeSpecialResolutionRulesAndMemorandum(filing.correction, entitySnapshot)
const specialResolution = this.getLatestResolutionForBusiness
let specialResolution: SpecialResolutionIF = {}
if (filing.correction.resolution) {
specialResolution = {
resolution: filing.correction?.resolution,
resolutionDate: filing.correction?.resolutionDate,
signingDate: filing.correction?.signingDate,
signatory: filing.correction?.signatory
}
} else {
specialResolution = this.getLatestResolutionForBusiness
}
this.setSpecialResolution(cloneDeep(specialResolution))
}

Expand Down
121 changes: 120 additions & 1 deletion tests/unit/filing-template-mixin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,127 @@ import { CorpTypeCd, FilingTypes } from '@/enums'
setActivePinia(createPinia())
const store = useStore()

// FUTURE
describe('Correction Filing', () => {
let wrapper: any

beforeEach(() => {
wrapper = shallowMount(MixinTester)
})

afterEach(() => {
wrapper.destroy()
})

it('correctly builds a special resolution filing', () => {
store.stateModel.tombstone.businessId = 'CP1234567'
store.stateModel.tombstone.filingType = FilingTypes.SPECIAL_RESOLUTION
store.stateModel.tombstone.entityType = CorpTypeCd.COOP
store.stateModel.specialResolution.resolution = '<p>xxxx</p>'
store.stateModel.specialResolution.resolutionConfirmed = true
store.stateModel.rules = store.stateModel.rules || {}
store.stateModel.memorandum = store.stateModel.memorandum || {}
store.stateModel.rules.includedInResolution = true
store.stateModel.memorandum.includedInResolution = true
store.stateModel.specialResolution.signatory = {
familyName: 'SGSG',
givenName: 'GSG'
}
store.stateModel.completingParty = {
firstName: 'First',
lastName: 'Last',
middleName: 'Middle',
mailingAddress: {
streetAddress: '123 Completing Ave',
addressCity: 'Party',
addressRegion: 'BC',
postalCode: 'V0V 0V0',
addressCountry: 'CA'
}
}
store.stateModel.entitySnapshot = {
businessInfo: {
foundingDate: 'Jan 01, 2000',
legalType: CorpTypeCd.COOP,
identifier: 'CP1234567',
legalName: 'SomeMockBusiness'
},
addresses: {
businessOffice: {
mailingAddress: {
addressCity: 'Charlie',
addressCountry: 'CA',
addressRegion: 'BC',
deliveryInstructions: 'Mailing address',
postalCode: 'V2V 2V2',
streetAddress: '222 Second St',
streetAddressAdditional: 'Suite 2'
},
deliveryAddress: {
addressCity: 'Alpha',
addressCountry: 'CA',
addressRegion: 'BC',
deliveryInstructions: 'Delivery address',
postalCode: 'V1V 1V1',
streetAddress: '111 First St',
streetAddressAdditional: 'Suite 1'
}
}
}
} as any

const filing = wrapper.vm.buildSpecialResolutionFiling(true)

// FUTURE: check filing data...
expect(filing).toEqual(
expect.objectContaining({
business: {
foundingDate: 'Jan 01, 2000',
identifier: 'CP1234567',
legalName: 'SomeMockBusiness',
legalType: 'CP',
nrNumber: undefined
},
specialResolution: {
resolution: '<p>xxxx</p>',
resolutionConfirmed: true,
signatory: {
familyName: 'SGSG',
givenName: 'GSG'
}
},
alteration: {
business: {
identifier: 'CP1234567',
legalType: 'CP'
},
contactPoint: {
email: '',
phone: ''
},
cooperativeAssociationType: null,
rulesFileKey: undefined,
rulesFileName: undefined,
rulesUploadedOn: undefined,
rulesInResolution: true,
memorandumInResolution: true
},
changeOfName: {
legalName: null,
nameRequest: {
legalName: null,
legalType: null,
nrNumber: null
}
},
header: {
certifiedBy: '',
date: '',
folioNumber: '',
name: 'specialResolution'
}
})
)
})
})

// FUTURE
Expand Down