From 46b0a2554c887e6cb0d4299ecf5c6e45316a917f Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Fri, 6 Dec 2019 14:44:27 -0800 Subject: [PATCH 01/13] GPII-3119 Adding SPI to supportedSettings sections. Waiting to remove it from capabilitiesTransforms until the acceptanceTests are reworked for it. --- testData/solutions/win32.json5 | 94 ++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 22 deletions(-) diff --git a/testData/solutions/win32.json5 b/testData/solutions/win32.json5 index 0cfba1702..10a44f4d1 100644 --- a/testData/solutions/win32.json5 +++ b/testData/solutions/win32.json5 @@ -4977,7 +4977,8 @@ "default": "%SystemRoot%\\Web\\Wallpaper\\Windows\\img0.jpg" } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -5044,7 +5045,8 @@ "default": "" } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -6315,7 +6317,8 @@ "default": false } } - } + }, + "path": "pvParam.dwFlags.FKF_FILTERKEYSON" }, "SlowKeysInterval": { "schema": { @@ -6330,7 +6333,8 @@ "default": 0 // 0 means no interval time } } - } + }, + "path": "pvParam.iWaitMSec" }, "BounceKeysInterval": { "schema": { @@ -6338,7 +6342,8 @@ "description": "Bounce keys interval time in milliseconds", "type": "integer", "default": 0 - } + }, + "path": "pvParam.iBounceMSec" } }, "capabilitiesTransformations": { @@ -6533,7 +6538,8 @@ "default": false } } - } + }, + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" } }, "capabilities": [ @@ -6758,7 +6764,8 @@ "off", "on" ] - } + }, + "path": "pvParam.Enabled" } }, "capabilitiesTransformations": { @@ -6832,7 +6839,8 @@ "60s", "300s" ] - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -7020,7 +7028,8 @@ "description": "Enable/Disable ToggleKeys feature", "type": "boolean", "default": false - } + }, + "path": "pvParam.dwFlags.TKF_TOGGLEKEYSON" } }, "capabilitiesTransformations": { @@ -7078,7 +7087,8 @@ "description": "Displays a underline showing which is the shortcut to active a menu item", "type": "boolean", "default": false - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -7118,6 +7128,10 @@ "description": "Set the keyboard as the preferred input method", "type": "boolean", "default": false + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -7632,7 +7646,8 @@ "default": false } } - } + }, + "path": "pvParam.dwFlags.MKF_MOUSEKEYSON" }, "MaxSpeed": { "schema": { @@ -7640,7 +7655,8 @@ "description": "Speed of mouse keys", "type": "number", "multipleOf": 10 - } + }, + "path": "pvParam.iMaxSpeed" }, "Acceleration": { "schema": { @@ -7650,7 +7666,8 @@ "minimum": -1000, // TODO: Not clear how to describe this setting "maximum": 1000 - } + }, + "path": "pvParam.iTimeToMaxSpeed" } }, "capabilitiesTransformations": { @@ -7780,6 +7797,10 @@ "default": 0 } } + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -7840,6 +7861,10 @@ ] } } + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -7888,7 +7913,8 @@ "enumLabels": ["RoutingFocus", "RoutingHybrid"] } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -7933,7 +7959,8 @@ "default": false } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -7980,6 +8007,10 @@ "maximum": 100 } } + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -8029,7 +8060,8 @@ "default": 0 } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -8075,7 +8107,8 @@ "default": 0 } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -8121,6 +8154,10 @@ "default": 1 } } + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -8202,7 +8239,8 @@ "default": 10 } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -8250,7 +8288,8 @@ "default": 1 } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -8299,6 +8338,10 @@ "default": 0 } } + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -8348,7 +8391,8 @@ "default": 1 } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -8394,7 +8438,8 @@ "default": 0 } } - } + }, + "path": "pvParam" } }, "capabilitiesTransformations": { @@ -8524,6 +8569,10 @@ "maximum": 10 } } + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -9646,7 +9695,8 @@ "path": { "type": "string", "required": true}, "value": { "type": "boolean", "required": true} } - } + }, + "path": "pvParam.dwFlags.SKF_STICKYKEYSON" } }, "capabilitiesTransformations": { From 8a595aad1015bde728a82fce6782278444d234d9 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Fri, 6 Dec 2019 16:20:04 -0800 Subject: [PATCH 02/13] GPII-3119 Adding optional SPI settings path to solutions registry json schema --- .../solutionsRegistry/src/schemas/solution-schema.json5 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gpii/node_modules/solutionsRegistry/src/schemas/solution-schema.json5 b/gpii/node_modules/solutionsRegistry/src/schemas/solution-schema.json5 index 720d4f986..24ef9ea2c 100644 --- a/gpii/node_modules/solutionsRegistry/src/schemas/solution-schema.json5 +++ b/gpii/node_modules/solutionsRegistry/src/schemas/solution-schema.json5 @@ -51,7 +51,11 @@ "type": "object", "additionalProperties": false, "properties": { - "schema": { "$ref": "gss-v7-full#", "required": true } + "schema": { "$ref": "gss-v7-full#", "required": true }, + "path": { + "type": ["string", "object"], + "required": false + } } } }, From 09c116062d4b8e363cc083673b02c07207e09174 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Tue, 10 Dec 2019 14:06:00 -0800 Subject: [PATCH 03/13] GPII-3119 Removing now redundant path from capabilities transforms and fixing tests. --- testData/solutions/win32.json5 | 156 ------------------ .../windows/windows-builtIn-testSpec.js | 27 --- 2 files changed, 183 deletions(-) diff --git a/testData/solutions/win32.json5 b/testData/solutions/win32.json5 index 10a44f4d1..f64383ad3 100644 --- a/testData/solutions/win32.json5 +++ b/testData/solutions/win32.json5 @@ -4987,12 +4987,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.desktopBackground.Image", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam" - } } } }, @@ -5055,12 +5049,6 @@ "type": "fluid.transforms.literalValue", "input": "", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam" - } } } }, @@ -6356,12 +6344,6 @@ "right": false, "operator": "||", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.FKF_FILTERKEYSON" - } } }, "SlowKeysInterval": { @@ -6377,12 +6359,6 @@ }, "false": 0, "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.iWaitMSec" - } } }, "BounceKeysInterval": { @@ -6414,12 +6390,6 @@ }, "false": 0, "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.iBounceMSec" - } } } }, @@ -6572,12 +6542,6 @@ } }, "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.HCF_HIGHCONTRASTON" - } } } }, @@ -6774,12 +6738,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.audioDescription.AudioDescriptionEnabled", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.Enabled" - } } } }, @@ -6849,12 +6807,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.notificationDuration.NotificationDuration", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam" - } } } }, @@ -7038,12 +6990,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/common/toggleKeys", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.TKF_TOGGLEKEYSON" - } } } }, @@ -7097,12 +7043,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.underlineMenuShortcuts.Enabled", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam" - } } } }, @@ -7141,15 +7081,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.underlineMenuShortcuts.KeyboardPrefEnabled", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": { - "get": "pvParam", - "set": "uiParam" - } - } } } }, @@ -7676,12 +7607,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/common/mouseEmulation/enabled", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.MKF_MOUSEKEYSON" - } } }, "MaxSpeed": { @@ -7696,12 +7621,6 @@ } }, "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.iMaxSpeed" - } } }, "Acceleration": { @@ -7725,12 +7644,6 @@ } }, "operator": "+" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.iTimeToMaxSpeed" - } } } }, @@ -7810,12 +7723,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SwapMouseButtons", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -7874,12 +7781,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.ScrollLines", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -7923,9 +7824,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.ScrollRouting", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -7969,9 +7867,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.EnableCursorShadow", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8020,12 +7915,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.ScrollChars", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -8070,9 +7959,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.WindowsTrackingEnabled", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8117,9 +8003,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.WindowsTrackingEnabled", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8167,12 +8050,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.AutoWinArrangement", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -8249,9 +8126,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.PointerSpeed", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8301,9 +8175,6 @@ "outputPath": "value", "true": [6, 10, 1], "false": [0, 0, 1] - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8351,12 +8222,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SnapToDefaultButton", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -8401,9 +8266,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.HidePointer", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8448,9 +8310,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.MouseSonar", "outputPath": "value" - }, - "path": { - "literalValue": "pvParam" } } }, @@ -8582,15 +8441,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/common/mouseTrailing", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": { - "get": "pvParam", - "set": "uiParam" - } - } } } }, @@ -9705,12 +9555,6 @@ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/common/stickyKeys", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.SKF_STICKYKEYSON" - } } } }, diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index b4813b62a..9ef7bec42 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -922,10 +922,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, @@ -943,7 +939,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseKeysOn": { - "path": "pvParam.dwFlags.MKF_MOUSEKEYSON", "value": true } }, @@ -962,7 +957,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "StickyKeysOn": { - "path": "pvParam.dwFlags.SKF_STICKYKEYSON", "value": true } }, @@ -981,11 +975,9 @@ gpii.tests.windows.builtIn = [ { "settings": { "FilterKeysEnable": { - "path": "pvParam.dwFlags.FKF_FILTERKEYSON", "value": false }, "BounceKeysInterval": { - "path": "pvParam.iBounceMSec", "value": 0 } }, @@ -1145,10 +1137,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, @@ -1166,7 +1154,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseKeysOn": { - "path": "pvParam.dwFlags.MKF_MOUSEKEYSON", "value": true } }, @@ -1185,7 +1172,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "StickyKeysOn": { - "path": "pvParam.dwFlags.SKF_STICKYKEYSON", "value": true } }, @@ -1204,11 +1190,9 @@ gpii.tests.windows.builtIn = [ { "settings": { "FilterKeysEnable": { - "path": "pvParam.dwFlags.FKF_FILTERKEYSON", "value": false }, "BounceKeysInterval": { - "path": "pvParam.iBounceMSec", "value": 0 } }, @@ -1368,10 +1352,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, @@ -1389,7 +1369,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseKeysOn": { - "path": "pvParam.dwFlags.MKF_MOUSEKEYSON", "value": true } }, @@ -1408,7 +1387,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "StickyKeysOn": { - "path": "pvParam.dwFlags.SKF_STICKYKEYSON", "value": true } }, @@ -1427,11 +1405,9 @@ gpii.tests.windows.builtIn = [ { "settings": { "FilterKeysEnable": { - "path": "pvParam.dwFlags.FKF_FILTERKEYSON", "value": false }, "BounceKeysInterval": { - "path": "pvParam.iBounceMSec", "value": 0 } }, @@ -1706,7 +1682,6 @@ gpii.tests.windows.builtInHighContrast = [ { // high contrast settings "settings": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, @@ -1771,7 +1746,6 @@ gpii.tests.windows.builtInHighContrast = [ { // high contrast settings "settings": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, @@ -1836,7 +1810,6 @@ gpii.tests.windows.builtInHighContrast = [ { // high contrast settings "settings": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, From de4ec4cdaeec92be495d434e111980b140947b16 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Tue, 10 Dec 2019 15:30:13 -0800 Subject: [PATCH 04/13] GPII-3119 Testing addition of supported settings to acceptance tests. --- tests/platform/windows/windows-builtIn-testSpec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index 9ef7bec42..5878a4551 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -1693,6 +1693,11 @@ gpii.tests.windows.builtInHighContrast = [ "type": "struct", "name": "HIGHCONTRAST" } + }, + "supportedSettings": { + "HighContrastOn": { + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" + } } } ] From c06e078ade9e13f6b055931c1842173d6d0346ef Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Wed, 11 Dec 2019 10:45:15 -0800 Subject: [PATCH 05/13] GPII-3119 Adding supported settings metadata to invoke settings handler payload. --- .../src/settingsHandlerUtilities.js | 4 +- .../windows/windows-builtIn-testSpec.js | 106 ++++++++++++++++++ 2 files changed, 108 insertions(+), 2 deletions(-) diff --git a/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js b/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js index 090838f88..d063d9392 100644 --- a/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js +++ b/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js @@ -175,8 +175,8 @@ gpii.settingsHandlers.invokeSettingsHandler = function (handler, payload) { var response = gpii.settingsHandlers.transformPayload(payload, function (element, path) { var solutionId = path[0]; // first entry of path will always be solution ID // Note shallow copy performed within filterKeys - var directLoad = fluid.filterKeys(element, ["settings", "options"]); - var others = fluid.censorKeys(element, ["settings", "options"]); + var directLoad = fluid.filterKeys(element, ["settings", "options", "supportedSettings"]); + var others = fluid.censorKeys(element, ["settings", "options", "supportedSettings"]); worklist.push({ path: path, result: handler(directLoad, solutionId), diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index 5878a4551..18ba9fbf1 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -142,6 +142,14 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "SwapMouseButtonsConfig": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } }, { @@ -857,6 +865,11 @@ gpii.tests.windows.builtIn = [ "valueType": "TCHAR", "length": 260 } + }, + "supportedSettings": { + "ImageConfig": { + "path": "pvParam" + } } }] }, @@ -932,6 +945,14 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "MouseTrails": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } } ], @@ -950,6 +971,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "MOUSEKEYS" } + }, + "supportedSettings": { + "MouseKeysOn": { + "path": "pvParam.dwFlags.MKF_MOUSEKEYSON" + } } } ], @@ -968,6 +994,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "STICKYKEYS" } + }, + "supportedSettings": { + "StickyKeysOn": { + "path": "pvParam.dwFlags.SKF_STICKYKEYSON" + } } } ], @@ -989,6 +1020,14 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "FILTERKEYS" } + }, + "supportedSettings": { + "FilterKeysEnable": { + "path": "pvParam.dwFlags.FKF_FILTERKEYSON" + }, + "BounceKeysInterval": { + "path": "pvParam.iBounceMSec" + } } } ] @@ -1147,6 +1186,14 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "MouseTrails": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } } ], @@ -1165,6 +1212,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "MOUSEKEYS" } + }, + "supportedSettings": { + "MouseKeysOn": { + "path": "pvParam.dwFlags.MKF_MOUSEKEYSON" + } } } ], @@ -1183,6 +1235,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "STICKYKEYS" } + }, + "supportedSettings": { + "StickyKeysOn": { + "path": "pvParam.dwFlags.SKF_STICKYKEYSON" + } } } ], @@ -1204,6 +1261,14 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "FILTERKEYS" } + }, + "supportedSettings": { + "FilterKeysEnable": { + "path": "pvParam.dwFlags.FKF_FILTERKEYSON" + }, + "BounceKeysInterval": { + "path": "pvParam.iBounceMSec" + } } } ] @@ -1362,6 +1427,14 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "MouseTrails": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } } ], @@ -1380,6 +1453,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "MOUSEKEYS" } + }, + "supportedSettings": { + "MouseKeysOn": { + "path": "pvParam.dwFlags.MKF_MOUSEKEYSON" + } } } ], @@ -1398,6 +1476,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "STICKYKEYS" } + }, + "supportedSettings": { + "StickyKeysOn": { + "path": "pvParam.dwFlags.SKF_STICKYKEYSON" + } } } ], @@ -1419,6 +1502,14 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "FILTERKEYS" } + }, + "supportedSettings": { + "FilterKeysEnable": { + "path": "pvParam.dwFlags.FKF_FILTERKEYSON" + }, + "BounceKeysInterval": { + "path": "pvParam.iBounceMSec" + } } } ] @@ -1667,6 +1758,11 @@ gpii.tests.windows.builtInHighContrast = [ "type": "struct", "name": "HIGHCONTRAST" } + }, + "supportedSettings": { + "HighContrastOn": { + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" + } } } ] @@ -1762,6 +1858,11 @@ gpii.tests.windows.builtInHighContrast = [ "type": "struct", "name": "HIGHCONTRAST" } + }, + "supportedSettings": { + "HighContrastOn": { + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" + } } } ] @@ -1826,6 +1927,11 @@ gpii.tests.windows.builtInHighContrast = [ "type": "struct", "name": "HIGHCONTRAST" } + }, + "supportedSettings": { + "HighContrastOn": { + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" + } } } ] From eaa4234f904a08316d99932fe59c0c8532d30ca1 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Wed, 11 Dec 2019 14:04:46 -0800 Subject: [PATCH 06/13] GPII-3119 Removing more uncessary paths from prefssets and putting more supportedSettings in test specs. --- .../test/data/app_specific_only.json | 5 - .../test/data/multi_context.json | 1 - tests/data/preferences/os_win.json5 | 48 +---- tests/data/preferences/os_win_2.json5 | 1 - .../windows/windows-builtIn-testSpec.js | 169 +++++++++++++----- 5 files changed, 127 insertions(+), 97 deletions(-) diff --git a/gpii/node_modules/matchMakerFramework/test/data/app_specific_only.json b/gpii/node_modules/matchMakerFramework/test/data/app_specific_only.json index 7ebe2cf92..e8cac4ce4 100644 --- a/gpii/node_modules/matchMakerFramework/test/data/app_specific_only.json +++ b/gpii/node_modules/matchMakerFramework/test/data/app_specific_only.json @@ -5,16 +5,11 @@ "preferences": { "http://registry.gpii.net/applications/com.microsoft.windows.mouseTrailing": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, "http://registry.gpii.net/applications/com.microsoft.windows.highContrast": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, diff --git a/gpii/node_modules/matchMakerFramework/test/data/multi_context.json b/gpii/node_modules/matchMakerFramework/test/data/multi_context.json index d0ac7a020..a1cdaeaa0 100644 --- a/gpii/node_modules/matchMakerFramework/test/data/multi_context.json +++ b/gpii/node_modules/matchMakerFramework/test/data/multi_context.json @@ -5,7 +5,6 @@ "preferences": { "http://registry.gpii.net/applications/com.microsoft.windows.highContrast": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, diff --git a/tests/data/preferences/os_win.json5 b/tests/data/preferences/os_win.json5 index 4c0abb57e..99bd4a9a4 100644 --- a/tests/data/preferences/os_win.json5 +++ b/tests/data/preferences/os_win.json5 @@ -6,50 +6,36 @@ "preferences": { "http://registry.gpii.net/applications/com.microsoft.windows.mouseTrailing": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, "http://registry.gpii.net/applications/com.microsoft.windows.mouseKeys": { "MouseKeysOn": { - "path": "pvParam.dwFlags.MKF_MOUSEKEYSON", "value": true }, "MaxSpeed": { - "path": "pvParam.iMaxSpeed", "value": 100 }, "Acceleration": { - "path": "pvParam.iTimeToMaxSpeed", "value": 1000 } }, "http://registry.gpii.net/applications/com.microsoft.windows.stickyKeys": { "StickyKeysOn": { - "path": "pvParam.dwFlags.SKF_STICKYKEYSON", "value": true } }, "http://registry.gpii.net/applications/com.microsoft.windows.toggleKeys": { "ToggleKeysOn": { - "path": "pvParam.dwFlags.TKF_TOGGLEKEYSON", "value": true } }, "http://registry.gpii.net/applications/com.microsoft.windows.underlineMenuShortcuts": { "UnderlineMenuShortcutsOn": { - "value": 1, - "path": "pvParam" + "value": 1 }, "KeyboardPreferenceOn": { - "value": 1, - "path": { - "get": "pvParam", - "set": "uiParam" - } + "value": 1 } }, "http://registry.gpii.net/applications/com.microsoft.windows.shortcutWarningMessage": { @@ -60,11 +46,9 @@ }, "http://registry.gpii.net/applications/com.microsoft.windows.filterKeys": { "FilterKeysEnable": { - "path": "pvParam.dwFlags.FKF_FILTERKEYSON", "value": true }, "BounceKeysInterval": { - "path": "pvParam.iBounceMSec", "value": 1000 } }, @@ -157,73 +141,45 @@ }, "http://registry.gpii.net/applications/com.microsoft.windows.mouseSettings": { "SwapMouseButtonsConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 }, "ScrollWheelModeConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 4294967294 }, "ScrollFocusRoutingConfig": { - "path": "pvParam", "value": 1 }, "MouseCursorShadowEnable": { - "path": "pvParam", "value": 1 }, "ScrollCharsConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 }, "WindowsTrackingConfig": { - "path": "pvParam", "value": 1 }, "ActiveZOrder": { - "path": "pvParam", "value": 0 }, "WindowsArrangement": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 }, "DoubleClickTimeConfig": { "value": 600 }, "PointerSpeedConfig": { - "path": "pvParam", "value": 15 }, "EnhancePrecisionConfig": { - "path": "pvParam", "value": [0, 0, 1] }, "SnapToDefaultButtonConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 }, "HidePointerConfig": { - "path": "pvParam", "value": 0 }, "MouseSonarConfig": { - "path": "pvParam", "value": 1 }, "DoubleClickWidthConfig": { diff --git a/tests/data/preferences/os_win_2.json5 b/tests/data/preferences/os_win_2.json5 index b732c15b2..6b75cd973 100644 --- a/tests/data/preferences/os_win_2.json5 +++ b/tests/data/preferences/os_win_2.json5 @@ -9,7 +9,6 @@ "value": { "r": 67, "g": 187, "b": 19 } }, "ImageConfig": { - "path": "pvParam", "value": "" } } diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index 18ba9fbf1..d13851b4f 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -128,10 +128,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "SwapMouseButtonsConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 } }, @@ -155,10 +151,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "ScrollWheelModeConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 4294967294 } }, @@ -169,12 +161,19 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "ScrollWheelModeConfig": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } }, { "settings": { "ScrollFocusRoutingConfig": { - "path": "pvParam", "value": 1 } }, @@ -185,12 +184,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "ScrollFocusRoutingConfig": { + "path": "pvParam" + } } }, { "settings": { "MouseCursorShadowEnable": { - "path": "pvParam", "value": 1 } }, @@ -201,15 +204,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "MouseCursorShadowEnable": { + "path": "pvParam" + } } }, { "settings": { "ScrollCharsConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, @@ -220,12 +224,19 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "ScrollCharsConfig": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } }, { "settings": { "WindowsTrackingConfig": { - "path": "pvParam", "value": 1 } }, @@ -236,12 +247,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "WindowsTrackingConfig": { + "path": "pvParam" + } } }, { "settings": { "ActiveZOrder": { - "path": "pvParam", "value": 0 } }, @@ -252,15 +267,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "ActiveZOrder": { + "path": "pvParam" + } } }, { "settings": { "WindowsArrangement": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 } }, @@ -271,12 +287,19 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "WindowsArrangement": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } }, { "settings": { "PointerSpeedConfig": { - "path": "pvParam", "value": 15 } }, @@ -287,12 +310,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "PointerSpeedConfig": { + "path": "pvParam" + } } }, { "settings": { "EnhancePrecisionConfig": { - "path": "pvParam", "value": [0, 0, 1] } }, @@ -305,15 +332,16 @@ gpii.tests.windows.builtIn = [ "valueType": "INT", "length": 3 } + }, + "supportedSettings": { + "EnhancePrecisionConfig": { + "path": "pvParam" + } } }, { "settings": { "SnapToDefaultButtonConfig": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 } }, @@ -324,12 +352,19 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "SnapToDefaultButtonConfig": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } }, { "settings": { "HidePointerConfig": { - "path": "pvParam", "value": 0 } }, @@ -340,12 +375,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "HidePointerConfig": { + "path": "pvParam" + } } }, { "settings": { "MouseSonarConfig": { - "path": "pvParam", "value": 1 } }, @@ -356,6 +395,11 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "UINT" } + }, + "supportedSettings": { + "MouseSonarConfig": { + "path": "pvParam" + } } } ], @@ -363,10 +407,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, @@ -377,6 +417,14 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "MouseTrails": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } } ], @@ -384,15 +432,12 @@ gpii.tests.windows.builtIn = [ { "settings": { "MouseKeysOn": { - "path": "pvParam.dwFlags.MKF_MOUSEKEYSON", "value": true }, "MaxSpeed": { - "path": "pvParam.iMaxSpeed", "value": 100 }, "Acceleration": { - "path": "pvParam.iTimeToMaxSpeed", "value": 1000 } }, @@ -404,6 +449,17 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "MOUSEKEYS" } + }, + "supportedSettings": { + "MouseKeysOn": { + "path": "pvParam.dwFlags.MKF_MOUSEKEYSON" + }, + "MaxSpeed": { + "path": "pvParam.iMaxSpeed" + }, + "Acceleration": { + "path": "pvParam.iTimeToMaxSpeed" + } } } ], @@ -411,7 +467,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "StickyKeysOn": { - "path": "pvParam.dwFlags.SKF_STICKYKEYSON", "value": true } }, @@ -423,6 +478,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "STICKYKEYS" } + }, + "supportedSettings": { + "StickyKeysOn": { + "path": "pvParam.dwFlags.SKF_STICKYKEYSON" + } } } ], @@ -430,11 +490,9 @@ gpii.tests.windows.builtIn = [ { "settings": { "FilterKeysEnable": { - "path": "pvParam.dwFlags.FKF_FILTERKEYSON", "value": true }, "BounceKeysInterval": { - "path": "pvParam.iBounceMSec", "value": 1000 } }, @@ -446,6 +504,17 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "FILTERKEYS" } + }, + "supportedSettings": { + "FilterKeysEnable": { + "path": "pvParam.dwFlags.FKF_FILTERKEYSON" + }, + "SlowKeysInterval": { + "path": "pvParam.iWaitMSec" + }, + "BounceKeysInterval": { + "path": "pvParam.iBounceMSec" + } } } ], @@ -453,7 +522,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "ToggleKeysOn": { - "path": "pvParam.dwFlags.TKF_TOGGLEKEYSON", "value": true } }, @@ -465,6 +533,11 @@ gpii.tests.windows.builtIn = [ "type": "struct", "name": "TOGGLEKEYS" } + }, + "supportedSettings": { + "ToggleKeysOn": { + "path": "pvParam.dwFlags.TKF_TOGGLEKEYSON" + } } } ], @@ -472,7 +545,6 @@ gpii.tests.windows.builtIn = [ { "settings": { "UnderlineMenuShortcutsOn": { - "path": "pvParam", "value": 1 } }, @@ -483,15 +555,16 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "UnderlineMenuShortcutsOn": { + "path": "pvParam" + } } }, { "settings": { "KeyboardPreferenceOn": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 1 } }, @@ -502,6 +575,14 @@ gpii.tests.windows.builtIn = [ "pvParam": { "type": "BOOL" } + }, + "supportedSettings": { + "KeyboardPreferenceOn": { + "path": { + "get": "pvParam", + "set": "uiParam" + } + } } } ] From a7b973a713cdd5b5036a8d8b5da80be0787b3c11 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Wed, 11 Dec 2019 14:06:00 -0800 Subject: [PATCH 07/13] GPII-3119 Temporarily commenting out integration tests. --- tests/all-tests.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/all-tests.js b/tests/all-tests.js index 91cda71dd..242fb7d5f 100644 --- a/tests/all-tests.js +++ b/tests/all-tests.js @@ -35,7 +35,7 @@ var testIncludes = [ "./CloseConflictingAppsTests.js", "./DeviceReporterErrorTests.js", "./ErrorTests.js", - "./IntegrationTests.js", + // "./IntegrationTests.js", "./JournalIntegrationTests.js", "./MultiSettingsHandlerTests.js", "./PayloadSizeTest.js", From 97fd0bbc8d734ec5802da5765d3a637f402782b9 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Wed, 11 Dec 2019 14:27:57 -0800 Subject: [PATCH 08/13] GPII-3119 Removing another missed path setting --- tests/platform/windows/windows-builtIn-testSpec.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index d13851b4f..d65815c15 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -1827,7 +1827,6 @@ gpii.tests.windows.builtInHighContrast = [ { // high contrast settings "settings": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, From 334476ed9374b2258cae4d30933dd127de39e90d Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Thu, 12 Dec 2019 11:03:33 -0800 Subject: [PATCH 09/13] GPII-3119 Fixing remaining tests. --- .../test/data/pre_mm_payload2.json | 9 +-- .../matchMakerFramework/test/data/os_win.json | 11 --- .../transformer/test/TransformerTests.js | 71 +++++-------------- tests/all-tests.js | 2 +- .../preferences/os_win_highContrast.json5 | 1 - .../windows/windows-builtIn-testSpec.js | 1 - 6 files changed, 21 insertions(+), 74 deletions(-) diff --git a/gpii/node_modules/flatMatchMaker/test/data/pre_mm_payload2.json b/gpii/node_modules/flatMatchMaker/test/data/pre_mm_payload2.json index 318b0b60e..74662367a 100644 --- a/gpii/node_modules/flatMatchMaker/test/data/pre_mm_payload2.json +++ b/gpii/node_modules/flatMatchMaker/test/data/pre_mm_payload2.json @@ -56,7 +56,8 @@ "description": "Whether to enable/disable High Contrast.", "type": "boolean", "default": false - } + }, + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" } }, "capabilitiesTransformations": { @@ -84,12 +85,6 @@ } }, "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.HCF_HIGHCONTRASTON" - } } } }, diff --git a/gpii/node_modules/matchMakerFramework/test/data/os_win.json b/gpii/node_modules/matchMakerFramework/test/data/os_win.json index 6f9899eae..cb6946cf7 100644 --- a/gpii/node_modules/matchMakerFramework/test/data/os_win.json +++ b/gpii/node_modules/matchMakerFramework/test/data/os_win.json @@ -6,46 +6,35 @@ "preferences": { "http://registry.gpii.net/applications/com.microsoft.windows.mouseTrailing": { "MouseTrails": { - "path": { - "get": "pvParam", - "set": "uiParam" - }, "value": 10 } }, "http://registry.gpii.net/applications/com.microsoft.windows.mouseKeys": { "MouseKeysOn": { - "path": "pvParam.dwFlags.MKF_MOUSEKEYSON", "value": true }, "MaxSpeed": { - "path": "pvParam.iMaxSpeed", "value": 100 }, "Acceleration": { - "path": "pvParam.iTimeToMaxSpeed", "value": 1000 } }, "http://registry.gpii.net/applications/com.microsoft.windows.stickyKeys": { "StickyKeysOn": { - "path": "pvParam.dwFlags.SKF_STICKYKEYSON", "value": true } }, "http://registry.gpii.net/applications/com.microsoft.windows.filterKeys": { "FilterKeysEnable": { - "path": "pvParam.dwFlags.FKF_FILTERKEYSON", "value": true }, "BounceKeysInterval": { - "path": "pvParam.iBounceMSec", "value": 1000 } }, "http://registry.gpii.net/applications/com.microsoft.windows.highContrast": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, diff --git a/gpii/node_modules/transformer/test/TransformerTests.js b/gpii/node_modules/transformer/test/TransformerTests.js index 5e86b4e52..c496b14cf 100644 --- a/gpii/node_modules/transformer/test/TransformerTests.js +++ b/gpii/node_modules/transformer/test/TransformerTests.js @@ -268,6 +268,10 @@ var testSolutionsEntry = { "description": "Swap mouse left/right buttons", "type": "boolean", "default": false + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -277,12 +281,6 @@ var testSolutionsEntry = { "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SwapMouseButtons", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -321,6 +319,10 @@ var testSolutionsEntry = { "enumLabels": ["full-page"] } ] + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -330,12 +332,6 @@ var testSolutionsEntry = { "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.ScrollLines", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -389,7 +385,8 @@ var testSolutionsEntry = { "description": "Whether to enable/disable High Contrast", "type": "boolean", "default": false - } + }, + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" } }, "capabilities": [ @@ -422,12 +419,6 @@ var testSolutionsEntry = { } }, "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam.dwFlags.HCF_HIGHCONTRASTON" - } } } }, @@ -1095,6 +1086,10 @@ gpii.tests.transformer.configurationToSettingsTestSpecs = [ "description": "Swap mouse left/right buttons", "type": "boolean", "default": false + }, + "path": { + "get": "pvParam", + "set": "uiParam" } } }, @@ -1125,7 +1120,6 @@ gpii.tests.transformer.configurationToSettingsTestSpecs = [ "http://registry.gpii.net/common/highContrast/enabled": true, "http://registry.gpii.net/applications/com.microsoft.windows.highContrast": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } } @@ -1175,7 +1169,6 @@ gpii.tests.transformer.configurationToSettingsTestSpecs = [ }, "settings": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } }, @@ -1186,8 +1179,10 @@ gpii.tests.transformer.configurationToSettingsTestSpecs = [ "description": "Whether to enable/disable High Contrast", "title": "High Contrast", "type": "boolean" - } - } + }, + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" + }, + }, "type": "gpii.windows.spiSettingsHandler" }, @@ -1427,12 +1422,6 @@ gpii.tests.transformer.hasSupportedSettingsTests = [ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SwapMouseButtons", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -1451,12 +1440,6 @@ gpii.tests.transformer.hasSupportedSettingsTests = [ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SwapMouseButtons", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -1479,12 +1462,6 @@ gpii.tests.transformer.hasSupportedSettingsTests = [ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SwapMouseButtons", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, @@ -1503,12 +1480,6 @@ gpii.tests.transformer.hasSupportedSettingsTests = [ "true": "", "false": "", "outputPath": "value" - }, - "path": { - "transform": { - "type": "fluid.transforms.literalValue", - "input": "pvParam" - } } } }, @@ -1526,12 +1497,6 @@ gpii.tests.transformer.hasSupportedSettingsTests = [ "type": "fluid.transforms.value", "inputPath": "http://registry\\.gpii\\.net/applications/com\\.microsoft\\.windows\\.mouseSettings.SwapMouseButtons", "outputPath": "value" - }, - "path": { - "literalValue": { - "get": "pvParam", - "set": "uiParam" - } } } }, diff --git a/tests/all-tests.js b/tests/all-tests.js index 242fb7d5f..91cda71dd 100644 --- a/tests/all-tests.js +++ b/tests/all-tests.js @@ -35,7 +35,7 @@ var testIncludes = [ "./CloseConflictingAppsTests.js", "./DeviceReporterErrorTests.js", "./ErrorTests.js", - // "./IntegrationTests.js", + "./IntegrationTests.js", "./JournalIntegrationTests.js", "./MultiSettingsHandlerTests.js", "./PayloadSizeTest.js", diff --git a/tests/data/preferences/os_win_highContrast.json5 b/tests/data/preferences/os_win_highContrast.json5 index a3faa6457..f96c2b284 100644 --- a/tests/data/preferences/os_win_highContrast.json5 +++ b/tests/data/preferences/os_win_highContrast.json5 @@ -10,7 +10,6 @@ "preferences": { "http://registry.gpii.net/applications/com.microsoft.windows.highContrast": { "HighContrastOn": { - "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", "value": true } } diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index d65815c15..64e291b60 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -933,7 +933,6 @@ gpii.tests.windows.builtIn = [ "com.microsoft.windows.desktopBackgroundColor": [{ "settings": { "ImageConfig": { - "path": "pvParam", "value": "" } }, From 33b230ea0d33f3115f059c336803d6788af9b421 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Thu, 12 Dec 2019 14:00:11 -0800 Subject: [PATCH 10/13] GPII-3119 Minor linting, and passing supportedSettings through lifecycle manager. --- gpii/node_modules/lifecycleManager/src/LifecycleManager.js | 3 ++- gpii/node_modules/transformer/test/TransformerTests.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gpii/node_modules/lifecycleManager/src/LifecycleManager.js b/gpii/node_modules/lifecycleManager/src/LifecycleManager.js index 6a3c22a1b..230c9c304 100644 --- a/gpii/node_modules/lifecycleManager/src/LifecycleManager.js +++ b/gpii/node_modules/lifecycleManager/src/LifecycleManager.js @@ -641,7 +641,8 @@ var gpii = fluid.registerNamespace("gpii"); } returnObj[solutionId] = [{ settings: settings, - options: handlerSpec.options + options: handlerSpec.options, + supportedSettings: handlerSpec.supportedSettings }]; return returnObj; diff --git a/gpii/node_modules/transformer/test/TransformerTests.js b/gpii/node_modules/transformer/test/TransformerTests.js index c496b14cf..e836a6bc6 100644 --- a/gpii/node_modules/transformer/test/TransformerTests.js +++ b/gpii/node_modules/transformer/test/TransformerTests.js @@ -1181,7 +1181,7 @@ gpii.tests.transformer.configurationToSettingsTestSpecs = [ "type": "boolean" }, "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON" - }, + } }, "type": "gpii.windows.spiSettingsHandler" From c066375993eabc797fc0efc0d46d961cf333ce9b Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Fri, 13 Dec 2019 11:28:07 -0800 Subject: [PATCH 11/13] GPII-3119 Minor stubs for supportedSettings to browser tests --- .../test/js/LifecycleManagerTests.js | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js b/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js index 9d0dc9f8e..eb4c26a1b 100644 --- a/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js +++ b/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js @@ -186,14 +186,16 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "cross-hairs-clip": true, "cross-hairs-color": "red" }, - "options": {} + "options": {}, + "supportedSettings": undefined }, response: [{ "settings": { "cross-hairs-clip": true, "cross-hairs-color": "red" }, - "options": {} + "options": {}, + "supportedSettings": undefined }] } }; @@ -381,7 +383,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt togo[solutionId] = [ { options: {}, - settings: settings + settings: settings, + supportedSettings: undefined } ]; return togo; @@ -398,7 +401,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt }, "options": { // "storePath": "settingsBlock1" - } + }, + "supportedSettings": undefined }], "other.application": [{ "settings": { @@ -406,7 +410,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt }, "options": { // "storePath": "settingsBlock1" - } + }, + "supportedSettings": undefined }] }; @@ -426,7 +431,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "cross-hairs-clip": true, "cross-hairs-color": "red" }, - "options": {} + "options": {}, + "supportedSettings": undefined }] }; @@ -436,7 +442,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "cross-hairs-clip": false, "cross-hairs-color": "red" }, - "options": {} + "options": {}, + "supportedSettings": undefined }] }; @@ -935,7 +942,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "options": {}, "settings": { "mysetting": undefined - } + }, + "supportedSettings": undefined }] }, runningAfterUpdate: true @@ -992,7 +1000,8 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "org.gnome.desktop.a11y.magnifier": [ { "options": {}, - "settings": expSettings + "settings": expSettings, + "supportedSettings": undefined } ] }; From 262638bee15a29d8e4a1c76baa18f9c4e7431e72 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Thu, 9 Jan 2020 14:28:14 -0800 Subject: [PATCH 12/13] GPII-3119 Optionally including supportedSettings in payload if they exist. --- .../lifecycleManager/src/LifecycleManager.js | 8 ++++-- .../test/js/LifecycleManagerTests.js | 27 +++++++------------ 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/gpii/node_modules/lifecycleManager/src/LifecycleManager.js b/gpii/node_modules/lifecycleManager/src/LifecycleManager.js index 230c9c304..bd20d66ea 100644 --- a/gpii/node_modules/lifecycleManager/src/LifecycleManager.js +++ b/gpii/node_modules/lifecycleManager/src/LifecycleManager.js @@ -641,10 +641,14 @@ var gpii = fluid.registerNamespace("gpii"); } returnObj[solutionId] = [{ settings: settings, - options: handlerSpec.options, - supportedSettings: handlerSpec.supportedSettings + options: handlerSpec.options }]; + // Optionally include supportedSettings if there are any + if (handlerSpec.supportedSettings !== undefined) { + returnObj[solutionId][0].supportedSettings = handlerSpec.supportedSettings; + } + return returnObj; }; diff --git a/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js b/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js index eb4c26a1b..9d0dc9f8e 100644 --- a/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js +++ b/gpii/node_modules/lifecycleManager/test/js/LifecycleManagerTests.js @@ -186,16 +186,14 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "cross-hairs-clip": true, "cross-hairs-color": "red" }, - "options": {}, - "supportedSettings": undefined + "options": {} }, response: [{ "settings": { "cross-hairs-clip": true, "cross-hairs-color": "red" }, - "options": {}, - "supportedSettings": undefined + "options": {} }] } }; @@ -383,8 +381,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt togo[solutionId] = [ { options: {}, - settings: settings, - supportedSettings: undefined + settings: settings } ]; return togo; @@ -401,8 +398,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt }, "options": { // "storePath": "settingsBlock1" - }, - "supportedSettings": undefined + } }], "other.application": [{ "settings": { @@ -410,8 +406,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt }, "options": { // "storePath": "settingsBlock1" - }, - "supportedSettings": undefined + } }] }; @@ -431,8 +426,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "cross-hairs-clip": true, "cross-hairs-color": "red" }, - "options": {}, - "supportedSettings": undefined + "options": {} }] }; @@ -442,8 +436,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "cross-hairs-clip": false, "cross-hairs-color": "red" }, - "options": {}, - "supportedSettings": undefined + "options": {} }] }; @@ -942,8 +935,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "options": {}, "settings": { "mysetting": undefined - }, - "supportedSettings": undefined + } }] }, runningAfterUpdate: true @@ -1000,8 +992,7 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt "org.gnome.desktop.a11y.magnifier": [ { "options": {}, - "settings": expSettings, - "supportedSettings": undefined + "settings": expSettings } ] }; From 957c992da54b0123eb0f81b724a31e16cb4446a9 Mon Sep 17 00:00:00 2001 From: Steven Githens Date: Mon, 27 Jan 2020 13:10:17 -0800 Subject: [PATCH 13/13] GPII-3119 Adding ticket number to comment --- gpii/node_modules/lifecycleManager/src/LifecycleManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gpii/node_modules/lifecycleManager/src/LifecycleManager.js b/gpii/node_modules/lifecycleManager/src/LifecycleManager.js index 3d2492a28..189fc4b67 100644 --- a/gpii/node_modules/lifecycleManager/src/LifecycleManager.js +++ b/gpii/node_modules/lifecycleManager/src/LifecycleManager.js @@ -736,7 +736,7 @@ var fluid = fluid || require("infusion"), options: handlerSpec.options }]; - // Optionally include supportedSettings if there are any + // GPII-3119 Optionally include supportedSettings if there are any if (handlerSpec.supportedSettings !== undefined) { returnObj[solutionId][0].supportedSettings = handlerSpec.supportedSettings; }