From 23e22efaaa75bfbebf2d7d9c81f8d7a54bc542d1 Mon Sep 17 00:00:00 2001 From: Benjamin Amelot Date: Thu, 14 Sep 2023 16:24:15 +0200 Subject: [PATCH] UI-8532 - Add test resources for legacy tables with hidden columns --- ...eWithCrossjoinOnColumnsAndHiddenColumns.ts | 23 ++++++++++++++++++ .../legacyPivotTableWithHiddenColumns.ts | 23 ++++++++++++++++++ .../legacyTableWithHiddenColumns.ts | 24 +++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 src/4.3_to_5.0/__test_resources__/legacyPivotTableWithCrossjoinOnColumnsAndHiddenColumns.ts create mode 100644 src/4.3_to_5.0/__test_resources__/legacyPivotTableWithHiddenColumns.ts create mode 100644 src/4.3_to_5.0/__test_resources__/legacyTableWithHiddenColumns.ts diff --git a/src/4.3_to_5.0/__test_resources__/legacyPivotTableWithCrossjoinOnColumnsAndHiddenColumns.ts b/src/4.3_to_5.0/__test_resources__/legacyPivotTableWithCrossjoinOnColumnsAndHiddenColumns.ts new file mode 100644 index 00000000..3264809d --- /dev/null +++ b/src/4.3_to_5.0/__test_resources__/legacyPivotTableWithCrossjoinOnColumnsAndHiddenColumns.ts @@ -0,0 +1,23 @@ +/** + * The state of a legacy pivot table with Dates, LegalEntities, pnl.FOREX and pnl.SUM on columns and one column is hidden. + */ +export const legacyPivotTableWithCrossjoinOnColumnsAndHiddenColumns = { + name: "Untitled Pivot Table", + type: "container", + value: { + body: { + mdx: "SELECT NON EMPTY Crossjoin([Time].[HistoricalDates].[AsOfDate].Members, Hierarchize(DrilldownLevel([Booking].[Desk].[ALL].[AllMember])), {[Measures].[pnl.FOREX], [Measures].[pnl.SUM]}) ON COLUMNS, NON EMPTY Hierarchize(DrilldownLevel([Currency].[Currency].[ALL].[AllMember])) ON ROWS FROM [EquityDerivativesCube] CELL PROPERTIES VALUE, FORMATTED_VALUE, BACK_COLOR, FORE_COLOR, FONT_FLAGS", + configuration: { + tabular: { + columns: [ + { + key: "([Time].[HistoricalDates].[AsOfDate].[2023-09-05],[Booking].[Desk].[ALL].[AllMember].[LegalEntityA],[Measures].[pnl.FOREX])", + hide: true, + }, + ], + }, + }, + }, + containerKey: "pivot-table", + }, +}; diff --git a/src/4.3_to_5.0/__test_resources__/legacyPivotTableWithHiddenColumns.ts b/src/4.3_to_5.0/__test_resources__/legacyPivotTableWithHiddenColumns.ts new file mode 100644 index 00000000..7820fbaa --- /dev/null +++ b/src/4.3_to_5.0/__test_resources__/legacyPivotTableWithHiddenColumns.ts @@ -0,0 +1,23 @@ +/** + * The state of a legacy pivot table with dates on columns and one column is hidden. + */ +export const legacyPivotTableWithHiddenColumns = { + name: "Untitled Pivot Table", + type: "container", + value: { + body: { + mdx: "SELECT NON EMPTY [Time].[HistoricalDates].[AsOfDate].Members ON COLUMNS, NON EMPTY Hierarchize(DrilldownLevel([Currency].[Currency].[ALL].[AllMember])) ON ROWS FROM [EquityDerivativesCube] CELL PROPERTIES VALUE, FORMATTED_VALUE, BACK_COLOR, FORE_COLOR, FONT_FLAGS", + configuration: { + tabular: { + columns: [ + { + key: "[Time].[HistoricalDates].[AsOfDate].[2023-09-05]", + hide: true, + }, + ], + }, + }, + }, + containerKey: "pivot-table", + }, +}; diff --git a/src/4.3_to_5.0/__test_resources__/legacyTableWithHiddenColumns.ts b/src/4.3_to_5.0/__test_resources__/legacyTableWithHiddenColumns.ts new file mode 100644 index 00000000..22fc26f2 --- /dev/null +++ b/src/4.3_to_5.0/__test_resources__/legacyTableWithHiddenColumns.ts @@ -0,0 +1,24 @@ +/** + * The state of a legacy table with Currency and City on rows and contributors.COUNT on columns. + * The "City" column is hidden. + */ +export const legacyTableWithHiddenColumns = { + type: "container", + name: "Untitled Tabular View", + value: { + body: { + mdx: "SELECT NON EMPTY Crossjoin([Currency].[Currency].[Currency].Members, [Geography].[City].[City].Members) ON ROWS, [Measures].[contributors.COUNT] ON COLUMNS FROM [EquityDerivativesCube] CELL PROPERTIES VALUE, FORMATTED_VALUE, BACK_COLOR, FORE_COLOR, FONT_FLAGS", + configuration: { + tabular: { + columns: [ + { + key: "[Geography].[City].[City]", + hide: true, + }, + ], + }, + }, + }, + containerKey: "tabular-view", + }, +};