e2e 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 342adef1a62250902049417eea009bda8913b09cbe1647d6296252a95247c63c
4
- data.tar.gz: bebb9795471ba014c145be81a02d134ea79f7516e2937dcc2b6597e6a4e0e5a8
3
+ metadata.gz: a61ba407c8deaba2a2e1f439b5a9811b0344bae63a53b49b59ccdd6db711d0c1
4
+ data.tar.gz: 71079c8ed8bee1aa479b2eba7d78290abb03f06b4533ef4b554f27848c96ce7a
5
5
  SHA512:
6
- metadata.gz: d10e9a9b09628ea51b0b286b72deaf567d625368c5dd63c955c61d6aa47986644f63c5e4b469c18e19242e40d186bd571f15199e7fe943a37452b97494bee78b
7
- data.tar.gz: f64645a7f01ecb1f8ad66bd7b0782b8b111afefcaa92eb021a290695d36d1c217bc47b8073ef380a1aa64cc08ef141a7f2fdf16b744665aceac22a5afcdac628
6
+ metadata.gz: 5ea1c183412f5b3615a45483d6492466f84414a7439dbd6a2bdc96b4aa8d602f29fae211a27851642ffa10c27865b5198a2e6a5e58f5d8e9a160cc1a588a9f9d
7
+ data.tar.gz: 0554cf1e4dcf4fcdfc8f8c645dbb3e950f549d17e739f39dcc5559d7b0b83aa7db7398240b6722dfd2e3209b4afa4c7a632f3b610e1e8a33d3d6f6135d30edb2
data/Appraisals CHANGED
@@ -13,3 +13,7 @@ end
13
13
  appraise "rails-8.0" do
14
14
  gem "rails", "~> 8.0.0"
15
15
  end
16
+
17
+ appraise "rails-8.1" do
18
+ gem "rails", "~> 8.1.0"
19
+ end
data/CHANGELOG.md CHANGED
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.5.0] - 2026-02-09
11
+
12
+ ### Added
13
+
14
+ - Minitest integration now includes auto-waiting assertions: `assert_text`, `refute_text`, `assert_selector`, `refute_selector`, `assert_current_path`, `refute_current_path`
15
+ - `E2E::Minitest::TestCase` now automatically quits the browser session after the test suite finishes
16
+
10
17
  ## [0.4.2] - 2026-02-07
11
18
 
12
19
  ### Fixed
data/README.md CHANGED
@@ -107,7 +107,8 @@ class UserLoginTest < E2E::Minitest::TestCase
107
107
  fill_in "Password", with: "password"
108
108
  click_button "Sign In"
109
109
 
110
- assert_includes page.body, "Welcome, User!"
110
+ assert_text "Welcome, User!"
111
+ assert_current_path "/dashboard"
111
112
  end
112
113
  end
113
114
  ```
@@ -122,6 +123,8 @@ Set the `HEADLESS` environment variable to `false`:
122
123
 
123
124
  ```bash
124
125
  HEADLESS=false bundle exec rspec spec/e2e
126
+ # or for minitest
127
+ HEADLESS=false ruby test/e2e/login_test.rb
125
128
  ```
126
129
 
127
130
  ### Pausing for Debugging
@@ -142,7 +145,7 @@ Alternatively, you can just use `sleep(10)` if you want the browser to stay open
142
145
 
143
146
  ### Automatic Screenshots
144
147
 
145
- If a test fails in RSpec, a screenshot is automatically saved to `tmp/screenshots/` for quick investigation.
148
+ If a test fails, a screenshot is automatically saved to `tmp/screenshots/` for quick investigation.
146
149
 
147
150
  ### API Reference
148
151
 
@@ -175,7 +178,7 @@ all("li") # Returns Array<E2E::Element>
175
178
  find("button", text: "Save") # Filter by text
176
179
  ```
177
180
 
178
- #### Assertions & Matchers
181
+ #### RSpec Matchers
179
182
 
180
183
  All text and path matchers **automatically wait** for the expected condition to be met (up to `wait_timeout` seconds), making your tests resilient to page transitions and async rendering.
181
184
 
@@ -207,6 +210,26 @@ expect(find("button")).to be_disabled
207
210
  expect(find("input")).to be_enabled
208
211
  ```
209
212
 
213
+ #### Minitest Assertions
214
+
215
+ These assertions mimic the behavior of RSpec matchers, including **auto-waiting**.
216
+
217
+ ```ruby
218
+ # Check for content (auto-waiting)
219
+ assert_text "Welcome"
220
+ refute_text "Error"
221
+ assert_text /welcome/i
222
+
223
+ # Check for specific elements (auto-waiting)
224
+ assert_selector ".user-profile"
225
+ refute_selector "#loading-spinner"
226
+
227
+ # Check current path (auto-waiting)
228
+ assert_current_path "/dashboard"
229
+ assert_current_path /\/users\/\d+/
230
+ refute_current_path "/login"
231
+ ```
232
+
210
233
  #### Assertions & Data
211
234
 
212
235
  ```ruby
