Skip to content
This repository was archived by the owner on Dec 8, 2022. It is now read-only.

Updated all dependencies. Removed offending flag #266

Merged
merged 5 commits into from
Sep 14, 2017
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
39 changes: 8 additions & 31 deletions cli/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const glob = require('glob');
const path = require('path');
const spawn = require('cross-spawn');
const selenium = require('selenium-standalone');
const protractorLauncher = require('protractor/built/launcher');

const build = require('./build');
const server = require('./utils/server');
Expand Down Expand Up @@ -64,38 +65,14 @@ function killServers(exitCode) {
*/
function spawnProtractor(chunks, port, skyPagesConfig) {
logger.info('Running Protractor');

const protractorPath = path.resolve(
'node_modules',
'.bin',
'protractor'
);

// Generate a trimmed-down version of skyPagesConfig to pass to host-utils.js
let trimmedConfig = {
skyux: {
host: {},
app: {}
protractorLauncher.init(getProtractorConfigPath(), {
params: {
localUrl: `https://localhost:${port}`,
chunks: chunks,
skyPagesConfig: skyPagesConfig
}
};
trimmedConfig.skyux.name = skyPagesConfig.skyux.name;
trimmedConfig.skyux.host.url = skyPagesConfig.skyux.host.url;
trimmedConfig.skyux.app.externals = skyPagesConfig.skyux.app.externals;

const protractor = spawn.spawn(
protractorPath,
[
getProtractorConfigPath(),
`--disableChecks`,
`--baseUrl ${skyPagesConfig.skyux.host.url}`,
`--params.localUrl=https://localhost:${port}`,
`--params.chunks=${JSON.stringify(chunks)}`,
`--params.skyPagesConfig=${JSON.stringify(trimmedConfig)}`
],
spawnOptions
);

protractor.on('exit', killServers);
});
process.on('exit', killServers);
}

/**
Expand Down
1 change: 0 additions & 1 deletion cli/utils/ts-linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const skyPagesConfigUtil = require('../../config/sky-pages/sky-pages.config');
const logger = require('../../utils/logger');

const flags = [
'--max-old-space-size=4096',
'--type-check',
'--project',
skyPagesConfigUtil.spaPath('tsconfig.json'),
Expand Down
88 changes: 44 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,81 +32,81 @@
"@blackbaud/skyux": ">=2.0.0-rc.0 <2.0.0"
},
"dependencies": {
"@angular/common": "4.2.5",
"@angular/compiler": "4.2.5",
"@angular/compiler-cli": "4.2.5",
"@angular/core": "4.2.5",
"@angular/forms": "4.2.5",
"@angular/http": "4.2.5",
"@angular/platform-browser": "4.2.5",
"@angular/platform-browser-dynamic": "4.2.5",
"@angular/router": "4.2.5",
"@angular/common": "4.3.6",
"@angular/compiler": "4.3.6",
"@angular/compiler-cli": "4.3.6",
"@angular/core": "4.3.6",
"@angular/forms": "4.3.6",
"@angular/http": "4.3.6",
"@angular/platform-browser": "4.3.6",
"@angular/platform-browser-dynamic": "4.3.6",
"@angular/router": "4.3.6",
"@blackbaud/auth-client": "1.15.0",
"@blackbaud/help-client": "1.0.1",
"@ngtools/webpack": "1.3.1",
"@types/core-js": "0.9.41",
"@ngtools/webpack": "1.6.2",
"@types/core-js": "0.9.43",
"@types/fontfaceobserver": "0.0.5",
"@types/jasmine": "2.5.47",
"@types/node": "7.0.18",
"@types/jasmine": "2.5.54",
"@types/node": "8.0.26",
"angular2-template-loader": "0.6.2",
"awesome-typescript-loader": "3.1.3",
"awesome-typescript-loader": "3.2.3",
"axe-webdriverjs": "1.1.3",
"codelyzer": "3.0.1",
"core-js": "2.4.1",
"codelyzer": "3.1.2",
"core-js": "2.5.1",
"cors": "2.8.4",
"express": "4.15.3",
"enhanced-resolve": "3.3.0",
"fontfaceobserver": "2.0.9",
"fs-extra": "3.0.1",
"glob": "7.1.1",
"express": "4.15.4",
"enhanced-resolve": "3.4.1",
"fontfaceobserver": "2.0.13",
"fs-extra": "4.0.1",
"glob": "7.1.2",
"hash-file": "3.0.0",
"html-webpack-plugin": "2.28.0",
"html-webpack-plugin": "2.30.1",
"http-server": "0.10.0",
"istanbul-instrumenter-loader": "2.0.0",
"jasmine-spec-reporter": "4.1.0",
"karma": "1.7.0",
"karma-chrome-launcher": "2.1.1",
"istanbul-instrumenter-loader": "3.0.0",
"jasmine-spec-reporter": "4.2.1",
"karma": "1.7.1",
"karma-chrome-launcher": "2.2.0",
"karma-coverage": "1.1.1",
"karma-jasmine": "1.1.0",
"karma-mocha-reporter": "2.2.3",
"karma-mocha-reporter": "2.2.4",
"karma-sourcemap-loader": "0.3.7",
"karma-webpack": "2.0.3",
"karma-webpack": "2.0.4",
"loader-utils": "1.1.0",
"merge": "1.2.0",
"ngc-webpack": "3.0.0",
"ngc-webpack": "3.2.2",
"node-sass": "4.5.3",
"open": "0.0.5",
"portfinder": "1.0.13",
"progress-bar-webpack-plugin": "1.9.3",
"progress-bar-webpack-plugin": "1.10.0",
"protractor": "5.1.2",
"raw-loader": "0.5.1",
"reflect-metadata": "0.1.10",
"remap-istanbul": "0.9.5",
"rxjs": "5.4.2",
"sass-loader": "6.0.5",
"selenium-standalone": "6.4.1",
"rxjs": "5.4.3",
"sass-loader": "6.0.6",
"selenium-standalone": "6.8.0",
"selenium-webdriver": "3.5.0",
"source-map-inline-loader": "blackbaud-bobbyearl/source-map-inline-loader",
"source-map-loader": "0.2.1",
"style-loader": "0.17.0",
"style-loader": "0.18.2",
"ts-helpers": "1.1.2",
"ts-node": "3.0.4",
"tslint": "5.2.0",
"typescript": "2.3.2",
"web-animations-js": "2.2.5",
"webpack": "2.5.1",
"webpack-dev-server": "2.4.5",
"ts-node": "3.3.0",
"tslint": "5.7.0",
"typescript": "2.5.2",
"web-animations-js": "2.3.1",
"webpack": "3.5.5",
"webpack-dev-server": "2.7.1",
"webpack-merge": "4.1.0",
"winston": "2.3.1",
"zone.js": "0.8.10"
"zone.js": "0.8.17"
},
"devDependencies": {
"@blackbaud/skyux": ">=2.0.0-rc.0 <2.0.0",
"@blackbaud/skyux": ">=2.0.0-rc.12 <2.0.0",
"cross-spawn": "5.1.0",
"istanbul": "0.4.5",
"jasmine": "2.6.0",
"jasmine": "2.8.0",
"jscs": "3.0.7",
"jshint": "2.9.4",
"jshint": "2.9.5",
"mock-require": "2.0.2",
"proxyquire": "1.8.0",
"rimraf": "2.6.1"
Expand Down
4 changes: 2 additions & 2 deletions runtime/testing/e2e/host-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export class SkyHostBrowser {
const destination = hostUtils.resolve(
url,
browser.params.localUrl,
JSON.parse(browser.params.chunks),
JSON.parse(browser.params.skyPagesConfig)
browser.params.chunks,
browser.params.skyPagesConfig
);

return browser.get(destination, timeout);
Expand Down
37 changes: 19 additions & 18 deletions test/cli-e2e.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ describe('cli e2e', () => {

let EXIT_CODE;
let PROTRACTOR_CB;
let CROSS_SPAWN_COMMAND;
let CROSS_SPAWN_OPTIONS;
let PROTRACTOR_CONFIG_FILE;
let PROTRACTOR_CONFIG_ARGS;

beforeEach(() => {
EXIT_CODE = 0;
Expand All @@ -58,19 +58,6 @@ describe('cli e2e', () => {
}));

mock('cross-spawn', {
spawn: (command, options) => {
CROSS_SPAWN_COMMAND = command;
CROSS_SPAWN_OPTIONS = options;

return {
on: (evt, cb) => {
if (evt === 'exit') {
PROTRACTOR_CB = cb;
cb(EXIT_CODE);
}
}
};
},
sync: () => ({ })
});

Expand All @@ -83,6 +70,20 @@ describe('cli e2e', () => {
sync: path => ['test.e2e-spec.ts']
});

mock('protractor/built/launcher', {
init: (file, args) => {
PROTRACTOR_CONFIG_FILE = file;
PROTRACTOR_CONFIG_ARGS = args;
}
});

spyOn(process, 'on').and.callFake((evt, cb) => {
if (evt === 'exit') {
PROTRACTOR_CB = cb;
cb(EXIT_CODE);
}
});

spyOn(logger, 'info');
});

Expand Down Expand Up @@ -234,16 +235,16 @@ describe('cli e2e', () => {

it('should accept the --no-build flag and handle errors', (done) => {
const metadata = [{ name: 'file1.js' }];
const json = JSON.stringify({ metadata: metadata });
const param = `--params.chunks=${json}`;

spyOn(fs, 'existsSync').and.returnValue(true);
const fsSpy = spyOn(fs, 'readJsonSync').and.returnValue(metadata);

mock.reRequire('../cli/e2e')({ build: false }, SKY_PAGES_CONFIG, WEBPACK);
spyOn(process, 'exit').and.callFake(exitCode => {
expect(fsSpy).toHaveBeenCalledWith('dist/metadata.json');
expect(CROSS_SPAWN_OPTIONS.includes(param)).toBe(true);
expect(PROTRACTOR_CONFIG_ARGS.params.chunks).toEqual({
metadata: metadata
});
expect(exitCode).toBe(0);
done();
});
Expand Down