Skip to content

Commit be90954

Browse files
author
kaspermarkus
committed
GPII-564: Separated NVDA acceptance tests out to living in it's own file. Set up configs to read from the correct folders/files when reading prefs and device reporter data
1 parent 3423b80 commit be90954

File tree

5 files changed

+229
-119
lines changed

5 files changed

+229
-119
lines changed
Lines changed: 0 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -412,125 +412,6 @@ var testDefs = [
412412
"expectRestored": "0"
413413
}
414414
]
415-
}, {
416-
name: "Testing screenreader_nvda using Flat matchmaker",
417-
config: gpiiConfig,
418-
token: "screenreader_nvda",
419-
settingsHandlers: {
420-
"gpii.settingsHandlers.INISettingsHandler": {
421-
"data": [
422-
{
423-
"settings": {
424-
"speech.espeak.rate": "17.20430107526882",
425-
"speech.espeak.volume": "80",
426-
"speech.espeak.pitch": "60",
427-
"speech.espeak.rateBoost": true,
428-
"virtualBuffers.autoSayAllOnPageLoad": false,
429-
"speech.synth": "espeak",
430-
"speech.outputDevice": "Microsoft Sound Mapper",
431-
"speech.symbolLevel": "300",
432-
"speech.espeak.voice": "en\\en-wi",
433-
"reviewCursor.followFocus": false,
434-
"reviewCursor.followCaret": true,
435-
"reviewCursor.followMouse": true,
436-
"keyboard.speakTypedWords": true,
437-
"keyboard.speakTypedCharacters": false,
438-
"presentation.reportHelpBalloons": false,
439-
"speech.espeak.sayCapForCapitals": true
440-
},
441-
"options": {
442-
// This needs to be addressed with GPII-497.
443-
"path": path.resolve(process.env.APPDATA, "nvda/nvda.ini"),
444-
"allowNumberSignComments": true,
445-
"allowSubSections": true
446-
}
447-
}
448-
]
449-
}
450-
},
451-
processes: [
452-
{
453-
"command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C",
454-
"expectConfigured": "1",
455-
"expectRestored": "0"
456-
}
457-
]
458-
}, {
459-
name: "Testing screenreader_common using Flat matchmaker",
460-
config: gpiiConfig,
461-
token: "screenreader_common",
462-
settingsHandlers: {
463-
"gpii.settingsHandlers.INISettingsHandler": {
464-
"data": [
465-
{
466-
"settings": {
467-
"speech.espeak.rate": "17.20430107526882",
468-
"speech.espeak.volume": "75",
469-
"speech.espeak.pitch": "15",
470-
"speech.espeak.rateBoost": true,
471-
"virtualBuffers.autoSayAllOnPageLoad": false,
472-
"speech.symbolLevel": "300",
473-
"speech.espeak.voice": "en\\en-wi",
474-
"reviewCursor.followFocus": false,
475-
"reviewCursor.followCaret": true,
476-
"reviewCursor.followMouse": true,
477-
"keyboard.speakTypedWords": true,
478-
"keyboard.speakTypedCharacters": false,
479-
"presentation.reportHelpBalloons": false,
480-
"speech.espeak.sayCapForCapitals": true
481-
},
482-
"options": {
483-
// This needs to be addressed with GPII-497.
484-
"path": path.resolve(process.env.APPDATA, "nvda/nvda.ini"),
485-
"allowNumberSignComments": true,
486-
"allowSubSections": true
487-
}
488-
}
489-
]
490-
}
491-
},
492-
processes: [
493-
{
494-
"command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C",
495-
"expectConfigured": "1",
496-
"expectRestored": "0"
497-
}
498-
]
499-
}, {
500-
name: "Testing screenreader_orca using Flat matchmaker",
501-
config: gpiiConfig,
502-
token: "screenreader_orca",
503-
settingsHandlers: {
504-
"gpii.settingsHandlers.INISettingsHandler": {
505-
"data": [
506-
{
507-
"settings": {
508-
"speech.symbolLevel": "300",
509-
"speech.espeak.rate": "17.20430107526882",
510-
"speech.espeak.voice": "en\\en-wi",
511-
"keyboard.speakTypedWords": true,
512-
"speech.espeak.rateBoost": true,
513-
"keyboard.speakTypedCharacters": false,
514-
"presentation.reportHelpBalloons": false,
515-
"virtualBuffers.autoSayAllOnPageLoad": false
516-
},
517-
"options": {
518-
// This needs to be addressed with GPII-497.
519-
"path": path.resolve(process.env.APPDATA, "nvda/nvda.ini"),
520-
"allowNumberSignComments": true,
521-
"allowSubSections": true
522-
}
523-
}
524-
]
525-
}
526-
},
527-
processes: [
528-
{
529-
"command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C",
530-
"expectConfigured": "1",
531-
"expectRestored": "0"
532-
}
533-
]
534415
}
535416
];
536417

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
3+
GPII Acceptance Testing
4+
5+
Copyright 2013 Raising the Floor International
6+
7+
Licensed under the New BSD license. You may not use this file except in
8+
compliance with this License.
9+
10+
You may obtain a copy of the License at
11+
https://github.com/gpii/universal/LICENSE.txt
12+
*/
13+
14+
/*global __dirname, require*/
15+
16+
"use strict";
17+
var fluid = require("universal"),
18+
path = require("path"),
19+
kettle = fluid.registerNamespace("kettle"),
20+
gpii = fluid.registerNamespace("gpii");
21+
22+
fluid.registerNamespace("gpii.acceptanceTesting.windows");
23+
24+
fluid.require("../../gpii/node_modules/registrySettingsHandler", require);
25+
fluid.require("../../gpii/node_modules/registryResolver", require);
26+
fluid.require("../../gpii/node_modules/spiSettingsHandler", require);
27+
28+
fluid.require("universal/tests/AcceptanceTests", require);
29+
30+
31+
gpii.acceptanceTesting.windows.runTests = function (configFile, testDefs) {
32+
var gpiiConfig = {
33+
nodeEnv: configFile,
34+
configPath: path.resolve(__dirname, "./configs")
35+
};
36+
fluid.each(testDefs, function (testDef) {
37+
testDef.config = gpiiConfig;
38+
});
39+
testDefs = gpii.acceptanceTesting.buildTests(testDefs);
40+
module.exports = kettle.tests.bootstrap(testDefs);
41+
}
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
/*
2+
3+
GPII Acceptance Testing
4+
5+
Copyright 2014 Raising the Floor International
6+
7+
Licensed under the New BSD license. You may not use this file except in
8+
compliance with this License.
9+
10+
You may obtain a copy of the License at
11+
https://github.com/gpii/universal/LICENSE.txt
12+
*/
13+
14+
/*global require*/
15+
16+
"use strict";
17+
var fluid = require("universal"),
18+
path = require("path"),
19+
gpii = fluid.registerNamespace("gpii");
20+
21+
fluid.require("./AcceptanceTests_incl", require);
22+
23+
var testDefs = [
24+
{
25+
name: "Testing screenreader_nvda using Flat matchmaker",
26+
// config: gpiiConfig,
27+
token: "screenreader_nvda",
28+
settingsHandlers: {
29+
"gpii.settingsHandlers.INISettingsHandler": {
30+
"data": [
31+
{
32+
"settings": {
33+
"speech.espeak.rate": "17.20430107526882",
34+
"speech.espeak.volume": "80",
35+
"speech.espeak.pitch": "60",
36+
"speech.espeak.rateBoost": true,
37+
"virtualBuffers.autoSayAllOnPageLoad": false,
38+
"speech.synth": "espeak",
39+
"speech.outputDevice": "Microsoft Sound Mapper",
40+
"speech.symbolLevel": "300",
41+
"speech.espeak.voice": "en\\en-wi",
42+
"reviewCursor.followFocus": false,
43+
"reviewCursor.followCaret": true,
44+
"reviewCursor.followMouse": true,
45+
"keyboard.speakTypedWords": true,
46+
"keyboard.speakTypedCharacters": false,
47+
"presentation.reportHelpBalloons": false,
48+
"speech.espeak.sayCapForCapitals": true
49+
},
50+
"options": {
51+
// This needs to be addressed with GPII-497.
52+
"path": path.resolve(process.env.APPDATA, "nvda/nvda.ini"),
53+
"allowNumberSignComments": true,
54+
"allowSubSections": true
55+
}
56+
}
57+
]
58+
}
59+
},
60+
processes: [
61+
{
62+
"command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C",
63+
"expectConfigured": "1",
64+
"expectRestored": "0"
65+
}
66+
]
67+
}, {
68+
name: "Testing screenreader_common using Flat matchmaker",
69+
// config: gpiiConfig,
70+
token: "screenreader_common",
71+
settingsHandlers: {
72+
"gpii.settingsHandlers.INISettingsHandler": {
73+
"data": [
74+
{
75+
"settings": {
76+
"speech.espeak.rate": "17.20430107526882",
77+
"speech.espeak.volume": "75",
78+
"speech.espeak.pitch": "15",
79+
"speech.espeak.rateBoost": true,
80+
"virtualBuffers.autoSayAllOnPageLoad": false,
81+
"speech.symbolLevel": "300",
82+
"speech.espeak.voice": "en\\en-wi",
83+
"reviewCursor.followFocus": false,
84+
"reviewCursor.followCaret": true,
85+
"reviewCursor.followMouse": true,
86+
"keyboard.speakTypedWords": true,
87+
"keyboard.speakTypedCharacters": false,
88+
"presentation.reportHelpBalloons": false,
89+
"speech.espeak.sayCapForCapitals": true
90+
},
91+
"options": {
92+
// This needs to be addressed with GPII-497.
93+
"path": path.resolve(process.env.APPDATA, "nvda/nvda.ini"),
94+
"allowNumberSignComments": true,
95+
"allowSubSections": true
96+
}
97+
}
98+
]
99+
}
100+
},
101+
processes: [
102+
{
103+
"command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C",
104+
"expectConfigured": "1",
105+
"expectRestored": "0"
106+
}
107+
]
108+
}, {
109+
name: "Testing screenreader_orca using Flat matchmaker",
110+
// config: gpiiConfig,
111+
token: "screenreader_orca",
112+
settingsHandlers: {
113+
"gpii.settingsHandlers.INISettingsHandler": {
114+
"data": [
115+
{
116+
"settings": {
117+
"speech.symbolLevel": "300",
118+
"speech.espeak.rate": "17.20430107526882",
119+
"speech.espeak.voice": "en\\en-wi",
120+
"keyboard.speakTypedWords": true,
121+
"speech.espeak.rateBoost": true,
122+
"keyboard.speakTypedCharacters": false,
123+
"presentation.reportHelpBalloons": false,
124+
"virtualBuffers.autoSayAllOnPageLoad": false
125+
},
126+
"options": {
127+
// This needs to be addressed with GPII-497.
128+
"path": path.resolve(process.env.APPDATA, "nvda/nvda.ini"),
129+
"allowNumberSignComments": true,
130+
"allowSubSections": true
131+
}
132+
}
133+
]
134+
}
135+
},
136+
processes: [
137+
{
138+
"command": "tasklist /fi \"STATUS eq RUNNING\" /FI \"IMAGENAME eq nvda.exe\" | find /I \"nvda.exe\" /C",
139+
"expectConfigured": "1",
140+
"expectRestored": "0"
141+
}
142+
]
143+
}
144+
];
145+
146+
gpii.acceptanceTesting.windows.runTests("nvda_config", testDefs);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"typeName": "acceptanceTests.base.config",
3+
"options": {
4+
"components": {
5+
"server": {
6+
"options": {
7+
"components": {
8+
"preferencesServer": {
9+
"options": {
10+
"userSourceUrl": "file://%root/../../../../../node_modules/universal/testData/preferences/acceptanceTests/%token.json"
11+
}
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"includes": [
19+
"../../../../node_modules/universal/gpii/configs/fm.ps.sr.dr.mm.os.lms.development.json"
20+
]
21+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"typeName": "acceptanceTests.nvda",
3+
"options": {
4+
"components": {
5+
"server": {
6+
"options": {
7+
"components": {
8+
"deviceReporter": {
9+
"options": {
10+
"installedSolutionsUrl": "file://%root/../../../testData/deviceReporter/acceptanceTests/nvda.json"
11+
}
12+
}
13+
}
14+
}
15+
}
16+
}
17+
},
18+
"includes": [
19+
"base.json"
20+
]
21+
}

0 commit comments

Comments
 (0)