data/Rakefile CHANGED
@@ -2,11 +2,18 @@
2
2
 
3
3
  require "bundler/gem_tasks"
4
4
  require "rspec/core/rake_task"
5
+ require "rake/testtask"
6
+ require "rubocop/rake_task"
5
7
 
6
8
  RSpec::Core::RakeTask.new(:spec)
7
9
 
8
- require "rubocop/rake_task"
10
+ Rake::TestTask.new(:test) do |t|
11
+ t.libs << "lib"
12
+ t.libs << "spec"
13
+ t.test_files = FileList["spec/**/*_test.rb"]
14
+ t.verbose = true
15
+ end
9
16
 
10
17
  RuboCop::RakeTask.new
11
18
 
12
- task default: %i[spec rubocop]
19
+ task default: %i[spec test rubocop]
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- e2e (0.4.2)
4
+ e2e (0.5.0)
5
5
  playwright-ruby-client (>= 1.40.0)
6
6
  rack
7
7
  rackup
@@ -105,8 +105,9 @@ GEM
105
105
  i18n (1.14.8)
106
106
  concurrent-ruby (~> 1.0)
107
107
  io-console (0.8.2)
108
- irb (1.16.0)
108
+ irb (1.17.0)
109
109
  pp (>= 0.6.0)
110
+ prism (>= 1.3.0)
110
111
  rdoc (>= 4.0.0)
111
112
  reline (>= 0.4.2)
112
113
  json (2.18.1)
@@ -303,6 +304,7 @@ DEPENDENCIES
303
304
  e2e!
304
305
  irb
305
306
  lefthook
307
+ minitest
306
308
  rails (~> 7.0.0)
307
309
  rake (~> 13.0)
308
310
  rspec (~> 3.0)
@@ -335,13 +337,13 @@ CHECKSUMS
335
337
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
336
338
  docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
337
339
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
338
- e2e (0.4.2)
340
+ e2e (0.5.0)
339
341
  erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
340
342
  erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
341
343
  globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
342
344
  i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
343
345
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
344
- irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806
346
+ irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae
345
347
  json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
346
348
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
347
349
  lefthook (2.1.0) sha256=a100dc90139806e62b9aa40cf32e9edf34f6cff10c8b55ebd14a1b0add4b86bf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- e2e (0.4.2)
4
+ e2e (0.5.0)
5
5
  playwright-ruby-client (>= 1.40.0)
6
6
  rack
7
7
  rackup
@@ -113,8 +113,9 @@ GEM
113
113
  i18n (1.14.8)
114
114
  concurrent-ruby (~> 1.0)
115
115
  io-console (0.8.2)
116
- irb (1.16.0)
116
+ irb (1.17.0)
117
117
  pp (>= 0.6.0)
118
+ prism (>= 1.3.0)
118
119
  rdoc (>= 4.0.0)
119
120
  reline (>= 0.4.2)
120
121
  json (2.18.1)
@@ -315,6 +316,7 @@ DEPENDENCIES
315
316
  e2e!
316
317
  irb
317
318
  lefthook
319
+ minitest
318
320
  rails (~> 7.1.0)
319
321
  rake (~> 13.0)
320
322
  rspec (~> 3.0)
@@ -349,13 +351,13 @@ CHECKSUMS
349
351
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
350
352
  docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
351
353
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
352
- e2e (0.4.2)
354
+ e2e (0.5.0)
353
355
  erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
354
356
  erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
355
357
  globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
356
358
  i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
357
359
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
358
- irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806
360
+ irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae
359
361
  json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
360
362
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
361
363
  lefthook (2.1.0) sha256=a100dc90139806e62b9aa40cf32e9edf34f6cff10c8b55ebd14a1b0add4b86bf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- e2e (0.4.2)
4
+ e2e (0.5.0)
5
5
  playwright-ruby-client (>= 1.40.0)
6
6
  rack
7
7
  rackup
@@ -107,8 +107,9 @@ GEM
107
107
  i18n (1.14.8)
108
108
  concurrent-ruby (~> 1.0)
109
109
  io-console (0.8.2)
110
- irb (1.16.0)
110
+ irb (1.17.0)
111
111
  pp (>= 0.6.0)
112
+ prism (>= 1.3.0)
112
113
  rdoc (>= 4.0.0)
113
114
  reline (>= 0.4.2)
114
115
  json (2.18.1)
@@ -309,6 +310,7 @@ DEPENDENCIES
309
310
  e2e!
310
311
  irb
311
312
  lefthook
313
+ minitest
312
314
  rails (~> 7.2.0)
313
315
  rake (~> 13.0)
314
316
  rspec (~> 3.0)
@@ -343,13 +345,13 @@ CHECKSUMS
343
345
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
344
346
  docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
345
347
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
346
- e2e (0.4.2)
348
+ e2e (0.5.0)
347
349
  erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
348
350
  erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
