Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions documentation/MatchMakerFramework.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ The input for these POST requests will be in the following format. Note that it
"http://registry.gpii.net/terms/environment/sound": -6
"http://registry.gpii.net/terms/environment/timeOfDay": "18:29:00"
},
solutionsRegistry: {
//stuff from: https://github.com/GPII/universal/blob/master/testData/solutions/win32.json
solutionsRegistryEntries: {
// entries from: https://github.com/GPII/universal/blob/master/testData/solutions/win32.json (or whichever os is the relevent one) merged with the entries from https://github.com/GPII/universal/blob/master/testData/solutions/web.json
},
activeContexts: [
"gpii-default",
Expand Down Expand Up @@ -162,6 +162,11 @@ The return payload from at call to `/match` should be in the following format:
"http://registry.gpii.net/applications/com.microsoft.windows.desktop/otherSetting": "reallyBig"
}
},
"com.bdigital.easit4all": {
"settings": {
"http://registry.gpii.net/common/fontSize": 25
}
},
"org.cats": {}
}
},
Expand Down
23 changes: 19 additions & 4 deletions gpii/node_modules/flowManager/src/FlowManagerUtilities.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion gpii/node_modules/testing/src/Integration.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions testData/preferences/acceptanceTests/webtest_font_size.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"flat": {
"contexts": {
"gpii-default": {
"name": "Default preferences",
"preferences": {
"http://registry.gpii.net/common/fontSize": 16,
"http://registry.gpii.net/common/screenReaderTTSEnabled": false,
"http://registry.gpii.net/common/magnifierEnabled": false,
"http://registry.gpii.net/common/magnification": 1,
"http://registry.gpii.net/common/highContrastEnabled": false,
"http://registry.gpii.net/common/invertColours": false
}
}
}
}
}
8 changes: 7 additions & 1 deletion testData/solutions/web.json
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,13 @@
"pictogramsEnabled": "http://registry\\.gpii\\.net/common/pictogramsEnabled"
}
}
}
},
"configure": [
"settings.conf"
],
"restore": [
"settings.conf"
]
}
}

97 changes: 97 additions & 0 deletions tests/SolutionRegistryMergingTests.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/**
GPII Solution Registry Retrieval and Merging Tests

These tests ensures that we're correctly retrieving the solutions registry for the current platform
as well as the web platform. Furthermore, we're testing that these are used in the matchMaking
process

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("infusion"),
kettle = fluid.registerNamespace("kettle"),
path = require("path"),
jqUnit = jqUnit || fluid.require("jqUnit"),
gpii = fluid.registerNamespace("gpii");

fluid.registerNamespace("gpii.tests.solutionRegistryMerging");

require("../index.js");

gpii.loadTestingSupport();

gpii.tests.solutionRegistryMerging.data = {
"settingsHandlers": {
"gpii.settingsHandlers.noSettings": {
"data": [{
"settings": {
"signLanguage": "ils",
"textSize": 1.3333333333333333
}
}]
},
"gpii.settingsHandlers.webSockets": {
"data": [{
"settings": {
"fontSize": "large"
}
}]
}
}
};

gpii.tests.solutionRegistryMerging.fixtures = [
{
name: "Configuration retrieved by lifecycle manager",
expect: 2,
sequence: [
{
"func": "gpii.test.expandSettings",
args: [ "{tests}", [ "contexts" ]]
}, {
func: "{loginRequest}.send"
}, {
event: "{loginRequest}.events.onComplete",
listener: "gpii.test.loginRequestListen"
},
{
func: "gpii.test.checkConfiguration",
args: ["{tests}.data.settingsHandlers", "{nameResolver}"]
}
]
}
];

gpii.tests.solutionRegistryMerging.buildTestFixtures = function (fixtures) {
return fluid.transform(fixtures, function (fixture) {
var testDef = {
name: fixture.name,
userToken: "webtest_font_size",
expect: fixture.expect,
gradeNames: "gpii.test.integration.testCaseHolder.linux",
config: {
configName: "linux-chrome-config",
configPath: path.resolve(__dirname, "platform/linux/configs")
},
sequence: fixture.sequence,
data: gpii.tests.solutionRegistryMerging.data
};

return testDef;
});
};

kettle.test.bootstrapServer(gpii.tests.solutionRegistryMerging.buildTestFixtures(
gpii.tests.solutionRegistryMerging.fixtures));