Skip to content

Commit a9e9d24

Browse files
committed
GPII-434: Refactoring following removal of Acceptance test definitions up into universal. These tests are run from here as acceptance tests using the universal definitions. Work on registry settings handler to implement the new "undefined value is deletion" semantic. Test cases using new Windows API call RegDeleteValueEx. New driver structure to mirror that in universal. Test cases are still not passing reliably - it appears there is an asynchronous interaction between desktop theme settings and cursor settings - even more power is required in the main lifecycle to repeatedly retry setting settings.
1 parent f607884 commit a9e9d24

21 files changed

+150
-721
lines changed

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module.exports = function (grunt) {
2121
var gpiiGrunt = grunt.config.getRaw("gpiiGruntGlobal");
2222
grunt.initConfig({
2323
jshint: {
24-
src: ["gpii/**/*.js", "tests/**/*.js"],
24+
src: ["gpii/**/*.js", "tests/**/*.js", "index.js", "gpii.js"],
2525
buildScripts: ["Gruntfile.js"],
2626
options: {
2727
jshintrc: true

gpii.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ https://github.com/gpii/universal/LICENSE.txt
1313
var fluid = require("universal"),
1414
gpii = fluid.registerNamespace("gpii");
1515

16-
require("./gpii/index.js");
16+
require("./index.js");
1717

1818
gpii.start();

gpii/index.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

gpii/node_modules/registrySettingsHandler/src/RegistrySettingsHandler.js

Lines changed: 38 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpii/node_modules/registrySettingsHandler/test/testRegistrySettingsHandler.js

Lines changed: 28 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*!
2+
GPII Universal Personalization Framework GPII windows index
3+
4+
Copyright 2014 Lucendo Development Ltd.
5+
6+
Licensed under the New BSD license. You may not use this file except in
7+
compliance with this License.
8+
9+
You may obtain a copy of the License at
10+
https://github.com/gpii/universal/LICENSE.txt
11+
*/
12+
13+
"use strict";
14+
15+
var fluid = require("universal");
16+
17+
fluid.module.register("gpii-windows", __dirname, require);
18+
19+
fluid.require("./gpii/node_modules/WindowsUtilities/WindowsUtilities.js", require);
20+
fluid.require("./gpii/node_modules/registrySettingsHandler", require);
21+
fluid.require("./gpii/node_modules/registryResolver", require);
22+
fluid.require("./gpii/node_modules/spiSettingsHandler", require);
23+
24+
module.exports = fluid;

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Components of the GPII personalization infrastructure for use on Microsoft's \"Windows\"",
44
"version": "0.1.0",
55
"author": "GPII",
6-
"bugs": "http://wiki.gpii.net/index.php/Main_Page",
6+
"bugs": "http://wiki.gpii.net/w/Main_Page",
77
"homepage": "http://gpii.net/",
88
"dependencies": {},
99
"devDependencies": {
@@ -21,6 +21,6 @@
2121
],
2222
"keywords": ["gpii", "accessibility", "settings", "fluid", "IoC", "Inversion of Control", "configuration", "evented"],
2323
"repository": "git://github.com/GPII/windows.git",
24-
"main": "./gpii/index.js",
25-
"engines": { "node" : ">=0.1.9" }
24+
"main": "./gpii.js",
25+
"engines": { "node" : ">=0.8" }
2626
}

tests/AcceptanceTests.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
3+
GPII Acceptance Testing for Windows
4+
5+
Copyright 2013 Raising the Floor International
6+
Copyright 2014 Lucendo Development Ltd.
7+
8+
Licensed under the New BSD license. You may not use this file except in
9+
compliance with this License.
10+
11+
You may obtain a copy of the License at
12+
https://github.com/gpii/universal/LICENSE.txt
13+
*/
14+
15+
"use strict";
16+
17+
var fluid = require("universal"),
18+
gpii = fluid.registerNamespace("gpii");
19+
20+
gpii.loadTestingSupport();
21+
22+
fluid.registerNamespace("gpii.acceptanceTesting.windows");
23+
24+
require("../index.js");
25+
26+
var baseDir = fluid.module.resolvePath("${universal}/tests/");
27+
var windowsFiles = fluid.require("${universal}/tests/platform/index-windows.js");
28+
29+
gpii.test.runSuitesWithFiltering(windowsFiles, baseDir, ["gpii.test.acceptance.testCaseHolder"]);

tests/README.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Run Windows Acceptance tests by means of the command line
2+
3+
node AcceptanceTests.js [optional filter arguments]
4+
5+
These will run through a suite of tests that will modify the real system - be prepared.
6+
For example, magnification, desktop contrast, and pointer trails settings will be
7+
activated and deactivated on the current Windows system.
8+
9+
The test suites available are listed in the
10+
11+
tests/platform/index-windows.js
12+
13+
directory of the GPII universal project checked out as part of the current build.
14+
15+
In order to filter only a subset of the available suites, you can supply extra
16+
command line arguments which will be checked as substrings of the test suite files.
17+
18+
For example, to run only the suites testing built-in adaptations of windows, run
19+
20+
node AcceptanceTests.js builtIn
21+
22+
Or to run only the tests for the NVDA screenreader, run
23+
24+
node AcceptanceTests.js nvda
25+
26+

0 commit comments

Comments
 (0)