Skip to content

CCM-15018: How to request a digital proof#879

Open
bhansell1 wants to merge 9 commits intomainfrom
feature/CCM-15018-request-proof-link
Open

CCM-15018: How to request a digital proof#879
bhansell1 wants to merge 9 commits intomainfrom
feature/CCM-15018-request-proof-link

Conversation

@bhansell1
Copy link
Contributor

@bhansell1 bhansell1 commented Mar 16, 2026

Description

  • adds a banner to direct users on how to request a proof for a digital template
  • adds a new page explaining how to request a proof (some links still missing)
image image

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming
  • If I have used the 'skip-trivy-package' label I have done so responsibly and in the knowledge that this is being fixed as part of a separate ticket/PR.

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@bhansell1 bhansell1 marked this pull request as ready for review March 17, 2026 14:00
@bhansell1 bhansell1 requested a review from a team as a code owner March 17, 2026 14:00
alexnuttall
alexnuttall previously approved these changes Mar 18, 2026
text: markdownList('ul', [
'the template ID or IDs',
'the email address you want the proofs sent to',
'yo,ur service name',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
'yo,ur service name',
'your service name',

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good spot thank you!


await expect(previewPage.editButton).toBeVisible();

await expect(previewPage.testMessageBanner).toBeHidden();
Copy link
Contributor

Choose a reason for hiding this comment

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

if we're no longer asserting its hidden, shouldn't we be asserting that its visible instead?

this.summaryList = page.locator('dl.nhsuk-summary-list');
this.testMessageBanner = page.getByTestId('test-message-banner');
this.testMessageBannerLink = this.testMessageBanner.locator('a');
this.messageBanner = page.getByTestId('message-banner');
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm tempted to say should we have two separate locators for the request a proof banner and the test message one? so we can make clear assertions which differentiate between the two?
what do you think?

},
{
type: 'text',
text: '[Request a proof using our online form (opens in a new tab)](#).',
Copy link
Contributor

Choose a reason for hiding this comment

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

might need some TODOs in here?

content:
'This is only a basic preview. [Request a proof](/templates/request-a-proof/{{templateId}}) to preview this template properly.',
overrides: {
a: { props: { target: '', rel: '' } },
Copy link
Contributor

Choose a reason for hiding this comment

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

are you happy overriding it this way round vs removing the default and explicitly adding the _blank etc in overrides when we want to add it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it really depends on whatever is used more often. At the moment it looks like the behaviour to open a new tab is the default behaviour and this is the edge case.

@@ -1218,6 +1290,13 @@ const previewDigitalTemplate = {
EMAIL:
'This is only a basic preview. [Send a test email](/templates/send-test-email/{{templateId}}) to preview this message properly.',
Copy link
Contributor

Choose a reason for hiding this comment

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

if you go with what I suggest in the pw tests about having separate locators for each banner, you could override the testid like we've done elsewhere in here and set it differently for each banner type in content, rather than it being hard-coded in PreviewDigitalTemplate?


await expect(previewPage.editButton).toBeVisible();

await expect(previewPage.testMessageBanner).toBeHidden();
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as in the other file


await expect(previewPage.editButton).toBeVisible();

await expect(previewPage.testMessageBanner).toBeHidden();
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as in the other files

content: testMessageBanner[template.templateType],
overrides: undefined,
}
: requestProofBanner;
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty sure the request proof banner only displays if routing is on, is that what you've done?

Copy link
Contributor

Choose a reason for hiding this comment

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

no longer applies - agreed the banner is always displayed, its just the content that changes depending on digital proofing flag

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants