Skip to content
Merged
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
3 changes: 3 additions & 0 deletions gpii/node_modules/testing/src/CloudBased.js

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

16 changes: 8 additions & 8 deletions gpii/node_modules/testing/src/CloudBasedOAuth2.js

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

62 changes: 2 additions & 60 deletions tests/platform/cloud/AcceptanceTests_chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,63 +23,7 @@ gpii.loadTestingSupport();

fluid.registerNamespace("gpii.tests.cloud.chrome");

gpii.tests.cloud.chrome.testDefs = [
{ // TODO: This check should be a standard and automatic part of the "baseline acceptance tests" for every solution
name: "Acceptance test for empty preferences in Chrome",
userToken: "chrome_empty",
solutionId: "org.chrome.cloud4chrome",
expected: {
"org.chrome.cloud4chrome": {
}
}
},
{
name: "Acceptance test for background color change in Chrome",
userToken: "chrome_high_contrast",
solutionId: "org.chrome.cloud4chrome",
expected: {
"org.chrome.cloud4chrome": {
"fontSize": "medium",
"invertColours": false,
"magnifierEnabled": false,
"magnification": 1,
"highContrastTheme": "white-black",
"highContrastEnabled": true,
"screenReaderTTSEnabled": false
}
}
},
{
name: "Acceptance test for font size transformation in Chrome",
userToken: "chrome_font_size",
solutionId: "org.chrome.cloud4chrome",
expected: {
"org.chrome.cloud4chrome": {
"fontSize": "large",
"invertColours": false,
"magnifierEnabled": false,
"magnification": 1,
"highContrastEnabled": false,
"screenReaderTTSEnabled": false
}
}
},
{
name: "Acceptance test for magnification transformation in Chrome",
userToken: "chrome_magnification",
solutionId: "org.chrome.cloud4chrome",
expected: {
"org.chrome.cloud4chrome": {
"fontSize": "medium",
"invertColours": false,
"magnifierEnabled": true,
"magnification": 2,
"highContrastEnabled": false,
"screenReaderTTSEnabled": false
}
}
}
];
gpii.tests.cloud.chrome.testDefs = require("./AcceptanceTests_chrome_testDefs.json");

