@@ -24,7 +24,7 @@ describe("export wait helpers", () => {
24
24
describe ( "waitUntilExportIsReady" , ( ) => {
25
25
it ( "should return export data when export completes successfully" , async ( ) => {
26
26
const exportId = "test-export-id" ;
27
- const exportData = { id : exportId , state : ExportState . Complete } ;
27
+ const exportData = { id : exportId , is_terminal : true , state : ExportState . Complete } ;
28
28
const statusHandler = sinon . stub ( ) ;
29
29
30
30
getExport . resolves ( exportData ) ;
@@ -40,17 +40,14 @@ describe("export wait helpers", () => {
40
40
expect ( statusHandler ) . to . have . been . calledWith (
41
41
`test-export-id is Pending and not yet started.` ,
42
42
) ;
43
- expect ( statusHandler ) . to . have . been . calledWith (
44
- "test-export-id is Pending and not yet started." ,
45
- ) ;
46
43
expect ( statusHandler ) . to . have . been . calledWith (
47
44
"test-export-id has a terminal state of Complete." ,
48
45
) ;
49
46
} ) ;
50
47
51
48
it ( "should not print status when quiet is true" , async ( ) => {
52
49
const exportId = "test-export-id" ;
53
- const exportData = { id : exportId , state : ExportState . Complete } ;
50
+ const exportData = { id : exportId , is_terminal : true } ;
54
51
const statusHandler = sinon . stub ( ) ;
55
52
56
53
getExport . resolves ( exportData ) ;
@@ -92,9 +89,9 @@ describe("export wait helpers", () => {
92
89
93
90
getExport
94
91
. onFirstCall ( )
95
- . resolves ( { id : exportId , state : ExportState . Pending } )
92
+ . resolves ( { id : exportId , is_terminal : false , state : ExportState . Pending } )
96
93
. onSecondCall ( )
97
- . resolves ( { id : exportId , state : ExportState . Complete } ) ;
94
+ . resolves ( { id : exportId , is_terminal : true , state : ExportState . Complete } ) ;
98
95
99
96
const result = await waitAndCheckExportState ( {
100
97
id : exportId ,
@@ -134,11 +131,11 @@ describe("export wait helpers", () => {
134
131
135
132
getExport
136
133
. onFirstCall ( )
137
- . resolves ( { id : exportId , state : ExportState . Pending } )
134
+ . resolves ( { id : exportId , is_terminal : false } )
138
135
. onSecondCall ( )
139
- . resolves ( { id : exportId , state : ExportState . Pending } )
136
+ . resolves ( { id : exportId , is_terminal : false } )
140
137
. onThirdCall ( )
141
- . resolves ( { id : exportId , state : ExportState . Complete } ) ;
138
+ . resolves ( { id : exportId , is_terminal : true } ) ;
142
139
143
140
await waitAndCheckExportState ( {
144
141
id : exportId ,
0 commit comments