Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,7 @@ exports[`ChooseATemplateTypePage with letter authoring disabled 1`] = `
id="maincontent"
role="main"
>
<form
action="/action"
>
<input
name="form-id"
readonly=""
type="hidden"
value="choose-a-template-type"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group"
>
Expand Down Expand Up @@ -132,6 +118,12 @@ exports[`ChooseATemplateTypePage with letter authoring disabled 1`] = `
</div>
</fieldset>
</div>
<input
name="letterAuthoringEnabled"
readonly=""
type="hidden"
value="0"
/>
<div
class="nhsuk-card nhsuk-card--warning nhsuk-u-reading-width"
>
Expand Down Expand Up @@ -194,21 +186,7 @@ exports[`ChooseATemplateTypePage with letter authoring enabled 1`] = `
id="maincontent"
role="main"
>
<form
action="/action"
>
<input
name="form-id"
readonly=""
type="hidden"
value="choose-a-template-type"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group"
>
Expand Down Expand Up @@ -328,6 +306,12 @@ exports[`ChooseATemplateTypePage with letter authoring enabled 1`] = `
</div>
</fieldset>
</div>
<input
name="letterAuthoringEnabled"
readonly=""
type="hidden"
value="1"
/>
<button
aria-disabled="false"
class="nhsuk-button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,9 @@ import { useFeatureFlags } from '@providers/client-config-provider';
const { pageTitle } = content.components.chooseTemplateType;

jest.mock('next/navigation', () => ({
redirect: () => {
throw new Error('Simulated redirect');
},

RedirectType: {
push: 'push',
replace: 'replace',
},
useRouter: () => ({
push: () => {},
}),
}));

jest.mock('@providers/client-config-provider', () => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,7 @@ exports[`ChooseMessageOrderPage 1`] = `
id="maincontent"
role="main"
>
<form
action="/action"
>
<input
name="form-id"
readonly=""
type="hidden"
value="choose-message-order"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ const { pageTitle } = content.components.chooseMessageOrder;
jest.mock('@providers/client-config-provider');

jest.mock('next/navigation', () => ({
redirect: () => {
throw new Error('Simulated redirect');
},

RedirectType: {
push: 'push',
replace: 'replace',
},
useRouter: () => ({
push: () => {},
}),
}));

jest.mock('react', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,7 @@ exports[`client has multiple campaign ids matches snapshot on initial render 1`]
<div
class="nhsuk-grid-column-two-thirds"
>
<form
action="javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
>
<input
name="form-id"
readonly=""
type="hidden"
value="upload-large-print-letter-template"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group nhsuk-u-margin-bottom-6"
>
Expand Down Expand Up @@ -314,21 +300,7 @@ exports[`client has multiple campaign ids renders errors when blank form is subm
<div
class="nhsuk-grid-column-two-thirds"
>
<form
action="javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
>
<input
name="form-id"
readonly=""
type="hidden"
value="upload-large-print-letter-template"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group nhsuk-u-margin-bottom-6 nhsuk-form-group--error"
>
Expand Down Expand Up @@ -426,7 +398,9 @@ exports[`client has multiple campaign ids renders errors when blank form is subm
id="campaignId"
name="campaignId"
>
<option />
<option
selected=""
/>
<option
value="Campaign 1"
>
Expand Down Expand Up @@ -583,21 +557,7 @@ exports[`client has one campaign id matches snapshot on initial render 1`] = `
<div
class="nhsuk-grid-column-two-thirds"
>
<form
action="javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
>
<input
name="form-id"
readonly=""
type="hidden"
value="upload-large-print-letter-template"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group nhsuk-u-margin-bottom-6"
>
Expand Down Expand Up @@ -848,21 +808,7 @@ exports[`client has one campaign id renders errors when blank form is submitted
<div
class="nhsuk-grid-column-two-thirds"
>
<form
action="javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')"
>
<input
name="form-id"
readonly=""
type="hidden"
value="upload-large-print-letter-template"
/>
<input
name="csrf_token"
readonly=""
type="hidden"
value="no_token"
/>
<form>
<div
class="nhsuk-form-group nhsuk-u-margin-bottom-6 nhsuk-form-group--error"
>
Expand Down
Loading
Loading