// We would like to write something like this, but we lost Kettle's transformer chain when implementing
// the GPII's test drivers:
Expand All @@ -90,6 +34,4 @@ gpii.tests.cloud.chrome.testDefs = [
// }, ["gpii.test.cloudBased.testCaseHolder"],
// module, require, __dirname);

if (require.main === module) {
module.exports = gpii.test.cloudBased.bootstrap(gpii.tests.cloud.chrome.testDefs, __dirname);
}
module.exports = gpii.test.cloudBased.bootstrap(gpii.tests.cloud.chrome.testDefs, __dirname);
2 changes: 2 additions & 0 deletions tests/platform/cloud/AcceptanceTests_chrome.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ AcceptanceTests_chrome.js
Description:
This is an series of tests using the online flowmanager.

These tests use the testDefinitions from AcceptanceTests_chrome_testDefs.json (which are also shared with the chrome_oauth2 tests)

Three N&P sets have been created in order to test the different transformations between the common terms and the clouc4all specific settings:
* chrome_font_size tests the transformation from a numeric value in the common terms to an enumeration value ("medium", "large", "x-large")
* chrome_magnification tests the transformation from a double value (1.2) to an integer (1, 2 or 3)
Expand Down
6 changes: 3 additions & 3 deletions tests/platform/cloud/AcceptanceTests_chrome_oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ var fluid = require("universal"),
gpii = fluid.registerNamespace("gpii");

fluid.registerNamespace("gpii.tests.cloud.oauth2.chrome");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests are failing - it seems that you forgot adding gpii.loadTestingSupport();

gpii.loadTestingSupport();

require("./OAuth2AcceptanceDataStore.js");
require("./AcceptanceTests_chrome.js");

gpii.tests.cloud.oauth2.chrome.common = {
client_id: "org.chrome.cloud4chrome",
Expand Down Expand Up @@ -279,8 +279,8 @@ gpii.tests.cloud.oauth2.chrome.disruptions = [{
}
];

// gpii.test.cloudBased.oauth2.bootstrap(gpii.tests.cloud.chrome.testDefs, gpii.tests.cloud.oauth2.chrome.common, __dirname);
var standardChromeTest = require("./AcceptanceTests_chrome_testDefs.json");

// Test 1 is the first with nonempty preference set
gpii.test.cloudBased.oauth2.bootstrapDisruptedTest(gpii.tests.cloud.chrome.testDefs[1], gpii.tests.cloud.oauth2.chrome.common,
gpii.test.cloudBased.oauth2.bootstrapDisruptedTest(standardChromeTest[1], gpii.tests.cloud.oauth2.chrome.common,
gpii.tests.cloud.oauth2.chrome.disruptions, __dirname);
57 changes: 57 additions & 0 deletions tests/platform/cloud/AcceptanceTests_chrome_testDefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[
{
"name": "Acceptance test for empty preferences in Chrome",
"userToken": "chrome_empty",
"solutionId": "org.chrome.cloud4chrome",
"expected": {
"org.chrome.cloud4chrome": {
}
}
},
{
"name": "Acceptance test for background color change in Chrome",
"userToken": "chrome_high_contrast",
"solutionId": "org.chrome.cloud4chrome",
"expected": {
"org.chrome.cloud4chrome": {
"fontSize": "medium",
"invertColours": false,
"magnifierEnabled": false,
"magnification": 1,
"highContrastTheme": "white-black",
"highContrastEnabled": true,
"screenReaderTTSEnabled": false
}
}
},
{
"name": "Acceptance test for font size transformation in Chrome",
"userToken": "chrome_font_size",
"solutionId": "org.chrome.cloud4chrome",
"expected": {
"org.chrome.cloud4chrome": {
"fontSize": "large",
"invertColours": false,
"magnifierEnabled": false,
"magnification": 1,
"highContrastEnabled": false,
"screenReaderTTSEnabled": false
}
}
},
{
"name": "Acceptance test for magnification transformation in Chrome",
"userToken": "chrome_magnification",
"solutionId": "org.chrome.cloud4chrome",
"expected": {
"org.chrome.cloud4chrome": {
"fontSize": "medium",
"invertColours": false,
"magnifierEnabled": true,
"magnification": 2,
"highContrastEnabled": false,
"screenReaderTTSEnabled": false
}
}
}
]
41 changes: 2 additions & 39 deletions tests/platform/cloud/AcceptanceTests_easit4all.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,43 +22,6 @@ gpii.loadTestingSupport();

fluid.registerNamespace("gpii.tests.cloud.easit4all");

gpii.tests.cloud.easit4all.testDefs = [
{
name: "Acceptance test for font and background color transformation in Easit4all",
userToken: "easit4all_color",
solutionId: "com.bdigital.easit4all",
expected: {
"com.bdigital.easit4all": {
"fontSize": 10,
"magnification": 1,
"foregroundColor": "Yellow",
"backgroundColor": "Black"
}
}
},
{
name: "Acceptance test for font size transformation in Easit4all",
userToken: "easit4all_font_size",
solutionId: "com.bdigital.easit4all",
expected: {
"com.bdigital.easit4all": {
"fontSize": 20,
"fontFaceFontName": "Times New Roman"
}
}
},
{
name: "Acceptance test for magnification in Easit4all",
userToken: "easit4all_magnification",
solutionId: "com.bdigital.easit4all",
expected: {
"com.bdigital.easit4all": {
"magnification": 1 // TODO: This test is faulty since the transformation rule is faulty in the solutions registry - configured factor is actually 6
}
}
}
];
gpii.tests.cloud.easit4all.testDefs = require("./AcceptanceTests_easit4all_testDefs.json");

if (require.main === module) {
module.exports = gpii.test.cloudBased.bootstrap(gpii.tests.cloud.easit4all.testDefs, __dirname);
}
module.exports = gpii.test.cloudBased.bootstrap(gpii.tests.cloud.easit4all.testDefs, __dirname);
2 changes: 2 additions & 0 deletions tests/platform/cloud/AcceptanceTests_easit4all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ AcceptanceTests_easit4all.js
Description:
This is an series of tests using the online flowmanager.

These tests use the testDefinitions from AcceptanceTests_easit4all_testDefs.json (which are also shared with the easit4all_oauth2 tests)

Three N&P sets have been created in order to test the different transformations between the common terms and the Easit4All specific settings:


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ https://github.com/GPII/universal/blob/master/LICENSE.txt
var fluid = require("universal"),
gpii = fluid.registerNamespace("gpii");

gpii.loadTestingSupport();

fluid.registerNamespace("gpii.tests.cloud.oauth2.easit4all");

require("./OAuth2AcceptanceDataStore.js");
require("./AcceptanceTests_easit4all.js");

gpii.tests.cloud.oauth2.easit4all.common = {
client_id: "com.bdigital.easit4all",
Expand Down Expand Up @@ -60,5 +61,7 @@ gpii.tests.cloud.oauth2.easit4all.disruptions = [{
}
}];

gpii.test.cloudBased.oauth2.bootstrapDisruptedTest(gpii.tests.cloud.easit4all.testDefs[0], gpii.tests.cloud.oauth2.easit4all.common,
var standardEasit4allTest = require("./AcceptanceTests_easit4all_testDefs.json");

gpii.test.cloudBased.oauth2.bootstrapDisruptedTest(standardEasit4allTest[0], gpii.tests.cloud.oauth2.easit4all.common,
gpii.tests.cloud.oauth2.easit4all.disruptions, __dirname);
36 changes: 36 additions & 0 deletions tests/platform/cloud/AcceptanceTests_easit4all_testDefs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[
{
"name": "Acceptance test for font and background color transformation in Easit4all",
"userToken": "easit4all_color",
"solutionId": "com.bdigital.easit4all",
"expected": {
"com.bdigital.easit4all": {
"fontSize": 10,
"magnification": 1,
"foregroundColor": "Yellow",
"backgroundColor": "Black"
}
}
},
{
"name": "Acceptance test for font size transformation in Easit4all",
"userToken": "easit4all_font_size",
"solutionId": "com.bdigital.easit4all",
"expected": {
"com.bdigital.easit4all": {
"fontSize": 20,
"fontFaceFontName": "Times New Roman"
}
}
},
{
"name": "Acceptance test for magnification in Easit4all",
"userToken": "easit4all_magnification",
"solutionId": "com.bdigital.easit4all",
"expected": {
"com.bdigital.easit4all": {
"magnification": 1
}
}
}
]