File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- /* jshint node: true */
2- 'use strict' ;
3-
4- var Command = require ( 'ember-cli/lib/models/command' ) ;
5- const config = require ( '../models/config' ) ;
6- var E2ETask = require ( '../tasks/e2e' ) ;
1+ import * as Command from 'ember-cli/lib/models/command' ;
2+ import * as E2ETask from '../tasks/e2e' ;
3+ import { CliConfig } from '../models/config' ;
74
85module . exports = Command . extend ( {
96 name : 'e2e' ,
107 description : 'Run e2e tests in existing project' ,
118 works : 'insideProject' ,
129 run : function ( ) {
13- this . project . ngConfig = this . project . ngConfig || config . CliConfig . fromProject ( ) ;
10+ this . project . ngConfig = this . project . ngConfig || CliConfig . fromProject ( ) ;
1411
1512 var e2eTask = new E2ETask ( {
1613 ui : this . ui ,
Load diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import * as Promise from 'ember-cli/lib/ext/promise' ;
2+ import * as Task from 'ember-cli/lib/models/task' ;
3+ import * as chalk from 'chalk' ;
4+ import { exec } from 'child_process' ;
5+
6+ module . exports = Task . extend ( {
7+ run : function ( ) {
8+ var ui = this . ui ;
9+
10+ return new Promise ( ( resolve ) => {
11+ exec ( `npm run e2e -- ${ this . project . ngConfig . e2e . protractor . config } ` , ( err , stdout ) => {
12+ ui . writeLine ( stdout ) ;
13+ if ( err ) {
14+ ui . writeLine ( chalk . red ( 'Some end-to-end tests failed, see above.' ) ) ;
15+ } else {
16+ ui . writeLine ( chalk . green ( 'All end-to-end tests pass.' ) ) ;
17+ }
18+ resolve ( ) ;
19+ } ) ;
20+ } ) ;
21+ }
22+ } ) ;
You can’t perform that action at this time.
0 commit comments