349
351
  globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
350
352
  i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
351
353
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
352
- irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806
354
+ irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae
353
355
  json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
354
356
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
355
357
  lefthook (2.1.0) sha256=a100dc90139806e62b9aa40cf32e9edf34f6cff10c8b55ebd14a1b0add4b86bf
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- e2e (0.4.2)
4
+ e2e (0.5.0)
5
5
  playwright-ruby-client (>= 1.40.0)
6
6
  rack
7
7
  rackup
@@ -104,8 +104,9 @@ GEM
104
104
  i18n (1.14.8)
105
105
  concurrent-ruby (~> 1.0)
106
106
  io-console (0.8.2)
107
- irb (1.16.0)
107
+ irb (1.17.0)
108
108
  pp (>= 0.6.0)
109
+ prism (>= 1.3.0)
109
110
  rdoc (>= 4.0.0)
110
111
  reline (>= 0.4.2)
111
112
  json (2.18.1)
@@ -306,6 +307,7 @@ DEPENDENCIES
306
307
  e2e!
307
308
  irb
308
309
  lefthook
310
+ minitest
309
311
  rails (~> 8.0.0)
310
312
  rake (~> 13.0)
311
313
  rspec (~> 3.0)
@@ -339,13 +341,13 @@ CHECKSUMS
339
341
  diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
340
342
  docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
341
343
  drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
342
- e2e (0.4.2)
344
+ e2e (0.5.0)
343
345
  erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
344
346
  erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
345
347
  globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
346
348
  i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
347
349
  io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
348
- irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806
350
+ irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae
349
351
  json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
350
352
  language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
351
353
  lefthook (2.1.0) sha256=a100dc90139806e62b9aa40cf32e9edf34f6cff10c8b55ebd14a1b0add4b86bf
