Skip to content

Commit

Permalink
24458 - no expansion panel for pending correction filing in the todo …
Browse files Browse the repository at this point in the history
…section (#110)
  • Loading branch information
patrickpeinanw authored Jan 6, 2025
1 parent 444aa60 commit a1e464a
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 2 deletions.
18 changes: 18 additions & 0 deletions cypress/e2e/components/todos/pending.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,22 @@ context('TODOs -> Pending Filing', () => {
.eq(0).click()
.wait('@cancelPayment')
})

it('Paid and pending correction', () => {
cy.visitBusinessDashFor('businessInfo/ben/active.json', undefined, false, false, 'pendingCorrection.json')

cy.get('[data-cy="header_todo"]').should('exist')
cy.get('[data-cy="todoItemList"]').should('exist')

// subtitle
cy.get('[data-cy^="todoItem-label-"]')
.should('exist')
.should('contains.text', 'FILING PENDING')

// no 'View Details' button
cy.get('[data-cy^="todoItem-showMore-"]').should('not.exist')

// no action button
cy.get('[data-cy^="todoItemActions-"]').find('button').should('not.exist')
})
})
42 changes: 42 additions & 0 deletions cypress/fixtures/todos/pendingCorrection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"tasks": [
{
"enabled": true,
"order": 1,
"task": {
"filing": {
"business": {
"foundingDate": "2024-10-12T00:27:29.366345+00:00",
"identifier": "BC0883617",
"legalName": "0883617 B.C. LTD.",
"legalType": "BC"
},
"correction": {
"correctedFilingType": "incorporationApplication"
},
"header": {
"affectedFilings": [],
"availableOnPaperOnly": false,
"certifiedBy": "",
"colinIds": [],
"comments": [],
"date": "2024-12-11T21:51:10.469453+00:00",
"deletionLocked": false,
"effectiveDate": "2024-12-11T21:51:10.469477+00:00",
"filingId": 155015,
"folioNumber": "",
"inColinOnly": false,
"isCorrected": false,
"isCorrectionPending": false,
"name": "correction",
"priority": false,
"paymentStatusCode": "COMPLETED",
"status": "PENDING",
"submitter": "pewang@idir",
"waiveFees": true
}
}
}
}
]
}
3 changes: 1 addition & 2 deletions src/utils/todo/task-filing/content-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,7 @@ export const addExpansionContent = (todoItem: TodoItemI): void => {
// if it is a draft correction filing
todoItem.expansionContent = TodoExpansionContentE.DRAFT_CORRECTION
} else if (todoItem.name === FilingTypes.CORRECTION) {
// if it is a correction filing (non-draft)
todoItem.expansionContent = TodoExpansionContentE.CORRECTION
// if it is a non-draft correction filing (pending filing), no expansion panel in this case
} else if (
(todoItem.status === FilingStatusE.DRAFT || todoItem.status === FilingStatusE.APPROVED) && todoItem.nameRequest
) {
Expand Down

0 comments on commit a1e464a

Please sign in to comment.