File tree Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Expand file tree Collapse file tree 3 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ export class Stack {
151
151
contentTypeUid : query . contentTypeUid ,
152
152
entryUid : query . entryUid ,
153
153
preview_timestamp : query . preview_timestamp || "" ,
154
+ include_applied_variants : query . include_applied_variants || false ,
154
155
}
155
156
this . _client . stackConfig . live_preview = livePreviewParams ;
156
157
}
Original file line number Diff line number Diff line change @@ -259,6 +259,7 @@ export interface FindResponse<T> {
259
259
260
260
export interface LivePreviewQuery {
261
261
live_preview : string
262
+ include_applied_variants ?: boolean ;
262
263
contentTypeUid : string
263
264
entryUid ?: any ;
264
265
preview_timestamp ?: string
@@ -267,6 +268,7 @@ export interface LivePreviewQuery {
267
268
268
269
export type LivePreview = {
269
270
live_preview ?: string ;
271
+ include_applied_variants ?: boolean ;
270
272
contentTypeUid ?: string ;
271
273
entryUid ?: any ;
272
274
host ?: string ;
Original file line number Diff line number Diff line change @@ -59,7 +59,8 @@ describe('Live preview tests', () => {
59
59
live_preview : {
60
60
enable : true ,
61
61
preview_token : 'preview_token' ,
62
- host : 'rest-preview.contentstack.com'
62
+ host : 'rest-preview.contentstack.com' ,
63
+ include_applied_variants : true ,
63
64
}
64
65
} )
65
66
const livePreviewObject = stack . config . live_preview
@@ -68,6 +69,8 @@ describe('Live preview tests', () => {
68
69
expect ( livePreviewObject ) . toHaveProperty ( 'host' ) ;
69
70
expect ( livePreviewObject ) . toHaveProperty ( 'preview_token' ) ;
70
71
expect ( livePreviewObject ) . not . toHaveProperty ( 'management_token' ) ;
72
+ expect ( livePreviewObject ) . toHaveProperty ( 'include_applied_variants' ) ;
73
+ expect ( livePreviewObject ?. include_applied_variants ) . toBe ( true ) ;
71
74
expect ( stack . config . host ) . toBe ( 'cdn.contentstack.io' ) ;
72
75
} ) ;
73
76
You can’t perform that action at this time.
0 commit comments