Skip to content

Commit 393f3da

Browse files
committed
feat(devserver): Add payment-test form for PaymentField development
1 parent 84c23fa commit 393f3da

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

src/server/forms/payment-test.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: Payment Test Form
3+
declaration: "<p class=\"govuk-body\">All the answers you have provided are true to the best of your knowledge.</p>"
4+
pages:
5+
- title: A page title
6+
path: '/pay-for-your-licence'
7+
components:
8+
- name: pageGuidance
9+
type: Html
10+
title: Guidance
11+
content: "<p class=\"govuk-body\">Random guidance</p>"
12+
options: {}
13+
- name: licencePayment
14+
title: Payment details required
15+
type: PaymentField
16+
options:
17+
required: true
18+
amount: 300
19+
description: Processing fee for your application.
20+
next:
21+
- path: '/summary'
22+
- title: Summary
23+
path: '/summary'
24+
controller: './pages/summary.js'
25+
components: []
26+
next: []
27+
conditions: []
28+
sections: []
29+
lists: []
30+
startPage: '/pay-for-your-licence'

src/server/plugins/engine/services/localFormsService.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,12 @@ export const formsService = async () => {
5858
slug: 'simple-form'
5959
})
6060

61+
await loader.addForm('src/server/forms/payment-test.yaml', {
62+
...metadata,
63+
id: 'b2c3d4e5-f6a7-8901-bcde-f01234567890',
64+
title: 'Payment Test Form',
65+
slug: 'payment-test'
66+
})
67+
6168
return loader.toFormsService()
6269
}

0 commit comments

Comments
 (0)