This repository was archived by the owner on Jul 29, 2024. It is now read-only.
File tree 7 files changed +15
-15
lines changed
7 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ exports.config = {
7
7
// Spec patterns are relative to the current working directly when
8
8
// protractor is called.
9
9
specs : [
10
- 'debugging/ failure_spec.js' ,
10
+ 'failure_spec.js' ,
11
11
] ,
12
12
13
13
capabilities : {
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ exports.config = {
7
7
// Spec patterns are relative to the current working directly when
8
8
// protractor is called.
9
9
specs : [
10
- 'debugging/ timeout_spec.js' ,
10
+ 'timeout_spec.js' ,
11
11
] ,
12
12
13
13
capabilities : {
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ exports.config = {
10
10
11
11
// Spec patterns are relative to the current working directly when
12
12
// protractor is called.
13
- specs : [ 'example/ onProtractorRunner.js' ] ,
13
+ specs : [ 'onProtractorRunner.js' ] ,
14
14
15
15
// Options to be passed to Jasmine-node.
16
16
jasmineNodeOpts : {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ var SauceLabs = require('saucelabs');
9
9
var glob = require ( 'glob' ) ;
10
10
11
11
var args = process . argv . slice ( 2 ) ;
12
+ var configDir ;
12
13
13
14
// Default configuration.
14
15
var config = {
@@ -76,12 +77,12 @@ var run = function() {
76
77
var specs = config . specs ;
77
78
var resolvedSpecs = [ ] ;
78
79
for ( var i = 0 ; i < specs . length ; ++ i ) {
79
- var matches = glob . sync ( specs [ i ] ) ;
80
+ var matches = glob . sync ( specs [ i ] , { cwd : configDir } ) ;
80
81
if ( ! matches . length ) {
81
82
throw new Error ( 'Test file ' + specs [ i ] + ' did not match any files.' ) ;
82
83
}
83
84
for ( var j = 0 ; j < matches . length ; ++ j ) {
84
- resolvedSpecs . push ( matches [ j ] ) ;
85
+ resolvedSpecs . push ( path . join ( configDir , matches [ j ] ) ) ;
85
86
}
86
87
}
87
88
minijn . addSpecs ( resolvedSpecs ) ;
@@ -185,7 +186,9 @@ while(args.length) {
185
186
config . seleniumPort = args . shift ( ) ;
186
187
break ;
187
188
default :
188
- config = require ( path . resolve ( process . cwd ( ) , arg ) ) . config ;
189
+ var configPath = path . resolve ( process . cwd ( ) , arg ) ;
190
+ config = require ( configPath ) . config ;
191
+ configDir = path . dirname ( configPath ) ;
189
192
break ;
190
193
}
191
194
}
Original file line number Diff line number Diff line change @@ -35,8 +35,7 @@ exports.config = {
35
35
36
36
// ----- What tests to run -----
37
37
//
38
- // Spec patterns are relative to the current working directly when
39
- // protractor is called.
38
+ // Spec patterns are relative to the location of this config.
40
39
specs : [
41
40
'spec/*_spec.js' ,
42
41
] ,
@@ -56,7 +55,7 @@ exports.config = {
56
55
baseUrl : 'http://localhost:8000' ,
57
56
58
57
// Selector for the element housing the angular app - this defaults to
59
- // body, but is necessary if ng-app is on a descendant of <body>
58
+ // body, but is necessary if ng-app is on a descendant of <body>
60
59
rootElement : 'body' ,
61
60
62
61
// ----- Options to be passed to minijasminenode -----
Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ exports.config = {
5
5
6
6
seleniumAddress : 'http://localhost:4444/wd/hub' ,
7
7
8
- // Spec patterns are relative to the current working directly when
9
- // protractor is called.
8
+ // Spec patterns are relative to this config.
10
9
specs : [
11
- 'spec/ altRoot/*_spec.js' ,
10
+ 'altRoot/*_spec.js' ,
12
11
] ,
13
12
14
13
capabilities : {
Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ exports.config = {
5
5
6
6
seleniumAddress : 'http://localhost:4444/wd/hub' ,
7
7
8
- // Spec patterns are relative to the current working directly when
9
- // protractor is called.
8
+ // Spec patterns are relative to this directory.
10
9
specs : [
11
- 'spec/ *_spec.js' ,
10
+ '*_spec.js' ,
12
11
] ,
13
12
14
13
capabilities : {
You can’t perform that action at this time.
0 commit comments