cypress-rails 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c61fae74af1660e97deea16ac3d1872a86184d2cd8d3671ef73087b65a5af16c
4
- data.tar.gz: 5caeeea8cd23182a1c8cf470ddf5df23c32b21021d87394e9d19866fcb27f568
3
+ metadata.gz: 67672b89666277b05b54d43d809daf48bd66c4c3d4b24bc52792994c378ffc6a
4
+ data.tar.gz: 20559b13133e2e32c777bb41b88607d7250ecd2281458fc60cc3ea5dee95cebf
5
5
  SHA512:
6
- metadata.gz: '075218741208d40a2c2bf92e73b41b11d165c4c17c32376036280d1a84a2ccde03b794cb3f65dbd88533254d78cefc5dd3b19f95c7b0132618310541bf436d6b'
7
- data.tar.gz: a4f2283b2d03310e608715c673f3311a175bde65c599016df55b523adf76f1ab1b99b013e62407f14c98e1454387566bab08fadad8667383cc703f96c49177ef
6
+ metadata.gz: 918352bf0a54236e1fafad16ab19d5f4a9a787278bd82e1386361076b1ba6f189ef2ccafd59d8f2545c4e32b0e34aa80ba33065a15ae2958df48e8078e1b685f
7
+ data.tar.gz: eccdf2b27a8f41d2e158060596856ec455d2d66f2c59b114db70aa47265a5f8ba3030fd435fafe5c8d78cc4390f5a26ef2cbd05f8916fb6a66ae4a761085f4e7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cypress-rails (0.0.3)
4
+ cypress-rails (0.0.4)
5
5
  capybara
6
6
  railties (>= 5.2.0)
7
7
  selenium-webdriver
@@ -41,25 +41,25 @@ GEM
41
41
  xpath (~> 3.2)
42
42
  childprocess (3.0.0)
43
43
  concurrent-ruby (1.1.5)
44
- crass (1.0.4)
44
+ crass (1.0.5)
45
45
  erubi (1.8.0)
46
46
  i18n (1.6.0)
47
47
  concurrent-ruby (~> 1.0)
48
48
  jaro_winkler (1.5.3)
49
- loofah (2.2.3)
49
+ loofah (2.3.1)
50
50
  crass (~> 1.0.2)
51
51
  nokogiri (>= 1.5.9)
52
52
  method_source (0.9.2)
53
53
  mini_mime (1.0.2)
54
54
  mini_portile2 (2.4.0)
55
55
  minitest (5.11.3)
56
- nokogiri (1.10.4)
56
+ nokogiri (1.10.8)
57
57
  mini_portile2 (~> 2.4.0)
58
58
  parallel (1.17.0)
59
59
  parser (2.6.4.1)
60
60
  ast (~> 2.4.0)
61
61
  public_suffix (4.0.1)
62
- rack (2.0.7)
62
+ rack (2.0.8)
63
63
  rack-test (1.1.0)
64
64
  rack (>= 1.0, < 3)
65
65
  rails-dom-testing (2.0.3)
@@ -74,7 +74,7 @@ GEM
74
74
  rake (>= 0.8.7)
75
75
  thor (>= 0.19.0, < 2.0)
76
76
  rainbow (3.0.0)
77
- rake (10.5.0)
77
+ rake (13.0.1)
78
78
  regexp_parser (1.6.0)
79
79
  rubocop (0.72.0)
80
80
  jaro_winkler (~> 1.5.1)
@@ -86,14 +86,14 @@ GEM
86
86
  rubocop-performance (1.4.1)
87
87
  rubocop (>= 0.71.0)
88
88
  ruby-progressbar (1.10.1)
89
- rubyzip (2.0.0)
90
- selenium-webdriver (3.142.6)
89
+ rubyzip (2.2.0)
90
+ selenium-webdriver (3.142.7)
91
91
  childprocess (>= 0.5, < 4.0)
92
92
  rubyzip (>= 1.2.2)
93
93
  standard (0.1.3)
94
94
  rubocop (~> 0.72.0)
95
95
  rubocop-performance (~> 1.4.0)
96
- thor (0.20.3)
96
+ thor (1.0.1)
97
97
  thread_safe (0.3.6)
