diff --git a/testData/deviceReporter/acceptanceTests/windows_firefox.json b/testData/deviceReporter/acceptanceTests/windows_firefox.json new file mode 100644 index 000000000..6d3bdaffa --- /dev/null +++ b/testData/deviceReporter/acceptanceTests/windows_firefox.json @@ -0,0 +1,5 @@ +[ + { + "id": "org.mozilla.cloud4firefox" + } +] diff --git a/testData/deviceReporter/installedSolutions.json b/testData/deviceReporter/installedSolutions.json index 74fce21b4..1c75367b9 100644 --- a/testData/deviceReporter/installedSolutions.json +++ b/testData/deviceReporter/installedSolutions.json @@ -103,6 +103,10 @@ "id": "org.chrome.cloud4chrome" }, + { + "id": "org.mozilla.cloud4firefox" + }, + { "id": "com.android.settings.secure" }, diff --git a/testData/preferences/firefox.json b/testData/preferences/firefox.json new file mode 100644 index 000000000..83a5bea34 --- /dev/null +++ b/testData/preferences/firefox.json @@ -0,0 +1,23 @@ +{ + "flat": { + "contexts": { + "gpii-default": { + "name": "Default preferences", + "preferences": { + "http://registry.gpii.net/applications/org.mozilla.cloud4firefox": { + "screenReaderTTSEnabled": false, + "highContrastEnabled": true, + "invertColours": false, + "magnifierEnabled": true, + "magnification": 1, + "fontSize": "L", + "simplifier": false, + "lineheight": 3, + "backgroundColour": "#000000", + "foregroundColour": "#FFFF00" + } + } + } + } + } +} \ No newline at end of file diff --git a/testData/solutions/solutionsDescription/org_mozilla_cloud4firefox.md b/testData/solutions/solutionsDescription/org_mozilla_cloud4firefox.md new file mode 100644 index 000000000..faf1882b0 --- /dev/null +++ b/testData/solutions/solutionsDescription/org_mozilla_cloud4firefox.md @@ -0,0 +1,36 @@ +# Cloud4Firefox + +## Details + +* __Name__: cloud4Firefox +* __Id__: org.mozilla.cloud4firefox +* __Platform__: Web +* __Contact__: José Antonio Gutiérrez Dueñas + +## Description +The Firefox extension for Firefox is a component installable in the web browser. This extension establishes a connection with GPII to get the active preferences. These preferences are used, by the extension, to adapt the web browser content, I mean, the web site interfaces. + +Useful links: + + * [Firefox extensions developer](https://developer.mozilla.org/en-US/Add-ons) + * [Source code at github.com](https://github.com/GutiX/firefox4cloud) + +## Integration +To install the Firefox extension, make the following steps. + + * Download the zip file from https://github.com/GutiX/firefox4cloud/archive/master.zip + * Extract the zip file in a folder of your choice. In the project root folder should be a xpi file called "cloud4firefox.xpi". + * In the extension section of the Firefox browser (Menu->Add-ons->extensions), click on the ‘settings’ icon in the upper right corner and select the option "Install add-on from File...". + * Select the "cloud4firefox.xpi" file that you unzipped in step 2 + + +## Testing +When using a NP set that makes use of the cloud4firefox extension, the Firefox browser should be launched and configured properly by taking into account the settings included in that NP set. +One user profiles with a set of Needs & Preferences have been provided in order to properly perform the tests. +These user profiles have as follows: + +### Firefox +NP set located at universal's testData/preferences/firefox1.json + + * When logging in, Firefox browser should be started automatically and you should see the magnification theme. + * When logging out, default settings will be restored. diff --git a/testData/solutions/win32.json b/testData/solutions/win32.json index 035159da3..be291fc0d 100644 --- a/testData/solutions/win32.json +++ b/testData/solutions/win32.json @@ -1318,5 +1318,91 @@ "restoreSettings" ] } + + }, + + "org.mozilla.cloud4firefox": { + "name": "Cloud4all firefox extension", + "contexts": { + "OS": [{ + "id": "win32", + "version": ">=5.0" + }] + }, + "settingsHandlers": [ + { + "type": "gpii.settingsHandlers.webSockets", + "options": { + "path": "org.mozilla.cloud4firefox" + }, + "capabilities": [ + "applications.org\\.mozilla\\.cloud4firefox.id" + ], + "capabilitiesTransformations": { + "screenReaderTTSEnabled":"http://registry\\.gpii\\.net/common/screenReaderTTSEnabled", + "magnifierEnabled": "http://registry\\.gpii\\.net/common/magnifierEnabled", + "magnification": "http://registry\\.gpii\\.net/common/magnification", + "fontSize": { + "transform":{ + "type":"gpii.transformer.quantize", + "inputPath":"http://registry\\.gpii\\.net/common/fontSize", + "ranges":[ + { + "upperBound":14, + "output":"M" + }, + { + "upperBound":24, + "output":"L" + }, + { + "output":"XL" + } + ] + } + }, + "backgroundColour": { + "transform": { + "type": "fluid.transforms.valueMapper", + "inputPath": "http://registry\\.gpii\\.net/common/highContrastTheme", + "options": { + "white-black": "#000000", + "black-white": "#FFFFFF", + "yellow-black": "#000000", + "black-yellow": "#FFFF00" + } + } + }, + "foregroundColour": { + "transform": { + "type": "fluid.transforms.valueMapper", + "inputPath": "http://registry\\.gpii\\.net/common/highContrastTheme", + "options": { + "white-black": "#FFFFFF", + "black-white": "#000000", + "yellow-black": "#FFFF00", + "black-yellow": "#000000" + } + } + }, + + "highContrastEnabled": "http://registry\\.gpii\\.net/common/highContrastEnabled", + "invertColours": "http://registry\\.gpii\\.net/common/invertColours", + "tracking":"display.screenEnhancement.tracking" + } + } + ], + "lifecycleManager" : { + "start": [ + "setSettings", + { + "type": "gpii.launch.exec", + "command": "\"${{registry}.HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\\firefox.exe\\}\" http://wiki.gpii.net/" + } + ], + "stop": [ + "restoreSettings" + ] + } } } diff --git a/tests/platform/index-windows.js b/tests/platform/index-windows.js index 964bcfa6b..708013b67 100644 --- a/tests/platform/index-windows.js +++ b/tests/platform/index-windows.js @@ -23,5 +23,6 @@ module.exports = [ "windows/windows-builtIn-testSpec.js", "windows/windows-jaws-testSpec.js", "windows/windows-nvda-testSpec.js", - "windows/windows-maavis-testSpec.js" + "windows/windows-maavis-testSpec.js", + "windows/windows-firefox-testSpec.js" ]; \ No newline at end of file diff --git a/tests/platform/windows/configs/windows-firefox-config.json b/tests/platform/windows/configs/windows-firefox-config.json new file mode 100644 index 000000000..b370c6af8 --- /dev/null +++ b/tests/platform/windows/configs/windows-firefox-config.json @@ -0,0 +1,21 @@ +{ + "typeName": "acceptanceTests.windows.firefox", + "options": { + "components": { + "server": { + "options": { + "components": { + "deviceReporter": { + "options": { + "installedSolutionsUrl": "file://%root/../../../testData/deviceReporter/acceptanceTests/windows_firefox.json" + } + } + } + } + } + } + }, + "includes": [ + "${universal}/tests/configs/localInstall.json" + ] +} diff --git a/tests/platform/windows/configs/windows-firefox-config.txt b/tests/platform/windows/configs/windows-firefox-config.txt new file mode 100644 index 000000000..103adda4d --- /dev/null +++ b/tests/platform/windows/configs/windows-firefox-config.txt @@ -0,0 +1,8 @@ +This configuration file is used for testing the firefox 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 'windows_firefox.json', which will report +the Cloud4all Firefox extension for Mozilla Firefox as being installed on the system. diff --git a/tests/platform/windows/windows-firefox-testSpec.js b/tests/platform/windows/windows-firefox-testSpec.js new file mode 100644 index 000000000..3d4209745 --- /dev/null +++ b/tests/platform/windows/windows-firefox-testSpec.js @@ -0,0 +1,105 @@ +/* +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/LICENSE.txt +*/ + +"use strict"; +var fluid = require("universal"), + gpii = fluid.registerNamespace("gpii"); + +gpii.loadTestingSupport(); + +fluid.registerNamespace("gpii.tests.windows.firefox"); + + + +gpii.tests.windows.firefox = [ + { + name: "Acceptance test for background color change in firefox", + userToken: "chrome_high_contrast", + settingsHandlers: { + "gpii.settingsHandlers.webSockets": { + "data": [ + { + "settings": { + "screenReaderTTSEnabled": false, + "highContrastEnabled": true, + "invertColours": false, + "magnifierEnabled": false, + "magnification": 1, + "fontSize": "M", + "backgroundColour": "#000000", + "foregroundColour": "#FFFFFF" + }, + "options": { + "path": "org.mozilla.cloud4firefox" + } + } + ] + } + }, + processes: [] + }, + { + name: "Acceptance test for font size transformation in Chrome", + userToken: "chrome_font_size", + settingsHandlers: { + "gpii.settingsHandlers.webSockets": { + "data": [ + { + "settings": { + "screenReaderTTSEnabled": false, + "highContrastEnabled": false, + "invertColours": false, + "magnifierEnabled": false, + "magnification": 1, + "fontSize": "L" + }, + "options": { + "path": "org.mozilla.cloud4firefox" + } + } + ] + } + }, + processes: [] + }, + { + name: "Acceptance test for magnification transformation in Chrome", + userToken: "chrome_magnification", + settingsHandlers: { + "gpii.settingsHandlers.webSockets": { + "data": [ + { + "settings": { + "screenReaderTTSEnabled": false, + "highContrastEnabled": false, + "invertColours": false, + "magnifierEnabled": true, + "magnification": 2, + "fontSize": "M" + }, + "options": { + "path": "org.mozilla.cloud4firefox" + } + } + ] + } + }, + processes: [] + } +]; + +module.exports = gpii.test.bootstrap({ + testDefs: "gpii.tests.windows.firefox", + configName: "windows-firefox-config", + configPath: "configs" +}, ["gpii.test.integration.testCaseHolder.windows"], + module, require, __dirname); diff --git a/tests/platform/windows/windows-firefox-testSpec.txt b/tests/platform/windows/windows-firefox-testSpec.txt new file mode 100644 index 000000000..07fba5d31 --- /dev/null +++ b/tests/platform/windows/windows-firefox-testSpec.txt @@ -0,0 +1,11 @@ +windows-firefox-testSpec.txt + +Descriptions: + +* Solution: Cloud4all's Firefox extension for Mozilla Firefox (cloud4firefox) +* Configuration file: windows-firefox-config.json +* Device reporter file: windows_firefox.json +* NP sets: + * chrome_high_contrast + * chrome_font_size + * chrome_magnification