Skip to content

Commit 51ccd0f

Browse files
committed
GPII-1230: Merge branch 'master' of github.com:GPII/universal into GPII-1230-2
2 parents 1f54342 + a664740 commit 51ccd0f

33 files changed

Lines changed: 14676 additions & 193 deletions

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ Vagrantfile.local
1515
report.tap
1616
coverage
1717
.nyc_output
18-
instrumented
1918
reports
2019
.idea/

.nycrc

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
{
2+
"include": [
3+
"**/*.js",
4+
"gpii/node_modules/**/*.js"
5+
],
6+
"exclude": [
7+
"!**/gpii/node_modules/accessRequester/index.js",
8+
"!**/gpii/node_modules/accessRequester/src/accessRequester.js",
9+
"!**/gpii/node_modules/canopyMatchMaker/index.js",
10+
"!**/gpii/node_modules/canopyMatchMaker/src/CanopyMatchMaker.js",
11+
"!**/gpii/node_modules/canopyMatchMaker/src/CanopyMatchMakerUtilities.js",
12+
"!**/gpii/node_modules/contextManager/index.js",
13+
"!**/gpii/node_modules/contextManager/src/ContextManager.js",
14+
"!**/gpii/node_modules/contextManager/src/ContextManagerUtilities.js",
15+
"!**/gpii/node_modules/deviceReporter/index.js",
16+
"!**/gpii/node_modules/deviceReporter/src/DeviceReporter.js",
17+
"!**/gpii/node_modules/deviceReporter/src/DeviceReporterUtilities.js",
18+
"!**/gpii/node_modules/eventLog/index.js",
19+
"!**/gpii/node_modules/eventLog/src/eventLog.js",
20+
"!**/gpii/node_modules/eventLog/src/installID.js",
21+
"!**/gpii/node_modules/eventLog/src/metrics.js",
22+
"!**/gpii/node_modules/flatMatchMaker/index.js",
23+
"!**/gpii/node_modules/flatMatchMaker/src/FlatMatchMaker.js",
24+
"!**/gpii/node_modules/flowManager/index.js",
25+
"!**/gpii/node_modules/flowManager/src/BrowserChannel.js",
26+
"!**/gpii/node_modules/flowManager/src/CloudBasedFlowManager.js",
27+
"!**/gpii/node_modules/flowManager/src/FlowManager.js",
28+
"!**/gpii/node_modules/flowManager/src/FlowManagerRequests.js",
29+
"!**/gpii/node_modules/flowManager/src/GetUserToken.js",
30+
"!**/gpii/node_modules/flowManager/src/PCPChannel.js",
31+
"!**/gpii/node_modules/flowManager/src/SolutionsRegistryDataSource.js",
32+
"!**/gpii/node_modules/flowManager/src/UntrustedFlowManager.js",
33+
"!**/gpii/node_modules/flowManager/src/UntrustedSettingsDataSource.js",
34+
"!**/gpii/node_modules/flowManager/src/UntrustedSettingsGetHandler.js",
35+
"!**/gpii/node_modules/flowManager/src/UntrustedSettingsPutHandler.js",
36+
"!**/gpii/node_modules/flowManager/src/UserLogonStateChange.js",
37+
"!**/gpii/node_modules/flowManager/src/UserSave.js",
38+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-authz-server/index.js",
39+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-authz-server/src/AuthGrantFinder.js",
40+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-authz-server/src/AuthServer.js",
41+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-authz-server/src/AuthorizationService.js",
42+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-authz-server/src/ClientService.js",
43+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-authz-server/src/CodeGenerator.js",
44+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-datastore/index.js",
45+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-datastore/src/DataSource-pouchDB.js",
46+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-datastore/src/DataStore.js",
47+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-datastore/src/DbDataStore.js",
48+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-datastore/src/DbDataStoreUtils.js",
49+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-utilities/index.js",
50+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-utilities/src/OAuth2Const.js",
51+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-utilities/src/OAuth2Express.js",
52+
"!**/gpii/node_modules/gpii-oauth2/gpii-oauth2-utilities/src/OAuth2Utilities.js",
53+
"!**/gpii/node_modules/gpii-oauth2/index.js",
54+
"!**/gpii/node_modules/journal/index.js",
55+
"!**/gpii/node_modules/journal/src/Journal.js",
56+
"!**/gpii/node_modules/journal/src/JournalIdParser.js",
57+
"!**/gpii/node_modules/journal/src/SettingsDir.js",
58+
"!**/gpii/node_modules/lifecycleActions/index.js",
59+
"!**/gpii/node_modules/lifecycleActions/src/LifecycleActions.js",
60+
"!**/gpii/node_modules/lifecycleManager/index.js",
61+
"!**/gpii/node_modules/lifecycleManager/src/DynamicComponentIndexer.js",
62+
"!**/gpii/node_modules/lifecycleManager/src/LifecycleManager.js",
63+
"!**/gpii/node_modules/lifecycleManager/src/LifecycleManagerSession.js",
64+
"!**/gpii/node_modules/lifecycleManager/src/Resolvers.js",
65+
"!**/gpii/node_modules/matchMakerFramework/index.js",
66+
"!**/gpii/node_modules/matchMakerFramework/src/MatchMakerFramework.js",
67+
"!**/gpii/node_modules/matchMakerFramework/src/MatchMakerUtilities.js",
68+
"!**/gpii/node_modules/ontologyHandler/index.js",
69+
"!**/gpii/node_modules/ontologyHandler/src/ontologyHandler.js",
70+
"!**/gpii/node_modules/ontologyHandler/src/ontologyHandlerUtilities.js",
71+
"!**/gpii/node_modules/pouchManager/index.js",
72+
"!**/gpii/node_modules/pouchManager/src/pouchManager.js",
73+
"!**/gpii/node_modules/preferencesServer/index.js",
74+
"!**/gpii/node_modules/preferencesServer/src/preferencesGetHandler.js",
75+
"!**/gpii/node_modules/preferencesServer/src/preferencesPostHandler.js",
76+
"!**/gpii/node_modules/preferencesServer/src/preferencesPutHandler.js",
77+
"!**/gpii/node_modules/preferencesServer/src/preferencesServer.js",
78+
"!**/gpii/node_modules/processReporter/index.js",
79+
"!**/gpii/node_modules/processReporter/src/ProcessReporter.js",
80+
"!**/gpii/node_modules/processReporter/src/processesBridge.js",
81+
"!**/gpii/node_modules/rawPreferencesServer/index.js",
82+
"!**/gpii/node_modules/rawPreferencesServer/src/rawPreferencesServer.js",
83+
"!**/gpii/node_modules/settingsHandlers/index.js",
84+
"!**/gpii/node_modules/settingsHandlers/src/INISettingsHandler.js",
85+
"!**/gpii/node_modules/settingsHandlers/src/JSONSettingsHandler.js",
86+
"!**/gpii/node_modules/settingsHandlers/src/NoSettingsHandler.js",
87+
"!**/gpii/node_modules/settingsHandlers/src/WebSocketsSettingsHandler.js",
88+
"!**/gpii/node_modules/settingsHandlers/src/XMLSettingsHandler.js",
89+
"!**/gpii/node_modules/settingsHandlers/src/settingsHandlerUtilities.js",
90+
"!**/gpii/node_modules/singleInstance/index.js",
91+
"!**/gpii/node_modules/singleInstance/src/singleInstance.js",
92+
"!**/gpii/node_modules/transformer/index.js",
93+
"!**/gpii/node_modules/transformer/src/js/Transformer.js",
94+
"!**/gpii/node_modules/testing/index.js",
95+
"!**/gpii/node_modules/testing/src/PouchTestCaseHolder.js",
96+
"!**/gpii/node_modules/testing/src/Acceptance.js",
97+
"!**/gpii/node_modules/testing/src/CloudBasedOAuth2TestsUtils.js",
98+
"!**/gpii/node_modules/testing/src/BrowserIncludes.js",
99+
"!**/gpii/node_modules/testing/src/NockUtils.js",
100+
"!**/gpii/node_modules/testing/src/Testing.js",
101+
"!**/gpii/node_modules/testing/src/CloudBased.js",
102+
"!**/gpii/node_modules/testing/src/Mocks.js",
103+
"!**/gpii/node_modules/testing/src/Integration.js",
104+
"testData",
105+
"tests",
106+
"reports",
107+
"coverage",
108+
"instrumented",
109+
".nyc_output",
110+
"**/browserify/**",
111+
"scripts",
112+
"examples",
113+
"gpii.js",
114+
"Gruntfile.js"
115+
],
116+
"reporter": "none",
117+
"report-dir": "reports",
118+
"temp-directory": "coverage",
119+
"clean": false
120+
}

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ You can also run (and debug) the tests manually from the root of the repository
109109

