@@ -35,7 +35,7 @@ test("full PIVOT() values", async function () {
35
35
setCellContent ( model , "A1" , `=PIVOT("1")` , "42" ) ;
36
36
// prettier-ignore
37
37
expect ( getEvaluatedGrid ( model , "A1:D7" , "42" ) ) . toEqual ( [
38
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
38
+ [ "Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
39
39
[ "" , "Probability" , "Probability" , "Probability" ] ,
40
40
[ 1 , "" , 11 , 11 ] ,
41
41
[ 2 , "" , 15 , 15 ] ,
@@ -63,7 +63,7 @@ test("PIVOT(row_count=1)", async function () {
63
63
setCellContent ( model , "A1" , `=PIVOT("1", 1)` , "42" ) ;
64
64
// prettier-ignore
65
65
expect ( getEvaluatedGrid ( model , "A1:D4" , "42" ) ) . toEqual ( [
66
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
66
+ [ "Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
67
67
[ "" , "Probability" , "Probability" , "Probability" ] ,
68
68
[ 1 , "" , 11 , 11 ] ,
69
69
[ null , null , null , null ] ,
@@ -74,7 +74,7 @@ test("PIVOT(row_count=0)", async function () {
74
74
setCellContent ( model , "A1" , `=PIVOT("1", 0)` , "42" ) ;
75
75
// prettier-ignore
76
76
expect ( getEvaluatedGrid ( model , "A1:D3" , "42" ) ) . toEqual ( [
77
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
77
+ [ "Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
78
78
[ "" , "Probability" , "Probability" , "Probability" ] ,
79
79
[ null , null , null , null ] ,
80
80
] ) ;
@@ -89,7 +89,7 @@ test("PIVOT(negative row_count)", async function () {
89
89
} ) ;
90
90
91
91
test ( "PIVOT(include_column_titles=FALSE)" , async function ( ) {
92
- setCellContent ( model , "A1" , `=PIVOT("1",,,FALSE)` , "42" ) ;
92
+ setCellContent ( model , "A1" , `=PIVOT("1",,,FALSE,,FALSE )` , "42" ) ;
93
93
// prettier-ignore
94
94
expect ( getEvaluatedGrid ( model , "A1:D5" , "42" ) ) . toEqual ( [
95
95
[ 1 , "" , 11 , 11 ] ,
@@ -111,7 +111,7 @@ test("PIVOT(include_total=FALSE) with no groupbys applied", async function () {
111
111
setCellContent ( model , "A1" , `=PIVOT("1",,FALSE)` , "42" ) ;
112
112
// prettier-ignore
113
113
expect ( getEvaluatedGrid ( model , "A1:B3" , "42" ) ) . toEqual ( [
114
- [ "(#1) Partner Pivot" , "Total" ] ,
114
+ [ "Partner Pivot" , "Total" ] ,
115
115
[ "" , "Probability" ] ,
116
116
[ "Total" , 131 ] ,
117
117
] ) ;
@@ -129,7 +129,7 @@ test("PIVOT(include_total=FALSE) with multiple measures and no groupbys applied"
129
129
setCellContent ( model , "A1" , `=PIVOT("1",,FALSE)` , "42" ) ;
130
130
// prettier-ignore
131
131
expect ( getEvaluatedGrid ( model , "A1:C3" , "42" ) ) . toEqual ( [
132
- [ "(#1) Partner Pivot" , "Total" , "" ] ,
132
+ [ "Partner Pivot" , "Total" , "" ] ,
133
133
[ "" , "Probability" , "Foo" ] ,
134
134
[ "Total" , 131 , 32 ] ,
135
135
] ) ;
@@ -147,7 +147,7 @@ test("PIVOT(include_total=FALSE) with only row groupby applied", async function
147
147
setCellContent ( model , "A1" , `=PIVOT("1",,FALSE)` , "42" ) ;
148
148
// prettier-ignore
149
149
expect ( getEvaluatedGrid ( model , "A1:C7" , "42" ) ) . toEqual ( [
150
- [ "(#1) Partner Pivot" , "Total" , null ] ,
150
+ [ "Partner Pivot" , "Total" , null ] ,
151
151
[ "" , "Probability" , null ] ,
152
152
[ 1 , 11 , null ] ,
153
153
[ 2 , 15 , null ] ,
@@ -177,7 +177,7 @@ test("sorted PIVOT(include_total=FALSE) with only row groupby applied", async fu
177
177
setCellContent ( model , "A1" , `=PIVOT("1",,FALSE)` , "42" ) ;
178
178
// prettier-ignore
179
179
expect ( getEvaluatedGrid ( model , "A1:C7" , "42" ) ) . toEqual ( [
180
- [ "(#1) Partner Pivot" , "Total" , null ] ,
180
+ [ "Partner Pivot" , "Total" , null ] ,
181
181
[ "" , "Probability" , null ] ,
182
182
[ 17 , 95 , null ] ,
183
183
[ 2 , 15 , null ] ,
@@ -200,7 +200,7 @@ test("PIVOT(include_total=FALSE) with multiple measures and only row groupby app
200
200
setCellContent ( model , "A1" , `=PIVOT("1",,FALSE)` , "42" ) ;
201
201
// prettier-ignore
202
202
expect ( getEvaluatedGrid ( model , "A1:D5" , "42" ) ) . toEqual ( [
203
- [ "(#1) Partner Pivot" , "Total" , "" , null ] ,
203
+ [ "Partner Pivot" , "Total" , "" , null ] ,
204
204
[ "" , "Probability" , "Foo" , null ] ,
205
205
[ "xphone" , 10 , 12 , null ] ,
206
206
[ "xpad" , 121 , 20 , null ] ,
@@ -220,15 +220,15 @@ test("PIVOT(include_total=FALSE) with only col groupby applied", async function
220
220
setCellContent ( model , "A1" , `=PIVOT("1",,FALSE)` , "42" ) ;
221
221
// prettier-ignore
222
222
expect ( getEvaluatedGrid ( model , "A1:D4" , "42" ) ) . toEqual ( [
223
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , null ] ,
223
+ [ "Partner Pivot" , "xphone" , "xpad" , null ] ,
224
224
[ "" , "Probability" , "Probability" , null ] ,
225
225
[ "Total" , 10 , 121 , null ] ,
226
226
[ null , null , null , null ] ,
227
227
] ) ;
228
228
} ) ;
229
229
230
230
test ( "PIVOT(include_total=FALSE, include_column_titles=FALSE)" , async function ( ) {
231
- setCellContent ( model , "A1" , `=PIVOT("1",,FALSE,FALSE)` , "42" ) ;
231
+ setCellContent ( model , "A1" , `=PIVOT("1",,FALSE,FALSE,,FALSE )` , "42" ) ;
232
232
// prettier-ignore
233
233
expect ( getEvaluatedGrid ( model , "A1:D5" , "42" ) ) . toEqual ( [
234
234
[ 1 , "" , 11 , null ] ,
@@ -240,7 +240,7 @@ test("PIVOT(include_total=FALSE, include_column_titles=FALSE)", async function (
240
240
} ) ;
241
241
242
242
test ( "PIVOT(row_count=1, include_total=FALSE, include_column_titles=FALSE)" , async function ( ) {
243
- setCellContent ( model , "A1" , `=PIVOT("1",1,FALSE,FALSE)` , "42" ) ;
243
+ setCellContent ( model , "A1" , `=PIVOT("1",1,FALSE,FALSE,,FALSE )` , "42" ) ;
244
244
// prettier-ignore
245
245
expect ( getEvaluatedGrid ( model , "A1:D2" , "42" ) ) . toEqual ( [
246
246
[ 1 , "" , 11 , null ] ,
@@ -249,18 +249,18 @@ test("PIVOT(row_count=1, include_total=FALSE, include_column_titles=FALSE)", asy
249
249
} ) ;
250
250
251
251
test ( "PIVOT(row_count=0, include_total=FALSE, include_column_titles=FALSE)" , async function ( ) {
252
- setCellContent ( model , "A1" , `=PIVOT("1",0,FALSE,FALSE)` , "42" ) ;
252
+ setCellContent ( model , "A1" , `=PIVOT("1",0,FALSE,FALSE,,FALSE )` , "42" ) ;
253
253
// prettier-ignore
254
254
expect ( getEvaluatedGrid ( model , "A1:D1" , "42" ) ) . toEqual ( [
255
- [ "(#1) Partner Pivot" , null , null , null ] ,
255
+ [ "Partner Pivot" , null , null , null ] ,
256
256
] ) ;
257
257
} ) ;
258
258
259
259
test ( "PIVOT(row_count=0, include_total=TRUE, include_column_titles=FALSE)" , async function ( ) {
260
- setCellContent ( model , "A1" , `=PIVOT("1",0,TRUE,FALSE)` , "42" ) ;
260
+ setCellContent ( model , "A1" , `=PIVOT("1",0,TRUE,FALSE,,FALSE )` , "42" ) ;
261
261
// prettier-ignore
262
262
expect ( getEvaluatedGrid ( model , "A1:D1" , "42" ) ) . toEqual ( [
263
- [ "(#1) Partner Pivot" , null , null , null ] ,
263
+ [ "Partner Pivot" , null , null , null ] ,
264
264
] ) ;
265
265
} ) ;
266
266
@@ -278,7 +278,7 @@ test("PIVOT with multiple row groups", async function () {
278
278
// values in the first sheet from the individual pivot functions
279
279
// prettier-ignore
280
280
expect ( getEvaluatedGrid ( model , "A1:D11" , firstSheetId ) ) . toEqual ( [
281
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
281
+ [ "Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
282
282
[ "" , "Probability" , "Probability" , "Probability" ] ,
283
283
[ 1 , "" , 11 , 11 ] ,
284
284
[ 2 , "" , 11 , 11 ] ,
@@ -295,7 +295,7 @@ test("PIVOT with multiple row groups", async function () {
295
295
// values from the PIVOT function
296
296
// prettier-ignore
297
297
expect ( getEvaluatedGrid ( model , "A1:D11" , "42" ) ) . toEqual ( [
298
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
298
+ [ "Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
299
299
[ "" , "Probability" , "Probability" , "Probability" ] ,
300
300
[ 1 , "" , 11 , 11 ] ,
301
301
[ 2 , "" , 11 , 11 ] ,
@@ -311,7 +311,7 @@ test("PIVOT with multiple row groups", async function () {
311
311
// values from the PIVOT function without any group totals
312
312
// prettier-ignore
313
313
expect ( getEvaluatedGrid ( model , "A1:D11" , "42" ) ) . toEqual ( [
314
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , null ] ,
314
+ [ "Partner Pivot" , "xphone" , "xpad" , null ] ,
315
315
[ "" , "Probability" , "Probability" , null ] ,
316
316
[ 1 , "" , "" , null ] , // group header but without total values
317
317
[ 2 , "" , 11 , null ] ,
@@ -330,7 +330,7 @@ test("edit pivot groups", async function () {
330
330
const originalGrid = getEvaluatedGrid ( model , "A1:D7" , "42" ) ;
331
331
// prettier-ignore
332
332
expect ( originalGrid ) . toEqual ( [
333
- [ "(#1) Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
333
+ [ "Partner Pivot" , "xphone" , "xpad" , "Total" ] ,
334
334
[ "" , "Probability" , "Probability" , "Probability" ] ,
335
335
[ 1 , "" , 11 , 11 ] ,
336
336
[ 2 , "" , 15 , 15 ] ,
@@ -350,7 +350,7 @@ test("edit pivot groups", async function () {
350
350
await animationFrame ( ) ;
351
351
// prettier-ignore
352
352
expect ( getEvaluatedGrid ( model , "A1:B3" , "42" ) ) . toEqual ( [
353
- [ "(#1) Partner Pivot" , "Total" ] ,
353
+ [ "Partner Pivot" , "Total" ] ,
354
354
[ "" , "Probability" ] ,
355
355
[ "Total" , 131 ] ,
356
356
] ) ;
@@ -362,12 +362,12 @@ test("edit pivot groups", async function () {
362
362
test ( "Renaming the pivot reevaluates the PIVOT function" , async function ( ) {
363
363
const pivotId = model . getters . getPivotIds ( ) [ 0 ] ;
364
364
setCellContent ( model , "A1" , `=PIVOT("1")` , "42" ) ;
365
- expect ( getEvaluatedCell ( model , "A1" , "42" ) . value ) . toBe ( "(#1) Partner Pivot" ) ;
365
+ expect ( getEvaluatedCell ( model , "A1" , "42" ) . value ) . toBe ( "Partner Pivot" ) ;
366
366
model . dispatch ( "RENAME_PIVOT" , {
367
367
pivotId,
368
368
name : "New Name" ,
369
369
} ) ;
370
- expect ( getEvaluatedCell ( model , "A1" , "42" ) . value ) . toBe ( "(#1) New Name" ) ;
370
+ expect ( getEvaluatedCell ( model , "A1" , "42" ) . value ) . toBe ( "New Name" ) ;
371
371
} ) ;
372
372
373
373
test ( "can hide a measure" , async function ( ) {
@@ -381,7 +381,7 @@ test("can hide a measure", async function () {
381
381
setCellContent ( model , "A10" , '=PIVOT("1")' ) ;
382
382
// prettier-ignore
383
383
expect ( getEvaluatedGrid ( model , "A10:C12" ) ) . toEqual ( [
384
- [ "(#1) Partner Pivot" , "Total" , "" , ] ,
384
+ [ "Partner Pivot" , "Total" , "" , ] ,
385
385
[ "" , "Probability" , "Foo" ] ,
386
386
[ "Total" , 131 , 32 ] ,
387
387
] ) ;
@@ -393,7 +393,7 @@ test("can hide a measure", async function () {
393
393
await animationFrame ( ) ;
394
394
// prettier-ignore
395
395
expect ( getEvaluatedGrid ( model , "A10:C12" ) ) . toEqual ( [
396
- [ "(#1) Partner Pivot" , "Total" , null ] ,
396
+ [ "Partner Pivot" , "Total" , null ] ,
397
397
[ "" , "Foo" , null ] ,
398
398
[ "Total" , 32 , null ] ,
399
399
] ) ;
0 commit comments