Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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/blob/master/LICENSE.txt
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.
*/
"use strict";
var fluid = require("infusion"),
gpii = fluid.registerNamespace("gpii");
fluid.require("%universal");
fluid.registerNamespace("gpii.tests.cloud.oauth2.chrome");
gpii.loadTestingSupport();
gpii.tests.cloud.oauth2.chrome.common = {
client_id: "org.chrome.cloud4chrome",
client_secret: "client_secret_chrome",
redirect_uri: "http://org.chrome.cloud4chrome/the-client%27s-uri/",
state: "The Client's Unique State",
username: "bob",
password: "b"
};
// A grade, applied to the testCaseHolder itself, to be used for testing whether
// the access token supplied for the settings request is checked. This overrides
// the definition of the settings request so that the member, ordinarily returned
https://github.com/GPII/universal/blob/master/LICENSE.txt
WARNING: Do not run these tests directly. They are called from within the
"vagrantCloudBasedContainers.sh" after it has initialized the environment.
*/
"use strict";
var fluid = require("infusion"),
kettle = fluid.require("kettle");
// Ensure this happens first, to catch errors during code loading.
kettle.loadTestingSupport();
// Pass the current `require` to `fluid.require`, as nyc's instrumentation is hooked into it.
fluid.require("%gpii-universal", require);
var testIncludes = [
"./CloudStatusProductionTests.js",
"./SettingsGetProductionTests.js",
"./SettingsPutProductionTests.js"
];
fluid.each(testIncludes, function (path) {
require(path);
});
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/blob/master/LICENSE.txt
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.
*/
"use strict";
var fluid = require("infusion"),
gpii = fluid.registerNamespace("gpii");
fluid.require("%gpii-universal");
gpii.loadTestingSupport();
fluid.registerNamespace("gpii.tests.windows.jaws");
// To avoid duplicating this entire piece in each test. Given a true or false value
// as input, this will return a settingshandler entry, containing all the options from
// the solutions registry entry for NVDAs launchHandler, with a settings block with
// running: X - where X is replaced with the input parameter
gpii.tests.windows.jaws.flexibleHandlerEntry = function (running) {
return {
"com.freedomscientific.jaws": [{
"settings": {
"running": running
},
"options": {
*
* 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"),
jqUnit = fluid.require("node-jqunit", require, "jqUnit"),
gpii = fluid.registerNamespace("gpii");
fluid.require("%gpii-universal");
require("./shared/UserLogonStateChangeTestDefs.js");
fluid.registerNamespace("gpii.tests.userLogonEvents");
gpii.tests.userLogonEvents.modelChangeChecker = function (type, inProgress, gpiiKey) {
return function (changePayload) {
jqUnit.assertEquals("Checking type of model change", type, changePayload.type);
jqUnit.assertEquals("Checking inProgress of model change", inProgress, changePayload.inProgress);
jqUnit.assertEquals("Checking gpiiKey of model change", gpiiKey, changePayload.gpiiKey);
};
};
gpii.tests.userLogonEvents.testDefs = [{
name: "Testing events related to login and logout via proximityTriggered endpoint",
expect: 14,
sequence: [{ // standard login
*/
/* eslint-env node */
"use strict";
var fluid = require("infusion");
var gpii = fluid.registerNamespace("gpii");
var mkdirp = require("mkdirp");
var fs = require("fs");
var path = require("path");
// Add the ability to require JSON5 files.
require("json5/lib/register");
// Require universal so that we can resolve paths to it and any sub-modules.
fluid.require("%gpii-universal");
fluid.registerNamespace("gpii.solutionsRegistry.schemaGenerator");
gpii.solutionsRegistry.schemaGenerator.generateSettingsSchema = function (that) {
var settingsSchema = require(fluid.module.resolvePath(that.options.baseSettingsSchema));
// settings schema template from that.options.baseSettingsSchema
// TODO: Add all solutions/settings and schemas from that.options.solutionsRegistryPath
var solutionsSettings = gpii.solutionsRegistry.schemaGenerator.settingsFromSolutions(that);
var genericSettings = gpii.solutionsRegistry.schemaGenerator.genericSettings(that);
var allSettings = fluid.extend({}, solutionsSettings, genericSettings);
// Merge the generated settings schema data into the "base schema" at the right point.
fluid.set(
settingsSchema,
/* eslint-env node */
"use strict";
var fluid = require("infusion");
var gpii = fluid.registerNamespace("gpii");
fluid.require("%kettle");
fluid.require("%gpii-json-schema");
// Add the ability to require JSON5 files.
require("json5/lib/register");
// Require universal so that we can resolve paths to it and any sub-modules.
fluid.require("%gpii-universal");
require("./filter-schema-settings");
require("./lib/get-settings-schema");
fluid.registerNamespace("gpii.universal.solutionsRegistry.requestValidation");
/**
*
* An invoker called on component creation that filters the "mega schema" to only validate the settings observed in the
You may obtain a copy of the License at
https://github.com/GPII/universal/blob/master/LICENSE.txt
*/
"use strict";
var fs = require("fs"),
fluid = require("infusion"),
jqUnit = fluid.require("node-jqunit", require, "jqUnit"),
gpii = fluid.registerNamespace("gpii"),
kettle = fluid.registerNamespace("kettle");
fluid.registerNamespace("gpii.tests.productionConfigTesting");
fluid.require("%gpii-universal");
/*
* ========================================================================
* Testing of untrusted local config with the live cloud based flow manager
* ========================================================================
*/
require("./shared/DevelopmentTestDefs.js");
require("./shared/FlowManagerSettingsGetTestDefs.js");
require("./shared/FlowManagerSettingsPutTestDefs.js");
gpii.loadTestingSupport();
gpii.tests.productionConfigTesting.config = {
configName: "gpii.tests.untrusted.production.config",
configPath: "%gpii-universal/tests/configs"
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/blob/master/LICENSE.txt
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.
*/
"use strict";
var fluid = require("infusion"),
gpii = fluid.registerNamespace("gpii");
fluid.require("%gpii-universal");
require("../shared/uioPlusTestDefs.js");
gpii.loadTestingSupport();
module.exports = gpii.test.bootstrap({
testDefs: "gpii.tests.uioPlus.testDefs",
configName: "gpii.tests.acceptance.windows.uioPlus.config",
configPath: "%gpii-universal/tests/platform/windows/configs"
}, ["gpii.test.integration.testCaseHolder.windows"],
module, require, __dirname);
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/blob/master/LICENSE.txt
WARNING: Do not run these tests directly. They are called from within the
"vagrantCloudBasedContainers.sh" after it has initialized the environment.
*/
"use strict";
var fluid = require("infusion"),
gpii = fluid.registerNamespace("gpii");
fluid.require("%gpii-universal");
gpii.loadTestingSupport();
fluid.registerNamespace("gpii.tests.productionConfigTesting");
require("./ProductionTestsUtils.js");
gpii.tests.productionConfigTesting.getDataFromFileById = function (locations) {
var resultDocs = [];
fluid.each(locations, function (oneFile) {
var dataArray = fluid.require(oneFile.filePath);
var ids = fluid.makeArray(oneFile.ids);
fluid.each(dataArray, function (anEntry) {
if (ids.includes(anEntry._id)) {
resultDocs.push(anEntry);
}
var fluid = require("infusion");
fluid.require("kettle", require);
fluid.require("matchMaker", require);
fluid.require("transformer", require);
fluid.require("deviceReporter", require);
fluid.require("lifecycleManager", require);
fluid.require("lifecycleActions", require);
fluid.require("flowManager", require);
fluid.require("settingsHandlers", require);
fluid.require("rawPreferencesServer", require);
fluid.require("ontologyHandler", require);
fluid.require("preferencesServer", require);
module.exports = fluid;