forked from GPII/universal
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sgithens/GPII-4226' GPII#857
* sgithens/GPII-4226: (27 commits) GPII-4226 Renaming JAWS settings handler option keys to be more meaningful GPII-4226 Adding jsdoc for makeFileGet, Set, Parser, and Fetcher GPII-4226 Moving label decl from additionalProperties to properties. GPII-1908 Updating description wording on TapEvenDurationMax GPII-1908 Renaming file Jaw -> Jaws. Cleaning up more settings. GPII-4226 Commenting out settings missing a minimum or maximum value. Removing types from enum settings GPII-4226: Added validation for low-quality SR settings. GPII-4226 Removing brailleMode from jaws_common tests still that term is not in flat.json GPII-4226: Fixed typo GPII-4226: Updated test payload and commented transforms until GPII-4336 is addressed GPII-4226: Updated JAWS related tests and commented transforms until GPII-4336 is addressed GPII-4226: Solved linter issues GPII-4226: Fixed invalid settings in JAWS preference set GPII-4226: Solved validation issues in JAWS SR entry GPII-4226: Uncommented invalid entry from 'jaws.json' preference set GPII-4226: Changed the transformation to the correct capabilitiesTransformation block GPII-4226: Removed trailing comma fixing linter issue GPII-4226: Disabled incomplete transforms and changed life-cycle handler implementation GPII-4226: Changed preference sets comment format GPII-4226: Added additional settings ...
- Loading branch information
Showing
17 changed files
with
16,370 additions
and
2,541 deletions.
There are no files selected for viewing
31 changes: 0 additions & 31 deletions
31
gpii/node_modules/matchMakerFramework/test/data/jaws_application.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
.../node_modules/matchMakerFramework/test/inverseCapabilities/jaws_application_expected.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
gpii/node_modules/settingsHandlers/src/JawsSettingsHandler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
/*! | ||
* JAWS Settings Handler | ||
* | ||
* Copyright 2012 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("infusion"), | ||
path = require("path"), | ||
gpii = fluid.registerNamespace("gpii"); | ||
|
||
require("./INISettingsHandler.js"); | ||
|
||
fluid.registerNamespace("gpii.settingsHandlers.JAWSSettingsHandler.parser"); | ||
|
||
gpii.settingsHandlers.JAWSSettingsHandler.getVoiceProfileFileName = function (options) { | ||
var iniPayload = { | ||
"com.freedomscientific.jaws": [{ | ||
options: { | ||
"defaultSettingsFilePath": options.defaultSettingsFilePath | ||
}, | ||
settings: { | ||
"Voice Profiles.ActiveVoiceProfileName": null | ||
} | ||
}] | ||
}; | ||
var response = gpii.settingsHandlers.INISettingsHandler.get(iniPayload); | ||
var solutions = response["com.freedomscientific.jaws"]; | ||
var voiceProfileFileName = undefined; | ||
|
||
if (Array.isArray(solutions) && solutions.length) { | ||
var solution = solutions[0]; | ||
var settingValue = fluid.get(solution, ["settings", "Voice Profiles.ActiveVoiceProfileName"]); | ||
|
||
if (settingValue) { | ||
voiceProfileFileName = path.join(options.voiceProfilesDirPath, settingValue + ".VPF"); | ||
} else { | ||
voiceProfileFileName = path.join(options.voiceProfilesDirPath, "Eloquence.VPF"); | ||
} | ||
} | ||
|
||
return voiceProfileFileName; | ||
}; | ||
|
||
gpii.settingsHandlers.JAWSSettingsHandler.parser.parse = function (content, options) { | ||
return gpii.iniFile.read(content, options); | ||
}; | ||
|
||
gpii.settingsHandlers.JAWSSettingsHandler.parser.stringify = function (content, options) { | ||
return gpii.iniFile.writeFromFile(options.defaultSettingsFilePath, content, options); | ||
}; | ||
|
||
/* PUBLIC API FUNCTIONS */ | ||
gpii.settingsHandlers.JAWSSettingsHandler.get = | ||
gpii.settingsHandlers.makeFileGet(gpii.settingsHandlers.JAWSSettingsHandler.parser, | ||
gpii.settingsHandlers.JAWSSettingsHandler.getProfileFileName); | ||
gpii.settingsHandlers.JAWSSettingsHandler.set = | ||
gpii.settingsHandlers.makeFileSet(gpii.settingsHandlers.JAWSSettingsHandler.parser, | ||
gpii.settingsHandlers.JAWSSettingsHandler.getProfileFileName); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
gpii/node_modules/settingsHandlers/test/JawsSettingsHandlerTests.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
"use strict"; | ||
|
||
var fluid = require("infusion"), | ||
gpii = fluid.registerNamespace("gpii"); | ||
|
||
fluid.registerNamespace("gpii.tests"); | ||
|
||
fluid.require("%gpii-universal"); | ||
gpii.loadTestingSupport(); | ||
|
||
require("settingsHandlers"); | ||
|
||
fluid.logObjectRenderChars = 30000; | ||
|
||
var test = { | ||
payload: { | ||
"com.freedomscientific.jaws": [{ | ||
options: { | ||
"defaultSettingsFilePath": "C:\\Users\\vagrant\\AppData\\Roaming\\Freedom Scientific\\JAWS\\2019\\Settings\\enu\\DEFAULT.JCF", | ||
"voiceProfilesDirPath": "C:\\Users\\vagrant\\AppData\\Roaming\\Freedom Scientific\\JAWS\\2019\\Settings\\VoiceProfiles" | ||
}, | ||
settings: { | ||
"ENU-Global.Pitch": 90 | ||
} | ||
}] | ||
}, | ||
expectedResult: { | ||
"com.freedomscientific.jaws": [{ | ||
options: { | ||
"defaultSettingsFilePath": "C:\\Users\\vagrant\\AppData\\Roaming\\Freedom Scientific\\JAWS\\2019\\Settings\\enu\\DEFAULT.JCF", | ||
"voiceProfilesDirPath": "C:\\Users\\vagrant\\AppData\\Roaming\\Freedom Scientific\\JAWS\\2019\\Settings\\VoiceProfiles" | ||
}, | ||
settings: { | ||
"ENU-Global.Pitch": { | ||
newValue: 90, | ||
oldValue: 65 | ||
} | ||
} | ||
}] | ||
} | ||
}; | ||
|
||
var output = gpii.settingsHandlers.JAWSSettingsHandler.get(test.payload); | ||
output = gpii.settingsHandlers.JAWSSettingsHandler.set(test.payload); | ||
fluid.log(output); |
6 changes: 5 additions & 1 deletion
6
gpii/node_modules/solutionsRegistry/src/schemas/solution-schema.json5
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.