Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nouzbe committed Mar 14, 2024
1 parent 6a9397b commit a9598ac
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ exports[`migrateSettingsFolder returns the folders corresponding to the converte
},
"settings": {
"entry": {
"content": "{"userFilters.areEnabled":false}",
"content": "{"userFilters.areEnabled":false,"drillthrough.defaultSelectedColumns":{"MarketRiskCube":["riskCurrency","subTradeId","EntityName"],"SecondCube":["delta"]}}",
"owners": [
"user1",
],
Expand Down
4 changes: 2 additions & 2 deletions src/4.3_to_5.0/__snapshots__/migrate_43_to_50.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1277,7 +1277,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a real life in
},
"settings": {
"entry": {
"content": "{"userFilters.areEnabled":false}",
"content": "{"userFilters.areEnabled":false,"drillthrough.defaultSelectedColumns":{"MarketRiskCube":["riskCurrency","subTradeId","EntityName"],"SecondCube":["delta"]}}",
"owners": [
"user1",
],
Expand Down Expand Up @@ -2420,7 +2420,7 @@ exports[`migrate_43_to_50 returns a valid ActiveUI5 /ui folder on a small input
},
"settings": {
"entry": {
"content": "{"theme":"dark-activeviam","search.maxResults":10,"userFilters.areEnabled":true}",
"content": "{"theme":"dark-activeviam","search.maxResults":10,"userFilters.areEnabled":true,"drillthrough.defaultSelectedColumns":{"EquityDerivativesCube":["delta","gamma","pnlVega","Desk","Currency","Date","HostName"],"EquityDerivativesCubeDist":["BumpedMtmDown","ProductQtyMultiplier","vega","rho","productId","pnlVega","pnlDelta","pnl","gamma","delta","TradeId","ProductBaseMtm"]}}",
"owners": [
"admin",
],
Expand Down
52 changes: 52 additions & 0 deletions src/4.3_to_5.0/legacySettingsFolder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,58 @@ const user1Preferences = {
deny: [],
map: {
"userFilters.enabled": true,
"widgets.Tabular.drillthrough.selectedColumns": {
"https://activerisk.zone1.scb.net:8081/server": {
MarketRiskCube: [
{
functionName: "MemberValue",
columnName: "riskCurrency",
},
{
functionName: "Caption",
columnName: "riskCurrency",
},
{
functionName: "MemberValue",
columnName: "subTradeId",
},
{
functionName: "Caption",
columnName: "subTradeId",
},
],
SecondCube: [
{
functionName: "MemberValue",
columnName: "delta",
},
{
functionName: "Caption",
columnName: "delta",
},
],
},
"https://second-server.com": {
MarketRiskCube: [
{
functionName: "MemberValue",
columnName: "subTradeId",
},
{
functionName: "Caption",
columnName: "subTradeId",
},
{
functionName: "MemberValue",
columnName: "EntityName",
},
{
functionName: "Caption",
columnName: "EntityName",
},
],
},
},
},
};

Expand Down

0 comments on commit a9598ac

Please sign in to comment.