cypress-rails 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +34 -37
- data/README.md +11 -2
- data/lib/cypress-rails/manages_transactions.rb +1 -13
- data/lib/cypress-rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c66865f1f844c8e3bd6fc86a881db8059fe26db9ebe70b1eeb0fc05e6ace601a
|
4
|
+
data.tar.gz: b94c1d60432ba1cf738f43574ef5ee9a831a2420cfcc4091446d6c0837860b64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8878b2be16bd34dbcb4994a0d2cec648dc1fdf41ea88dea4b51092d9e882d7e199dbd189dbc1873f96b3c5834f04df05b08a7592de55b71649cd8f7720e3c07
|
7
|
+
data.tar.gz: 1f200193af7bdddc8e4c56f9d3a3f9b38eeed17fef9e7cd5a26fa0c31b93eb6ba04a4e62b73ed42c5d7c79d6382d9883754311a5a946d4cf8ef00861d1c1d609
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,40 +1,40 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cypress-rails (0.4.
|
4
|
+
cypress-rails (0.4.2)
|
5
5
|
puma (>= 3.8.0)
|
6
6
|
railties (>= 5.2.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionpack (6.0
|
12
|
-
actionview (= 6.0
|
13
|
-
activesupport (= 6.0
|
14
|
-
rack (~> 2.0, >= 2.0.
|
11
|
+
actionpack (6.1.0)
|
12
|
+
actionview (= 6.1.0)
|
13
|
+
activesupport (= 6.1.0)
|
14
|
+
rack (~> 2.0, >= 2.0.9)
|
15
15
|
rack-test (>= 0.6.3)
|
16
16
|
rails-dom-testing (~> 2.0)
|
17
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
18
|
-
actionview (6.0
|
19
|
-
activesupport (= 6.0
|
18
|
+
actionview (6.1.0)
|
19
|
+
activesupport (= 6.1.0)
|
20
20
|
builder (~> 3.1)
|
21
21
|
erubi (~> 1.4)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
24
|
-
activesupport (6.0
|
24
|
+
activesupport (6.1.0)
|
25
25
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
|
-
i18n (>=
|
27
|
-
minitest (
|
28
|
-
tzinfo (~>
|
29
|
-
zeitwerk (~> 2.
|
26
|
+
i18n (>= 1.6, < 2)
|
27
|
+
minitest (>= 5.1)
|
28
|
+
tzinfo (~> 2.0)
|
29
|
+
zeitwerk (~> 2.3)
|
30
30
|
ast (2.4.1)
|
31
31
|
builder (3.2.4)
|
32
32
|
concurrent-ruby (1.1.7)
|
33
33
|
crass (1.0.6)
|
34
|
-
erubi (1.
|
34
|
+
erubi (1.10.0)
|
35
35
|
i18n (1.8.5)
|
36
36
|
concurrent-ruby (~> 1.0)
|
37
|
-
loofah (2.
|
37
|
+
loofah (2.8.0)
|
38
38
|
crass (~> 1.0.2)
|
39
39
|
nokogiri (>= 1.5.9)
|
40
40
|
method_source (1.0.0)
|
@@ -43,10 +43,10 @@ GEM
|
|
43
43
|
nio4r (2.5.4)
|
44
44
|
nokogiri (1.10.10)
|
45
45
|
mini_portile2 (~> 2.4.0)
|
46
|
-
parallel (1.
|
47
|
-
parser (2.7.
|
46
|
+
parallel (1.20.1)
|
47
|
+
parser (2.7.2.0)
|
48
48
|
ast (~> 2.4.1)
|
49
|
-
puma (5.
|
49
|
+
puma (5.1.1)
|
50
50
|
nio4r (~> 2.0)
|
51
51
|
rack (2.2.3)
|
52
52
|
rack-test (1.1.0)
|
@@ -56,42 +56,39 @@ GEM
|
|
56
56
|
nokogiri (>= 1.6)
|
57
57
|
rails-html-sanitizer (1.3.0)
|
58
58
|
loofah (~> 2.3)
|
59
|
-
railties (6.0
|
60
|
-
actionpack (= 6.0
|
61
|
-
activesupport (= 6.0
|
59
|
+
railties (6.1.0)
|
60
|
+
actionpack (= 6.1.0)
|
61
|
+
activesupport (= 6.1.0)
|
62
62
|
method_source
|
63
63
|
rake (>= 0.8.7)
|
64
|
-
thor (
|
64
|
+
thor (~> 1.0)
|
65
65
|
rainbow (3.0.0)
|
66
66
|
rake (13.0.1)
|
67
|
-
regexp_parser (
|
67
|
+
regexp_parser (2.0.0)
|
68
68
|
rexml (3.2.4)
|
69
|
-
rubocop (
|
69
|
+
rubocop (1.4.2)
|
70
70
|
parallel (~> 1.10)
|
71
71
|
parser (>= 2.7.1.5)
|
72
72
|
rainbow (>= 2.2.2, < 4.0)
|
73
|
-
regexp_parser (>= 1.
|
73
|
+
regexp_parser (>= 1.8)
|
74
74
|
rexml
|
75
|
-
rubocop-ast (>=
|
75
|
+
rubocop-ast (>= 1.1.1)
|
76
76
|
ruby-progressbar (~> 1.7)
|
77
77
|
unicode-display_width (>= 1.4.0, < 2.0)
|
78
|
-
rubocop-ast (
|
78
|
+
rubocop-ast (1.3.0)
|
79
79
|
parser (>= 2.7.1.5)
|
80
|
-
|
81
|
-
|
82
|
-
rubocop (>= 0.87.0)
|
80
|
+
rubocop-performance (1.9.1)
|
81
|
+
rubocop (>= 0.90.0, < 2.0)
|
83
82
|
rubocop-ast (>= 0.4.0)
|
84
83
|
ruby-progressbar (1.10.1)
|
85
|
-
standard (0.
|
86
|
-
rubocop (=
|
87
|
-
rubocop-performance (= 1.
|
88
|
-
strscan (1.0.3)
|
84
|
+
standard (0.10.2)
|
85
|
+
rubocop (= 1.4.2)
|
86
|
+
rubocop-performance (= 1.9.1)
|
89
87
|
thor (1.0.1)
|
90
|
-
|
91
|
-
|
92
|
-
thread_safe (~> 0.1)
|
88
|
+
tzinfo (2.0.4)
|
89
|
+
concurrent-ruby (~> 1.0)
|
93
90
|
unicode-display_width (1.7.0)
|
94
|
-
zeitwerk (2.4.
|
91
|
+
zeitwerk (2.4.2)
|
95
92
|
|
96
93
|
PLATFORMS
|
97
94
|
ruby
|
data/README.md
CHANGED
@@ -138,9 +138,9 @@ This way, you can easily instruct the server to reset its test state from your
|
|
138
138
|
Cypress tests like so:
|
139
139
|
|
140
140
|
```js
|
141
|
-
beforeEach(() =>
|
141
|
+
beforeEach(() => {
|
142
142
|
cy.request('/cypress_rails_reset_state')
|
143
|
-
)
|
143
|
+
})
|
144
144
|
```
|
145
145
|
|
146
146
|
(Remember, in Cypress, `before` is a before-all hook and `beforeEach` is run
|
@@ -172,6 +172,15 @@ preferred environment variables project-wide using a tool like
|
|
172
172
|
* **CYPRESS_RAILS_CYPRESS_OPTS** (default: _none_) any options you want to
|
173
173
|
forward to the Cypress CLI when running its `open` or `run` commands
|
174
174
|
|
175
|
+
#### Example: Running a single spec from the command line
|
176
|
+
|
177
|
+
It's a little verbose, but an example of using the above options to run a single
|
178
|
+
Cypress test would look like this:
|
179
|
+
|
180
|
+
```
|
181
|
+
$ CYPRESS_RAILS_CYPRESS_OPTS="--spec cypress/integration/a_test.js" bin/rake cypress:run
|
182
|
+
```
|
183
|
+
|
175
184
|
### Initializer hooks
|
176
185
|
|
177
186
|
### before_server_start
|
@@ -68,19 +68,7 @@ module CypressRails
|
|
68
68
|
# need to share a connection pool so that the reading connection
|
69
69
|
# can see data in the open transaction on the writing connection.
|
70
70
|
def setup_shared_connection_pool
|
71
|
-
|
72
|
-
|
73
|
-
writing_handler = ActiveRecord::Base.connection_handler
|
74
|
-
ActiveRecord::Base.connection_handlers.values.each do |handler|
|
75
|
-
if handler != writing_handler
|
76
|
-
handler.connection_pool_list.each do |pool|
|
77
|
-
name = pool.spec.name
|
78
|
-
writing_connection = writing_handler.retrieve_connection_pool(name)
|
79
|
-
return nil unless writing_connection
|
80
|
-
handler.send(:owner_to_pool)[name] = writing_connection
|
81
|
-
end
|
82
|
-
end
|
83
|
-
end
|
71
|
+
ActiveRecord::TestFixtures.instance_method(:setup_shared_connection_pool).bind(self).call
|
84
72
|
end
|
85
73
|
end
|
86
74
|
end
|
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.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|