@@ -38,8 +38,8 @@ describe('View Application test', () => {
38
38
expect ( $ ( 'h1.govuk-heading-l' ) . text ( ) ) . toEqual ( '400 - Bad Request' )
39
39
expectPhaseBanner . ok ( $ )
40
40
} )
41
- test ( 'returns 200 application applied ' , async ( ) => {
42
- applications . getApplication . mockReturnValueOnce ( viewApplicationData . applied )
41
+ test ( 'returns 200 application agreed ' , async ( ) => {
42
+ applications . getApplication . mockReturnValueOnce ( viewApplicationData . agreed )
43
43
const options = {
44
44
method : 'GET' ,
45
45
url,
@@ -64,7 +64,7 @@ describe('View Application test', () => {
64
64
expect ( $ ( '.govuk-summary-list__key' ) . eq ( 3 ) . text ( ) ) . toMatch ( 'Email address:' )
65
65
expect ( $ ( '.govuk-summary-list__value' ) . eq ( 3 ) . text ( ) ) . toMatch ( '[email protected] ' )
66
66
67
- expect ( $ ( 'tbody tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Agreement formed ' )
67
+ expect ( $ ( 'tbody tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Date of agreement ' )
68
68
expect ( $ ( 'tbody tr:nth-child(1)' ) . text ( ) ) . toContain ( '06/06/2022' )
69
69
expect ( $ ( 'tbody tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Business details correct' )
70
70
expect ( $ ( 'tbody tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Yes' )
@@ -74,7 +74,7 @@ describe('View Application test', () => {
74
74
expect ( $ ( 'tbody tr:nth-child(4)' ) . text ( ) ) . toContain ( 'At least 21' )
75
75
expect ( $ ( 'tbody tr:nth-child(5)' ) . text ( ) ) . toContain ( 'Agreement accepted' )
76
76
expect ( $ ( 'tbody tr:nth-child(5)' ) . text ( ) ) . toContain ( 'Yes' )
77
- expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Never claimed' )
77
+ expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Not claimed yet ' )
78
78
expectPhaseBanner . ok ( $ )
79
79
} )
80
80
test ( 'returns 200 application applied' , async ( ) => {
@@ -103,7 +103,7 @@ describe('View Application test', () => {
103
103
expect ( $ ( '.govuk-summary-list__key' ) . eq ( 3 ) . text ( ) ) . toMatch ( 'Email address:' )
104
104
expect ( $ ( '.govuk-summary-list__value' ) . eq ( 3 ) . text ( ) ) . toMatch ( '[email protected] ' )
105
105
106
- expect ( $ ( 'tbody tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Agreement not formed ' )
106
+ expect ( $ ( 'tbody tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Date of agreement rejected ' )
107
107
expect ( $ ( 'tbody tr:nth-child(1)' ) . text ( ) ) . toContain ( '06/06/2022' )
108
108
expect ( $ ( 'tbody tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Business details correct' )
109
109
expect ( $ ( 'tbody tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Yes' )
@@ -113,7 +113,7 @@ describe('View Application test', () => {
113
113
expect ( $ ( 'tbody tr:nth-child(4)' ) . text ( ) ) . toContain ( 'At least 21' )
114
114
expect ( $ ( 'tbody tr:nth-child(5)' ) . text ( ) ) . toContain ( 'Agreement accepted' )
115
115
expect ( $ ( 'tbody tr:nth-child(5)' ) . text ( ) ) . toContain ( 'No' )
116
- expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Never claimed ' )
116
+ expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Not eligible to claim ' )
117
117
expectPhaseBanner . ok ( $ )
118
118
} )
119
119
test ( 'returns 200 application data inputted' , async ( ) => {
@@ -142,7 +142,7 @@ describe('View Application test', () => {
142
142
expect ( $ ( '.govuk-summary-list__key' ) . eq ( 3 ) . text ( ) ) . toMatch ( 'Email address:' )
143
143
expect ( $ ( '.govuk-summary-list__value' ) . eq ( 3 ) . text ( ) ) . toMatch ( '[email protected] ' )
144
144
145
- expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Never claimed ' )
145
+ expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Not eligible to claim ' )
146
146
expectPhaseBanner . ok ( $ )
147
147
} )
148
148
test ( 'returns 200 application claim' , async ( ) => {
@@ -173,16 +173,18 @@ describe('View Application test', () => {
173
173
174
174
expect ( $ ( '#claim' ) . text ( ) ) . toContain ( 'Claimed' )
175
175
176
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Review details confirmed' )
177
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Yes' )
178
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Date of review' )
179
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(2)' ) . text ( ) ) . toContain ( '07/11/2022' )
180
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(3)' ) . text ( ) ) . toContain ( 'Vet’s name' )
181
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(3)' ) . text ( ) ) . toContain ( 'testVet' )
182
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(4)' ) . text ( ) ) . toContain ( 'Vet’s RCVS number' )
183
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(4)' ) . text ( ) ) . toContain ( '1234234' )
184
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(5)' ) . text ( ) ) . toContain ( 'Unique reference number (URN)' )
185
- expect ( $ ( 'tbody:nth-child(1) tr:nth-child(5)' ) . text ( ) ) . toContain ( '134242' )
176
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(1)' ) . text ( ) ) . toContain ( 'Date of claim' )
177
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(1)' ) . text ( ) ) . toContain ( '07/12/2022' )
178
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Review details confirmed' )
179
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(2)' ) . text ( ) ) . toContain ( 'Yes' )
180
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(3)' ) . text ( ) ) . toContain ( 'Date of review' )
181
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(3)' ) . text ( ) ) . toContain ( '07/11/2022' )
182
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(4)' ) . text ( ) ) . toContain ( 'Vet’s name' )
183
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(4)' ) . text ( ) ) . toContain ( 'testVet' )
184
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(5)' ) . text ( ) ) . toContain ( 'Vet’s RCVS number' )
185
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(5)' ) . text ( ) ) . toContain ( '1234234' )
186
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(6)' ) . text ( ) ) . toContain ( 'Test results unique reference number (URN)' )
187
+ expect ( $ ( 'tbody:nth-child(1) tr:nth-child(6)' ) . text ( ) ) . toContain ( '134242' )
186
188
expectPhaseBanner . ok ( $ )
187
189
} )
188
190
test ( 'returns 200 application paid' , async ( ) => {
0 commit comments