@@ -33,10 +33,10 @@ test("Preset edit model, page component", () => {
33
33
expect ( allItemsQuestion . choices [ 5 ] . value ) . toEqual ( "translation" ) ;
34
34
expect ( allItemsQuestion . choices [ 0 ] . title ) . toEqual ( "Designer" ) ;
35
35
expect ( allItemsQuestion . choices [ 4 ] . title ) . toEqual ( "JSON Editor" ) ;
36
- expect ( [ ] . concat ( allItemsQuestion . value ) ) . toEqual ( [ "designer" , "preview" , "json" ] ) ;
37
- expect ( itemsQuestion . visibleChoices ) . toHaveLength ( 3 ) ;
38
- expect ( [ ] . concat ( itemsQuestion . value ) ) . toEqual ( [ "designer" , "preview" , "json" ] ) ;
39
- expect ( activeTabQuestion . visibleChoices ) . toHaveLength ( 3 ) ;
36
+ expect ( [ ] . concat ( allItemsQuestion . value ) ) . toEqual ( [ "designer" , "preview" , "logic" , " json"] ) ;
37
+ expect ( itemsQuestion . visibleChoices ) . toHaveLength ( 4 ) ;
38
+ expect ( [ ] . concat ( itemsQuestion . value ) ) . toEqual ( [ "designer" , "preview" , "logic" , " json"] ) ;
39
+ expect ( activeTabQuestion . visibleChoices ) . toHaveLength ( 4 ) ;
40
40
expect ( activeTabQuestion . value ) . toEqual ( "designer" ) ;
41
41
42
42
allItemsQuestion . value = [ "designer" , "translation" ] ;
@@ -51,7 +51,7 @@ test("Preset edit model, page component", () => {
51
51
tabs : { items : [ "designer" , "translation" ] , activeTab : "translation" }
52
52
} ) ;
53
53
54
- allItemsQuestion . value = [ "designer" , "preview" , "json" ] ;
54
+ allItemsQuestion . value = [ "designer" , "preview" , "logic" , " json"] ;
55
55
activeTabQuestion . value = "designer" ;
56
56
const resJson2 = editor . getJsonFromSurveyModel ( ) ;
57
57
expect ( resJson2 ) . toEqual ( { } ) ;
@@ -61,14 +61,14 @@ test("Preset edit model, tabs page with creator, default items", () => {
61
61
const survey = editor . model ;
62
62
const itemsQuestion = survey . getQuestionByName ( "tabs_items" ) ;
63
63
const defultTabs = JSON . parse ( JSON . stringify ( itemsQuestion . value ) ) ;
64
- expect ( defultTabs ) . toEqual ( [ "designer" , "preview" , "json" ] ) ;
64
+ expect ( defultTabs ) . toEqual ( [ "designer" , "preview" , "logic" , " json"] ) ;
65
65
itemsQuestion . value = [ "preview" , "logic" ] ;
66
66
const activeTabQuestion = survey . getQuestionByName ( "tabs_activeTab" ) ;
67
67
activeTabQuestion . value = "logic" ;
68
68
editor . applyFromSurveyModel ( ) ;
69
69
const creator = editor . creator ;
70
70
expect ( creator . tabs ) . toHaveLength ( 2 ) ;
71
- expect ( creator . tabs [ 0 ] . id ) . toEqual ( "test " ) ;
71
+ expect ( creator . tabs [ 0 ] . id ) . toEqual ( "preview " ) ;
72
72
expect ( creator . tabs [ 1 ] . id ) . toEqual ( "logic" ) ;
73
73
expect ( creator . activeTab ) . toBe ( "logic" ) ;
74
74
} ) ;
@@ -78,7 +78,7 @@ test("Preset edit model, tabs page one selected element", () => {
78
78
const allItemsQuestion = survey . getQuestionByName ( "tabs_allItems" ) ;
79
79
const itemsQuestion = survey . getQuestionByName ( "tabs_items" ) ;
80
80
const activeTabQuestion = survey . getQuestionByName ( "tabs_activeTab" ) ;
81
- expect ( [ ] . concat ( itemsQuestion . value ) ) . toEqual ( [ "designer" , "preview" , "json" ] ) ;
81
+ expect ( [ ] . concat ( itemsQuestion . value ) ) . toEqual ( [ "designer" , "preview" , "logic" , " json"] ) ;
82
82
allItemsQuestion . value = [ "designer" ] ;
83
83
expect ( [ ] . concat ( itemsQuestion . value ) ) . toEqual ( [ "designer" ] ) ;
84
84
expect ( itemsQuestion . isVisible ) . toBeFalsy ( ) ;
@@ -129,7 +129,7 @@ test("Preset edit model, toolbox definition page, validate name/json", () => {
129
129
} ) ;
130
130
test ( "Preset edit model, page component" , ( ) => {
131
131
const editor = new CreatorPresetEditorModel ( { tabs : { items : [ ] } } ) ;
132
- expect ( editor . creator . tabs ) . toHaveLength ( 3 ) ;
132
+ expect ( editor . creator . tabs ) . toHaveLength ( 4 ) ;
133
133
const survey = editor . model ;
134
134
const allItemsQuestion = survey . getQuestionByName ( "tabs_allItems" ) ;
135
135
const itemsQuestion = survey . getQuestionByName ( "tabs_items" ) ;
@@ -447,7 +447,7 @@ test("Preset edit model, edit matrixdropdowncolumn@default", () => {
447
447
survey . setValue ( "propertyGrid_definition_selector" , "matrixdropdowncolumn@default" ) ;
448
448
const propGridCreator = getPropGridCreator ( survey ) ;
449
449
const creatorSurvey = propGridCreator . survey ;
450
- expect ( creatorSurvey . getAllPanels ( ) ) . toHaveLength ( 4 ) ;
450
+ expect ( creatorSurvey . getAllPanels ( ) ) . toHaveLength ( 5 ) ;
451
451
expect ( creatorSurvey . getAllPanels ( ) [ 0 ] . elements ) . toHaveLength ( 10 ) ;
452
452
expect ( creatorSurvey . getAllPanels ( ) [ 1 ] . elements ) . toHaveLength ( 7 ) ;
453
453
} ) ;
@@ -895,7 +895,7 @@ test("Preset edit model, save creator JSON on applying new preset", () => {
895
895
editor . creator . JSON = { elements : [ { type : "text" , name : "q1" } , { type : "text" , name : "q2" } ] } ;
896
896
const itemsQuestion = survey . getQuestionByName ( "tabs_items" ) ;
897
897
const defultTabs = JSON . parse ( JSON . stringify ( itemsQuestion . value ) ) ;
898
- expect ( defultTabs ) . toEqual ( [ "designer" , "preview" , "json" ] ) ;
898
+ expect ( defultTabs ) . toEqual ( [ "designer" , "preview" , "logic" , " json"] ) ;
899
899
itemsQuestion . value = [ "preview" , "logic" ] ;
900
900
const activeTabQuestion = survey . getQuestionByName ( "tabs_activeTab" ) ;
901
901
activeTabQuestion . value = "logic" ;
@@ -920,5 +920,5 @@ test("Preset edit model, set json property", () => {
920
920
editor . json = json ;
921
921
expect ( JSON . parse ( jsonQuestion . value ) ) . toMatchObject ( json ) ;
922
922
expect ( editor . creator . tabs ) . toHaveLength ( 2 ) ;
923
- expect ( editor . creator . activeTab ) . toBe ( "test " ) ;
923
+ expect ( editor . creator . activeTab ) . toBe ( "preview " ) ;
924
924
} ) ;
0 commit comments