@@ -13,6 +13,8 @@ window.scrollTo = jest.fn()
1313
1414const server = setupServer ( )
1515
16+ const mockApplication = JSON . parse ( JSON . stringify ( blankApplication ) )
17+
1618beforeAll ( ( ) => {
1719 server . listen ( )
1820} )
@@ -31,12 +33,12 @@ describe("applications pages", () => {
3133 describe ( "back button to ada step" , ( ) => {
3234 it ( "no listing available should redirect to listings page" , async ( ) => {
3335 const { pushMock } = mockNextRouter ( )
34- const conductor = new ApplicationConductor ( { } , { } )
36+ const conductor = new ApplicationConductor ( mockApplication , null )
3537 render (
3638 < AppSubmissionContext . Provider
3739 value = { {
3840 conductor : conductor ,
39- application : JSON . parse ( JSON . stringify ( blankApplication ) ) ,
41+ application : mockApplication ,
4042 listing : null ,
4143 syncApplication : ( ) => {
4244 return
@@ -57,12 +59,12 @@ describe("applications pages", () => {
5759
5860 it ( "listing available should not redirect to listings page" , async ( ) => {
5961 const { pushMock } = mockNextRouter ( )
60- const conductor = new ApplicationConductor ( { } , { } )
62+ const conductor = new ApplicationConductor ( mockApplication , { } )
6163 render (
6264 < AppSubmissionContext . Provider
6365 value = { {
6466 conductor : conductor ,
65- application : JSON . parse ( JSON . stringify ( blankApplication ) ) ,
67+ application : mockApplication ,
6668 listing : { } as Listing ,
6769 syncApplication : ( ) => {
6870 return
@@ -85,12 +87,12 @@ describe("applications pages", () => {
8587 describe ( "back button to summary step" , ( ) => {
8688 it ( "no listing available should redirect to listings page" , async ( ) => {
8789 const { pushMock } = mockNextRouter ( )
88- const conductor = new ApplicationConductor ( { } , { } )
90+ const conductor = new ApplicationConductor ( mockApplication , null )
8991 render (
9092 < AppSubmissionContext . Provider
9193 value = { {
9294 conductor : conductor ,
93- application : JSON . parse ( JSON . stringify ( blankApplication ) ) ,
95+ application : mockApplication ,
9496 listing : null ,
9597 syncApplication : ( ) => {
9698 return
@@ -111,12 +113,12 @@ describe("applications pages", () => {
111113
112114 it ( "listing available should not redirect to listings page" , async ( ) => {
113115 const { pushMock } = mockNextRouter ( )
114- const conductor = new ApplicationConductor ( { } , { } )
116+ const conductor = new ApplicationConductor ( mockApplication , { } )
115117 render (
116118 < AppSubmissionContext . Provider
117119 value = { {
118120 conductor : conductor ,
119- application : JSON . parse ( JSON . stringify ( blankApplication ) ) ,
121+ application : mockApplication ,
120122 listing : { } as Listing ,
121123 syncApplication : ( ) => {
122124 return
0 commit comments