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

19044 - Amalgamation unit tests #655

Merged
merged 8 commits into from
Feb 14, 2024
Merged

Conversation

ketaki-deodhar
Copy link
Collaborator

@ketaki-deodhar ketaki-deodhar commented Feb 13, 2024

Issue #: /bcgov/entity#19044

Description of changes:

Added unit tests in:

  • AmalgamationBusinessInfo.spec.ts
  • AmalgamationInformation.spec.ts
  • AmalgamationPeopleRoles.spec.ts
  • AmalgamationReviewConfirm.spec.ts
  • PeopleAndRoles.spec.ts

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the bcrs-entities-create-ui license (Apache 2.0).

@@ -73,11 +73,11 @@ describe('Amalgamating Businesses - components and validity', () => {
})

it('computes havePrimaryBusiness correctly', () => {
// verify with no holding businesses
// verify with no primary businesses
Copy link
Collaborator Author

@ketaki-deodhar ketaki-deodhar Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated comment based on test. Same below.

import AmalgamatingBusinesses from '@/components/Amalgamation/AmalgamatingBusinesses.vue'
import { ExpandableHelp } from '@bcrs-shared-components/expandable-help'
import ResultingBusinessName from '@/components/Amalgamation/ResultingBusinessName.vue'
import BusinessTypeHelp from '@/components/Amalgamation/BusinessTypeHelp.vue'
import { AmalgamationTypes, FilingTypes } from '@bcrs-shared-components/enums'

// Test Case Data
const amalgamationRegularBusinessInfo = [
const amalgamationBusinessInfo = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed as can be used for regular and short tests

@@ -28,18 +29,21 @@ const amalgamationRegularBusinessInfo = [
}
]

for (const test of amalgamationRegularBusinessInfo) {
describe(`Amalgamation-Regular Review Confirm for a ${test.entityType}`, () => {
for (const test of amalgamationBusinessInfo) {
Copy link
Collaborator Author

@ketaki-deodhar ketaki-deodhar Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests for Review and confirm are similar Regular vs Short. UIs are different for Staff vs regular user so added test at line 133

@@ -167,3 +168,57 @@ describe('People And Roles component', () => {
resetStore()
})
})

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few tests for Short amalgamation (it is a bit of a different case than other filings)

@ketaki-deodhar ketaki-deodhar self-assigned this Feb 14, 2024
Copy link
Collaborator

@severinbeauvais severinbeauvais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this one?

// *** FUTURE: add tests for regular vs short-form amalgamations

@ketaki-deodhar
Copy link
Collaborator Author

What about this one?

// *** FUTURE: add tests for regular vs short-form amalgamations

For Short form, Share structure is not a step and is only shown in Review and Confirm step as read only.

@severinbeauvais
Copy link
Collaborator

For Short form, Share structure is not a step and is only shown in Review and Confirm step as read only.

Oh, right. Please remove that comment. Thanks!

Copy link
Contributor

@jamespaologarcia jamespaologarcia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ketaki-deodhar ketaki-deodhar merged commit e8e1491 into bcgov:main Feb 14, 2024
4 of 5 checks passed
JazzarKarim pushed a commit to JazzarKarim/business-create-ui that referenced this pull request Feb 23, 2024
* 19044 - unit tests for Short amalgmation resources

* 19044 - clean up

* 19044 - add comment

* 19044 - remove comment

* 19044 - remove comment

* 19044 - update package version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants