@@ -105,14 +105,35 @@ describe('Bundles API', () => {
105105 url : exportUrl ,
106106 } ,
107107 } )
108- . post ( `/projects/${ projectId } /bundles/${ bundleId } /exports` , undefined , {
109- reqheaders : {
110- Authorization : `Bearer ${ api . token } ` ,
108+ . post (
109+ `/projects/${ projectId } /bundles/${ bundleId } /exports` ,
110+ {
111+ targetLanguageIds : [ 'uk' ] ,
112+ skipUntranslatedStrings : false ,
113+ exportApprovedOnly : true ,
111114 } ,
112- } )
115+ {
116+ reqheaders : {
117+ Authorization : `Bearer ${ api . token } ` ,
118+ } ,
119+ } ,
120+ )
113121 . reply ( 200 , {
114122 data : {
115123 identifier : exportId ,
124+ status : 'finished' ,
125+ progress : 100 ,
126+ attributes : {
127+ bundleId,
128+ targetLanguageIds : [ 'uk' ] ,
129+ skipUntranslatedStrings : false ,
130+ skipUntranslatedFiles : false ,
131+ exportApprovedOnly : true ,
132+ } ,
133+ createdAt : '2019-09-23T11:26:54+00:00' ,
134+ updatedAt : '2019-09-23T11:26:54+00:00' ,
135+ startedAt : null ,
136+ finishedAt : '2019-09-23T11:26:54+00:00' ,
116137 } ,
117138 } )
118139 . get ( `/projects/${ projectId } /bundles/${ bundleId } /exports/${ exportId } ` , undefined , {
@@ -123,6 +144,19 @@ describe('Bundles API', () => {
123144 . reply ( 200 , {
124145 data : {
125146 identifier : exportId ,
147+ status : 'finished' ,
148+ progress : 100 ,
149+ attributes : {
150+ bundleId,
151+ targetLanguageIds : [ 'uk' ] ,
152+ skipUntranslatedStrings : false ,
153+ skipUntranslatedFiles : false ,
154+ exportApprovedOnly : true ,
155+ } ,
156+ createdAt : '2019-09-23T11:26:54+00:00' ,
157+ updatedAt : '2019-09-23T11:26:54+00:00' ,
158+ startedAt : null ,
159+ finishedAt : '2019-09-23T11:26:54+00:00' ,
126160 } ,
127161 } )
128162 . get ( `/projects/${ projectId } /bundles/${ bundleId } /files` , undefined , {
@@ -210,13 +244,21 @@ describe('Bundles API', () => {
210244 } ) ;
211245
212246 it ( 'Export bundle' , async ( ) => {
213- const resp = await api . exportBundle ( projectId , bundleId ) ;
247+ const resp = await api . exportBundle ( projectId , bundleId , {
248+ targetLanguageIds : [ 'uk' ] ,
249+ skipUntranslatedStrings : false ,
250+ exportApprovedOnly : true ,
251+ } ) ;
214252 expect ( resp . data . identifier ) . toBe ( exportId ) ;
253+ expect ( resp . data . attributes . exportApprovedOnly ) . toBe ( true ) ;
254+ expect ( resp . data . startedAt ) . toBeNull ( ) ;
215255 } ) ;
216256
217257 it ( 'Check bundle export status' , async ( ) => {
218258 const resp = await api . checkBundleExportStatus ( projectId , bundleId , exportId ) ;
219259 expect ( resp . data . identifier ) . toBe ( exportId ) ;
260+ expect ( resp . data . attributes . targetLanguageIds ) . toEqual ( [ 'uk' ] ) ;
261+ expect ( resp . data . finishedAt ) . toBe ( '2019-09-23T11:26:54+00:00' ) ;
220262 } ) ;
221263
222264 it ( 'Bundle list files' , async ( ) => {
0 commit comments