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 - hide 'Hide Details' button #657

Merged
merged 3 commits into from
May 29, 2024
Merged
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
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-filings-ui",
"version": "7.2.5",
"version": "7.2.6",
"private": true,
"appName": "Filings UI",
"sbcName": "SBC Common Components",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<v-btn
class="details-btn"
:class="{ 'bootstrap-filing': isBootstrapFiling }"
outlined
color="orange darken-2"
:ripple="false"
Expand All @@ -20,10 +21,10 @@

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { Action } from 'pinia-class'
import { Action, Getter } from 'pinia-class'
import { ApiFilingIF } from '@/interfaces'
import FiledLabel from '../FiledLabel.vue'
import { useFilingHistoryListStore } from '@/stores'
import { useFilingHistoryListStore, useRootStore } from '@/stores'

@Component({
components: { FiledLabel }
Expand All @@ -32,6 +33,7 @@ export default class FiledAndPendingPaid extends Vue {
@Prop({ required: true }) readonly filing!: ApiFilingIF
@Prop({ required: true }) readonly index!: number

@Getter(useRootStore) isBootstrapFiling!: boolean
@Action(useFilingHistoryListStore) toggleFilingHistoryItem!: (x: number) => Promise<void>
}
</script>
Expand All @@ -56,4 +58,9 @@ export default class FiledAndPendingPaid extends Vue {
.v-expansion-panel:not(.v-expansion-panel--active) .hide-details {
display: none;
}

// when panel is active and this is a bootstrap filing, hide button
.v-expansion-panel.v-expansion-panel--active .bootstrap-filing {
display: none;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

<v-btn
class="details-btn"
:class="{ 'bootstrap-filing': isBootstrapFiling }"
outlined
color="primary"
:ripple="false"
Expand All @@ -23,11 +24,11 @@

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { Action } from 'pinia-class'
import { Action, Getter } from 'pinia-class'
import { ApiFilingIF } from '@/interfaces'
import { EnumUtilities } from '@/services'
import FiledLabel from '../FiledLabel.vue'
import { useFilingHistoryListStore } from '@/stores'
import { useFilingHistoryListStore, useRootStore } from '@/stores'

@Component({
components: { FiledLabel }
Expand All @@ -36,6 +37,7 @@ export default class FutureEffectivePaid extends Vue {
@Prop({ required: true }) readonly filing!: ApiFilingIF
@Prop({ required: true }) readonly index!: number

@Getter(useRootStore) isBootstrapFiling!: boolean
@Action(useFilingHistoryListStore) toggleFilingHistoryItem!: (x: number) => Promise<void>

/** Whether this is an incorporation application. */
Expand Down Expand Up @@ -75,4 +77,9 @@ export default class FutureEffectivePaid extends Vue {
.v-expansion-panel:not(.v-expansion-panel--active) .hide-details {
display: none;
}

// when panel is active and this is a bootstrap filing, hide button
.v-expansion-panel.v-expansion-panel--active .bootstrap-filing {
display: none;
}
</style>
40 changes: 40 additions & 0 deletions tests/unit/FilingHistoryList1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,46 @@ describe('Filing History List - incorporation applications', () => {
wrapper.destroy()
})

it('displays a "future effective" IA filing view details', async () => {
// init store
sessionStorage.setItem('TEMP_REG_NUMBER', 'T123456789')
businessStore.setLegalType(CorpTypeCd.BENEFIT_COMPANY)
filingHistoryListStore.setFilings([
{
availableOnPaperOnly: false,
businessIdentifier: 'T123456789',
commentsCount: 0,
displayLedger: true,
displayName: 'BC Benefit Company Incorporation Application - ACME Benefit Inc',
effectiveDate: '2099-12-31 23:59:59 GMT', // way in the future so it's always > now
filingId: 85114,
isFutureEffective: true,
name: FilingTypes.INCORPORATION_APPLICATION,
status: FilingStatus.PAID,
submittedDate: 'Tue, 28 Apr 2020 19:14:45 GMT',
submitter: 'Cameron'
} as any
])

const wrapper = mount(FilingHistoryList, { vuetify })

const detailsBtn = wrapper.find('.details-btn')
expect(detailsBtn.text()).toContain('View Details')

await detailsBtn.trigger('click')
await Vue.nextTick()

expect(wrapper.findAll('.v-expansion-panel-content').isVisible()).toBe(true)
expect(wrapper.find('.future-effective').text()).toContain('Future Effective Incorporation Date')

rootStore.$state = {
...rootStore.$state,
entityStatus: null // Set isBootstrapFiling to false
}
sessionStorage.removeItem('TEMP_REG_NUMBER')
wrapper.destroy()
})

it.skip('displays a "future effective pending" IA filing', async () => {
// init store
sessionStorage.setItem('TEMP_REG_NUMBER', 'T123456789')
Expand Down
Loading