File tree Expand file tree Collapse file tree 3 files changed +26
-19
lines changed Expand file tree Collapse file tree 3 files changed +26
-19
lines changed 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' ;
7
4
8
5
module . exports = Command . extend ( {
9
6
name : 'e2e' ,
10
7
description : 'Run e2e tests in existing project' ,
11
8
works : 'insideProject' ,
12
9
run : function ( ) {
13
- this . project . ngConfig = this . project . ngConfig || config . CliConfig . fromProject ( ) ;
10
+ this . project . ngConfig = this . project . ngConfig || CliConfig . fromProject ( ) ;
14
11
15
12
var e2eTask = new E2ETask ( {
16
13
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