diff --git a/gpii/configs/gpii.config.cloudBased.development.all.local.json b/gpii/configs/gpii.config.cloudBased.development.all.local.json index 99f278631..0564c168e 100644 --- a/gpii/configs/gpii.config.cloudBased.development.all.local.json +++ b/gpii/configs/gpii.config.cloudBased.development.all.local.json @@ -22,6 +22,6 @@ "%preferencesServer/configs/gpii.preferencesServer.config.development.json", "%canopyMatchMaker/configs/gpii.canopyMatchMaker.config.base.json", "%rawPreferencesServer/configs/gpii.rawPreferencesServer.config.development.json", - "%deviceReporter/configs/gpii.deviceReporter.config.development.json" + "%deviceReporter/configs/gpii.deviceReporter.config.production.json" ] } diff --git a/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js b/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js index 02a4ed55d..0e8f307e4 100644 --- a/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js +++ b/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js @@ -398,6 +398,9 @@ gpii.settingsHandlers.readFile = function (options) { gpii.settingsHandlers.writeFile = function (content, options) { if (!options || !options.filename) { fluid.fail("writeFile: expected an options block defining filename and encoding"); + } else if (!fs.existsSync(options.filename)) { + fluid.log("writeFile: No settingsfile '", options.filename, "'' exists. Nothing written."); + return; } // TODO check for and handle write errors. fs.writeFileSync(options.filename, content, options.encoding || "utf-8"); diff --git a/gpii/node_modules/settingsHandlers/test/data/basicOut.json b/gpii/node_modules/settingsHandlers/test/data/basicOut.json new file mode 100644 index 000000000..97106d9ed --- /dev/null +++ b/gpii/node_modules/settingsHandlers/test/data/basicOut.json @@ -0,0 +1 @@ +{ "Good": "buy" } \ No newline at end of file diff --git a/gpii/node_modules/settingsHandlers/test/settingsHandlerUtilitiesTests.js b/gpii/node_modules/settingsHandlers/test/settingsHandlerUtilitiesTests.js index 28ddc11cc..7c4d13957 100644 --- a/gpii/node_modules/settingsHandlers/test/settingsHandlerUtilitiesTests.js +++ b/gpii/node_modules/settingsHandlers/test/settingsHandlerUtilitiesTests.js @@ -41,6 +41,31 @@ gpii.tests.settingsHandlers.readFile = function () { jqUnit.assertEquals("Expecting undefined on reading non-existing file", undefined, result2); }; +gpii.tests.settingsHandlers.writeFile = function () { + // Check writing existing file by writing and reading it back. + var dataOut = "{ \"Good\": \"buy\" }"; + gpii.settingsHandlers.writeFile(dataOut, { + filename: __dirname + "/data/basicOut.json" + }); + var dataIn = gpii.settingsHandlers.readFile({ + filename: __dirname + "/data/basicOut.json" + }); + jqUnit.assertDeepEq( + "Writing to existing file", + JSON.parse(dataOut), + JSON.parse(dataIn) + ); + + // Check writing non-existing file + gpii.settingsHandlers.writeFile(dataOut, { + filename: __dirname + "/data/bogus/bogus.ini" + }); + dataIn = gpii.settingsHandlers.readFile({ + filename: __dirname + "/data/bogus/bogus.ini" + }); + jqUnit.assertEquals("Writing to non-existing file", undefined, dataIn); +}; + var handleFileSolutionEntryData = { existingFileSolutionEntry: { options: { @@ -97,6 +122,10 @@ fluid.defaults("gpii.tests.settingsHandlers.caseHolder", { expect: 2, name: "gpii.settingsHandlers.readFile tests", func: "gpii.tests.settingsHandlers.readFile" + }, { + expect: 2, + name: "gpii.settingsHandlers.writeFile tests", + func: "gpii.tests.settingsHandlers.writeFile" }, { expect: 2, name: "gpii.settingsHandlers.handleFileSolutionEntry tests", diff --git a/tests/configs/gpii.tests.acceptance.localInstall.config.json b/tests/configs/gpii.tests.acceptance.localInstall.config.json deleted file mode 100644 index 748674456..000000000 --- a/tests/configs/gpii.tests.acceptance.localInstall.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.localInstall.config", - "options": { - "distributeOptions": { - "acceptance.rawPreferencesDataSource": { - "record": "%universal/testData/preferences/acceptanceTests/%userToken.json", - "target": "{that rawPreferencesServer rawPreferencesDataSource}.options.path", - "priority": "after:development.rawPreferencesDataSource" - } - } - }, - "mergeConfigs": "%universal/gpii/configs/gpii.config.development.all.local.json" -} diff --git a/tests/configs/gpii.tests.acceptance.localInstall.config.txt b/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.txt similarity index 50% rename from tests/configs/gpii.tests.acceptance.localInstall.config.txt rename to tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.txt index 43de6b612..bcfaeef4c 100644 --- a/tests/configs/gpii.tests.acceptance.localInstall.config.txt +++ b/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.txt @@ -1,9 +1,10 @@ This configuration file is used for acceptance testing. -It uses the basic (default) development setup of the system, but replaces the -folder with NP sets used to be (universal)/testData/preferences/acceptanceTests -as opposed to the normal preferences folder. -Besides that, everything will be based on the normal development mode setup. +It uses the basic (default) development setup of the system, with a couple of +modifications. It replaces the folder with NP sets in (universal)/testData/preferences/acceptanceTests +as opposed to the normal preferences folder. It also uses the dynamic device +reporter (the device reporter in production mode). Otherwise, everything else +is based on the normal development mode setup. The name "localInstall" refers to a setup where GPII is running as installed locally on the machine (as opposed to eg. running the system as a cloudBased flowmanager). diff --git a/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.json b/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.json index 331f771c7..d3669f183 100644 --- a/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.json +++ b/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.txt b/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.txt index 9b629914e..debaa2181 100644 --- a/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.txt +++ b/tests/platform/android/configs/gpii.tests.acceptance.android.builtIn.config.txt @@ -1,8 +1,5 @@ This config file is used for integration and acceptance tests on Android. -It includes to the basic localInstall setup for acceptance tests (modifying the -preferences folder used), which in turn includes the standard development -config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'android_builtIn.json', which will -report only the standard built in solutions as installed. +It makes use of dynamic device reporter: It uses the basic local install setup +in development mode, but with the device reporter in production mode, merging in +gpii's "all.development.dr.production" configuration. diff --git a/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.json b/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.json index 1471a5475..a578bdbbe 100644 --- a/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.json +++ b/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.txt b/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.txt index 640847d84..ecf7e67d0 100644 --- a/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.txt +++ b/tests/platform/android/configs/gpii.tests.acceptance.android.talkback.config.txt @@ -1,8 +1,5 @@ This configuration file is used by the for acceptance test: android-talkback-testSpec.js. -It includes to the basic localInstall setup for acceptance tests (modifying the -preferences folder used), which in turn includes the standard development -config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'talkback.json', which will report -Talkback as being installed on the system. +It makes use of dynamic device reporter: It includes the basic local install +setup in development mode, but with the device reporter in production mode, +merging in gpii's "all.development.dr.production" configuration. diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.json b/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.json index e7f91dca5..a5e52b6f2 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.json +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.txt b/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.txt index 1880e0363..1e0c2b21d 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.txt +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.txt @@ -1,8 +1,5 @@ This config file is used for integration and acceptance tests on Linux as well as the context integration tests -It includes to the basic localInstall setup for acceptance tests (modifying the -preferences folder used), which in turn includes the standard development -config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'linux_builtIn.json', which will -report only the standard built in solutions as installed. +It makes use of dynamic device reporter: It includes the basic local install +setup in development mode, but with the device reporter in production mode, +merging in gpii's "all.development.dr.production" configuration. diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.json b/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.json index eb9e07bfe..dceee6c40 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.json +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.txt b/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.txt index 5a536ac33..c8a385bc7 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.txt +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.chrome.config.txt @@ -1,8 +1,6 @@ This configuration file is used for testing the chrome extension in Linux -It includes to the basic localInstall setup for acceptance tests (modifying the -preferences folder used), which in turn includes the standard development -config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'chrome.json', which will report -the Cloud4all Chrome extension for Google Chrome as being installed on the system. +It makes use of dynamic device reporter: It includes the basic local install +setup in development mode (modifying the preferences folder used), but with the +device reporter in production mode, merging in gpii's +"all.development.dr.production" configuration. diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.json b/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.json index 6c6750324..72f5966d5 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.json +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.txt b/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.txt index c8c82d5f0..1e0014f98 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.txt +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.txt @@ -1,8 +1,6 @@ -This configuration file is used by the for acceptance test: AcceptanceTests_orca.js. +This configuration file is used by the acceptance test: AcceptanceTests_orca.js. -It includes to the basic localInstall setup for acceptance tests (modifying the -preferences folder used), which in turn includes the standard development -config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'orca.json', which will report -Orca as being installed on the system. +It makes use of dynamic device reporter: It includes the basic local install +setup in development mode (modifying the preferences folder used), but with the +device reporter in production mode, merging in gpii's +"all.development.dr.production" configuration. diff --git a/tests/platform/linux/linux-builtIn-testSpec.js b/tests/platform/linux/linux-builtIn-testSpec.js index 680e143a7..3b53d0285 100644 --- a/tests/platform/linux/linux-builtIn-testSpec.js +++ b/tests/platform/linux/linux-builtIn-testSpec.js @@ -58,7 +58,12 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell"] + } + } }, { name: "Testing os_common2 using default matchmaker", @@ -76,7 +81,12 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ }] } }, - processes: [] + processes: [], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gsettings-desktop-schemas"] + } + } }, { name: "Testing os_gnome using default matchmaker", @@ -115,7 +125,12 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell"] + } + } }, { name: "Testing os_win7 using default matchmaker", @@ -151,7 +166,12 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell"] + } + } } ]); diff --git a/tests/platform/linux/linux-orca-testSpec.js b/tests/platform/linux/linux-orca-testSpec.js index 21707a2c1..9a5a0bb18 100644 --- a/tests/platform/linux/linux-orca-testSpec.js +++ b/tests/platform/linux/linux-orca-testSpec.js @@ -58,7 +58,12 @@ gpii.tests.linux.orca.testDefs = [ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["orca"] + } + } }, { name: "Testing screenreader_orca using Flat matchmaker", @@ -94,7 +99,12 @@ gpii.tests.linux.orca.testDefs = [ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["orca"] + } + } }, { name: "Testing screenreader_nvda using Flat matchmaker", @@ -129,7 +139,12 @@ gpii.tests.linux.orca.testDefs = [ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["orca"] + } + } } ]; diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.json index 064856ecb..063273c9c 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.txt index 91d923402..1a509d009 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.txt +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.txt @@ -1,5 +1,7 @@ -This configuration file is used by the for acceptance test: AcceptanceTests_builtIn.js. +This configuration file is used by the acceptance test: AcceptanceTests_builtIn.js. -It includes to the basic localInstall setup for acceptance tests (modifying the preferences folder used), which in turn includes the standard development config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'win7_builtIn.json', which will report only the standard built in solutions as installed. \ No newline at end of file +It uses the basic (default) development setup of the system, with a couple of +modifications. It replaces the folder with NP sets in (universal)/testData/preferences/acceptanceTests +as opposed to the normal preferences folder. It also uses the dynamic device +reporter (the device reporter in production mode). Otherwise, everything else +is based on the normal development mode setup. diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.json index a901f51a9..3cccf7ace 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.txt index 02a8388b4..8d8cbeb04 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.txt +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.chrome.config.txt @@ -1,8 +1,7 @@ This configuration file is used for testing the chrome extension in Windows -It includes to the basic localInstall setup for acceptance tests (modifying the -preferences folder used), which in turn includes the standard development -config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'chrome.json', which will report -the Cloud4all Chrome extension for Google Chrome as being installed on the system. +It uses the basic (default) development setup of the system, with a couple of +modifications. It replaces the folder with NP sets in (universal)/testData/preferences/acceptanceTests +as opposed to the normal preferences folder. It also uses the dynamic device +reporter (the device reporter in production mode). Otherwise, everything else +is based on the normal development mode setup. diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.json index 668c38354..ecedcc8a3 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.txt new file mode 100644 index 000000000..4fe817376 --- /dev/null +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.txt @@ -0,0 +1,6 @@ +This configuration file is used by the acceptance test: windows-jaws-testSpec.js. + +It makes use of dynamic device reporter: It includes the basic local install +setup in development mode (modifying the preferences folder used), but with the +device reporter in production mode, merging in gpii's +"all.development.dr.production" configuration. diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.json index fa57ba860..c360cd265 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.txt new file mode 100644 index 000000000..15c9e3e34 --- /dev/null +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.txt @@ -0,0 +1,6 @@ +This configuration file is used by the acceptance test: windows-maavis-testSpec.js. + +It makes use of dynamic device reporter: It includes the basic local install +setup in development mode (modifying the preferences folder used), but with the +device reporter in production mode, merging in gpii's +"all.development.dr.production" configuration. diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.json index 66501749c..bbba68e0d 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.txt index 6029932aa..62ed68580 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.txt +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.txt @@ -1,5 +1,3 @@ -This configuration file is used by the for acceptance test: AcceptanceTests_nvda.js. +This configuration file is used by the acceptance test: AcceptanceTests_nvda.js. -It includes to the basic localInstall setup for acceptance tests (modifying the preferences folder used), which in turn includes the standard development config file (running GPII locally, using development setup). - -This config sets the device reporter file to be 'nvda.json', which will report nvda as being installed on the system. \ No newline at end of file +It makes use of dynamic device reporter: It includes the basic local install setup in development mode (modifying the preferences folder used), but with the device reporter in production mode, merging in gpii's "all.development.dr.production" configuration. diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.json index b8dd7c7ba..747fb9f96 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.json @@ -9,5 +9,5 @@ } } }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" + "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.txt index 24f6bd073..cbf5a3c4c 100644 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.txt +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.txt @@ -1,5 +1,4 @@ This configuration file is used by the acceptance tests for Read&Write Gold -It includes the basic localInstall setup for acceptance tests (modifying the preferences folder used), which in turn includes the standard development config file (running GPII locally, using development setup). +It makes use of dynamic device reporter: It includes the basic local install setup in development mode (modifying the preferences folder used), but with the device reporter in production mode, merging in gpii's "all.development.dr.production" configuration. -This config sets the device reporter file to be 'readWrite.json', which will report Read&Write Gold as being installed on the system. diff --git a/tests/platform/windows/windows-builtIn-testSpec.js b/tests/platform/windows/windows-builtIn-testSpec.js index 749ef6677..1fc105782 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -202,7 +202,10 @@ gpii.tests.windows.builtIn = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.alwaysInstalled" : { } + } }, { name: "Testing os_common using default matchmaker", userToken: "os_common", @@ -364,7 +367,10 @@ gpii.tests.windows.builtIn = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.alwaysInstalled" : { } + } }, { name: "Testing os_gnome using default matchmaker", userToken: "os_gnome", @@ -431,7 +437,10 @@ gpii.tests.windows.builtIn = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.alwaysInstalled" : { } + } } ]; diff --git a/tests/platform/windows/windows-jaws-testSpec.js b/tests/platform/windows/windows-jaws-testSpec.js index 9db6e5ed1..2867835d6 100644 --- a/tests/platform/windows/windows-jaws-testSpec.js +++ b/tests/platform/windows/windows-jaws-testSpec.js @@ -46,7 +46,16 @@ gpii.tests.windows.jaws = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JAWS15.exe", + "subPath": "" + }] + } + } }, { name: "Testing NP set \"jaws_common\" using Flat matchmaker", userToken: "jaws_common", @@ -71,7 +80,16 @@ gpii.tests.windows.jaws = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JAWS15.exe", + "subPath": "" + }] + } + } } ]; diff --git a/tests/platform/windows/windows-maavis-testSpec.js b/tests/platform/windows/windows-maavis-testSpec.js index 658f95b4d..40e5baa11 100644 --- a/tests/platform/windows/windows-maavis-testSpec.js +++ b/tests/platform/windows/windows-maavis-testSpec.js @@ -48,7 +48,10 @@ gpii.tests.windows.maavis = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.alwaysInstalled" : { } + } }, { name: "Testing maavis_selfvoicing using Flat matchmaker", userToken: "maavis_selfvoicing", @@ -75,7 +78,10 @@ gpii.tests.windows.maavis = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.alwaysInstalled" : { } + } } ]; diff --git a/tests/platform/windows/windows-nvda-testSpec.js b/tests/platform/windows/windows-nvda-testSpec.js index b6af2d032..077836b78 100644 --- a/tests/platform/windows/windows-nvda-testSpec.js +++ b/tests/platform/windows/windows-nvda-testSpec.js @@ -61,7 +61,16 @@ gpii.tests.windows.nvda = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\nvda.exe", + "subPath": "" + }] + } + } }, { name: "Testing screenreader_common using Flat matchmaker", userToken: "screenreader_common", @@ -99,7 +108,16 @@ gpii.tests.windows.nvda = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\nvda.exe", + "subPath": "" + }] + } + } }, { name: "Testing screenreader_orca using Flat matchmaker", userToken: "screenreader_orca", @@ -131,7 +149,16 @@ gpii.tests.windows.nvda = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\nvda.exe", + "subPath": "" + }] + } + } } ];