diff --git a/gpii/node_modules/canopyMatchMaker/src/CanopyMatchMakerUtilities.js b/gpii/node_modules/canopyMatchMaker/src/CanopyMatchMakerUtilities.js index e773b3468..05bc30c48 100644 --- a/gpii/node_modules/canopyMatchMaker/src/CanopyMatchMakerUtilities.js +++ b/gpii/node_modules/canopyMatchMaker/src/CanopyMatchMakerUtilities.js @@ -36,7 +36,11 @@ gpii.canopyMatchMaker.utils.compareFitness = function (solA, solB) { for (; ; ++i) { var endA = i === fitA.length, endB = i === fitB.length; if (endA || endB) { - return endA && endB ? 0 : (endB ? -1 : 1); + if (endA && endB) { // if tied, break using priority + return (solB.priority || 0) - (solA.priority || 0); + } else { // if not tied, return most fit + return (endB ? -1 : 1); + } } var diff = fitB[i] - fitA[i]; if (diff !== 0) { diff --git a/gpii/node_modules/canopyMatchMaker/test/web/js/CanopyMatchMakerUtilitiesTests.js b/gpii/node_modules/canopyMatchMaker/test/web/js/CanopyMatchMakerUtilitiesTests.js index d27d56b1c..34bbb5c23 100644 --- a/gpii/node_modules/canopyMatchMaker/test/web/js/CanopyMatchMakerUtilitiesTests.js +++ b/gpii/node_modules/canopyMatchMaker/test/web/js/CanopyMatchMakerUtilitiesTests.js @@ -184,6 +184,31 @@ gpii.tests.canopyMatchMaker.runBasicTests = function () { }; jqUnit.assertDeepEq("Disposed solutions", expected, itions); }); + + jqUnit.test("Rank and dispose solutions - non-conflicting solutions matching canopy equally well", function () { + // Using a preferences set that matches the two solutions equally well the one with the highest priority will be chosen: + var solutions = { + "lesserMag": lesserMagnifier, + "mag": magnifier + }; + var solrecs = gpii.matchMakerFramework.utils.expandSolutions(solutions, { "*": "*" }); + solrecs.mag.priority = 1024; + var ranked = gpii.canopyMatchMaker.utils.rankSolutions(["display.screenEnhancement.magnification"], solrecs, gpii.canopyMatchMaker.utils.ISO24751.ontologicalMetric); + var expectedRanking = ["mag", "lesserMag"]; + jqUnit.assertDeepEq("Ranked solutions - tie break equal canopy match using priorities", expectedRanking, ranked); + var minimalData = { + solutionTypes: {}, + solutionTypeMapping: {} + }; + + var disposed = gpii.canopyMatchMaker.utils.disposeFromCanopy(["display.screenEnhancement.magnification"], ranked, solrecs, minimalData, gpii.canopyMatchMaker.utils.ISO24751.ontologicalMetric); + var dispositions = gpii.canopyMatchMaker.utils.extractDispositions(disposed); + var expected = { + "mag": "accept", + "lesserMag": "reject" + }; + jqUnit.assertDeepEq("Disposed solutions", expected, dispositions); + }); }; var disposeStrategyFixtures = [ diff --git a/testData/deviceReporter/acceptanceTests/jaws.json b/testData/deviceReporter/acceptanceTests/jaws.json deleted file mode 100644 index a60797e53..000000000 --- a/testData/deviceReporter/acceptanceTests/jaws.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - { "id": "com.freedomscientific.jaws" } -] diff --git a/testData/deviceReporter/acceptanceTests/linux_builtIn.json b/testData/deviceReporter/acceptanceTests/linux_builtIn.json deleted file mode 100644 index e0fbf462b..000000000 --- a/testData/deviceReporter/acceptanceTests/linux_builtIn.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "id": "org.gnome.desktop.interface" - }, - { - "id": "org.gnome.desktop.a11y.magnifier" - }, - { - "id": "org.alsa-project" - }, - { - "id": "org.gnome.desktop.a11y.keyboard" - } -] diff --git a/testData/deviceReporter/acceptanceTests/maavis.json b/testData/deviceReporter/acceptanceTests/maavis.json deleted file mode 100644 index 30a5b6f7d..000000000 --- a/testData/deviceReporter/acceptanceTests/maavis.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - { "id": "net.opendirective.maavis" } -] diff --git a/testData/deviceReporter/acceptanceTests/nvda.json b/testData/deviceReporter/acceptanceTests/nvda.json deleted file mode 100644 index c23a27c5a..000000000 --- a/testData/deviceReporter/acceptanceTests/nvda.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "id": "org.nvda-project" - } -] diff --git a/testData/deviceReporter/acceptanceTests/orca.json b/testData/deviceReporter/acceptanceTests/orca.json deleted file mode 100644 index 060caa1d4..000000000 --- a/testData/deviceReporter/acceptanceTests/orca.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "id": "org.gnome.orca" - } -] diff --git a/testData/deviceReporter/acceptanceTests/readWrite.json b/testData/deviceReporter/acceptanceTests/readWrite.json deleted file mode 100644 index 08a7f346e..000000000 --- a/testData/deviceReporter/acceptanceTests/readWrite.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "id": "com.texthelp.readWriteGold" - } -] diff --git a/testData/deviceReporter/acceptanceTests/uioPlus.json b/testData/deviceReporter/acceptanceTests/uioPlus.json deleted file mode 100644 index 30658cff6..000000000 --- a/testData/deviceReporter/acceptanceTests/uioPlus.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - { - "id": "net.gpii.uioPlus" - } -] diff --git a/testData/deviceReporter/acceptanceTests/win7_builtIn.json b/testData/deviceReporter/acceptanceTests/win7_builtIn.json deleted file mode 100644 index b67014811..000000000 --- a/testData/deviceReporter/acceptanceTests/win7_builtIn.json +++ /dev/null @@ -1,46 +0,0 @@ -[ - { - "id": "com.microsoft.windows.magnifier" - }, - - { - "id": "com.microsoft.windows.onscreenKeyboard" - }, - - { - "id": "com.microsoft.windows.highContrast" - }, - - { - "id": "com.microsoft.windows.mouseTrailing" - }, - - { - "id": "com.microsoft.windows.screenResolution" - }, - - { - "id": "com.microsoft.windows.screenDPI" - }, - - { - "id": "com.microsoft.windows.cursors" - }, - - { - "id": "com.microsoft.windows.stickyKeys" - }, - - { - "id": "com.microsoft.windows.filterKeys" - }, - - { - "id": "com.microsoft.windows.mouseKeys" - }, - - { - "id": "com.microsoft.windows.narrator" - } - -] diff --git a/testData/preferences/acceptanceTests/maavis_highcontrast.json b/testData/preferences/acceptanceTests/maavis_highcontrast.json index e0c5f4582..3fdc530f4 100644 --- a/testData/preferences/acceptanceTests/maavis_highcontrast.json +++ b/testData/preferences/acceptanceTests/maavis_highcontrast.json @@ -6,7 +6,16 @@ "preferences": { "http://registry.gpii.net/common/highContrastEnabled": true, "http://registry.gpii.net/common/highContrastTheme": "yellow-black" - } + }, + "metadata": [ + { + "type": "priority", + "scope": [ + "http://registry.gpii.net/applications/net.opendirective.maavis" + ], + "value": 1024 + } + ] } } } diff --git a/testData/preferences/acceptanceTests/maavis_selfvoicing.json b/testData/preferences/acceptanceTests/maavis_selfvoicing.json index a042e7d24..ab7baabeb 100644 --- a/testData/preferences/acceptanceTests/maavis_selfvoicing.json +++ b/testData/preferences/acceptanceTests/maavis_selfvoicing.json @@ -5,7 +5,16 @@ "name": "Default preferences", "preferences": { "http://registry.gpii.net/common/selfVoicingEnabled": true - } + }, + "metadata": [ + { + "type": "priority", + "scope": [ + "http://registry.gpii.net/applications/net.opendirective.maavis" + ], + "value": 1024 + } + ] } } } diff --git a/testData/preferences/acceptanceTests/os_common.json b/testData/preferences/acceptanceTests/os_common.json index ce069a2cc..2765c6a30 100644 --- a/testData/preferences/acceptanceTests/os_common.json +++ b/testData/preferences/acceptanceTests/os_common.json @@ -17,9 +17,24 @@ "http://registry.gpii.net/common/cursorSpeed": 1, "http://registry.gpii.net/common/stickyKeys": true, "http://registry.gpii.net/common/debounceEnabled": true, - "http://registry.gpii.net/common/debounceInterval": 1 - } + "http://registry.gpii.net/common/debounceInterval": 1, + "http://registry.gpii.net/applications/com.microsoft.windows.highContrast": { + "HighContrastOn": { + "path": "pvParam.dwFlags.HCF_HIGHCONTRASTON", + "value": true + } + } + }, + "metadata": [ + { + "type": "priority", + "scope": [ + "http://registry.gpii.net/applications/com.microsoft.windows.highContrast" + ], + "value": 1024 + } + ] } } } -} \ No newline at end of file +} diff --git a/tests/ContextIntegrationTests.js b/tests/ContextIntegrationTests.js index 288979d6c..bf68de82b 100644 --- a/tests/ContextIntegrationTests.js +++ b/tests/ContextIntegrationTests.js @@ -27,7 +27,7 @@ gpii.tests.contextIntegration.baseTestDef = { "gpii.test.common.lifecycleManagerReceiver" ], config: { - configName: "gpii.tests.acceptance.linux.builtIn.config", + configName: "gpii.tests.acceptance.linux.config", configPath: "%universal/tests/platform/linux/configs" } }; diff --git a/tests/IntegrationTests.js b/tests/IntegrationTests.js index 3916cf740..20973fa54 100644 --- a/tests/IntegrationTests.js +++ b/tests/IntegrationTests.js @@ -29,6 +29,6 @@ fluid.require("%universal"); gpii.loadTestingSupport(); -gpii.test.runSuitesWithFiltering(require("./platform/index-windows.js"), __dirname, ["gpii.test.integration.testCaseHolder.windows"]); -gpii.test.runSuitesWithFiltering(require("./platform/index-linux.js"), __dirname, ["gpii.test.integration.testCaseHolder.linux"]); +gpii.test.runSuitesWithFiltering(require("./platform/index-windows.js"), __dirname, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"]); +gpii.test.runSuitesWithFiltering(require("./platform/index-linux.js"), __dirname, ["gpii.test.integration.testCaseHolder.linux", "gpii.test.integration.deviceReporterAware.linux"]); gpii.test.runSuitesWithFiltering(require("./platform/index-android.js"), __dirname, ["gpii.test.integration.testCaseHolder.android"]); diff --git a/tests/configs/gpii.tests.acceptance.localInstall.config.txt b/tests/configs/gpii.tests.acceptance.localInstall.config.txt index 43de6b612..210f099c7 100644 --- a/tests/configs/gpii.tests.acceptance.localInstall.config.txt +++ b/tests/configs/gpii.tests.acceptance.localInstall.config.txt @@ -1,4 +1,4 @@ -This configuration file is used for acceptance testing. +This configuration file is used for integration and acceptance testing on Android. It uses the basic (default) development setup of the system, but replaces the folder with NP sets used to be (universal)/testData/preferences/acceptanceTests @@ -7,6 +7,3 @@ Besides that, everything will be 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). - -This file is used as a "base config" by architecture-specific tests in the windows -and linux repositories, as well as locally as the base for universal integration tests. diff --git a/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.txt b/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.txt new file mode 100644 index 000000000..bcfaeef4c --- /dev/null +++ b/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.txt @@ -0,0 +1,13 @@ +This configuration file is used for acceptance testing. + +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). + +This file is used as a "base config" by architecture-specific tests in the windows +and linux repositories, as well as locally as the base for universal integration tests. diff --git a/tests/platform/android/android-builtIn-testSpec.txt b/tests/platform/android/android-builtIn-testSpec.txt index 21cf6d7da..41c9819fa 100644 --- a/tests/platform/android/android-builtIn-testSpec.txt +++ b/tests/platform/android/android-builtIn-testSpec.txt @@ -1,4 +1,4 @@ -AcceptanceTests_builtIn.js +android-builtIn-testSpec.js Description: diff --git a/tests/platform/android/android-talkback-testSpec.txt b/tests/platform/android/android-talkback-testSpec.txt index 0d879734d..6dfedd6f6 100644 --- a/tests/platform/android/android-talkback-testSpec.txt +++ b/tests/platform/android/android-talkback-testSpec.txt @@ -1,4 +1,4 @@ -AcceptanceTests_talkback.js +android-talkback-testSpec.js Description: 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..cde1f656f 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,3 @@ -This config file is used for integration and acceptance tests on Android. +This config file is used for integration and acceptance tests on built-in Android solutions. -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 uses the basic local install setup in development mode. 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..2d0839230 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,3 @@ -This configuration file is used by the for acceptance test: android-talkback-testSpec.js. +This config file is used for integration and acceptance tests of Talkback 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 'talkback.json', which will report -Talkback as being installed on the system. +It uses the basic local install setup in development mode. diff --git a/tests/platform/index-linux.js b/tests/platform/index-linux.js index 7e9e9788d..7ac9baf9b 100644 --- a/tests/platform/index-linux.js +++ b/tests/platform/index-linux.js @@ -24,6 +24,5 @@ module.exports = [ "linux/linux-builtIn-testSpec.js", "linux/linux-orca-testSpec.js", "linux/linux-uioPlus-testSpec.js", - "linux/linux-dynamicDeviceReporter-testSpec.js", "linux/linux-xrandr-testSpec.js" ]; diff --git a/tests/platform/index-windows.js b/tests/platform/index-windows.js index 7857ccc73..9575717ec 100644 --- a/tests/platform/index-windows.js +++ b/tests/platform/index-windows.js @@ -27,6 +27,5 @@ module.exports = [ "windows/windows-nvda-testSpec.js", "windows/windows-maavis-testSpec.js", "windows/windows-uioPlus-testSpec.js", - "windows/windows-readWrite-testSpec.js", - "windows/windows-dynamicDeviceReporter-testSpec.js" + "windows/windows-readWrite-testSpec.js" ]; 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 deleted file mode 100644 index e7f91dca5..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.linux.builtIn", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/linux_builtIn.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.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 deleted file mode 100644 index 1880e0363..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.builtIn.config.txt +++ /dev/null @@ -1,8 +0,0 @@ -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. diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.dynamicDeviceReporter.config.json b/tests/platform/linux/configs/gpii.tests.acceptance.linux.config.json similarity index 62% rename from tests/platform/linux/configs/gpii.tests.acceptance.linux.dynamicDeviceReporter.config.json rename to tests/platform/linux/configs/gpii.tests.acceptance.linux.config.json index 54e308881..4897dbda3 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.dynamicDeviceReporter.config.json +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.config.json @@ -1,4 +1,4 @@ { - "type": "gpii.tests.acceptance.linux.dynamicDeviceReporter.config", + "type": "gpii.tests.acceptance.linux.config", "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" } diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.dynamicDeviceReporter.config.txt b/tests/platform/linux/configs/gpii.tests.acceptance.linux.config.txt similarity index 65% rename from tests/platform/linux/configs/gpii.tests.acceptance.linux.dynamicDeviceReporter.config.txt rename to tests/platform/linux/configs/gpii.tests.acceptance.linux.config.txt index c2d14dce0..7fadc5d9c 100644 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.dynamicDeviceReporter.config.txt +++ b/tests/platform/linux/configs/gpii.tests.acceptance.linux.config.txt @@ -1,4 +1,4 @@ -This configuration file is used by the acceptance test: linux-dynamicDeviceReporter-config.js. +This configuration file is used by the acceptance tests. This config makes use of dynamic device reporting, so it uses localInstall.dynamicDeviceReporter as its base config, which uses the all.development.dr.production gpii's config. 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 deleted file mode 100644 index 6c6750324..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.linux.orca.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/orca.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.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 deleted file mode 100644 index c8c82d5f0..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.orca.config.txt +++ /dev/null @@ -1,8 +0,0 @@ -This configuration file is used by the for 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. diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.uioPlus.config.json b/tests/platform/linux/configs/gpii.tests.acceptance.linux.uioPlus.config.json deleted file mode 100644 index 75c92bfc2..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.uioPlus.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.linux.uioPlus.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/uioPlus.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" -} diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.uioPlus.config.txt b/tests/platform/linux/configs/gpii.tests.acceptance.linux.uioPlus.config.txt deleted file mode 100644 index 5e4511545..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.uioPlus.config.txt +++ /dev/null @@ -1,8 +0,0 @@ -This configuration file is used for testing the browser 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 'uioPlus.json', which will report -the UIO Plus browser extension as being installed on the system. diff --git a/tests/platform/linux/configs/gpii.tests.acceptance.linux.xrandr.config.json b/tests/platform/linux/configs/gpii.tests.acceptance.linux.xrandr.config.json deleted file mode 100644 index e724d8d2e..000000000 --- a/tests/platform/linux/configs/gpii.tests.acceptance.linux.xrandr.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.linux.xrandr", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/xrandr.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" -} diff --git a/tests/platform/linux/linux-builtIn-testSpec.js b/tests/platform/linux/linux-builtIn-testSpec.js index bc97e9cbf..d7fb6b378 100644 --- a/tests/platform/linux/linux-builtIn-testSpec.js +++ b/tests/platform/linux/linux-builtIn-testSpec.js @@ -24,7 +24,7 @@ gpii.loadTestingSupport(); fluid.registerNamespace("gpii.tests.linux.builtIn"); -gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ +gpii.tests.linux.builtIn.testDefs = [ { name: "Testing os_common using default matchmaker", userToken: "os_common", @@ -60,7 +60,12 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell", "gsettings-desktop-schemas"] + } + } }, { name: "Testing os_common2 using default matchmaker", @@ -78,7 +83,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", @@ -117,7 +127,12 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell", "gsettings-desktop-schemas", "alsa"] + } + } }, { name: "Testing os_win7 using default matchmaker", @@ -153,14 +168,19 @@ gpii.tests.linux.builtIn.testDefs = fluid.freezeRecursive([ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell", "gsettings-desktop-schemas"] + } + } } -]); +]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.linux.builtIn.testDefs", - configName: "gpii.tests.acceptance.linux.builtIn.config", + configName: "gpii.tests.acceptance.linux.config", configPath: "%universal/tests/platform/linux/configs" -}, ["gpii.test.integration.testCaseHolder.linux"], +}, ["gpii.test.integration.testCaseHolder.linux", "gpii.test.integration.deviceReporterAware.linux"], module, require, __dirname); diff --git a/tests/platform/linux/linux-builtIn-testSpec.txt b/tests/platform/linux/linux-builtIn-testSpec.txt index 3e22fe2d8..99c0ee1cf 100644 --- a/tests/platform/linux/linux-builtIn-testSpec.txt +++ b/tests/platform/linux/linux-builtIn-testSpec.txt @@ -1,4 +1,4 @@ -AcceptanceTests_builtIn.js +linux-builtIn-testSpec.js Description: @@ -8,4 +8,3 @@ onscreen keyboard, etc. It tests the system using four NP sets: (2) os_win7: application specific windows settings (3) os_gnome: application specific gnome settings (4) os_common2: this is only used to check when highContrastEnabled=false - diff --git a/tests/platform/linux/linux-dynamicDeviceReporter-testSpec.js b/tests/platform/linux/linux-dynamicDeviceReporter-testSpec.js deleted file mode 100644 index ba98e4079..000000000 --- a/tests/platform/linux/linux-dynamicDeviceReporter-testSpec.js +++ /dev/null @@ -1,161 +0,0 @@ -/* -GPII Integration and Acceptance Testing - -Copyright 2014 Emergya - -Licensed under the New BSD license. You may not use this file except in -compliance with this License. - -You may obtain a copy of the License at -https://github.com/GPII/universal/blob/master/LICENSE.txt - -The research leading to these results has received funding from the European Union's -Seventh Framework Programme (FP7/2007-2013) under grant agreement no. 289016. -*/ - -"use strict"; - -var fluid = require("infusion"), - gpii = fluid.registerNamespace("gpii"); - -fluid.require("%universal"); - -gpii.loadTestingSupport(); - -fluid.registerNamespace("gpii.tests.deviceReporterAware.linux.orca"); - -gpii.tests.deviceReporterAware.linux.orca.testDefs = [ - { - name: "Testing screenreader_common using Flat matchmaker", - gradeNames: "gpii.test.integration.deviceReporterAware.linux", - userToken: "screenreader_common", - settingsHandlers: { - "gpii.orca": { - "data": [ - { - "settings": { - "sayAllStyle": 1, - "enableSpeech": true, - "enableEchoByWord": true, - "enableEchoByCharacter": false, - "voices.default.rate": 102.27272727272727, - "voices.default.gain": 7.5, - "enableTutorialMessages": false, - "voices.default.family": { - "locale": "en", - "name": "en-westindies" - }, - "verbalizePunctuationStyle": 0, - "voices.default.average-pitch": 1.5 - }, - "options": { - "user": "screenreader_common" - } - } - ] - } - }, - processes: [ - { - "command": "gsettings get org.gnome.desktop.a11y.applications screen-reader-enabled", - "expectConfigured": "true", - "expectRestored": "false" - } - ], - deviceReporters: { - "gpii.packageKit.find": { - "expectInstalled": ["orca"] - } - } - }, - { - name: "Testing screenreader_orca using Flat matchmaker", - gradeNames: "gpii.test.integration.deviceReporterAware.linux", - userToken: "screenreader_orca", - settingsHandlers: { - "gpii.orca": { - "some.app.id": [ - { - "settings": { - "sayAllStyle": 1, - "enableEchoByWord": true, - "enableEchoByCharacter": false, - "voices.default.rate": 102.27272727272727, - "voices.default.gain": 7.5, - "enableTutorialMessages": false, - "voices.default.family": { - "locale": "en", - "name": "en-westindies" - }, - "verbalizePunctuationStyle": 0, - "voices.default.average-pitch": 1.5 - }, - "options": { - "user": "screenreader_orca" - } - } - ] - } - }, - processes: [ - { - "command": "gsettings get org.gnome.desktop.a11y.applications screen-reader-enabled", - "expectConfigured": "true", - "expectRestored": "false" - } - ], - deviceReporters: { - "gpii.packageKit.find": { - "expectInstalled": ["orca"] - } - } - }, - { - name: "Testing screenreader_nvda using Flat matchmaker", - gradeNames: "gpii.test.integration.deviceReporterAware.linux", - userToken: "screenreader_nvda", - settingsHandlers: { - "gpii.orca": { - "some.app.id": [ - { - "settings": { - "sayAllStyle": 1, - "enableSpeech": true, - "enableEchoByWord": true, - "enableEchoByCharacter": false, - "voices.default.rate": 101.84090909090908, - "enableTutorialMessages": false, - "voices.default.family": { - "locale": "en", - "name": "en-westindies" - }, - "verbalizePunctuationStyle": 0 - }, - "options": { - "user": "screenreader_nvda" - } - } - ] - } - }, - processes: [ - { - "command": "gsettings get org.gnome.desktop.a11y.applications screen-reader-enabled", - "expectConfigured": "true", - "expectRestored": "false" - } - ], - deviceReporters: { - "gpii.packageKit.find": { - "expectInstalled": ["orca"] - } - } - } -]; - -module.exports = gpii.test.bootstrap({ - testDefs: "gpii.tests.deviceReporterAware.linux.orca.testDefs", - configName: "gpii.tests.acceptance.linux.dynamicDeviceReporter.config", - configPath: "%universal/tests/platform/linux/configs" -}, ["gpii.test.integration.testCaseHolder.linux", "gpii.test.integration.deviceReporterAware.linux"], - module, require, __dirname); diff --git a/tests/platform/linux/linux-dynamicDeviceReporter-testSpec.txt b/tests/platform/linux/linux-dynamicDeviceReporter-testSpec.txt deleted file mode 100644 index 979e68516..000000000 --- a/tests/platform/linux/linux-dynamicDeviceReporter-testSpec.txt +++ /dev/null @@ -1,6 +0,0 @@ -linux-dynamicDeviceReporter-testSpec.js - -Descriptions: - -This will run the acceptance tests with dynamic device reporting. -It uses 1 NP set: screenreader_common (but more will be added) diff --git a/tests/platform/linux/linux-orca-testSpec.js b/tests/platform/linux/linux-orca-testSpec.js index 1bd68faf6..d43ddddd4 100644 --- a/tests/platform/linux/linux-orca-testSpec.js +++ b/tests/platform/linux/linux-orca-testSpec.js @@ -60,7 +60,12 @@ gpii.tests.linux.orca.testDefs = [ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["orca"] + } + } }, { name: "Testing screenreader_orca using Flat matchmaker", @@ -96,7 +101,12 @@ gpii.tests.linux.orca.testDefs = [ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["orca"] + } + } }, { name: "Testing screenreader_nvda using Flat matchmaker", @@ -131,13 +141,18 @@ gpii.tests.linux.orca.testDefs = [ "expectConfigured": "true", "expectRestored": "false" } - ] + ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["orca"] + } + } } ]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.linux.orca.testDefs", - configName: "gpii.tests.acceptance.linux.orca.config", + configName: "gpii.tests.acceptance.linux.config", configPath: "%universal/tests/platform/linux/configs" -}, ["gpii.test.integration.testCaseHolder.linux"], +}, ["gpii.test.integration.testCaseHolder.linux", "gpii.test.integration.deviceReporterAware.linux"], module, require, __dirname); diff --git a/tests/platform/linux/linux-orca.testSpec.txt b/tests/platform/linux/linux-orca-testSpec.txt similarity index 87% rename from tests/platform/linux/linux-orca.testSpec.txt rename to tests/platform/linux/linux-orca-testSpec.txt index cb1aa3cbd..d8282b2d7 100644 --- a/tests/platform/linux/linux-orca.testSpec.txt +++ b/tests/platform/linux/linux-orca-testSpec.txt @@ -1,4 +1,4 @@ -AcceptanceTests_orca.js +linux-orca-testSpec.js Descriptions: diff --git a/tests/platform/linux/linux-uioPlus-testSpec.js b/tests/platform/linux/linux-uioPlus-testSpec.js index 3b03700d0..cccb77885 100644 --- a/tests/platform/linux/linux-uioPlus-testSpec.js +++ b/tests/platform/linux/linux-uioPlus-testSpec.js @@ -24,9 +24,19 @@ require("../shared/uioPlusTestDefs.js"); gpii.loadTestingSupport(); +var deviceReporterMock = { + "gpii.packageKit.find": { + "expectInstalled": [] + } +}; + +fluid.transform(gpii.tests.uioPlus.testDefs, function (testDef) { + fluid.set(testDef, "deviceReporters", deviceReporterMock); +}); + module.exports = gpii.test.bootstrap({ - testDefs: "gpii.tests.uioPlus.testDefs", - configName: "gpii.tests.acceptance.linux.uioPlus.config", + testDefs: "gpii.tests.uioPlus.testDefs", + configName: "gpii.tests.acceptance.linux.config", configPath: "%universal/tests/platform/linux/configs" -}, ["gpii.test.integration.testCaseHolder.linux"], +}, ["gpii.test.integration.testCaseHolder.linux", "gpii.test.integration.deviceReporterAware.linux"], module, require, __dirname); diff --git a/tests/platform/linux/linux-xrandr-testSpec.js b/tests/platform/linux/linux-xrandr-testSpec.js index 06ea7b4b8..395753065 100644 --- a/tests/platform/linux/linux-xrandr-testSpec.js +++ b/tests/platform/linux/linux-xrandr-testSpec.js @@ -43,14 +43,18 @@ gpii.tests.acceptance.linux.xrandr.testDefs = fluid.freezeRecursive([ }] } }, - processes: [] + processes: [], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["libXrandr"] + } + } } ]); module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.acceptance.linux.xrandr.testDefs", - configName: "gpii.tests.acceptance.linux.xrandr.config", + configName: "gpii.tests.acceptance.linux.config", configPath: "%universal/tests/platform/linux/configs" -}, ["gpii.test.integration.testCaseHolder.linux"], +}, ["gpii.test.integration.testCaseHolder.linux", "gpii.test.integration.deviceReporterAware.linux"], module, require, __dirname); - diff --git a/tests/platform/linux/linux-xrandr-testSpec.txt b/tests/platform/linux/linux-xrandr-testSpec.txt index 981cdae8d..743af9e1a 100644 --- a/tests/platform/linux/linux-xrandr-testSpec.txt +++ b/tests/platform/linux/linux-xrandr-testSpec.txt @@ -1,8 +1,7 @@ -AcceptanceTests_xrandr.js +linux-xrandr-testSpec.js Description: This tests the functionality of GNOME/Linux XRandR bridge, or the linux display settings handler. It tests the system using one NP set: (1) os_gnome_display: application specific gnome settings. - 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 deleted file mode 100644 index 064856ecb..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.windows.builtIn.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/win7_builtIn.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.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 deleted file mode 100644 index 91d923402..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.builtIn.config.txt +++ /dev/null @@ -1,5 +0,0 @@ -This configuration file is used by the for 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 diff --git a/tests/platform/windows/configs/windows-dynamicDeviceReporter-config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.config.json similarity index 69% rename from tests/platform/windows/configs/windows-dynamicDeviceReporter-config.json rename to tests/platform/windows/configs/gpii.tests.acceptance.windows.config.json index e80c64152..0ea558674 100644 --- a/tests/platform/windows/configs/windows-dynamicDeviceReporter-config.json +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.config.json @@ -1,5 +1,5 @@ { - "type": "acceptanceTests.windows.dynamicDeviceReporter", + "type": "gpii.tests.acceptance.windows.config", "mergeConfigs": [ "%universal/tests/configs/gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" ] diff --git a/tests/platform/windows/configs/windows-dynamicDeviceReporter-config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.config.txt similarity index 65% rename from tests/platform/windows/configs/windows-dynamicDeviceReporter-config.txt rename to tests/platform/windows/configs/gpii.tests.acceptance.windows.config.txt index 4c8de6355..75d257e1e 100644 --- a/tests/platform/windows/configs/windows-dynamicDeviceReporter-config.txt +++ b/tests/platform/windows/configs/gpii.tests.acceptance.windows.config.txt @@ -1,4 +1,4 @@ -This configuration file is used by the acceptance test: windows-dynamicDeviceReporter-config.js. +This configuration file is used by the acceptance tests. This config makes use of dynamic device reporting, so it uses localInstallWithDynamicDeviceReporter as its base config, which uses the all.development.dr.production gpii's config. 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 deleted file mode 100644 index 668c38354..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.jaws.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.windows.jaws.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/jaws.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" -} 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 deleted file mode 100644 index fa57ba860..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.maavis.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.windows.maavis.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/maavis.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" -} 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 deleted file mode 100644 index 66501749c..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.windows.nvda.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/nvda.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.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 deleted file mode 100644 index 6029932aa..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.nvda.config.txt +++ /dev/null @@ -1,5 +0,0 @@ -This configuration file is used by the for 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 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 deleted file mode 100644 index b8dd7c7ba..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.windows.readWrite.config", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/readWrite.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.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 deleted file mode 100644 index 24f6bd073..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.readWrite.config.txt +++ /dev/null @@ -1,5 +0,0 @@ -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). - -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/configs/gpii.tests.acceptance.windows.uioPlus.config.json b/tests/platform/windows/configs/gpii.tests.acceptance.windows.uioPlus.config.json deleted file mode 100644 index 47ffbbc6a..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.uioPlus.config.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "type": "gpii.tests.acceptance.windows.uioPlus", - "options": { - "distributeOptions": { - "acceptance.installedSolutionsPath": { - "record": "%universal/testData/deviceReporter/acceptanceTests/uioPlus.json", - "target": "{that deviceReporter installedSolutionsDataSource}.options.path", - "priority": "after:development.installedSolutionsPath" - } - } - }, - "mergeConfigs": "%universal/tests/configs/gpii.tests.acceptance.localInstall.config.json" -} diff --git a/tests/platform/windows/configs/gpii.tests.acceptance.windows.uioPlus.config.txt b/tests/platform/windows/configs/gpii.tests.acceptance.windows.uioPlus.config.txt deleted file mode 100644 index 1ca2942b6..000000000 --- a/tests/platform/windows/configs/gpii.tests.acceptance.windows.uioPlus.config.txt +++ /dev/null @@ -1,8 +0,0 @@ -This configuration file is used for testing the browser 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 'uioPlus.json', which will report -the UIO Plus extension 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 a360d8436..cc754c6c9 100644 --- a/tests/platform/windows/windows-builtIn-testSpec.js +++ b/tests/platform/windows/windows-builtIn-testSpec.js @@ -228,7 +228,12 @@ gpii.tests.windows.builtIn = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [] + } + } }, { name: "Testing os_common using default matchmaker", userToken: "os_common", @@ -390,7 +395,12 @@ gpii.tests.windows.builtIn = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [] + } + } }, { name: "Testing os_gnome using default matchmaker", userToken: "os_gnome", @@ -457,13 +467,18 @@ gpii.tests.windows.builtIn = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [] + } + } } ]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.windows.builtIn", - configName: "gpii.tests.acceptance.windows.builtIn.config", + configName: "gpii.tests.acceptance.windows.config", configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows"], +}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], module, require, __dirname); diff --git a/tests/platform/windows/windows-dynamicDeviceReporter-testSpec.js b/tests/platform/windows/windows-dynamicDeviceReporter-testSpec.js deleted file mode 100644 index a2a11bb3c..000000000 --- a/tests/platform/windows/windows-dynamicDeviceReporter-testSpec.js +++ /dev/null @@ -1,108 +0,0 @@ -/* -GPII Integration and Acceptance Testing - -Copyright 2015 Raising The Floor US - -Licensed under the New BSD license. You may not use this file except in -compliance with this License. - -You may obtain a copy of the License at -https://github.com/GPII/universal/blob/master/LICENSE.txt - -The research leading to these results has received funding from the European Union's -Seventh Framework Programme (FP7/2007-2013) under grant agreement no. 289016. -*/ - -"use strict"; - -var fluid = require("infusion"), - gpii = fluid.registerNamespace("gpii"); - -fluid.require("%universal"); - -gpii.loadTestingSupport(); - -fluid.registerNamespace("gpii.tests.deviceReporterAware.windows"); - -gpii.tests.deviceReporterAware.windows = [ - { - name: "Testing screenreader_nvda using Flat matchmaker", - userToken: "screenreader_nvda", - gradeNames: "gpii.test.integration.deviceReporterAware.windows", - settingsHandlers: { - "gpii.settingsHandlers.INISettingsHandler": { - "data": [ - { - "settings": { - "speech.espeak.rate": 17, - "speech.espeak.volume": 80, - "speech.espeak.pitch": 60, - "speech.espeak.rateBoost": true, - "speech.synth": "espeak", - "speech.outputDevice": "Microsoft Sound Mapper", - "speech.symbolLevel": 300, - "speech.espeak.voice": "en\\en-wi", - "reviewCursor.followFocus": false, - "reviewCursor.followCaret": true, - "reviewCursor.followMouse": true, - "keyboard.speakTypedWords": true, - "keyboard.speakTypedCharacters": false, - "presentation.reportHelpBalloons": false, - "speech.espeak.sayCapForCapitals": true - }, - "options": { - "filename": "${{environment}.APPDATA}\\nvda\\nvda.ini", - "allowNumberSignComments": true, - "allowSubSections": true - } - } - ] - } - }, - processes: [ - { - "command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C", - "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 readwritegold_application1 using Flat matchmaker", - userToken: "readwritegold_application1", - gradeNames: "gpii.test.integration.deviceReporterAware.windows", - settingsHandlers: {}, - processes: [ - { - "command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq ReadAndWrite.exe\" | find /I \"ReadAndWrite.exe\" /C", - "expectConfigured": "1", - "expectRestored": "0" - } - ], - deviceReporters: { - "gpii.deviceReporter.registryKeyExists": { - "expectInstalled": [{ - "hKey": "HKEY_CURRENT_USER", - "path": "Software\\Texthelp\\Read&Write11", - "subPath": "InstallPath" - }] - } - } - } -]; - -module.exports = gpii.test.bootstrap({ - testDefs: "gpii.tests.deviceReporterAware.windows", - configName: "windows-dynamicDeviceReporter-config", - configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], - module, require, __dirname); diff --git a/tests/platform/windows/windows-dynamicDeviceReporter-testSpec.txt b/tests/platform/windows/windows-dynamicDeviceReporter-testSpec.txt deleted file mode 100644 index d608eca72..000000000 --- a/tests/platform/windows/windows-dynamicDeviceReporter-testSpec.txt +++ /dev/null @@ -1,16 +0,0 @@ -windows-dynamicDeviceReporter-testSpec.js - -Descriptions: - -This will run the acceptance tests with dynamic device reporting. -It uses 2 NP sets: screenreader_nvda and readwritegold_application1. - -Due to some current limitations/issues with the current flat matchmaker, JAWS -should not be installed, and sociable should not be listed as installed, because -they will both attempt to launch with an NVDA NP. - -Requirements: -* NVDA installed -* Read and Write Gold not installed - -To run these tests, you need to have NVDA INSTALLED. NVDA is free and can be downloaded from: http://www.nvaccess.org/download/ diff --git a/tests/platform/windows/windows-jaws-testSpec.js b/tests/platform/windows/windows-jaws-testSpec.js index 33b4cf4cc..8787dc90c 100644 --- a/tests/platform/windows/windows-jaws-testSpec.js +++ b/tests/platform/windows/windows-jaws-testSpec.js @@ -93,7 +93,16 @@ gpii.tests.windows.jaws = [ "expectRestored": "0", "maxTimeouts": "40" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JAWS17.exe", + "subPath": "" + }] + } + } }, { name: "Testing NP set \"jaws_common\" using Flat matchmaker", @@ -163,7 +172,16 @@ gpii.tests.windows.jaws = [ "expectRestored": "0", "maxTimeouts": "40" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JAWS17.exe", + "subPath": "" + }] + } + } }, { name: "Testing NP set \"jaws_common2\" using Flat matchmaker", @@ -232,7 +250,16 @@ gpii.tests.windows.jaws = [ "expectRestored": "0", "maxTimeouts": "40" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JAWS17.exe", + "subPath": "" + }] + } + } }, { name: "Testing NP set \"jaws_common3\" using Flat matchmaker", @@ -302,13 +329,22 @@ gpii.tests.windows.jaws = [ "expectRestored": "0", "maxTimeouts": "40" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_LOCAL_MACHINE", + "path": "Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\JAWS17.exe", + "subPath": "" + }] + } + } } ]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.windows.jaws", - configName: "gpii.tests.acceptance.windows.jaws.config", + configName: "gpii.tests.acceptance.windows.config", configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows"], +}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], module, require, __dirname); diff --git a/tests/platform/windows/windows-maavis-testSpec.js b/tests/platform/windows/windows-maavis-testSpec.js index 313bd6abf..b8d53cef8 100644 --- a/tests/platform/windows/windows-maavis-testSpec.js +++ b/tests/platform/windows/windows-maavis-testSpec.js @@ -51,7 +51,12 @@ gpii.tests.windows.maavis = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [] + } + } }, { name: "Testing maavis_selfvoicing using Flat matchmaker", userToken: "maavis_selfvoicing", @@ -78,13 +83,18 @@ gpii.tests.windows.maavis = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [] + } + } } ]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.windows.maavis", - configName: "gpii.tests.acceptance.windows.maavis.config", + configName: "gpii.tests.acceptance.windows.config", configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows"], +}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], module, require, __dirname); diff --git a/tests/platform/windows/windows-nvda-testSpec.js b/tests/platform/windows/windows-nvda-testSpec.js index f09388034..2f9d25111 100644 --- a/tests/platform/windows/windows-nvda-testSpec.js +++ b/tests/platform/windows/windows-nvda-testSpec.js @@ -64,7 +64,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", @@ -102,7 +111,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", @@ -134,13 +152,22 @@ 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": "" + }] + } + } } ]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.windows.nvda", - configName: "gpii.tests.acceptance.windows.nvda.config", + configName: "gpii.tests.acceptance.windows.config", configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows"], +}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], module, require, __dirname); diff --git a/tests/platform/windows/windows-readWrite-testSpec.js b/tests/platform/windows/windows-readWrite-testSpec.js index 6b90bd2b0..8dca8a52a 100644 --- a/tests/platform/windows/windows-readWrite-testSpec.js +++ b/tests/platform/windows/windows-readWrite-testSpec.js @@ -64,7 +64,16 @@ gpii.tests.windows.readWrite = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_CURRENT_USER", + "path": "Software\\Texthelp\\Read&Write11", + "subPath": "InstallPath" + }] + } + } }, { name: "Testing rwg2", userToken: "rwg2", @@ -109,13 +118,22 @@ gpii.tests.windows.readWrite = [ "expectConfigured": "1", "expectRestored": "0" } - ] + ], + deviceReporters: { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [{ + "hKey": "HKEY_CURRENT_USER", + "path": "Software\\Texthelp\\Read&Write11", + "subPath": "InstallPath" + }] + } + } } ]; module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.windows.readWrite", - configName: "gpii.tests.acceptance.windows.readWrite.config", + configName: "gpii.tests.acceptance.windows.config", configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows"], +}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], module, require, __dirname); diff --git a/tests/platform/windows/windows-uioPlus-testSpec.js b/tests/platform/windows/windows-uioPlus-testSpec.js index 9fa24af7a..c9735875e 100644 --- a/tests/platform/windows/windows-uioPlus-testSpec.js +++ b/tests/platform/windows/windows-uioPlus-testSpec.js @@ -24,9 +24,19 @@ require("../shared/uioPlusTestDefs.js"); gpii.loadTestingSupport(); +var deviceReporterMock = { + "gpii.deviceReporter.registryKeyExists": { + "expectInstalled": [] + } +}; + +fluid.transform(gpii.tests.uioPlus.testDefs, function (testDef) { + fluid.set(testDef, "deviceReporters", deviceReporterMock); +}); + module.exports = gpii.test.bootstrap({ testDefs: "gpii.tests.uioPlus.testDefs", - configName: "gpii.tests.acceptance.windows.uioPlus.config", + configName: "gpii.tests.acceptance.windows.config", configPath: "%universal/tests/platform/windows/configs" -}, ["gpii.test.integration.testCaseHolder.windows"], +}, ["gpii.test.integration.testCaseHolder.windows", "gpii.test.integration.deviceReporterAware.windows"], module, require, __dirname); diff --git a/tests/shared/ContextIntegrationTestDefs.js b/tests/shared/ContextIntegrationTestDefs.js index 4706f436c..998238176 100644 --- a/tests/shared/ContextIntegrationTestDefs.js +++ b/tests/shared/ContextIntegrationTestDefs.js @@ -370,8 +370,14 @@ gpii.tests.contextIntegration.fixtures = [ fluid.defaults("gpii.tests.contextIntegration.testCaseHolder.common.linux", { gradeNames: [ "gpii.test.integration.testCaseHolder.linux", + "gpii.test.integration.deviceReporterAware.linux", "gpii.tests.contextIntegration.testCaseHolder" ], + deviceReporters: { + "gpii.packageKit.find": { + "expectInstalled": ["gnome-shell", "gsettings-desktop-schemas", "alsa"] + } + }, userToken: "context1", contexts: gpii.tests.contextIntegration.data.contexts });