@@ -0,0 +1,15 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "irb"
6
+ gem "rake", "~> 13.0"
7
+ gem "rspec", "~> 3.0"
8
+ gem "appraisal"
9
+ gem "lefthook"
10
+ gem "standard"
11
+ gem "rubocop-rspec"
12
+ gem "rubocop-performance"
13
+ gem "rails", "~> 8.1.0"
14
+
15
+ gemspec path: "../"
@@ -0,0 +1,431 @@
1
+ PATH
2
+ remote: ..
3
+ specs:
4
+ e2e (0.5.0)
5
+ playwright-ruby-client (>= 1.40.0)
6
+ rack
7
+ rackup
8
+ webrick
9
+
10
+ GEM
11
+ remote: https://rubygems.org/
12
+ specs:
13
+ action_text-trix (2.1.16)
14
+ railties
15
+ actioncable (8.1.2)
16
+ actionpack (= 8.1.2)
17
+ activesupport (= 8.1.2)
18
+ nio4r (~> 2.0)
19
+ websocket-driver (>= 0.6.1)
20
+ zeitwerk (~> 2.6)
21
+ actionmailbox (8.1.2)
22
+ actionpack (= 8.1.2)
23
+ activejob (= 8.1.2)
24
+ activerecord (= 8.1.2)
25
+ activestorage (= 8.1.2)
26
+ activesupport (= 8.1.2)
27
+ mail (>= 2.8.0)
28
+ actionmailer (8.1.2)
29
+ actionpack (= 8.1.2)
30
+ actionview (= 8.1.2)
31
+ activejob (= 8.1.2)
32
+ activesupport (= 8.1.2)
33
+ mail (>= 2.8.0)
34
+ rails-dom-testing (~> 2.2)
35
+ actionpack (8.1.2)
36
+ actionview (= 8.1.2)
37
+ activesupport (= 8.1.2)
38
+ nokogiri (>= 1.8.5)
39
+ rack (>= 2.2.4)
40
+ rack-session (>= 1.0.1)
41
+ rack-test (>= 0.6.3)
42
+ rails-dom-testing (~> 2.2)
43
+ rails-html-sanitizer (~> 1.6)
44
+ useragent (~> 0.16)
45
+ actiontext (8.1.2)
46
+ action_text-trix (~> 2.1.15)
47
+ actionpack (= 8.1.2)
48
+ activerecord (= 8.1.2)
49
+ activestorage (= 8.1.2)
50
+ activesupport (= 8.1.2)
51
+ globalid (>= 0.6.0)
52
+ nokogiri (>= 1.8.5)
53
+ actionview (8.1.2)
54
+ activesupport (= 8.1.2)
55
+ builder (~> 3.1)
56
+ erubi (~> 1.11)
57
+ rails-dom-testing (~> 2.2)
58
+ rails-html-sanitizer (~> 1.6)
59
+ activejob (8.1.2)
60
+ activesupport (= 8.1.2)
61
+ globalid (>= 0.3.6)
62
+ activemodel (8.1.2)
63
+ activesupport (= 8.1.2)
64
+ activerecord (8.1.2)
65
+ activemodel (= 8.1.2)
66
+ activesupport (= 8.1.2)
67
+ timeout (>= 0.4.0)
68
+ activestorage (8.1.2)
69
+ actionpack (= 8.1.2)
70
+ activejob (= 8.1.2)
71
+ activerecord (= 8.1.2)
72
+ activesupport (= 8.1.2)
73
+ marcel (~> 1.0)
74
+ activesupport (8.1.2)
75
+ base64
76
+ bigdecimal
77
+ concurrent-ruby (~> 1.0, >= 1.3.1)
78
+ connection_pool (>= 2.2.5)
79
+ drb
80
+ i18n (>= 1.6, < 2)
81
+ json
82
+ logger (>= 1.4.2)
83
+ minitest (>= 5.1)
84
+ securerandom (>= 0.3)
85
+ tzinfo (~> 2.0, >= 2.0.5)
86
+ uri (>= 0.13.1)
87
+ appraisal (2.5.0)
88
+ bundler
89
+ rake
90
+ thor (>= 0.14.0)
91
+ ast (2.4.3)
92
+ base64 (0.3.0)
93
+ bigdecimal (4.0.1)
94
+ builder (3.3.0)
95
+ concurrent-ruby (1.3.6)
96
+ connection_pool (3.0.2)
97
+ crass (1.0.6)
98
+ date (3.5.1)
99
+ diff-lcs (1.6.2)
100
+ docile (1.4.1)
101
+ drb (2.2.3)
102
+ erb (6.0.1)
103
+ erubi (1.13.1)
104
+ globalid (1.3.0)
105
+ activesupport (>= 6.1)
106
+ i18n (1.14.8)
107
+ concurrent-ruby (~> 1.0)
108
+ io-console (0.8.2)
109
+ irb (1.17.0)
110
+ pp (>= 0.6.0)
111
+ prism (>= 1.3.0)
112
+ rdoc (>= 4.0.0)
113
+ reline (>= 0.4.2)
114
+ json (2.18.1)
115
+ language_server-protocol (3.17.0.5)
116
+ lefthook (2.1.0)
117
+ lint_roller (1.1.0)
118
+ logger (1.7.0)
119
+ loofah (2.25.0)
120
+ crass (~> 1.0.2)
121
+ nokogiri (>= 1.12.0)
122
+ mail (2.9.0)
123
+ logger
124
+ mini_mime (>= 0.1.1)
125
+ net-imap
126
+ net-pop
127
+ net-smtp
128
+ marcel (1.1.0)
129
+ mime-types (3.7.0)
130
+ logger
131
+ mime-types-data (~> 3.2025, >= 3.2025.0507)
132
+ mime-types-data (3.2026.0203)
133
+ mini_mime (1.1.5)
134
+ minitest (6.0.1)
135
+ prism (~> 1.5)
136
+ net-imap (0.6.2)
137
+ date
138
+ net-protocol
139
+ net-pop (0.1.2)
140
+ net-protocol
141
+ net-protocol (0.2.2)
142
+ timeout
143
+ net-smtp (0.5.1)
144
+ net-protocol
145
+ nio4r (2.7.5)
146
+ nokogiri (1.19.0-aarch64-linux-gnu)
147
+ racc (~> 1.4)
148
+ nokogiri (1.19.0-aarch64-linux-musl)
149
+ racc (~> 1.4)
150
+ nokogiri (1.19.0-arm-linux-gnu)
151
+ racc (~> 1.4)
152
+ nokogiri (1.19.0-arm-linux-musl)
153
+ racc (~> 1.4)
154
+ nokogiri (1.19.0-arm64-darwin)
155
+ racc (~> 1.4)
156
+ nokogiri (1.19.0-x86_64-darwin)
157
+ racc (~> 1.4)
158
+ nokogiri (1.19.0-x86_64-linux-gnu)
159
+ racc (~> 1.4)
160
+ nokogiri (1.19.0-x86_64-linux-musl)
161
+ racc (~> 1.4)
162
+ parallel (1.27.0)
163
+ parser (3.3.10.1)
164
+ ast (~> 2.4.1)
165
+ racc
166
+ playwright-ruby-client (1.58.0)
167
+ base64
168
+ concurrent-ruby (>= 1.1.6)
169
+ mime-types (>= 3.0)
170
+ pp (0.6.3)
171
+ prettyprint
172
+ prettyprint (0.2.0)
173
+ prism (1.9.0)
174
+ psych (5.3.1)
175
+ date
176
+ stringio
177
+ racc (1.8.1)
178
+ rack (3.2.4)
179
+ rack-session (2.1.1)
180
+ base64 (>= 0.1.0)
181
+ rack (>= 3.0.0)
182
+ rack-test (2.2.0)
183
+ rack (>= 1.3)
184
+ rackup (2.3.1)
185
+ rack (>= 3)
186
+ rails (8.1.2)
187
+ actioncable (= 8.1.2)
188
+ actionmailbox (= 8.1.2)
189
+ actionmailer (= 8.1.2)
190
+ actionpack (= 8.1.2)
191
+ actiontext (= 8.1.2)
192
+ actionview (= 8.1.2)
193
+ activejob (= 8.1.2)
194
+ activemodel (= 8.1.2)
195
+ activerecord (= 8.1.2)
196
+ activestorage (= 8.1.2)
197
+ activesupport (= 8.1.2)
198
+ bundler (>= 1.15.0)
199
+ railties (= 8.1.2)
200
+ rails-dom-testing (2.3.0)
201
+ activesupport (>= 5.0.0)
202
+ minitest
203
+ nokogiri (>= 1.6)
204
+ rails-html-sanitizer (1.6.2)
205
+ loofah (~> 2.21)
206
+ nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
207
+ railties (8.1.2)
208
+ actionpack (= 8.1.2)
209
+ activesupport (= 8.1.2)
210
+ irb (~> 1.13)
211
+ rackup (>= 1.0.0)
212
+ rake (>= 12.2)
213
+ thor (~> 1.0, >= 1.2.2)
214
+ tsort (>= 0.2)
215
+ zeitwerk (~> 2.6)
216
+ rainbow (3.1.1)
217
+ rake (13.3.1)
218
+ rdoc (7.1.0)
219
+ erb
220
+ psych (>= 4.0.0)
221
+ tsort
222
+ regexp_parser (2.11.3)
223
+ reline (0.6.3)
224
+ io-console (~> 0.5)
225
+ rspec (3.13.2)
226
+ rspec-core (~> 3.13.0)
227
+ rspec-expectations (~> 3.13.0)
228
+ rspec-mocks (~> 3.13.0)
229
+ rspec-core (3.13.6)
230
+ rspec-support (~> 3.13.0)
231
+ rspec-expectations (3.13.5)
232
+ diff-lcs (>= 1.2.0, < 2.0)
233
+ rspec-support (~> 3.13.0)
234
+ rspec-mocks (3.13.7)
235
+ diff-lcs (>= 1.2.0, < 2.0)
236
+ rspec-support (~> 3.13.0)
237
+ rspec-support (3.13.7)
238
+ rubocop (1.82.1)
239
+ json (~> 2.3)
240
+ language_server-protocol (~> 3.17.0.2)
241
+ lint_roller (~> 1.1.0)
242
+ parallel (~> 1.10)
243
+ parser (>= 3.3.0.2)
244
+ rainbow (>= 2.2.2, < 4.0)
245
+ regexp_parser (>= 2.9.3, < 3.0)
246
+ rubocop-ast (>= 1.48.0, < 2.0)
247
+ ruby-progressbar (~> 1.7)
248
+ unicode-display_width (>= 2.4.0, < 4.0)
249
+ rubocop-ast (1.49.0)
250
+ parser (>= 3.3.7.2)
251
+ prism (~> 1.7)
252
+ rubocop-performance (1.26.1)
253
+ lint_roller (~> 1.1)
254
+ rubocop (>= 1.75.0, < 2.0)
255
+ rubocop-ast (>= 1.47.1, < 2.0)
256
+ rubocop-rspec (3.9.0)
257
+ lint_roller (~> 1.1)
258
+ rubocop (~> 1.81)
259
+ ruby-progressbar (1.13.0)
260
+ securerandom (0.4.1)
261
+ simplecov (0.22.0)
262
+ docile (~> 1.1)
263
+ simplecov-html (~> 0.11)
264
+ simplecov_json_formatter (~> 0.1)
265
+ simplecov-html (0.13.2)
266
+ simplecov_json_formatter (0.1.4)
267
+ standard (1.53.0)
268
+ language_server-protocol (~> 3.17.0.2)
269
+ lint_roller (~> 1.0)
270
+ rubocop (~> 1.82.0)
271
+ standard-custom (~> 1.0.0)
272
+ standard-performance (~> 1.8)
273
+ standard-custom (1.0.2)
274
+ lint_roller (~> 1.0)
275
+ rubocop (~> 1.50)
276
+ standard-performance (1.9.0)
277
+ lint_roller (~> 1.1)
278
+ rubocop-performance (~> 1.26.0)
279
+ stringio (3.2.0)
280
+ thor (1.5.0)
281
+ timeout (0.6.0)
282
+ tsort (0.2.0)
283
+ tzinfo (2.0.6)
284
+ concurrent-ruby (~> 1.0)
285
+ unicode-display_width (3.2.0)
286
+ unicode-emoji (~> 4.1)
287
+ unicode-emoji (4.2.0)
288
+ uri (1.1.1)
289
+ useragent (0.16.11)
290
+ webrick (1.9.2)
291
+ websocket-driver (0.8.0)
292
+ base64
293
+ websocket-extensions (>= 0.1.0)
294
+ websocket-extensions (0.1.5)
295
+ zeitwerk (2.7.4)
296
+
297
+ PLATFORMS
298
+ aarch64-linux-gnu
299
+ aarch64-linux-musl
300
+ arm-linux-gnu
301
+ arm-linux-musl
302
+ arm64-darwin
303
+ x86_64-darwin
304
+ x86_64-linux-gnu
305
+ x86_64-linux-musl
306
+
307
+ DEPENDENCIES
308
+ appraisal
309
+ e2e!
310
+ irb
311
+ lefthook
312
+ minitest
313
+ rails (~> 8.1.0)
314
+ rake (~> 13.0)
315
+ rspec (~> 3.0)
316
+ rubocop-performance
317
+ rubocop-rspec
318
+ simplecov
319
+ standard
320
+
321
+ CHECKSUMS
322
+ action_text-trix (2.1.16) sha256=f645a2c21821b8449fd1d6770708f4031c91a2eedf9ef476e9be93c64e703a8a
323
+ actioncable (8.1.2) sha256=dc31efc34cca9cdefc5c691ddb8b4b214c0ea5cd1372108cbc1377767fb91969
324
+ actionmailbox (8.1.2) sha256=058b2fb1980e5d5a894f675475fcfa45c62631103d5a2596d9610ec81581889b
325
+ actionmailer (8.1.2) sha256=f4c1d2060f653bfe908aa7fdc5a61c0e5279670de992146582f2e36f8b9175e9
326
+ actionpack (8.1.2) sha256=ced74147a1f0daafaa4bab7f677513fd4d3add574c7839958f7b4f1de44f8423
327
+ actiontext (8.1.2) sha256=0bf57da22a9c19d970779c3ce24a56be31b51c7640f2763ec64aa72e358d2d2d
328
+ actionview (8.1.2) sha256=80455b2588911c9b72cec22d240edacb7c150e800ef2234821269b2b2c3e2e5b
329
+ activejob (8.1.2) sha256=908dab3713b101859536375819f4156b07bdf4c232cc645e7538adb9e302f825
330
+ activemodel (8.1.2) sha256=e21358c11ce68aed3f9838b7e464977bc007b4446c6e4059781e1d5c03bcf33e
331
+ activerecord (8.1.2) sha256=acfbe0cadfcc50fa208011fe6f4eb01cae682ebae0ef57145ba45380c74bcc44
332
+ activestorage (8.1.2) sha256=8a63a48c3999caeee26a59441f813f94681fc35cc41aba7ce1f836add04fba76
333
+ activesupport (8.1.2) sha256=88842578ccd0d40f658289b0e8c842acfe9af751afee2e0744a7873f50b6fdae
334
+ appraisal (2.5.0) sha256=36989221be127913b0dba8d114da2001e6b2dceea7bd4951200eaba764eed3ce
335
+ ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
336
+ base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b
337
+ bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7
338
+ builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f
339
+ concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
340
+ connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a
341
+ crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d
342
+ date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0
343
+ diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
344
+ docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
345
+ drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373
346
+ e2e (0.5.0)
347
+ erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5
348
+ erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9
349
+ globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11
350
+ i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5
351
+ io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc
352
+ irb (1.17.0) sha256=168c4ddb93d8a361a045c41d92b2952c7a118fa73f23fe14e55609eb7a863aae
353
+ json (2.18.1) sha256=fe112755501b8d0466b5ada6cf50c8c3f41e897fa128ac5d263ec09eedc9f986
354
+ language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
355
+ lefthook (2.1.0) sha256=a100dc90139806e62b9aa40cf32e9edf34f6cff10c8b55ebd14a1b0add4b86bf
356
+ lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
357
+ logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203
358
+ loofah (2.25.0) sha256=df5ed7ac3bac6a4ec802df3877ee5cc86d027299f8952e6243b3dac446b060e6
359
+ mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941
360
+ marcel (1.1.0) sha256=fdcfcfa33cc52e93c4308d40e4090a5d4ea279e160a7f6af988260fa970e0bee
361
+ mime-types (3.7.0) sha256=dcebf61c246f08e15a4de34e386ebe8233791e868564a470c3fe77c00eed5e56
362
+ mime-types-data (3.2026.0203) sha256=54353d693af028847391c28361c07d4b8b689cad78c3e1cc272fb1205c6d2a2f
363
+ mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef
364
+ minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb
365
+ net-imap (0.6.2) sha256=08caacad486853c61676cca0c0c47df93db02abc4a8239a8b67eb0981428acc6
366
+ net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3
367
+ net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8
368
+ net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736
369
+ nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1
370
+ nokogiri (1.19.0-aarch64-linux-gnu) sha256=11a97ecc3c0e7e5edcf395720b10860ef493b768f6aa80c539573530bc933767
371
+ nokogiri (1.19.0-aarch64-linux-musl) sha256=eb70507f5e01bc23dad9b8dbec2b36ad0e61d227b42d292835020ff754fb7ba9
372
+ nokogiri (1.19.0-arm-linux-gnu) sha256=572a259026b2c8b7c161fdb6469fa2d0edd2b61cd599db4bbda93289abefbfe5
373
+ nokogiri (1.19.0-arm-linux-musl) sha256=23ed90922f1a38aed555d3de4d058e90850c731c5b756d191b3dc8055948e73c
374
+ nokogiri (1.19.0-arm64-darwin) sha256=0811dfd936d5f6dd3f6d32ef790568bf29b2b7bead9ba68866847b33c9cf5810
375
+ nokogiri (1.19.0-x86_64-darwin) sha256=1dad56220b603a8edb9750cd95798bffa2b8dd9dd9aa47f664009ee5b43e3067
376
+ nokogiri (1.19.0-x86_64-linux-gnu) sha256=f482b95c713d60031d48c44ce14562f8d2ce31e3a9e8dd0ccb131e9e5a68b58c
377
+ nokogiri (1.19.0-x86_64-linux-musl) sha256=1c4ca6b381622420073ce6043443af1d321e8ed93cc18b08e2666e5bd02ffae4
378
+ parallel (1.27.0) sha256=4ac151e1806b755fb4e2dc2332cbf0e54f2e24ba821ff2d3dcf86bf6dc4ae130
379
+ parser (3.3.10.1) sha256=06f6a725d2cd91e5e7f2b7c32ba143631e1f7c8ae2fb918fc4cebec187e6a688
380
+ playwright-ruby-client (1.58.0) sha256=d78b6acfb2c7bea19394366f8fc840a8518b0dbfb07d8c63754cb21d9eda0277
381
+ pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6
382
+ prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193
383
+ prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
384
+ psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974
385
+ racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
386
+ rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6
387
+ rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9
388
+ rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463
389
+ rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868
390
+ rails (8.1.2) sha256=5069061b23dfa8706b9f0159ae8b9d35727359103178a26962b868a680ba7d95
391
+ rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d
392
+ rails-html-sanitizer (1.6.2) sha256=35fce2ca8242da8775c83b6ba9c1bcaad6751d9eb73c1abaa8403475ab89a560
393
+ railties (8.1.2) sha256=1289ece76b4f7668fc46d07e55cc992b5b8751f2ad85548b7da351b8c59f8055
394
+ rainbow (3.1.1) sha256=039491aa3a89f42efa1d6dec2fc4e62ede96eb6acd95e52f1ad581182b79bc6a
395
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
396
+ rdoc (7.1.0) sha256=494899df0706c178596ca6e1d50f1b7eb285a9b2aae715be5abd742734f17363
397
+ regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4
398
+ reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835
399
+ rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
400
+ rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
401
+ rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
402
+ rspec-mocks (3.13.7) sha256=0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c
403
+ rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
404
+ rubocop (1.82.1) sha256=09f1a6a654a960eda767aebea33e47603080f8e9c9a3f019bf9b94c9cab5e273
405
+ rubocop-ast (1.49.0) sha256=49c3676d3123a0923d333e20c6c2dbaaae2d2287b475273fddee0c61da9f71fd
406
+ rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
407
+ rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2
408
+ ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
409
+ securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1
410
+ simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
411
+ simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
412
+ simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
413
+ standard (1.53.0) sha256=f3c9493385db7079d0abce6f7582f553122156997b81258cd361d3480eeacf9c
414
+ standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
415
+ standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
416
+ stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1
417
+ thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73
418
+ timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af
419
+ tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f
420
+ tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b
421
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
422
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
423
+ uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
424
+ useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844
425
+ webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131
426
+ websocket-driver (0.8.0) sha256=ed0dba4b943c22f17f9a734817e808bc84cdce6a7e22045f5315aa57676d4962
427
+ websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241
428
+ zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b
429
+
430
+ BUNDLED WITH
431
+ 4.0.5
@@ -0,0 +1,94 @@
1
+ # frozen_string_literal: true
2
+
3
+ module E2E
4
+ module Assertions
5
+ def assert_text(text)
6
+ actual_text = nil
7
+ found = E2E.wait_until do
8
+ actual_text = page.text
9
+ if text.is_a?(Regexp)
10
+ actual_text.match?(text)
11
+ else
12
+ actual_text.include?(text)
13
+ end
14
+ end
15
+
16
+ assert found, "Expected page to have text #{text.inspect}, but it had:
17
+ #{actual_text}"
18
+ end
19
+
20
+ def refute_text(text)
21
+ actual_text = nil
22
+ found = E2E.wait_until do
23
+ actual_text = page.text
24
+ if text.is_a?(Regexp)
25
+ !actual_text.match?(text)
26
+ else
27
+ !actual_text.include?(text)
28
+ end
29
+ end
30
+
31
+ assert found, "Expected page NOT to have text #{text.inspect}, but it did."
32
+ end
33
+
34
+ alias_method :assert_no_text, :refute_text
35
+
36
+ def assert_selector(selector)
37
+ found = E2E.wait_until do
38
+ page.all(selector).any?(&:visible?)
39
+ end
40
+ assert found, "Expected to find visible selector #{selector.inspect}"
41
+ end
42
+
43
+ def refute_selector(selector)
44
+ found = E2E.wait_until do
45
+ page.all(selector).none?(&:visible?)
46
+ end
47
+ assert found, "Expected NOT to find visible selector #{selector.inspect}"
48
+ end
49
+
50
+ alias_method :assert_no_selector, :refute_selector
51
+
52
+ def assert_current_path(expected_path)
53
+ actual_path = nil
54
+ found = E2E.wait_until do
55
+ url = page.current_url
56
+ actual_path = begin
57
+ URI.parse(url).path
58
+ rescue URI::InvalidURIError
59
+ url
60
+ end
61
+
62
+ if expected_path.is_a?(Regexp)
63
+ actual_path.match?(expected_path)
64
+ else
65
+ actual_path == expected_path
66
+ end
67
+ end
68
+
69
+ assert found, "Expected current path to be #{expected_path.inspect}, but was #{actual_path.inspect}"
70
+ end
71
+
72
+ def refute_current_path(expected_path)
73
+ actual_path = nil
74
+ found = E2E.wait_until do
75
+ url = page.current_url
76
+ actual_path = begin
77
+ URI.parse(url).path
78
+ rescue URI::InvalidURIError
79
+ url
80
+ end
81
+
82
+ if expected_path.is_a?(Regexp)
83
+ !actual_path.match?(expected_path)
84
+ else
85
+ actual_path != expected_path
86
+ end
87
+ end
88
+
89
+ assert found, "Expected current path NOT to be #{expected_path.inspect}, but it was"
90
+ end
91
+
92
+ alias_method :assert_no_current_path, :refute_current_path
93
+ end
94
+ end
data/lib/e2e/minitest.rb CHANGED
@@ -2,11 +2,13 @@
2
2
 