110110
`node node_modules/testem/testem.js --file tests/testem.js`
111111

112-
The required test fixtures and testem will start, and Testem will provide a URL you can open in a browser.
112+
The required test fixtures and Testem will start, and Testem will provide a URL you can open in a browser.
113113

114114
If you would like to debug individual tests or view the test summary in a browser without using Testem, you can:
115115

@@ -137,7 +137,7 @@ command can then be used to provision a new VM.
137137

138138
Within the VM, the application will be installed in the directory specified by the `nodejs_app_install_dir` variable,
139139
which is defined in `provisioning/vagrant-vars.yml` configuration file in this repository. By default the installation
140-
directory is set to `/home/vagrant/sync/node_modules/universal`.
140+
directory is set to `/home/vagrant/sync/universal`.
141141

142142
Following the provisioning phase, tests can be run in the VM directly from the host system, without the need to log
143143
into the VM or interact with its console.
@@ -186,16 +186,27 @@ The tests are run using the following command:
186186

187187
#### Coverage Reporting
188188

189-
The preferred way to consistentely generate a code coverage report is to use Vagrant as described above. When you
190-
start a VM using `vagrant up` and run `npm run test:vagrant`, the full test suite will run in the VM, and a coverage
191-
report will be saved to the `reports` directory. You can also run the `npm test` command on your local machine, but
192-
you will need to ensure that browsers receive focus when they are launched (see above).
189+
The preferred way to consistently generate a code coverage report is to use Vagrant as described above. When you
190+
start a VM using `vagrant up` and run `npm run test:vagrant`, the full test suite will run in the VM, and at then end of
191+
the run:
192+
193+
1. A summary of the report will be displayed to the console.
194+
2. A coverage report will be saved to the `reports` directory (open the `index.html` file in that directory in a browser to see the full details).
195+
196+
The report displays the code coverage for:
197+
198+
1. Code reached from the tests run directly in Node.
199+
2. Code reached within a browser when running the tests in Testem.
200+
3. Server fixtures exercised by browser requests when running the Testem tests.
201+
202+
A code coverage report will also be generated when you run the `npm test` command on your local machine, but you will
203+
need to ensure that browsers receive focus when they are launched (see above).
193204

