Skip to content

Commit

Permalink
25157 - close the comment modal after saving comments/details (#131)
Browse files Browse the repository at this point in the history
* 25157 - close the comment modal after saving comments/details

* update version

* update correctionFilings cypress test
  • Loading branch information
patrickpeinanw authored Jan 24, 2025
1 parent 2aea693 commit 8040ca0
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
10 changes: 7 additions & 3 deletions cypress/e2e/components/filings/correctionFilings.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { allFilings } from '../../../fixtures/filings/allFilings'
import { administrativeDissolution } from '../../../fixtures/filings/dissolution/administrativeDissolution'
import { devBCReg } from '../../../fixtures/origins'

context('Correction Filings', () => {
Expand Down Expand Up @@ -34,12 +35,15 @@ context('Correction Filings', () => {
})

it("Staff shouldn't be able to file a correction against an invalid type", () => {
cy.visitBusinessDashFor('businessInfo/ben/active.json', undefined, false, false, undefined, allFilings, true)
cy.visitBusinessDashFor(
'businessInfo/ben/active.json', undefined, false, false, undefined, [administrativeDissolution], true
)
cy.intercept('POST', '**/api/v2/businesses/**/filings', {}).as('correctionFilingsPost')

cy.get('[data-cy="header.actions.dropdown"]').should('exist')
//select filing 2 instead of 0 or 1 which are correctionable
cy.get('[data-cy="header.actions.dropdown"]').eq(2).click()

// open the dropdown for the administrative dissolution in the Filing History; correction option should be disabled
cy.get('[data-cy="header.actions.dropdown"]').first().click()
cy.get('[data-cy="header.actions.dropdown"] .fileACorrection').should('have.attr', 'aria-disabled')
cy.get('[data-cy="header.actions.dropdown"] .fileACorrection').invoke('attr', 'aria-disabled').should('eq', 'true')
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "bcros-business-dashboard",
"private": true,
"type": "module",
"version": "1.0.9",
"version": "1.0.10",
"scripts": {
"build": "nuxt generate",
"build:local": "nuxt build",
Expand Down
2 changes: 1 addition & 1 deletion src/components/bcros/businessDetails/Links.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ const contacts = getContactInfo('registries')
<BcrosComment :comments="comments" :business="currentBusiness.identifier" @close="showCommentDialog(false)" />
</UModal>
<UButton
id="download-summary-button"
id="comment-button"
small
text
variant="ghost"
Expand Down
3 changes: 2 additions & 1 deletion src/components/bcros/comment/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const props = withDefaults(defineProps<{
showCloseModal: true
})
defineEmits(['close'])
const emit = defineEmits(['close'])
const MAX_COMMENT_LENGTH = 2000
const commentToAdd = ref('')
Expand Down Expand Up @@ -76,6 +76,7 @@ const saveComment = async () => {
commentToAdd.value = ''
noChangesSinceSave.value = true
emit('close')
}
</script>
Expand Down

0 comments on commit 8040ca0

Please sign in to comment.