3
3
  require "minitest"
4
4
  require "e2e"
5
+ require_relative "assertions"
5
6
 
6
7
  module E2E
7
8
  module Minitest
8
9
  class TestCase < ::Minitest::Test
9
10
  include E2E::DSL
11
+ include E2E::Assertions
10
12
 
11
13
  def teardown
12
14
  take_failed_screenshot if !passed? && !skipped?
@@ -22,16 +24,24 @@ module E2E
22
24
  screenshots_dir = File.expand_path("tmp/screenshots", Dir.pwd)
23
25
  FileUtils.mkdir_p(screenshots_dir)
24
26
 
25
- name = "#{self.class.name}_#{name}".gsub(/[^0-9A-Za-z]/, "_")
27
+ name = "#{self.class.name}_#{self.name}".gsub(/[^0-9A-Za-z]/, "_")
26
28
  path = File.join(screenshots_dir, "#{name}.png")
27
29
 
28
30
  begin
29
- save_screenshot(path) # rubocop:disable Lint/Debugger
30
- puts "\n[E2E] Screenshot saved to #{path}"
31
+ # rubocop:disable Lint/Debugger
32
+ save_screenshot(path)
33
+ # rubocop:enable Lint/Debugger
34
+ puts "
35
+ [E2E] Screenshot saved to #{path}"
31
36
  rescue => e