98
98
  tzinfo (1.2.5)
99
99
  thread_safe (~> 0.1)
@@ -110,7 +110,7 @@ DEPENDENCIES
110
110
  capybara
111
111
  cypress-rails!
112
112
  minitest (~> 5.0)
113
- rake (~> 10.0)
113
+ rake (~> 13.0)
114
114
  standard (~> 0.1.3)
115
115
 
116
116
  BUNDLED WITH
data/README.md CHANGED
@@ -155,6 +155,15 @@ Or, with rake:
155
155
  $ rake cypress:run
156
156
  ```
157
157
 
158
+ ### Pass options to cypress run or open
159
+
160
+ Options can be provided to `cypress run` and `cypress open` using the
161
+ `CYPRESS_OPTS` environment variable
162
+
163
+ ```
164
+ rake cypress:run CYPRESS_OPTS="--record --key=abc123 --parallel"
165
+ ```
166
+
158
167
  ### Write Ruby tests that wrap and invoke your cypress tests
159
168
 
160
169
  You can also extend a provided `CypressRails::TestCase`, which itself inherits
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.add_dependency "selenium-webdriver"
27
27
 
28
28
  spec.add_development_dependency "bundler", "~> 1.17"
29
- spec.add_development_dependency "rake", "~> 10.0"
29
+ spec.add_development_dependency "rake", "~> 13.0"
30
30
  spec.add_development_dependency "minitest", "~> 5.0"
31
31
  spec.add_development_dependency "standard", "~> 0.1.3"
32
32
  spec.add_development_dependency "actionpack"
@@ -8,12 +8,12 @@ module CypressRails
8
8
  @finds_bin = FindsBin.new
9
9
  end
10
10
 
11
- def call(dir: Dir.pwd, port: ENV["RAILS_CYPRESS_PORT"])
11
+ def call(dir: Dir.pwd, port: ENV["RAILS_CYPRESS_PORT"], opts: ENV["CYPRESS_OPTS"])
12
12
  @starts_rails_server.call(dir: dir, port: port)
13
13
  bin = @finds_bin.call(dir)
14
14
 
15
15
  system <<~EXEC
16
- CYPRESS_BASE_URL=http://#{Capybara.server_host}:#{Capybara.server_port} #{bin} open --project "#{dir}"
16
+ CYPRESS_BASE_URL=http://#{Capybara.server_host}:#{Capybara.server_port} #{bin} open --project "#{dir}" #{opts}
17
17
  EXEC
18
18
  end
19
19
  end
@@ -8,12 +8,12 @@ module CypressRails
8
8
  @finds_bin = FindsBin.new
9
9
  end
10
10
 
11
- def call(dir: Dir.pwd, port: ENV["RAILS_CYPRESS_PORT"])
11
+ def call(dir: Dir.pwd, port: ENV["RAILS_CYPRESS_PORT"], opts: ENV["CYPRESS_OPTS"])
12
12
  @starts_rails_server.call(dir: dir, port: port)
13
13
  bin = @finds_bin.call(dir)
14
14
 
15
15
  system <<~EXEC
16
- CYPRESS_BASE_URL=http://#{Capybara.server_host}:#{Capybara.server_port} #{bin} run --project "#{dir}"
16
+ CYPRESS_BASE_URL=http://#{Capybara.server_host}:#{Capybara.server_port} #{bin} run --project "#{dir}" #{opts}
17
17
  EXEC
18
18
  end
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module CypressRails
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -7,4 +7,13 @@ directory=$1
7
7
  cd example/an_app
8
8
  bundle
9
9
  yarn install
10
+
11
+ # test a normal test run
10
12
  bundle exec rake cypress:run
13
+
14
+ # test that passing options works (by printing help)
15
+ if ! bundle exec rake cypress:run CYPRESS_OPTS="-h" | grep -q "Usage: run \[options\]"; then
16
+ echo "Failed to pass options to cypress run"
17
+ exit 1
18
+ fi
19
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cypress-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-11-04 00:00:00.000000000 Z
11
+ date: 2020-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '10.0'
75
+ version: '13.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '10.0'
82
+ version: '13.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: minitest
85
85
  requirement: !ruby/object:Gem::Requirement