Skip to content

Commit cc7c836

Browse files
committed
Update chromatic test to use "Go to review"
#10132
1 parent 55684f8 commit cc7c836

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

packages/client/src/v2-events/features/events/actions/correct/request/CorrectionRequest.interaction.stories.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ export const ReviewWithParentFieldChanges: Story = {
160160

161161
await step('Change senior pass values', async () => {
162162
await userEvent.click(
163-
canvas.getByRole('button', { name: 'Back to review' })
163+
canvas.getByRole('button', { name: 'Go to review' })
164164
)
165165
await userEvent.click(canvas.getByTestId('change-button-senior-pass.id'))
166166
await userEvent.type(
@@ -186,7 +186,7 @@ export const ReviewWithParentFieldChanges: Story = {
186186
})
187187
)
188188
await userEvent.click(
189-
canvas.getByRole('button', { name: 'Back to review' })
189+
canvas.getByRole('button', { name: 'Go to review' })
190190
)
191191
})
192192

@@ -234,9 +234,9 @@ export const ReviewWithParentFieldChanges: Story = {
234234
)
235235
})
236236

237-
await step('Go back to review', async () => {
237+
await step('Go to review', async () => {
238238
await userEvent.click(
239-
canvas.getByRole('button', { name: 'Back to review' })
239+
canvas.getByRole('button', { name: 'Go to review' })
240240
)
241241
})
242242

@@ -249,7 +249,7 @@ export const ReviewWithParentFieldChanges: Story = {
249249
)
250250

251251
await userEvent.click(
252-
canvas.getByRole('button', { name: 'Back to review' })
252+
canvas.getByRole('button', { name: 'Go to review' })
253253
)
254254
})
255255

@@ -332,7 +332,7 @@ export const AddressStaysUnchangedInSummaryWhenNotEdited: Story = {
332332
const canvas = within(canvasElement)
333333
await step('Validate review content', async () => {
334334
await userEvent.click(
335-
await canvas.findByRole('button', { name: 'Back to review' })
335+
await canvas.findByRole('button', { name: 'Go to review' })
336336
)
337337

338338
await canvas.findByText("Applicant's address")
@@ -354,7 +354,7 @@ export const AddressStaysUnchangedInSummaryWhenNotEdited: Story = {
354354
await canvas.findByText("Applicant's address")
355355

356356
await userEvent.click(
357-
await canvas.findByRole('button', { name: 'Back to review' })
357+
await canvas.findByRole('button', { name: 'Go to review' })
358358
)
359359
})
360360

packages/client/src/v2-events/features/events/actions/correct/request/Summary/Summary.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ export function Summary() {
202202
title={intl.formatMessage(correctionMessages.correctionSummaryTitle)}
203203
topActionButtons={[
204204
<SecondaryButton
205-
key="back-to-review"
206-
id="back-to-review"
205+
key="go-to-review"
206+
id="go-to-review"
207207
onClick={() =>
208208
navigate(
209209
ROUTES.V2.EVENTS.REQUEST_CORRECTION.REVIEW.buildPath(
@@ -215,7 +215,7 @@ export function Summary() {
215215
)
216216
}
217217
>
218-
{intl.formatMessage(registerMessages.backToReviewButton)}
218+
{intl.formatMessage(registerMessages.goToReviewButton)}
219219
</SecondaryButton>
220220
]}
221221
>

packages/client/src/v2-events/features/events/actions/declare/Review.interaction.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,8 @@ export const ReviewForIncompleteNameInteraction: Story = {
511511
const surnameInput = await canvas.findByTestId('text__surname')
512512
await userEvent.clear(surnameInput)
513513

514-
const backToReviewButton = await canvas.findByText('Back to review')
515-
await userEvent.click(backToReviewButton)
514+
const goToReviewButton = await canvas.findByText('Go to review')
515+
await userEvent.click(goToReviewButton)
516516
await canvas.findByText('Declaration incomplete')
517517
})
518518
}
@@ -577,8 +577,8 @@ export const ChangeFieldInReview: Story = {
577577
})
578578

579579
await step('Navigate back to review', async () => {
580-
const backToReviewButton = await canvas.findByText('Back to review')
581-
await userEvent.click(backToReviewButton)
580+
const goToReviewButton = await canvas.findByText('Go to review')
581+
await userEvent.click(goToReviewButton)
582582

583583
await waitFor(async () => {
584584
await expect(canvas.getByText("Applicant's name")).toBeInTheDocument()

packages/client/src/v2-events/features/events/actions/validate/Review.interaction.fileRemoval.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export const RemovingExistingFileSendsNull: Story = {
147147

148148
await userEvent.click(
149149
await canvas.findByRole('button', {
150-
name: 'Back to review'
150+
name: 'Go to review'
151151
})
152152
)
153153
})
@@ -429,7 +429,7 @@ export const RemovingMultipleFilesDeletesAll: Story = {
429429
await step('Clears file references and sends payload', async () => {
430430
await userEvent.click(
431431
await canvas.findByRole('button', {
432-
name: 'Back to review'
432+
name: 'Go to review'
433433
})
434434
)
435435
await canvas.findByText('No supporting documents')

packages/client/src/v2-events/features/events/components/FormWizard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const messages = defineMessages({
2525
goToReview: {
2626
defaultMessage: 'Go to review',
2727
description: 'Go to review button text',
28-
id: 'v2.buttons.goToReview'
28+
id: 'buttons.goToReview'
2929
}
3030
})
3131

0 commit comments

Comments
 (0)