@@ -37,10 +37,11 @@ test('isMatrixifyEnabled should return false when no matrixify configuration exi
37
37
expect ( isMatrixifyEnabled ( formData ) ) . toBe ( false ) ;
38
38
} ) ;
39
39
40
- test ( 'isMatrixifyEnabled should return false when matrixify_enabled is false' , ( ) => {
40
+ test ( 'isMatrixifyEnabled should return false when layout controls are false' , ( ) => {
41
41
const formData = {
42
42
viz_type : 'table' ,
43
- matrixify_enabled : false ,
43
+ matrixify_enable_vertical_layout : false ,
44
+ matrixify_enable_horizontal_layout : false ,
44
45
matrixify_mode_rows : 'metrics' ,
45
46
matrixify_rows : [ createMetric ( 'Revenue' ) ] ,
46
47
} as MatrixifyFormData ;
@@ -51,7 +52,7 @@ test('isMatrixifyEnabled should return false when matrixify_enabled is false', (
51
52
test ( 'isMatrixifyEnabled should return true for valid metrics mode configuration' , ( ) => {
52
53
const formData = {
53
54
viz_type : 'table' ,
54
- matrixify_enabled : true ,
55
+ matrixify_enable_vertical_layout : true ,
55
56
matrixify_mode_rows : 'metrics' ,
56
57
matrixify_mode_columns : 'metrics' ,
57
58
matrixify_rows : [ createMetric ( 'Revenue' ) ] ,
@@ -64,7 +65,7 @@ test('isMatrixifyEnabled should return true for valid metrics mode configuration
64
65
test ( 'isMatrixifyEnabled should return true for valid dimensions mode configuration' , ( ) => {
65
66
const formData = {
66
67
viz_type : 'table' ,
67
- matrixify_enabled : true ,
68
+ matrixify_enable_vertical_layout : true ,
68
69
matrixify_mode_rows : 'dimensions' ,
69
70
matrixify_mode_columns : 'dimensions' ,
70
71
matrixify_dimension_rows : { dimension : 'country' , values : [ 'USA' ] } ,
@@ -77,7 +78,7 @@ test('isMatrixifyEnabled should return true for valid dimensions mode configurat
77
78
test ( 'isMatrixifyEnabled should return true for mixed mode configuration' , ( ) => {
78
79
const formData = {
79
80
viz_type : 'table' ,
80
- matrixify_enabled : true ,
81
+ matrixify_enable_vertical_layout : true ,
81
82
matrixify_mode_rows : 'metrics' ,
82
83
matrixify_mode_columns : 'dimensions' ,
83
84
matrixify_rows : [ createMetric ( 'Revenue' ) ] ,
@@ -90,7 +91,7 @@ test('isMatrixifyEnabled should return true for mixed mode configuration', () =>
90
91
test ( 'isMatrixifyEnabled should return true for topn dimension selection mode' , ( ) => {
91
92
const formData = {
92
93
viz_type : 'table' ,
93
- matrixify_enabled : true ,
94
+ matrixify_enable_vertical_layout : true ,
94
95
matrixify_mode_rows : 'dimensions' ,
95
96
matrixify_mode_columns : 'dimensions' ,
96
97
matrixify_dimension_rows : {
@@ -109,7 +110,7 @@ test('isMatrixifyEnabled should return true for topn dimension selection mode',
109
110
test ( 'isMatrixifyEnabled should return false when both axes have empty metrics arrays' , ( ) => {
110
111
const formData = {
111
112
viz_type : 'table' ,
112
- matrixify_enabled : true ,
113
+ matrixify_enable_vertical_layout : true ,
113
114
matrixify_mode_rows : 'metrics' ,
114
115
matrixify_mode_columns : 'metrics' ,
115
116
matrixify_rows : [ ] ,
@@ -122,7 +123,7 @@ test('isMatrixifyEnabled should return false when both axes have empty metrics a
122
123
test ( 'isMatrixifyEnabled should return false when both dimensions have empty values and no topn mode' , ( ) => {
123
124
const formData = {
124
125
viz_type : 'table' ,
125
- matrixify_enabled : true ,
126
+ matrixify_enable_vertical_layout : true ,
126
127
matrixify_mode_rows : 'dimensions' ,
127
128
matrixify_mode_columns : 'dimensions' ,
128
129
matrixify_dimension_rows : { dimension : 'country' , values : [ ] } ,
@@ -140,7 +141,7 @@ test('getMatrixifyConfig should return null when no matrixify configuration exis
140
141
test ( 'getMatrixifyConfig should return valid config for metrics mode' , ( ) => {
141
142
const formData = {
142
143
viz_type : 'table' ,
143
- matrixify_enabled : true ,
144
+ matrixify_enable_vertical_layout : true ,
144
145
matrixify_mode_rows : 'metrics' ,
145
146
matrixify_mode_columns : 'metrics' ,
146
147
matrixify_rows : [ createMetric ( 'Revenue' ) ] ,
@@ -158,7 +159,7 @@ test('getMatrixifyConfig should return valid config for metrics mode', () => {
158
159
test ( 'getMatrixifyConfig should return valid config for dimensions mode' , ( ) => {
159
160
const formData = {
160
161
viz_type : 'table' ,
161
- matrixify_enabled : true ,
162
+ matrixify_enable_vertical_layout : true ,
162
163
matrixify_mode_rows : 'dimensions' ,
163
164
matrixify_mode_columns : 'dimensions' ,
164
165
matrixify_dimension_rows : { dimension : 'country' , values : [ 'USA' ] } ,
@@ -182,7 +183,7 @@ test('getMatrixifyConfig should return valid config for dimensions mode', () =>
182
183
test ( 'getMatrixifyConfig should handle topn selection mode' , ( ) => {
183
184
const formData = {
184
185
viz_type : 'table' ,
185
- matrixify_enabled : true ,
186
+ matrixify_enable_vertical_layout : true ,
186
187
matrixify_mode_rows : 'dimensions' ,
187
188
matrixify_mode_columns : 'dimensions' ,
188
189
matrixify_dimension_rows : {
@@ -212,7 +213,7 @@ test('getMatrixifyValidationErrors should return empty array when matrixify is n
212
213
test ( 'getMatrixifyValidationErrors should return empty array when properly configured' , ( ) => {
213
214
const formData = {
214
215
viz_type : 'table' ,
215
- matrixify_enabled : true ,
216
+ matrixify_enable_vertical_layout : true ,
216
217
matrixify_mode_rows : 'metrics' ,
217
218
matrixify_mode_columns : 'metrics' ,
218
219
matrixify_rows : [ createMetric ( 'Revenue' ) ] ,
@@ -225,7 +226,7 @@ test('getMatrixifyValidationErrors should return empty array when properly confi
225
226
test ( 'getMatrixifyValidationErrors should return error when enabled but no configuration exists' , ( ) => {
226
227
const formData = {
227
228
viz_type : 'table' ,
228
- matrixify_enabled : true ,
229
+ matrixify_enable_vertical_layout : true ,
229
230
} as MatrixifyFormData ;
230
231
231
232
const errors = getMatrixifyValidationErrors ( formData ) ;
@@ -235,7 +236,7 @@ test('getMatrixifyValidationErrors should return error when enabled but no confi
235
236
test ( 'getMatrixifyValidationErrors should return error when metrics mode has no metrics' , ( ) => {
236
237
const formData = {
237
238
viz_type : 'table' ,
238
- matrixify_enabled : true ,
239
+ matrixify_enable_vertical_layout : true ,
239
240
matrixify_mode_rows : 'metrics' ,
240
241
matrixify_rows : [ ] ,
241
242
matrixify_columns : [ ] ,
@@ -261,7 +262,7 @@ test('should handle empty form data object', () => {
261
262
test ( 'should handle partial configuration with one axis only' , ( ) => {
262
263
const formData = {
263
264
viz_type : 'table' ,
264
- matrixify_enabled : true ,
265
+ matrixify_enable_vertical_layout : true ,
265
266
matrixify_mode_rows : 'metrics' ,
266
267
matrixify_rows : [ createMetric ( 'Revenue' ) ] ,
267
268
// No columns configuration
0 commit comments