194205
The `npm test` command has [two additional associated scripts](https://docs.npmjs.com/misc/scripts). The `pretest`
195206
script runs before the command defined for the `test` script. The `posttest` script runs after. In our case
196207
we use a `pretest` script to clean up previous coverage data before we run the tests, and a `posttest` script to
197-
compile the actual report. You should not need to run the `pretest` scripts manually before running either the node or
198-
browser tests, or to run the `posttest` scripts afterward.
208+
compile the actual report. Both the `pretest` and `posttest` steps must run in order to generate the report. If you
209+
only care about the test results, you should not need to run either of these scripts.
199210

200211
Docker Containers
201212
-----------------

Vagrantfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ ram = ENV["VM_RAM"] || 2048
2525

2626
Vagrant.configure(2) do |config|
2727

28-
config.vm.box = "inclusivedesign/fedora26"
28+
config.vm.box = "inclusivedesign/fedora27"
2929

3030
# Your working directory will be synced to /home/vagrant/sync in the VM.
3131
config.vm.synced_folder ".", "#{app_directory}"

gpii/node_modules/flowManager/configs/gpii.flowManager.untrusted.config.development.json

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpii/node_modules/flowManager/src/FlowManager.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpii/node_modules/flowManager/src/UntrustedSettingsDataSource.js

Lines changed: 55 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)