protractor-rails 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +16 -1
- data/lib/protractor/rails/version.rb +1 -1
- data/lib/tasks/protractor.rake +6 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80b33f3dc4595f5b9c54eda75c31d1a6f01f9da6
|
4
|
+
data.tar.gz: cbf20359cb8cbee1af1ee4cf05c48d32c6867b37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b9e22b26046a558044a380f85b8c66aa1b0625ccaf75cbccbd1a5af728ef995e736192e78db5d035507a335abb6645c328be6ea69b9a3d886afd38e48ab0978
|
7
|
+
data.tar.gz: 4d9a9325a455721dde218c26ff13a8d9bfbc62bdceddd855e851e42e248e8c9bcd8b6af543864a9d72b4e23bc1cf8f3705d14ac11a817962ff5a6ada18818fb0
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -82,9 +82,24 @@ Once you have setup your tests as above, running `rake protractor:spec` will pic
|
|
82
82
|
|
83
83
|
You can specify the binding for the rails server as an environment variable: `rake protractor:spec rails_binding=hostname_or_ip`.
|
84
84
|
|
85
|
+
### Suites
|
86
|
+
|
87
|
+
If you want to organise your tests then you can use suites. Replace the specs: line in the above with the following
|
88
|
+
|
89
|
+
suites: {
|
90
|
+
login: 'protractor_specs/login/*.js',
|
91
|
+
user: 'protractor_specs/user/*.js'
|
92
|
+
},
|
93
|
+
|
85
94
|
You can run specific test suites by passing in options to the rake task as per the below example.
|
86
95
|
|
87
|
-
$ rake protractor:spec --suite suite-name
|
96
|
+
$ rake protractor:spec -- --suite suite-name
|
97
|
+
|
98
|
+
**NOTE You must have the -- first otherwise rake will think the arguments are for rake instead of the task**
|
99
|
+
|
100
|
+
### Run a specific spec file
|
101
|
+
|
102
|
+
$ rake protractor:spec -- --specs spec-filename
|
88
103
|
|
89
104
|
### Setup and teardown
|
90
105
|
|
data/lib/tasks/protractor.rake
CHANGED
@@ -22,6 +22,11 @@ namespace :protractor do |args|
|
|
22
22
|
begin
|
23
23
|
options = ''
|
24
24
|
OptionParser.new(args) do |opts|
|
25
|
+
# Test specific spec files instead of a whole suite.
|
26
|
+
specsKey = '--specs'
|
27
|
+
opts.on("#{specsKey} {filename}", 'Test spec files', String) do |filename|
|
28
|
+
options = options + "#{specsKey} #{filename}"
|
29
|
+
end
|
25
30
|
# Suite setup
|
26
31
|
suiteKey = '--suite'
|
27
32
|
opts.on("#{suiteKey} {suite}", 'Test suite name', String) do |suite|
|
@@ -75,7 +80,7 @@ namespace :protractor do |args|
|
|
75
80
|
|
76
81
|
task :kill_rails do
|
77
82
|
puts "kill protractor rails tests server...".yellow
|
78
|
-
system "ps aux | grep -ie 'rails s -e test
|
83
|
+
system "ps aux | grep -ie 'rails s -e test -P tmp/pids/protractor_test_server.pid --port=4000' | awk '{print $2}' | xargs kill -9"
|
79
84
|
end
|
80
85
|
|
81
86
|
task :rails do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: protractor-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyrone Wilson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|