32
- puts "\n[E2E] Failed to save screenshot: #{e.message}"
37
+ puts "
38
+ [E2E] Failed to save screenshot: #{e.message}"
33
39
  end
34
40
  end
35
41
  end
36
42
  end
37
43
  end
44
+
45
+ Minitest.after_run do
46
+ E2E.session.quit if E2E.instance_variable_get(:@session)
47
+ end
data/lib/e2e/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module E2E
4
- VERSION = "0.4.2"
4
+ VERSION = "0.5.0"
5
5
  end
@@ -5,6 +5,6 @@ require "e2e_helper"
5
5
  class <%= class_name %>Test < E2E::Minitest::TestCase
6
6
  def test_works
7
7
  visit "/"
8
- # assert_includes page.body, "Home"
8
+ assert_text "Home"
9
9
  end
10
- end
10
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e2e
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Poimtsev
@@ -93,6 +93,20 @@ dependencies:
93
93
  - - ">="
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
+ - !ruby/object:Gem::Dependency
97
+ name: minitest
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
96
110
  - !ruby/object:Gem::Dependency
97
111
  name: rake
98
112
  requirement: !ruby/object:Gem::Requirement
@@ -199,8 +213,11 @@ files:
199
213
  - gemfiles/rails_7.2.gemfile.lock
200
214
  - gemfiles/rails_8.0.gemfile
201
215
  - gemfiles/rails_8.0.gemfile.lock
216
+ - gemfiles/rails_8.1.gemfile
217
+ - gemfiles/rails_8.1.gemfile.lock
202
218
  - lefthook.yml
203
219
  - lib/e2e.rb
220
+ - lib/e2e/assertions.rb
204
221
  - lib/e2e/driver.rb
205
222
  - lib/e2e/drivers/playwright.rb
206
223
  - lib/e2e/dsl.rb