-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* GPII-3553: GPII-3553: Added tests for "check required options" grade. GPII-3553: Added note about work required to collect complete code coverage data. GPII-3553: Exclude test files from reports. NOJIRA: Removed stale TODO. NOJIRA: Removed outdated .istanbul.yml file. NOJIRA: Routine dependency update. GPII-3553: Updated for compatibility with Node 10. GPII-3553: Added browser coverage to overall report. Updated all dependencies.
- Loading branch information
Showing
20 changed files
with
266 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ coverage | |
reports | ||
.vagrant | ||
package-lock.json | ||
instrumented |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"reporter": ["html", "text-summary"], | ||
"reporter": ["none"], | ||
"report-dir": "reports", | ||
"temp-directory": "coverage" | ||
"temp-dir": "coverage", | ||
"clean": false, | ||
"exclude": ["**/tests/**/*.js"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,44 @@ | ||
{ | ||
"name": "gpii-handlebars", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"private": false, | ||
"license": "BSD-3-Clause", | ||
"repository": "https://github.com/GPII/gpii-handlebars", | ||
"scripts": { | ||
"pretest": "node node_modules/rimraf/bin.js coverage/* reports/*", | ||
"test": "node node_modules/istanbul/lib/cli.js cover tests/all-tests.js" | ||
"test": "npm run test:node && npm run test:browser", | ||
"test:node": "node node_modules/nyc/bin/nyc.js node tests/js/server/all-server-tests.js", | ||
"test:browser": "node instrumented/tests/js/browser/all-browser-tests.js", | ||
"pretest:browser": "node tests/js/lib/instrument-source.js", | ||
"posttest": "node node_modules/nyc/bin/nyc.js report --reporter text-summary --reporter html" | ||
}, | ||
"dependencies": { | ||
"chokidar": "2.0.4", | ||
"gpii-binder": "1.0.3", | ||
"gpii-express": "1.0.14", | ||
"handlebars": "4.0.11", | ||
"chokidar": "2.1.0", | ||
"gpii-binder": "1.0.4", | ||
"gpii-express": "1.0.15", | ||
"handlebars": "4.1.0", | ||
"infusion": "3.0.0-dev.20180208T114206Z.2964703", | ||
"json5": "1.0.1", | ||
"markdown-it": "8.4.1", | ||
"json5": "2.1.0", | ||
"markdown-it": "8.4.2", | ||
"md5": "2.2.1", | ||
"underscore-node": "0.1.2" | ||
}, | ||
"devDependencies": { | ||
"cheerio": "1.0.0-rc.2", | ||
"eslint": "5.1.0", | ||
"eslint": "5.13.0", | ||
"eslint-config-fluid": "1.3.0", | ||
"foundation-sites": "6.4.1", | ||
"gpii-grunt-lint-all": "1.0.1-dev.20180706T153657Z.4cbbd61", | ||
"gpii-grunt-lint-all": "1.0.5", | ||
"gpii-testem": "2.1.7", | ||
"gpii-webdriver": "1.0.3-dev.20180316T104657Z.4a84a30", | ||
"grunt": "1.0.3", | ||
"istanbul": "0.4.5", | ||
"kettle": "1.7.3", | ||
"kettle": "1.10.1", | ||
"mkdirp": "0.5.1", | ||
"node-jqunit": "1.1.8", | ||
"recursive-copy": "2.0.9", | ||
"request": "2.87.0", | ||
"rimraf": "2.6.2", | ||
"tough-cookie": "2.4.3" | ||
"nyc": "13.2.0", | ||
"recursive-copy": "2.0.10", | ||
"request": "2.88.0", | ||
"rimraf": "2.6.3", | ||
"tough-cookie": "3.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
// TODO: This should be removed as soon as "schema-validated components" are available. | ||
// Test "has required options" grade using `gpii-test-browser`. | ||
// | ||
/* eslint-env node */ | ||
"use strict"; | ||
var fluid = require("infusion"); | ||
var gpii = fluid.registerNamespace("gpii"); | ||
|
||
require("./includes.js"); | ||
|
||
fluid.registerNamespace("gpii.tests.handlebars.browser.hasRequiredOptions"); | ||
|
||
gpii.tests.handlebars.browser.hasRequiredOptions.createComponent = function (options) { | ||
try { | ||
gpii.tests.handlebars.hasRequiredOptions(options); | ||
return true; | ||
} | ||
catch (error) { | ||
return false; | ||
} | ||
}; | ||
|
||
fluid.defaults("gpii.tests.handlebars.browser.hasRequiredOptions.caseHolder", { | ||
gradeNames: ["gpii.test.handlebars.browser.caseHolder"], | ||
rawModules: [{ | ||
name: "Testing the `hasRequiredOptions` client-side grade...", | ||
tests: [ | ||
{ | ||
name: "Confirm that required options are checked correctly...", | ||
sequence: [ | ||
{ | ||
func: "{testEnvironment}.webdriver.get", | ||
args: ["{testEnvironment}.options.url"] | ||
}, | ||
{ | ||
event: "{testEnvironment}.webdriver.events.onGetComplete", | ||
listener: "{testEnvironment}.webdriver.executeScript", | ||
args: [gpii.tests.handlebars.browser.hasRequiredOptions.createComponent, {}] | ||
}, | ||
{ | ||
event: "{testEnvironment}.webdriver.events.onExecuteScriptComplete", | ||
listener: "jqUnit.assertEquals", | ||
args: ["Omitting all options should result in failure.", false, "{arguments}.0"] | ||
}, | ||
{ | ||
func: "{testEnvironment}.webdriver.executeScript", | ||
args: [gpii.tests.handlebars.browser.hasRequiredOptions.createComponent, { skittles: true }] | ||
}, | ||
{ | ||
event: "{testEnvironment}.webdriver.events.onExecuteScriptComplete", | ||
listener: "jqUnit.assertEquals", | ||
args: ["Omitting one option should result in failure.", false, "{arguments}.0"] | ||
}, | ||
{ | ||
func: "{testEnvironment}.webdriver.executeScript", | ||
args: [gpii.tests.handlebars.browser.hasRequiredOptions.createComponent, { beer: true, skittles: true }] | ||
}, | ||
{ | ||
event: "{testEnvironment}.webdriver.events.onExecuteScriptComplete", | ||
listener: "jqUnit.assertEquals", | ||
args: ["Supplying all options should result in success.", true, "{arguments}.0"] | ||
} | ||
] | ||
} | ||
] | ||
}] | ||
}); | ||
|
||
fluid.defaults("gpii.tests.handlebars.browser.hasRequiredOptions.testEnvironment", { | ||
gradeNames: ["gpii.test.handlebars.browser.environment"], | ||
"port": 6924, | ||
"path": "content/tests-hasRequiredOptions.html", | ||
components: { | ||
caseHolder: { | ||
type: "gpii.tests.handlebars.browser.hasRequiredOptions.caseHolder" | ||
} | ||
} | ||
}); | ||
|
||
gpii.test.webdriver.allBrowsers({ baseTestEnvironment: "gpii.tests.handlebars.browser.hasRequiredOptions.testEnvironment"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* | ||
Instrument our source including config files and templates for use in preparing browser coverage reports | ||
with gpii-webdriver/. | ||
*/ | ||
/* eslint-env node */ | ||
"use strict"; | ||
var fluid = require("infusion"); | ||
var gpii = fluid.registerNamespace("gpii"); | ||
|
||
require("gpii-testem"); | ||
require("../../../"); | ||
|
||
fluid.registerNamespace("gpii.tests.handlebars.instrumentation"); | ||
|
||
gpii.tests.handlebars.instrumentation.options = { | ||
sources: ["./src/**/*.js", "./index.js"], | ||
excludes: [], | ||
nonSources: [ | ||
"./tests/**", | ||
"./Gruntfile.js", | ||
"./node_modules/gpii-binder/src/js/binder.js", | ||
"./node_modules/handlebars/dist/handlebars.js", | ||
"./node_modules/infusion/dist/infusion-all.js", | ||
"./node_modules/infusion/src/framework/core/js/DataBinding.js", | ||
"./node_modules/infusion/src/framework/core/js/Fluid.js", | ||
"./node_modules/infusion/src/framework/core/js/FluidDOMUtilities.js", | ||
"./node_modules/infusion/src/framework/core/js/FluidDocument.js", | ||
"./node_modules/infusion/src/framework/core/js/FluidIoC.js", | ||
"./node_modules/infusion/src/framework/core/js/FluidRequests.js", | ||
"./node_modules/infusion/src/framework/core/js/FluidView.js", | ||
"./node_modules/infusion/src/framework/core/js/MessageResolver.js", | ||
"./node_modules/infusion/src/framework/core/js/ModelTransformation.js", | ||
"./node_modules/infusion/src/framework/core/js/ModelTransformationTransforms.js", | ||
"./node_modules/infusion/src/framework/renderer/js/fluidParser.js", | ||
"./node_modules/infusion/src/framework/renderer/js/fluidRenderer.js", | ||
"./node_modules/infusion/src/lib/fastXmlPull/js/fastXmlPull.js", | ||
"./node_modules/infusion/src/lib/jquery/core/js/jquery.js", | ||
"./node_modules/markdown-it/dist/markdown-it.js", | ||
"./node_modules/gpii-binder/src/js/binder.js", | ||
"./node_modules/handlebars/dist/handlebars.js", | ||
"./node_modules/markdown-it/dist/markdown-it.js" | ||
], | ||
istanbulOptions: { | ||
produceSourceMap: true, | ||
autoWrap: true | ||
} | ||
}; | ||
|
||
gpii.testem.instrumenter.instrument("%gpii-handlebars", "%gpii-handlebars/instrumented", gpii.tests.handlebars.instrumentation.options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.