@@ -289,7 +289,7 @@ test("Theme onModified and saveThemeFunc", (): any => {
289
289
saveThemeCount ++ ;
290
290
callback ( saveNo , "success" ) ;
291
291
} ;
292
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
292
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
293
293
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
294
294
let modificationsLog = "" ;
295
295
themePlugin . onThemeSelected . add ( ( s , o ) => {
@@ -367,7 +367,7 @@ test("loadTheme fill all theme parameters: name, mode and compactness", (): any
367
367
368
368
test ( "Get theme changes only" , ( ) : any => {
369
369
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
370
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
370
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
371
371
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
372
372
themePlugin . activate ( ) ;
373
373
const themeModel = themePlugin . themeModel as ThemeModel ;
@@ -432,6 +432,7 @@ test("Pass background image from survey to theme editor and back", (): any => {
432
432
const lionImage = "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg" ;
433
433
const camelImage = "https://surveyjs.io/Content/Images/examples/image-picker/camel.jpg" ;
434
434
creator . JSON = {
435
+ headerView : "advanced" ,
435
436
backgroundImage : lionImage ,
436
437
questions : [ { type : "text" , name : "q1" } ]
437
438
} ;
@@ -476,6 +477,7 @@ test("Keep background image in theme modifications", (): any => {
476
477
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
477
478
const lionImage = "https://surveyjs.io/Content/Images/examples/image-picker/lion.jpg" ;
478
479
creator . JSON = {
480
+ headerView : "advanced" ,
479
481
questions : [ { type : "text" , name : "q1" } ]
480
482
} ;
481
483
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
@@ -550,7 +552,7 @@ test("Set and use custom default theme", (): any => {
550
552
Serializer . addProperty ( "theme" , { name : "--a-var" , visible : false } ) ;
551
553
552
554
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
553
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
555
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
554
556
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
555
557
expect ( ThemeModel . DefaultTheme ) . toEqual ( Themes [ "default-light" ] ) ;
556
558
@@ -697,7 +699,7 @@ test("Reset theme to default one", (): any => {
697
699
698
700
test ( "Theme undo redo changes" , ( ) : any => {
699
701
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
700
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
702
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
701
703
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
702
704
themePlugin . activate ( ) ;
703
705
const themeModel = themePlugin . themeModel as ThemeModel ;
@@ -734,7 +736,7 @@ test("Theme undo redo changes", (): any => {
734
736
735
737
test ( "Theme undo redo general settings" , ( ) : any => {
736
738
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
737
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
739
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
738
740
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
739
741
themePlugin . activate ( ) ;
740
742
const themeModel = themePlugin . themeModel as ThemeModel ;
@@ -768,7 +770,7 @@ test("Theme undo redo general settings", (): any => {
768
770
769
771
test ( "Theme undo redo calculated questions" , ( ) : any => {
770
772
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
771
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
773
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
772
774
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
773
775
themePlugin . activate ( ) ;
774
776
const themeModel = themePlugin . themeModel as ThemeModel ;
@@ -836,7 +838,7 @@ test("Theme undo redo calculated questions", (): any => {
836
838
837
839
test ( "Theme undo redo expression questions" , ( ) : any => {
838
840
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
839
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
841
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
840
842
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
841
843
themePlugin . activate ( ) ;
842
844
const themeModel = themePlugin . themeModel as ThemeModel ;
@@ -874,7 +876,7 @@ test("Theme undo redo expression questions", (): any => {
874
876
875
877
test ( "Theme undo redo header settings" , ( ) : any => {
876
878
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
877
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
879
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
878
880
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
879
881
themePlugin . activate ( ) ;
880
882
const themeModel = themePlugin . themeModel as ThemeModel ;
@@ -1007,7 +1009,7 @@ test("saveTheme action", (): any => {
1007
1009
saveThemeCount ++ ;
1008
1010
callback ( saveNo , "success" ) ;
1009
1011
} ;
1010
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
1012
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
1011
1013
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
1012
1014
expect ( saveCount ) . toBe ( 0 ) ;
1013
1015
expect ( saveThemeCount ) . toBe ( 0 ) ;
@@ -1063,7 +1065,7 @@ test("Reset theme action availability", (): any => {
1063
1065
return true ;
1064
1066
} ;
1065
1067
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
1066
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
1068
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
1067
1069
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
1068
1070
const resetThemeAction = themePlugin [ "resetTheme" ] ;
1069
1071
themePlugin . activate ( ) ;
@@ -1435,7 +1437,7 @@ test("Theme tab: default device and save current device", (): any => {
1435
1437
1436
1438
test ( "Theme tab: use theme palatte corresponding cretor theme palette if theme is not selected" , ( ) : any => {
1437
1439
const creator : CreatorTester = new CreatorTester ( { showThemeTab : true } ) ;
1438
- creator . JSON = { questions : [ { type : "text" , name : "q1" } ] } ;
1440
+ creator . JSON = { headerView : "advanced" , questions : [ { type : "text" , name : "q1" } ] } ;
1439
1441
const themePlugin : ThemeTabPlugin = < ThemeTabPlugin > creator . getPlugin ( "theme" ) ;
1440
1442
1441
1443
expect ( creator . preferredColorPalette ) . toBe ( "light" ) ;
0 commit comments