Skip to content

Convert def acc#2340

Draft
max-holland wants to merge 29 commits intomasterfrom
convert_def_acc
Draft

Convert def acc#2340
max-holland wants to merge 29 commits intomasterfrom
convert_def_acc

Conversation

@max-holland
Copy link
Copy Markdown
Contributor

Jira link

See PROJ-XXXXXX

Change description

Testing done

Security Vulnerability Assessment

CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?

  • Yes
  • No

Checklist

  • commit messages are meaningful and follow good commit message guidelines
  • README and other documentation has been updated / added (if needed)
  • tests have been updated / new tests has been added (if needed)
  • Does this PR introduce a breaking change

max-holland and others added 14 commits March 17, 2026 10:09
- Added actions and assertions for converting a company account to an individual account in the EditDefendantDetailsActions class.
- Updated feature files to include scenarios for converting to an individual account and verifying pre-filled fields.
- Enhanced AccountEnquiryFlow to support individual account conversion actions and assertions.
- Modified selectors to accommodate new convert action links and text.
- Updated step definitions to handle new steps for converting to an individual account.
- Enhanced FinesAccConvertComponent to manage conversion logic for individual accounts.
- Created a new interface for convert actions to streamline handling of conversion options.
- Updated tests to cover new conversion scenarios and ensure proper navigation and state management.
…r non-debtor company to individual conversion
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 17, 2026 18:03 Abandoned
Copy link
Copy Markdown
Contributor

@Arnabsubedi233 Arnabsubedi233 left a comment

Choose a reason for hiding this comment

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

LGTM

@max-holland max-holland requested a review from louisbriggs March 18, 2026 08:58
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 18, 2026 09:00 Abandoned
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 18, 2026 09:13 Abandoned
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 18, 2026 13:41 Abandoned
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 18, 2026 13:56 Abandoned
@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 18, 2026 14:06 Abandoned
Copy link
Copy Markdown
Contributor

@louisbriggs louisbriggs left a comment

Choose a reason for hiding this comment

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

LGTM

@hmcts-jenkins-cnp hmcts-jenkins-cnp bot requested a deployment to preview March 18, 2026 14:33 Abandoned
Copy link
Copy Markdown
Contributor

@iamfrankiemoran iamfrankiemoran left a comment

Choose a reason for hiding this comment

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

Minor thoughts about moving some plain text to constant files

Comment on lines +74 to +94
/**
* Returns the confirmation heading for the requested conversion target.
*/
public get headingText(): string {
if (this.routePartyType === this.partyTypes.INDIVIDUAL) {
return 'Are you sure you want to convert this account to an individual account?';
}

return 'Are you sure you want to convert this account to a company account?';
}

/**
* Returns the warning copy describing which source-specific fields will be removed.
*/
public get warningText(): string {
if (this.routePartyType === this.partyTypes.INDIVIDUAL) {
return 'Some information specific to company accounts, such as company name, will be removed.';
}

return 'Certain data related to individual accounts, such as employment details, will be removed.';
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Would we want this plain text in constant files where we could pass in company or individual and details?

Comment on lines +28 to +41
return {
interactive: true,
label: 'Convert to an individual account',
partyType: FINES_ACC_PARTY_ADD_AMEND_CONVERT_PARTY_TYPES.INDIVIDUAL,
};
}

return {
interactive: true,
label: 'Convert to a company account',
partyType: FINES_ACC_PARTY_ADD_AMEND_CONVERT_PARTY_TYPES.COMPANY,
};
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again, the label text. I wonder if that should be in a constant?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or if we have two constants, one for the company and one for the individual that can be returned instead?

Comment on lines +46 to +53
if (this.partyType === 'company') {
return 'Converted to a company account.';
}

if (this.partyType === 'individual') {
return 'Converted to an individual account.';
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be in a constant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants