diff --git a/config/karma/shared.karma.conf.js b/config/karma/shared.karma.conf.js index f7447e46..73f07a8d 100644 --- a/config/karma/shared.karma.conf.js +++ b/config/karma/shared.karma.conf.js @@ -71,6 +71,7 @@ function getConfig(config) { } ], preprocessors: preprocessors, + skyPagesConfig: skyPagesConfig, webpack: testWebpackConfig.getWebpackConfig(skyPagesConfig, argv), coverageReporter: { dir: path.join(process.cwd(), 'coverage'), diff --git a/config/protractor/protractor.conf.js b/config/protractor/protractor.conf.js index c27b4bce..4c10adec 100644 --- a/config/protractor/protractor.conf.js +++ b/config/protractor/protractor.conf.js @@ -2,10 +2,16 @@ 'use strict'; const path = require('path'); +const minimist = require('minimist'); const SpecReporter = require('jasmine-spec-reporter').SpecReporter; const logger = require('@blackbaud/skyux-logger'); +// See minimist documentation regarding `argv._` https://github.com/substack/minimist +const argv = minimist(process.argv.slice(2)); +const skyPagesConfig = require('../sky-pages/sky-pages.config').getSkyPagesConfig(argv._[0]); + exports.config = { + skyPagesConfig: skyPagesConfig, allScriptsTimeout: 11000, specs: [ path.join( diff --git a/runtime/config.ts b/runtime/config.ts index 2a7fc40f..c6a05ac8 100644 --- a/runtime/config.ts +++ b/runtime/config.ts @@ -19,6 +19,14 @@ export class SkyuxPactConfig { public pactProxyServer?: string; } +export interface SkyuxConfigUnitTestSettings { + browserSet?: 'speedy' | 'quirky' | 'paranoid'; +} + +export interface SkyuxConfigTestSettings { + unit?: SkyuxConfigUnitTestSettings; +} + export interface RuntimeConfig { app: RuntimeConfigApp; command?: string; // Dynamically added in "higher up" webpacks @@ -74,6 +82,7 @@ export interface SkyuxConfig { public?: any[], referenced?: any[] }; + testSettings?: SkyuxConfigTestSettings; omnibar?: any; useHashRouting?: boolean; skyuxModules?: string[]; diff --git a/skyuxconfig-schema.json b/skyuxconfig-schema.json index 85b8b2ed..62179149 100644 --- a/skyuxconfig-schema.json +++ b/skyuxconfig-schema.json @@ -222,6 +222,27 @@ "skyuxModules": { "description": "The individual SKY UX modules that should be imported into the application. Use this property for performance optimization when your application only uses a small subset of SKY UX components.", "type": "array" + }, + "testSettings": { + "description": "Container for controlling test settings.", + "type": "object", + "properties": { + "unit": { + "description": "Test settings specific to the skyux test command.", + "type": "object", + "properties": { + "browserSet": { + "description": "The named set of browsers to run against.", + "type": "string", + "enum": [ + "speedy", + "quirky", + "paranoid" + ] + } + } + } + } } } }