diff --git a/testData/deviceReporter/acceptanceTests/kurzweil.JSON b/testData/deviceReporter/acceptanceTests/kurzweil.JSON new file mode 100644 index 000000000..7cd4d5da8 --- /dev/null +++ b/testData/deviceReporter/acceptanceTests/kurzweil.JSON @@ -0,0 +1,3 @@ +[ + { "id": "com.kesi.kurzweil" } +] diff --git a/testData/deviceReporter/installedSolutions.json b/testData/deviceReporter/installedSolutions.json index efd67070b..a5bd01cc3 100644 --- a/testData/deviceReporter/installedSolutions.json +++ b/testData/deviceReporter/installedSolutions.json @@ -1,4 +1,8 @@ [ + { + "id": "com.kesi.kurzweil" + }, + { "id": "org.gnome.desktop.interface" }, diff --git a/testData/preferences/acceptanceTests/kurzweil_application.json b/testData/preferences/acceptanceTests/kurzweil_application.json new file mode 100644 index 000000000..ae542f87d --- /dev/null +++ b/testData/preferences/acceptanceTests/kurzweil_application.json @@ -0,0 +1,18 @@ +{ + "flat": { + "contexts": { + "gpii-default": { + "name": "Default preferences", + "preferences": { + "http://registry.gpii.net/applications/com.kesi.kurzweil": { + "View.MyZoomValue": 200, + "Speech.EnglishReadingSpeed": 100, + "Speech.EnglishReadingVolume": 100, + "Fonts.FontSize": 20, + "Fonts.FontName": "Times New Roman" + } + } + } + } + } +} diff --git a/testData/preferences/acceptanceTests/kurzweil_common.JSON b/testData/preferences/acceptanceTests/kurzweil_common.JSON new file mode 100644 index 000000000..959330de2 --- /dev/null +++ b/testData/preferences/acceptanceTests/kurzweil_common.JSON @@ -0,0 +1,16 @@ +{ + "flat": { + "contexts": { + "gpii-default": { + "name": "Default preferences", + "preferences": { + "http://registry.gpii.net/common/magnification": 200, + "http://registry.gpii.net/common/speechRate": 100, + "http://registry.gpii.net/common/volume": 100, + "http://registry.gpii.net/common/fontSize": 20, + "http://registry.gpii.net/common/fontFaceFontName": "Times New Roman" + } + } + } + } +} \ No newline at end of file diff --git a/testData/preferences/kurzweil_application.json b/testData/preferences/kurzweil_application.json new file mode 100644 index 000000000..ae542f87d --- /dev/null +++ b/testData/preferences/kurzweil_application.json @@ -0,0 +1,18 @@ +{ + "flat": { + "contexts": { + "gpii-default": { + "name": "Default preferences", + "preferences": { + "http://registry.gpii.net/applications/com.kesi.kurzweil": { + "View.MyZoomValue": 200, + "Speech.EnglishReadingSpeed": 100, + "Speech.EnglishReadingVolume": 100, + "Fonts.FontSize": 20, + "Fonts.FontName": "Times New Roman" + } + } + } + } + } +} diff --git a/testData/preferences/kurzweil_common.json b/testData/preferences/kurzweil_common.json new file mode 100644 index 000000000..959330de2 --- /dev/null +++ b/testData/preferences/kurzweil_common.json @@ -0,0 +1,16 @@ +{ + "flat": { + "contexts": { + "gpii-default": { + "name": "Default preferences", + "preferences": { + "http://registry.gpii.net/common/magnification": 200, + "http://registry.gpii.net/common/speechRate": 100, + "http://registry.gpii.net/common/volume": 100, + "http://registry.gpii.net/common/fontSize": 20, + "http://registry.gpii.net/common/fontFaceFontName": "Times New Roman" + } + } + } + } +} \ No newline at end of file diff --git a/testData/solutions/kurzweil.json b/testData/solutions/kurzweil.json new file mode 100644 index 000000000..5e753e356 --- /dev/null +++ b/testData/solutions/kurzweil.json @@ -0,0 +1,53 @@ +{ + "com.kesi.kurzweil": { + "name": "Kurzweil 3000", + "contexts": { + "OS": [ + { + "id": "win32" + } + ] + }, + "settingsHandlers": { + "configuration": { + "type": "gpii.settingsHandlers.INISettingsHandler", + "options": { + "filename": "${{environment}.APPDATA}\\KESI\\Kurzweil 3000\\gpii\\K3000Settings.k3s" + }, + "capabilities": [ + "applications.com\\.kesi\\.kurzweil.id", + "display.screenReader.speechRate", + "display.screenEnhancement.magnification", + "-provisional-general.-provisional-volume", + "display.screenEnhancement.fontSize", + "display.screenEnhancement.fontFaceFontName" + ], + "capabilitiesTransformations": { + "View\\.MyZoomValue": "http://registry\\.gpii\\.net/common/magnification", + "Speech\\.EnglishReadingSpeed": "http://registry\\.gpii\\.net/common/speechRate", + "Speech\\.EnglishReadingVolume": "http://registry\\.gpii\\.net/common/volume", + "Fonts\\.FontSize": "http://registry\\.gpii\\.net/common/fontSize", + "Fonts\\.FontName": "http://registry\\.gpii\\.net/common/fontFaceFontName" + } + } + }, + "configure": [ + "settings.configuration" + ], + "restore": [ + "settings.configuration" + ], + "start": [ + { + "type": "gpii.launch.exec", + "command": "\"${{registry}.HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Kurzweil 3000.exe\\}\"" + } + ], + "stop": [ + { + "type": "gpii.windows.killProcessByName", + "filename": "Kurzweil 3000.exe" + } + ] + } +} \ No newline at end of file diff --git a/testData/solutions/win32.json b/testData/solutions/win32.json index 92d5ad94f..2c226da73 100644 --- a/testData/solutions/win32.json +++ b/testData/solutions/win32.json @@ -1,4 +1,56 @@ { + "com.kesi.kurzweil": { + "name": "Kurzweil 3000", + "contexts": { + "OS": [ + { + "id": "win32" + } + ] + }, + "settingsHandlers": { + "configuration": { + "type": "gpii.settingsHandlers.INISettingsHandler", + "options": { + "filename": "${{environment}.APPDATA}\\KESI\\Kurzweil 3000\\gpii\\K3000Settings.k3s" + }, + "capabilities": [ + "applications.com\\.kesi\\.kurzweil.id", + "display.screenReader.speechRate", + "display.screenEnhancement.magnification", + "-provisional-general.-provisional-volume", + "display.screenEnhancement.fontSize", + "display.screenEnhancement.fontFaceFontName" + ], + "capabilitiesTransformations": { + "View\\.MyZoomValue": "http://registry\\.gpii\\.net/common/magnification", + "Speech\\.EnglishReadingSpeed": "http://registry\\.gpii\\.net/common/speechRate", + "Speech\\.EnglishReadingVolume": "http://registry\\.gpii\\.net/common/volume", + "Fonts\\.FontSize": "http://registry\\.gpii\\.net/common/fontSize", + "Fonts\\.FontName": "http://registry\\.gpii\\.net/common/fontFaceFontName" + } + } + }, + "configure": [ + "settings.configuration" + ], + "restore": [ + "settings.configuration" + ], + "start": [ + { + "type": "gpii.launch.exec", + "command": "\"${{registry}.HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\Kurzweil 3000.exe\\}\"" + } + ], + "stop": [ + { + "type": "gpii.windows.killProcessByName", + "filename": "Kurzweil 3000.exe" + } + ] + }, + "com.freedomscientific.jaws": { "name": "JAWS", "contexts": { diff --git a/tests/platform/index-windows.js b/tests/platform/index-windows.js index ae16bdfa3..becf72ce3 100644 --- a/tests/platform/index-windows.js +++ b/tests/platform/index-windows.js @@ -25,5 +25,6 @@ module.exports = [ "windows/windows-nvda-testSpec.js", "windows/windows-maavis-testSpec.js", "windows/windows-chrome-testSpec.js", - "windows/windows-dynamicDeviceReporter-testSpec.js" + "windows/windows-dynamicDeviceReporter-testSpec.js", + "windows/windows-kurzweil-testSpec.js" ]; diff --git a/tests/platform/windows/configs/windows-kurzweil-config.JSON b/tests/platform/windows/configs/windows-kurzweil-config.JSON new file mode 100644 index 000000000..637d5bac1 --- /dev/null +++ b/tests/platform/windows/configs/windows-kurzweil-config.JSON @@ -0,0 +1,21 @@ +{ + "typeName": "acceptanceTests.windows.kurzweil", + "options": { + "components": { + "server": { + "options": { + "components": { + "deviceReporter": { + "options": { + "installedSolutionsUrl": "file://%root/../../../testData/deviceReporter/acceptanceTests/kurzweil.json" + } + } + } + } + } + } + }, + "includes": [ + "${universal}/tests/configs/localInstall.json" + ] +} diff --git a/tests/platform/windows/windows-kurzweil-testSpec.js b/tests/platform/windows/windows-kurzweil-testSpec.js new file mode 100644 index 000000000..55462a2e5 --- /dev/null +++ b/tests/platform/windows/windows-kurzweil-testSpec.js @@ -0,0 +1,93 @@ +/* + +GPII Acceptance Testing + +Copyright 2014 Raising the Floor International + +Licensed under the New BSD license. You may not use this file except in +compliance with this License. + +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. + +You may obtain a copy of the License at +https://github.com/GPII/universal/blob/master/LICENSE.txt +*/ + + +"use strict"; +var fluid = require("universal"), + gpii = fluid.registerNamespace("gpii"); + +gpii.loadTestingSupport(); + +fluid.registerNamespace("gpii.tests.windows"); + +gpii.tests.windows.kurzweil = [ + { + name: "Testing NP set \"kurzweil_application\" using Flat matchmaker", + userToken: "kurzweil_application", + settingsHandlers: { + "gpii.settingsHandlers.INISettingsHandler": { + "some.app.id": [ + { + "settings": { + "View.MyZoomValue": 200, + "Speech.EnglishReadingSpeed": 100, + "Speech.EnglishReadingVolume": 100, + "Fonts.FontSize": 20, + "Fonts.FontName": "Times New Roman" + }, + "options": { + "filename": "${{environment}.APPDATA}\\KESI\\Kurzweil 3000\\gpii\\K3000Settings.k3s" + } + } + ] + } + }, + processes: [ + { + "command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq Kurzweil 3000.exe\" | find /I \"Kurzweil 3000.exe\" /C", + "expectConfigured": "1", + "expectRestored": "0" + } + ] + }, + + { + name: "Testing NP set \"kurzweil_common\" using Flat matchmaker", + userToken: "kurzweil_common", + settingsHandlers: { + "gpii.settingsHandlers.INISettingsHandler": { + "some.app.id": [ + { + "settings": { + "View.MyZoomValue": 200, + "Speech.EnglishReadingSpeed": 100, + "Speech.EnglishReadingVolume": 100, + "Fonts.FontSize": 20, + "Fonts.FontName": "Times New Roman" + }, + "options": { + "filename": "${{environment}.APPDATA}\\KESI\\Kurzweil 3000\\gpii\\K3000Settings.k3s" + } + } + ] + } + }, + processes: [ + { + "command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq Kurzweil 3000.exe\" | find /I \"Kurzweil 3000.exe\" /C", + "expectConfigured": "1", + "expectRestored": "0" + } + ] + } +]; + +module.exports = gpii.test.bootstrap({ + testDefs: "gpii.tests.windows.kurzweil", + configName: "windows-kurzweil-config", + configPath: "configs" +}, ["gpii.test.integration.testCaseHolder.windows"], + module, require, __dirname); diff --git a/tests/platform/windows/windows-kurzweil-testSpec.txt b/tests/platform/windows/windows-kurzweil-testSpec.txt new file mode 100644 index 000000000..b6641358d --- /dev/null +++ b/tests/platform/windows/windows-kurzweil-testSpec.txt @@ -0,0 +1,10 @@ +windows-kurzweil-testSpec.js + +Descriptions: +This will run the acceptance tests for Kurzweil 3000 (KESI). It uses 2 NP sets: kurzweil_common.json and kurzweil_application.json + +Prerequisites: +* Kurzweil 3000 needs to be installed +* Need to set up username "gpii" for Kurzweil(incomplete) +* The name "gpii" is required for Kurzweil's settings folder +