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

21122 sample code (DO NOT MERGE) #655

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components/Dashboard/FilingHistoryList/HeaderActions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<!-- the main button -->
<v-btn
class="expand-btn"
:class="{ 'bootstrap-filing': isBootstrapFiling }"
outlined
color="primary"
:ripple="false"
Expand All @@ -12,7 +13,7 @@
<span class="view-details app-blue">Request a Copy</span>
<span class="hide-details app-blue">Close</span>
</template>
<template v-else-if="isTypeStaff">
<template v-else-if="isTypeStaff || isBootstrapFiling">
<span class="view-details app-blue">View</span>
<span class="hide-details app-blue">Hide</span>
</template>
Expand Down Expand Up @@ -83,7 +84,7 @@ import { FilingTypes } from '@bcrs-shared-components/enums'
import { ApiFilingIF } from '@/interfaces'
import { AllowableActionsMixin } from '@/mixins'
import { EnumUtilities } from '@/services'
import { useBusinessStore, useFilingHistoryListStore } from '@/stores'
import { useBusinessStore, useFilingHistoryListStore, useRootStore } from '@/stores'

@Component({})
export default class HeaderActions extends Mixins(AllowableActionsMixin) {
Expand All @@ -93,6 +94,7 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) {
@Prop({ required: true }) readonly index!: number

@Getter(useBusinessStore) isBenBcCccUlc!: boolean
@Getter(useRootStore) isBootstrapFiling!: boolean
@Getter(useBusinessStore) isDisableNonBenCorps!: boolean
// @Getter(useAuthenticationStore) isRoleStaff!: boolean

Expand Down Expand Up @@ -201,6 +203,11 @@ export default class HeaderActions extends Mixins(AllowableActionsMixin) {
border: none;
}

// when panel is active and this is a bootstrap filing, hide button
.v-expansion-panel.v-expansion-panel--active .bootstrap-filing {
display: none;
}

// when panel is active, hide View span
.v-expansion-panel.v-expansion-panel--active .view-details {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/ContinuationOut.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useBusinessStore, useRootStore } from '@/stores'
import ContinuationOut from '@/views/ContinuationOut.vue'
import { ConfirmDialog, ResumeErrorDialog, SaveErrorDialog }
from '@/components/dialogs'
import { BusinessNameForeign, EffectiveDate, Certify, DetailComment, ForeignJurisdiction } from '@/components/common'
import { BusinessNameForeign, EffectiveDate, Certify, ForeignJurisdiction } from '@/components/common'
import { CourtOrderPoa } from '@bcrs-shared-components/court-order-poa'
import { DocumentDelivery } from '@bcrs-shared-components/document-delivery'
import { LegalServices } from '@/services'
Expand Down
5 changes: 3 additions & 2 deletions tests/unit/FilingHistoryList1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,7 @@ describe('Filing History List - incorporation applications', () => {
wrapper.destroy()
})

// MAYBE FIX THIS?
it.skip('displays a Completed IA (temp reg number mode)', async () => {
// init store
sessionStorage.setItem('TEMP_REG_NUMBER', 'T123456789')
Expand Down Expand Up @@ -1533,8 +1534,8 @@ describe('Filing History List - incorporation applications', () => {
await detailsBtn.trigger('click')
await Vue.nextTick()

// verify Hide Details button
expect(wrapper.find('.details-btn').text()).toContain('Hide Details')
// verify that Hide Details button is hidden
expect(wrapper.find('.details-btn').isVisible()).toBe(false)

// verify details
expect(vm.getPanel).toEqual(0) // first row is expanded
Expand Down
14 changes: 14 additions & 0 deletions tests/unit/FilingHistoryList2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const isStaff = (filing) => (
filing.name === FilingTypes.PUT_BACK_ON ||
(filing.name === FilingTypes.DISSOLUTION && filing.displayName === 'Administrative Dissolution')
)
// MAYBE IMPLEMENT THIS?
const isFiledIncorpApp = (filing) => (filing.name === FilingTypes.CONSENT_CONTINUATION_OUT)

// Iterate over sample filings
filings.forEach((filing: any, index: number) => {
Expand Down Expand Up @@ -106,6 +108,18 @@ filings.forEach((filing: any, index: number) => {
expect(item.correctionFilingId).toBe(filing.correctionFilingId)
})

// MAYBE IMPLEMENT THIS?
itIf(isFiledIncorpApp(filing))('filed incorporation application filing', () => {
expect(vm.getFilings.length).toBe(1) // sanity check
const item = vm.getFilings[0]

// verify that View button is displayed when expansion is collapsed
// ...

// verify that Hide button is hidden when expansion is expanded
// ...
})

itIf(isIncorporationApplication(filing))('incorporation application filing', () => {
// expect(vm.getFilings.length).toBe(1) // sanity check
// const item = vm.getFilings[0]
Expand Down
Loading