Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPII-1311: OLB should use WebSockets handler #415

Merged
merged 10 commits into from
Oct 21, 2015
33 changes: 23 additions & 10 deletions testData/solutions/solutionsDescription/net_eu_gpii_olb.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Online Banking Demonstrator (OLB)
# Online Banking Prototype (OLB)

## Details

* __Name__: Online Banking Demonstrator (OLB)
* __Name__: Online Banking Prototype (OLB)
* __Id__: eu.gpii.olb
* __Platform__: Web
* __Platform__: Win32; Web
* __Contact__: Christophe Strobbe <strobbe@hdm-stuttgart.de>

## Description
The __[Online Banking Demonstrator](http://gpii.eu/olb/)__ is a web-based application built to demonstrate
The __[Online Banking Prototype](http://gpii.eu/olb/)__ is a web-based application built to demonstrate
auto-personalisation from preference sets across multiple levels:
* the application itself,
* the browser (through browser extensions such as Cloud4Chrome),
* assistive technologies (if any are needed),
* the platform (typically a desktop operating system).
The Online Banking Demonstrator uses an adapted version of
The Online Banking Prototype uses an adapted version of
[Fluid UI Options](http://wiki.fluidproject.org/display/Infusion14/UI+Options)
with added support for sign language videos and pictograms.
It will be available in four languages: English, German, Spanish and Greek.
The Online Banking Demonstrator will be released under the Apache License, Version 2.0.
The Online Banking Prototype will be released under the Apache License, Version 2.0.

## Integration
The Online Banking Demonstrator is fully supported by the GPII personalisation framework
in the sense that all settings avaiable through the UIOptions panel are mapped to application-specific terms.
The Online Banking Prototype is fully supported by the GPII personalisation framework
in the sense that all settings avaiable through its control panel are mapped to application-specific terms.

Information about value ranges and some mappings to common terms can be found [in the spreadsheet "SP3 Settings for 2nd pilots"](https://docs.google.com/spreadsheet/ccc?key=0AppduB_JZh5EdDRYT1pmOTc5eUpNbkpMckhacUVxWXc&usp=drive_web#gid=31).
(Find the tabe "eu.gpii.olb".)
Information about value ranges and some mappings to common terms can be found [in the spreadsheet "SP3 Settings for 2nd and 3rd pilots"](https://docs.google.com/spreadsheets/d/1uaZV4mBze4udTlEikT30ApmE7CaO46eM0GLT0HVUESg/edit#gid=31).
(Find the tab "eu.gpii.olb".)
Note, however, that some of the application-specific terms for the OLB cannot yet be mapped to common terms, since the corresponding common terms still need to be defined.

These acceptance tests will be expanded when all application-specific terms can be mapped to common terms.
Expand All @@ -37,6 +37,8 @@ Manual testing can be of two kinds:
* On a platform where GPII is running: Log in a token at the OS level (through USB, NFC, RFID, ...).
After the platform has adapted itself to the preferences corresponding to the token, open a browser, go to the OLB and log in there.
Then check that the adaptations at the level of the web app do not conflict with or cancel out the adaptations at the other levels.
* Once the browser extension code has been integrated, GPII installed on a Windows system should pass on
OLB settings from the Local Flow Manager to the OLB. (This information will be updated once that work is complete.)

### olb_Carla

Expand Down Expand Up @@ -64,6 +66,7 @@ Using this NP set in the OLB should have the following effects:
* the sign language videos show a human sign language interpreter,
* the interface language changes from English to German.


### [olb_QinKesheng](https://zh.wikipedia.org/wiki/%E6%AC%BD%E5%8F%AF%E8%81%96)

Using this NP set in the OLB should have the following effects:
Expand All @@ -72,3 +75,13 @@ Using this NP set in the OLB should have the following effects:
* the sign language videos use avatars,
* the interface language does not change since Chinese (zho) is not supported.

### olb_Alicia_app

Using this NP set in the OLB should have the following effects:

* high contrast (white on black) should be enabled,
* a simplified UI should be shown.

Note: this NP set is not available in the `acceptanceTests` directory.


134 changes: 134 additions & 0 deletions testData/solutions/win32.json
Original file line number Diff line number Diff line change
Expand Up @@ -1428,5 +1428,139 @@
],
"start": [],
"stop": []
},

"eu.gpii.olb": {
"name": "Online Banking Prototype",
"contexts": {
"OS": [
{
"id": "win32"
}
]
},
"settingsHandlers": {
"conf": {
"type": "gpii.settingsHandlers.webSockets",
"options": {
"path": "gpii.eu/olb/"
Copy link
Member

Choose a reason for hiding this comment

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

the path must be the same as the solution id (eu.gpii.olb), short explanation: this is the way for both the browserChannel and the webSockets settingsHandler to know who and where their preferences are stored.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, I see. I misread something that I had seen in your pull request for the Cloud4all site. Sorry.

},
"capabilities": [
"applications.eu\\.gpii\\.olb.id",
"display.applications.eu\\.gpii\\.olb.name",
"language",
"textSize",
"toc",
"links",
"contrastTheme",
"signLanguageEnabled",
"signLanguage",
"interpreterType",
"pictogramEnabled",
"pictogramMode",
"pictogramSymbolSet",
"simplifiedUiEnabled"
],
"capabilitiesTransformations": {
"language": "http://registry\\.gpii\\.net/common/language",
"textSize": {
"transform": {
"type": "fluid.transforms.binaryOp",
"leftPath": "http://registry\\.gpii\\.net/common/fontSize",
"operator": "/",
"right": 12
}
},
"toc": {
"transform": {
"type": "fluid.transforms.valueMapper",
"inputPath": "http://registry\\.gpii\\.net/common/navigationAdaptation",
"options": {
"showToC": {
"outputValue": true
},
"default": {
"outputValue": false
}
}
}
},
"links": {
"transform": {
"type": "fluid.transforms.valueMapper",
"inputPath": "http://registry\\.gpii\\.net/common/linkAdaptation",
"options": {
"emphasizeLinks": {
"outputValue": true
}
}
}
},
"contrastTheme": {
"transform": {
"type": "fluid.transforms.condition",
"conditionPath": "http://registry\\.gpii\\.net/common/highContrastEnabled",
"true": {
"transform": {
"type": "fluid.transforms.valueMapper",
"inputPath": "http://registry\\.gpii\\.net/common/highContrastTheme",
"defaultInputValue": "default",
"options": {
"black-white": {
"outputValue": "bw"
},
"white-black": {
"outputValue": "wb"
},
"black-yellow": {
"outputValue": "by"
},
"yellow-black": {
"outputValue": "yb"
}
}
}
}
}
},
"signLanguageEnabled": "http://registry\\.gpii\\.net/common/signLanguageEnabled",
"signLanguage": {
"transform": {
"type": "fluid.transforms.valueMapper",
"inputPath": "http://registry\\.gpii\\.net/common/signLanguage",
"defaultInputValue": "ils",
"options": {
"ase": {
"outputValue": "ase"
},
"gsg": {
"outputValue": "gsg"
},
"ils": {
"outputValue": "ils"
}
}
}
},
"interpreterType": {
"transform": {
"type": "fluid.transforms.valueMapper",
"inputPath": "http://registry\\.gpii\\.net/common/signLanguageInterpreterType",
"options": {
"avatar": {
"outputValue": "avatar"
},
"human": {
"outputValue": "human"
}
}
}
},
"pictogramsEnabled": "http://registry\\.gpii\\.net/common/pictogramsEnabled",
"simplifiedUiEnabled": "http://registry\\.gpii\\.net/common/simplifiedUiEnabled"
}
}
}
}
}

3 changes: 2 additions & 1 deletion tests/platform/index-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,6 @@ module.exports = [
"windows/windows-jaws-testSpec.js",
"windows/windows-nvda-testSpec.js",
"windows/windows-maavis-testSpec.js",
"windows/windows-chrome-testSpec.js"
"windows/windows-chrome-testSpec.js",
"windows/windows-olb-testSpec.js"
];
129 changes: 129 additions & 0 deletions tests/platform/windows/AcceptanceTests_olb.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
/*
GPII Integration and Acceptance Testing

Copyright 2015 Hochschule der Medien (HdM) / Stuttgart Media University

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
*/

/*global require*/

"use strict";
var fluid = require("universal"),
gpii = fluid.registerNamespace("gpii");

gpii.loadTestingSupport();

var testDefs = [
{
name: "Acceptance test with empty preference set for OLB",
userToken: "olb_empty",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
}
}
},
{
name: "Test for Online Banking demonstrator (OLB) with Online Flow Manager (German sign language).",
userToken: "olb_Lara",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
"language": "de-DE",
"signLanguageEnabled": true,
"signLanguage": "gsg",
"interpreterType": "human",
"interpreterName": "default"
}
}
},
{
name: "Test for Online Banking demonstrator (OLB) with Online Flow Manager (US sign language).",
userToken: "olb_KimCallahan",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
"language": "en-US",
"signLanguageEnabled": true,
"signLanguage": "ase",
"interpreterType": "avatar",
"textStyle": "verdana"
}
}
},
{
name: "Test for Online Banking demonstrator (OLB) with Online Flow Manager (contrast and large text).",
userToken: "olb_Carla",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
"language": "en-GB",
"textSize": 2,
"links": true,
"contrastTheme": "wb",
"signLanguageEnabled": false,
"signLanguage": "ils",
"lineSpacing": 2,
"inputsLarger": true
}
}
},
{
name: "Test for Online Banking demonstrator (OLB) with only application-specific terms.",
userToken: "olb_applicationSpecific_01",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
"textSize": 1.1,
"lineSpacing": 2,
"textStyle": "comic",
"toc": true,
"links": true,
"inputsLarger": true,
"contrastTheme": "yb",
"signLanguageEnabled": true,
"signLanguage": "ils",
"interpreterType": "avatar",
"interpreterName": "Neytiri",
"pictogramsEnabled": false
}
}
},
{
name: "Test for Online Banking demonstrator (OLB) with Online Flow Manager: unsupported sign language.",
userToken: "olb_QinKesheng",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
"language": "zho",
"signLanguageEnabled": true,
"signLanguage": "ils",
"interpreterType": "avatar"
}
}
},
{
name: "Test for Online Banking demonstrator (OLB) with Online Flow Manager: simplified UI.",
userToken: "olb_Alicia_cmn",
solutionId: "eu.gpii.olb",
expected: {
"eu.gpii.olb": {
"language": "en-GB",
"contrastTheme": "wb",
"signLanguage": "ils", // see https://issues.gpii.net/browse/GPII-1125
"simplifiedUiEnabled": true
}
}
}
];

module.exports = gpii.test.cloudBased.bootstrap(testDefs, __dirname);

19 changes: 19 additions & 0 deletions tests/platform/windows/AcceptanceTests_olb.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
AcceptanceTests_olb.js

Description:
This is a set of acceptance tests for the Online Banking demonstrator (OLB) using the Online Flow Manager.
It relies on the following preference sets in ..\..\testData\preferences\acceptanceTests:
* olb_empty.json
* olb_Carla.json
* olb_KimCallahan.json
* olb_Lara.json
* olb_QinKesheng.json
* olb_applicationSpecific_01.json
* olb_Alicia_cmn.json


Requirements:
Since the Online Banking demonstrator uses the Online Flow Manager (or "Cloud-based Flow Manager"), there are no requirements other than a local instance of the GPII running with NODE_ENV set to "cloudBased.development.all.local" and starting the server from the "universal" folder by typing "node node_modules/kettle/lib/init.js gpii/configs/".
Note:
Using the Online Flow Manager is a temporary workaround until there is infrastructure that allows web applications to request settings through the local Flow Manager.