wal 0.0.1 → 0.0.3

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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -7
  3. data/lib/wal/noop_watcher.rb +0 -4
  4. data/lib/wal/record_watcher.rb +4 -58
  5. data/lib/wal/replicator.rb +2 -21
  6. data/lib/wal/streaming_watcher.rb +0 -9
  7. data/lib/wal/version.rb +1 -2
  8. data/lib/wal/watcher.rb +0 -25
  9. data/lib/wal.rb +9 -68
  10. data/rbi/wal.rbi +5 -85
  11. data/sig/wal.rbs +4 -4
  12. metadata +2 -161
  13. data/sorbet/config +0 -7
  14. data/sorbet/rbi/annotations/.gitattributes +0 -1
  15. data/sorbet/rbi/annotations/activemodel.rbi +0 -89
  16. data/sorbet/rbi/annotations/activerecord.rbi +0 -98
  17. data/sorbet/rbi/annotations/activesupport.rbi +0 -463
  18. data/sorbet/rbi/annotations/minitest.rbi +0 -119
  19. data/sorbet/rbi/annotations/rainbow.rbi +0 -269
  20. data/sorbet/rbi/gems/.gitattributes +0 -1
  21. data/sorbet/rbi/gems/actioncable@8.0.2.rbi +0 -9
  22. data/sorbet/rbi/gems/actionmailbox@8.0.2.rbi +0 -9
  23. data/sorbet/rbi/gems/actionmailer@8.0.2.rbi +0 -9
  24. data/sorbet/rbi/gems/actionpack@8.0.2.rbi +0 -21122
  25. data/sorbet/rbi/gems/actiontext@8.0.2.rbi +0 -9
  26. data/sorbet/rbi/gems/actionview@8.0.2.rbi +0 -16423
  27. data/sorbet/rbi/gems/activejob@8.0.2.rbi +0 -9
  28. data/sorbet/rbi/gems/activemodel@8.0.2.rbi +0 -6866
  29. data/sorbet/rbi/gems/activerecord@8.0.2.rbi +0 -43227
  30. data/sorbet/rbi/gems/activestorage@8.0.2.rbi +0 -9
  31. data/sorbet/rbi/gems/activesupport@8.0.2.rbi +0 -21110
  32. data/sorbet/rbi/gems/ast@2.4.3.rbi +0 -585
  33. data/sorbet/rbi/gems/base64@0.3.0.rbi +0 -545
  34. data/sorbet/rbi/gems/benchmark@0.4.1.rbi +0 -619
  35. data/sorbet/rbi/gems/bigdecimal@3.2.2.rbi +0 -78
  36. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -9
  37. data/sorbet/rbi/gems/commander@5.0.0.rbi +0 -9
  38. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +0 -11657
  39. data/sorbet/rbi/gems/connection_pool@2.5.3.rbi +0 -9
  40. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -623
  41. data/sorbet/rbi/gems/date@3.4.1.rbi +0 -75
  42. data/sorbet/rbi/gems/diff-lcs@1.6.2.rbi +0 -1134
  43. data/sorbet/rbi/gems/docker-api@2.4.0.rbi +0 -1719
  44. data/sorbet/rbi/gems/docopt@0.6.1.rbi +0 -9
  45. data/sorbet/rbi/gems/drb@2.2.3.rbi +0 -1661
  46. data/sorbet/rbi/gems/erubi@1.13.1.rbi +0 -155
  47. data/sorbet/rbi/gems/excon@1.2.7.rbi +0 -1514
  48. data/sorbet/rbi/gems/globalid@1.2.1.rbi +0 -9
  49. data/sorbet/rbi/gems/highline@3.0.1.rbi +0 -9
  50. data/sorbet/rbi/gems/i18n@1.14.7.rbi +0 -2359
  51. data/sorbet/rbi/gems/io-console@0.8.0.rbi +0 -9
  52. data/sorbet/rbi/gems/logger@1.7.0.rbi +0 -963
  53. data/sorbet/rbi/gems/loofah@2.24.1.rbi +0 -1105
  54. data/sorbet/rbi/gems/mail@2.8.1.rbi +0 -9
  55. data/sorbet/rbi/gems/marcel@1.0.4.rbi +0 -9
  56. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +0 -9
  57. data/sorbet/rbi/gems/minitest@5.25.5.rbi +0 -1704
  58. data/sorbet/rbi/gems/multi_json@1.15.0.rbi +0 -268
  59. data/sorbet/rbi/gems/net-imap@0.5.9.rbi +0 -9
  60. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +0 -9
  61. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +0 -292
  62. data/sorbet/rbi/gems/net-smtp@0.5.1.rbi +0 -9
  63. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -159
  64. data/sorbet/rbi/gems/nio4r@2.7.4.rbi +0 -9
  65. data/sorbet/rbi/gems/nokogiri@1.18.8.rbi +0 -8206
  66. data/sorbet/rbi/gems/ostruct@0.6.2.rbi +0 -354
  67. data/sorbet/rbi/gems/parallel@1.27.0.rbi +0 -291
  68. data/sorbet/rbi/gems/parlour@9.1.1.rbi +0 -3071
  69. data/sorbet/rbi/gems/parser@3.3.8.0.rbi +0 -7338
  70. data/sorbet/rbi/gems/pg-replication-protocol@0.0.7.rbi +0 -633
  71. data/sorbet/rbi/gems/pg@1.5.9.rbi +0 -2806
  72. data/sorbet/rbi/gems/pp@0.6.2.rbi +0 -368
  73. data/sorbet/rbi/gems/prettyprint@0.2.0.rbi +0 -477
  74. data/sorbet/rbi/gems/prism@1.4.0.rbi +0 -41732
  75. data/sorbet/rbi/gems/psych@5.2.3.rbi +0 -2435
  76. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -160
  77. data/sorbet/rbi/gems/rack-session@2.1.1.rbi +0 -727
  78. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +0 -734
  79. data/sorbet/rbi/gems/rack@3.1.16.rbi +0 -4940
  80. data/sorbet/rbi/gems/rackup@2.2.1.rbi +0 -230
  81. data/sorbet/rbi/gems/rails-dom-testing@2.3.0.rbi +0 -858
  82. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -785
  83. data/sorbet/rbi/gems/rails@8.0.2.rbi +0 -9
  84. data/sorbet/rbi/gems/railties@8.0.2.rbi +0 -3865
  85. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -403
  86. data/sorbet/rbi/gems/rake@13.2.1.rbi +0 -3120
  87. data/sorbet/rbi/gems/rbi@0.3.6.rbi +0 -6893
  88. data/sorbet/rbi/gems/rbs@3.9.4.rbi +0 -6978
  89. data/sorbet/rbi/gems/rdoc@6.12.0.rbi +0 -12760
  90. data/sorbet/rbi/gems/reline@0.6.0.rbi +0 -2451
  91. data/sorbet/rbi/gems/rexml@3.4.1.rbi +0 -5240
  92. data/sorbet/rbi/gems/rspec-core@3.13.4.rbi +0 -11348
  93. data/sorbet/rbi/gems/rspec-expectations@3.13.5.rbi +0 -8189
  94. data/sorbet/rbi/gems/rspec-mocks@3.13.5.rbi +0 -5350
  95. data/sorbet/rbi/gems/rspec-sorbet@1.9.2.rbi +0 -164
  96. data/sorbet/rbi/gems/rspec-support@3.13.4.rbi +0 -1630
  97. data/sorbet/rbi/gems/rspec@3.13.1.rbi +0 -83
  98. data/sorbet/rbi/gems/securerandom@0.4.1.rbi +0 -75
  99. data/sorbet/rbi/gems/spoom@1.6.3.rbi +0 -6985
  100. data/sorbet/rbi/gems/stringio@3.1.5.rbi +0 -9
  101. data/sorbet/rbi/gems/tapioca@0.16.11.rbi +0 -3628
  102. data/sorbet/rbi/gems/testcontainers-core@0.2.0.rbi +0 -1005
  103. data/sorbet/rbi/gems/testcontainers-postgres@0.2.0.rbi +0 -145
  104. data/sorbet/rbi/gems/thor@1.3.2.rbi +0 -4378
  105. data/sorbet/rbi/gems/timeout@0.4.3.rbi +0 -157
  106. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5918
  107. data/sorbet/rbi/gems/uri@1.0.3.rbi +0 -2349
  108. data/sorbet/rbi/gems/useragent@0.16.11.rbi +0 -9
  109. data/sorbet/rbi/gems/websocket-driver@0.8.0.rbi +0 -9
  110. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +0 -9
  111. data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +0 -435
  112. data/sorbet/rbi/gems/yard@0.9.37.rbi +0 -18379
  113. data/sorbet/rbi/gems/zeitwerk@2.7.3.rbi +0 -9
  114. data/sorbet/tapioca/config.yml +0 -5
  115. data/sorbet/tapioca/require.rb +0 -12
@@ -1,858 +0,0 @@
1
- # typed: true
2
-
3
- # DO NOT EDIT MANUALLY
4
- # This is an autogenerated file for types exported from the `rails-dom-testing` gem.
5
- # Please instead update this file by running `bin/tapioca gem rails-dom-testing`.
6
-
7
-
8
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#3
9
- module Rails
10
- class << self
11
- # source://railties/8.0.2/lib/rails.rb#44
12
- def app_class; end
13
-
14
- # source://railties/8.0.2/lib/rails.rb#44
15
- def app_class=(_arg0); end
16
-
17
- # source://railties/8.0.2/lib/rails.rb#45
18
- def application; end
19
-
20
- # source://railties/8.0.2/lib/rails.rb#43
21
- def application=(_arg0); end
22
-
23
- # source://railties/8.0.2/lib/rails.rb#126
24
- def autoloaders; end
25
-
26
- # source://railties/8.0.2/lib/rails.rb#56
27
- def backtrace_cleaner; end
28
-
29
- # source://railties/8.0.2/lib/rails.rb#44
30
- def cache; end
31
-
32
- # source://railties/8.0.2/lib/rails.rb#44
33
- def cache=(_arg0); end
34
-
35
- # source://railties/8.0.2/lib/rails.rb#52
36
- def configuration; end
37
-
38
- # source://railties/8.0.2/lib/rails/deprecator.rb#4
39
- def deprecator; end
40
-
41
- # source://railties/8.0.2/lib/rails.rb#75
42
- def env; end
43
-
44
- # source://railties/8.0.2/lib/rails.rb#82
45
- def env=(environment); end
46
-
47
- # source://railties/8.0.2/lib/rails.rb#93
48
- def error; end
49
-
50
- # source://railties/8.0.2/lib/rails/gem_version.rb#5
51
- def gem_version; end
52
-
53
- # source://railties/8.0.2/lib/rails.rb#106
54
- def groups(*groups); end
55
-
56
- # source://railties/8.0.2/lib/rails.rb#49
57
- def initialize!(*_arg0, **_arg1, &_arg2); end
58
-
59
- # source://railties/8.0.2/lib/rails.rb#49
60
- def initialized?(*_arg0, **_arg1, &_arg2); end
61
-
62
- # source://railties/8.0.2/lib/rails.rb#44
63
- def logger; end
64
-
65
- # source://railties/8.0.2/lib/rails.rb#44
66
- def logger=(_arg0); end
67
-
68
- # source://railties/8.0.2/lib/rails.rb#122
69
- def public_path; end
70
-
71
- # source://railties/8.0.2/lib/rails.rb#65
72
- def root; end
73
-
74
- # source://railties/8.0.2/lib/rails/version.rb#7
75
- def version; end
76
- end
77
- end
78
-
79
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#4
80
- module Rails::Dom; end
81
-
82
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#5
83
- module Rails::Dom::Testing
84
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
85
- def default_html_version; end
86
-
87
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
88
- def default_html_version=(val); end
89
-
90
- class << self
91
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
92
- def default_html_version; end
93
-
94
- # source://rails-dom-testing//lib/rails/dom/testing.rb#12
95
- def default_html_version=(val); end
96
-
97
- # @return [Boolean]
98
- #
99
- # source://rails-dom-testing//lib/rails/dom/testing.rb#15
100
- def html5_support?; end
101
-
102
- # source://rails-dom-testing//lib/rails/dom/testing.rb#19
103
- def html_document(html_version: T.unsafe(nil)); end
104
-
105
- # source://rails-dom-testing//lib/rails/dom/testing.rb#26
106
- def html_document_fragment(html_version: T.unsafe(nil)); end
107
-
108
- private
109
-
110
- # source://rails-dom-testing//lib/rails/dom/testing.rb#34
111
- def choose_html_parser(parser_classes, html_version: T.unsafe(nil)); end
112
- end
113
- end
114
-
115
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#6
116
- module Rails::Dom::Testing::Assertions
117
- include ::Rails::Dom::Testing::Assertions::DomAssertions
118
- include ::Rails::Dom::Testing::Assertions::SelectorAssertions
119
- end
120
-
121
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#7
122
- module Rails::Dom::Testing::Assertions::DomAssertions
123
- # \Test two HTML strings for equivalency (e.g., equal even when attributes are in another order)
124
- #
125
- # # assert that the referenced method generates the appropriate HTML string
126
- # assert_dom_equal(
127
- # '<a href="http://www.example.com">Apples</a>',
128
- # link_to("Apples", "http://www.example.com"),
129
- # )
130
- #
131
- # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces
132
- # and newlines). If you want stricter matching with exact matching for whitespace, pass
133
- # <tt>strict: true</tt>:
134
- #
135
- # # these assertions will both pass
136
- # assert_dom_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: false
137
- # assert_dom_not_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: true
138
- #
139
- # The DOMs are created using an HTML parser specified by
140
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
141
- #
142
- # When testing in a Rails application, the parser default can also be set by setting
143
- # +Rails.application.config.dom_testing_default_html_version+.
144
- #
145
- # If you want to specify the HTML parser just for a particular assertion, pass
146
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
147
- #
148
- # assert_dom_equal expected, actual, html_version: :html5
149
- #
150
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#35
151
- def assert_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end
152
-
153
- # The negated form of +assert_dom_equal+.
154
- #
155
- # # assert that the referenced method does not generate the specified HTML string
156
- # assert_dom_not_equal(
157
- # '<a href="http://www.example.com">Apples</a>',
158
- # link_to("Oranges", "http://www.example.com"),
159
- # )
160
- #
161
- # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces
162
- # and newlines). If you want stricter matching with exact matching for whitespace, pass
163
- # <tt>strict: true</tt>:
164
- #
165
- # # these assertions will both pass
166
- # assert_dom_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: false
167
- # assert_dom_not_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: true
168
- #
169
- # The DOMs are created using an HTML parser specified by
170
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
171
- #
172
- # When testing in a Rails application, the parser default can also be set by setting
173
- # +Rails.application.config.dom_testing_default_html_version+.
174
- #
175
- # If you want to specify the HTML parser just for a particular assertion, pass
176
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
177
- #
178
- # assert_dom_not_equal expected, actual, html_version: :html5
179
- #
180
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68
181
- def assert_dom_not_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end
182
-
183
- # The negated form of +assert_dom_equal+.
184
- #
185
- # # assert that the referenced method does not generate the specified HTML string
186
- # assert_dom_not_equal(
187
- # '<a href="http://www.example.com">Apples</a>',
188
- # link_to("Oranges", "http://www.example.com"),
189
- # )
190
- #
191
- # By default, the matcher will not pay attention to whitespace in text nodes (e.g., spaces
192
- # and newlines). If you want stricter matching with exact matching for whitespace, pass
193
- # <tt>strict: true</tt>:
194
- #
195
- # # these assertions will both pass
196
- # assert_dom_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: false
197
- # assert_dom_not_equal "<div>\nfoo\n\</div>", "<div>foo</div>", strict: true
198
- #
199
- # The DOMs are created using an HTML parser specified by
200
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
201
- #
202
- # When testing in a Rails application, the parser default can also be set by setting
203
- # +Rails.application.config.dom_testing_default_html_version+.
204
- #
205
- # If you want to specify the HTML parser just for a particular assertion, pass
206
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
207
- #
208
- # assert_dom_not_equal expected, actual, html_version: :html5
209
- #
210
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#68
211
- def refute_dom_equal(expected, actual, message = T.unsafe(nil), strict: T.unsafe(nil), html_version: T.unsafe(nil)); end
212
-
213
- protected
214
-
215
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#76
216
- def compare_doms(expected, actual, strict); end
217
-
218
- # @return [Boolean]
219
- #
220
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#129
221
- def equal_attribute?(attr, other_attr); end
222
-
223
- # @return [Boolean]
224
- #
225
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#116
226
- def equal_attribute_nodes?(nodes, other_nodes); end
227
-
228
- # @return [Boolean]
229
- #
230
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#108
231
- def equal_child?(child, other_child, strict); end
232
-
233
- # @return [Boolean]
234
- #
235
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#96
236
- def equal_children?(child, other_child, strict); end
237
-
238
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#88
239
- def extract_children(node, strict); end
240
-
241
- private
242
-
243
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/dom_assertions.rb#134
244
- def fragment(text, html_version: T.unsafe(nil)); end
245
- end
246
-
247
- # Adds the +assert_dom+ method for use in Rails functional
248
- # test cases, which can be used to make assertions on the response HTML of a controller
249
- # action. You can also call +assert_dom+ within another +assert_dom+ to
250
- # make assertions on elements selected by the enclosing assertion.
251
- #
252
- # Use +css_select+ to select elements without making an assertions, either
253
- # from the response HTML or elements selected by the enclosing assertion.
254
- #
255
- # In addition to HTML responses, you can make the following assertions:
256
- #
257
- # * +assert_dom_encoded+ - Assertions on HTML encoded inside XML, for example for dealing with feed item descriptions.
258
- # * +assert_dom_email+ - Assertions on the HTML body of an e-mail.
259
- #
260
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#7
261
- module Rails::Dom::Testing::Assertions::SelectorAssertions
262
- # An assertion that selects elements and makes one or more equality tests.
263
- #
264
- # If the first argument is an element, selects all matching elements
265
- # starting from (and including) that element and all its children in
266
- # depth-first order.
267
- #
268
- # If no element is specified +assert_dom+ selects from
269
- # the element returned in +document_root_element+
270
- # unless +assert_dom+ is called from within an +assert_dom+ block.
271
- # Override +document_root_element+ to tell +assert_dom+ what to select from.
272
- # The default implementation raises an exception explaining this.
273
- #
274
- # When called with a block +assert_dom+ passes an array of selected elements
275
- # to the block. Calling +assert_dom+ from the block, with no element specified,
276
- # runs the assertion on the complete set of elements selected by the enclosing assertion.
277
- # Alternatively the array may be iterated through so that +assert_dom+ can be called
278
- # separately for each element.
279
- #
280
- #
281
- # ==== Example
282
- # If the response contains two ordered lists, each with four list elements then:
283
- # assert_dom "ol" do |elements|
284
- # elements.each do |element|
285
- # assert_dom element, "li", 4
286
- # end
287
- # end
288
- #
289
- # will pass, as will:
290
- # assert_dom "ol" do
291
- # assert_dom "li", 8
292
- # end
293
- #
294
- # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression
295
- # with substitution values (Array).
296
- # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution.
297
- # assert_dom returns nil if called with an invalid css selector.
298
- #
299
- # assert_dom "div:match('id', ?)", "id_string"
300
- # assert_dom "div:match('id', ?)", :id_string
301
- # assert_dom "div:match('id', ?)", 1
302
- # assert_dom "div:match('id', ?)", /\d+/
303
- #
304
- # === Equality Tests
305
- #
306
- # The equality test may be one of the following:
307
- # * <tt>true</tt> - Assertion is true if at least one element selected.
308
- # * <tt>false</tt> - Assertion is true if no element selected.
309
- # * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
310
- # one element matches the string or regular expression.
311
- # * <tt>Integer</tt> - Assertion is true if exactly that number of
312
- # elements are selected.
313
- # * <tt>Range</tt> - Assertion is true if the number of selected
314
- # elements fit the range.
315
- # If no equality test specified, the assertion is true if at least one
316
- # element selected.
317
- #
318
- # To perform more than one equality tests, use a hash with the following keys:
319
- # * <tt>:text</tt> - Narrow the selection to elements that have this text
320
- # value (string or regexp).
321
- # * <tt>:html</tt> - Narrow the selection to elements that have this HTML
322
- # content (string or regexp).
323
- # * <tt>:count</tt> - Assertion is true if the number of selected elements
324
- # is equal to this value.
325
- # * <tt>:minimum</tt> - Assertion is true if the number of selected
326
- # elements is at least this value.
327
- # * <tt>:maximum</tt> - Assertion is true if the number of selected
328
- # elements is at most this value.
329
- #
330
- # If the method is called with a block, once all equality tests are
331
- # evaluated the block is called with an array of all matched elements.
332
- #
333
- # # At least one form element
334
- # assert_dom "form"
335
- #
336
- # # Form element includes four input fields
337
- # assert_dom "form input", 4
338
- #
339
- # # Page title is "Welcome"
340
- # assert_dom "title", "Welcome"
341
- #
342
- # # Page title is "Welcome" and there is only one title element
343
- # assert_dom "title", {count: 1, text: "Welcome"},
344
- # "Wrong title or more than one title element"
345
- #
346
- # # Page contains no forms
347
- # assert_dom "form", false, "This page must contain no forms"
348
- #
349
- # # Test the content and style
350
- # assert_dom "body div.header ul.menu"
351
- #
352
- # # Use substitution values
353
- # assert_dom "ol>li:match('id', ?)", /item-\d+/
354
- #
355
- # # All input fields in the form have a name
356
- # assert_dom "form input" do
357
- # assert_dom ":match('name', ?)", /.+/ # Not empty
358
- # end
359
- #
360
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163
361
- def assert_dom(*args, &block); end
362
-
363
- # Extracts the body of an email and runs nested assertions on it.
364
- #
365
- # You must enable deliveries for this assertion to work, use:
366
- # ActionMailer::Base.perform_deliveries = true
367
- #
368
- # Example usage:
369
- #
370
- # assert_dom_email do
371
- # assert_dom "h1", "Email alert"
372
- # end
373
- #
374
- # assert_dom_email do
375
- # items = assert_dom "ol>li"
376
- # items.each do
377
- # # Work with items here...
378
- # end
379
- # end
380
- #
381
- # The DOM is created using an HTML parser specified by
382
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
383
- #
384
- # When testing in a Rails application, the parser default can also be set by setting
385
- # +Rails.application.config.dom_testing_default_html_version+.
386
- #
387
- # If you want to specify the HTML parser just for a particular assertion, pass
388
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
389
- #
390
- # assert_dom_email(html_version: :html5) do
391
- # assert_dom "h1", "Email alert"
392
- # end
393
- #
394
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#318
395
- def assert_dom_email(html_version: T.unsafe(nil), &block); end
396
-
397
- # Extracts the content of an element, treats it as encoded HTML and runs
398
- # nested assertion on it.
399
- #
400
- # You typically call this method within another assertion to operate on
401
- # all currently selected elements. You can also pass an element or array
402
- # of elements.
403
- #
404
- # The content of each element is un-encoded, and wrapped in the root
405
- # element +encoded+. It then calls the block with all un-encoded elements.
406
- #
407
- # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
408
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
409
- # # Select each entry item and then the title item
410
- # assert_dom "entry>title" do
411
- # # Run assertions on the encoded title elements
412
- # assert_dom_encoded do
413
- # assert_dom "b"
414
- # end
415
- # end
416
- # end
417
- #
418
- #
419
- # # Selects all paragraph tags from within the description of an RSS feed
420
- # assert_dom "rss[version=2.0]" do
421
- # # Select description element of each feed item.
422
- # assert_dom "channel>item>description" do
423
- # # Run assertions on the encoded elements.
424
- # assert_dom_encoded do
425
- # assert_dom "p"
426
- # end
427
- # end
428
- # end
429
- #
430
- # The DOM is created using an HTML parser specified by
431
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
432
- #
433
- # When testing in a Rails application, the parser default can also be set by setting
434
- # +Rails.application.config.dom_testing_default_html_version+.
435
- #
436
- # If you want to specify the HTML parser just for a particular assertion, pass
437
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
438
- #
439
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
440
- # assert_dom "entry>title" do
441
- # assert_dom_encoded(html_version: :html5) do
442
- # assert_dom "b"
443
- # end
444
- # end
445
- # end
446
- #
447
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#265
448
- def assert_dom_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end
449
-
450
- # The negated form of +assert_dom+.
451
- #
452
- # === Equality Tests
453
- #
454
- # Supports the same equality tests as +assert_dom+ except for:
455
- # * <tt>true</tt>
456
- # * <tt>false</tt>
457
- # * <tt>Integer</tt>
458
- # * <tt>Range</tt>
459
- # * <tt>:count</tt>
460
- # * <tt>:minimum</tt>
461
- # * <tt>:maximum</tt>
462
- #
463
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#183
464
- def assert_not_dom(*args, &block); end
465
-
466
- # The negated form of +assert_dom+.
467
- #
468
- # === Equality Tests
469
- #
470
- # Supports the same equality tests as +assert_dom+ except for:
471
- # * <tt>true</tt>
472
- # * <tt>false</tt>
473
- # * <tt>Integer</tt>
474
- # * <tt>Range</tt>
475
- # * <tt>:count</tt>
476
- # * <tt>:minimum</tt>
477
- # * <tt>:maximum</tt>
478
- #
479
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#183
480
- def assert_not_select(*args, &block); end
481
-
482
- # An assertion that selects elements and makes one or more equality tests.
483
- #
484
- # If the first argument is an element, selects all matching elements
485
- # starting from (and including) that element and all its children in
486
- # depth-first order.
487
- #
488
- # If no element is specified +assert_dom+ selects from
489
- # the element returned in +document_root_element+
490
- # unless +assert_dom+ is called from within an +assert_dom+ block.
491
- # Override +document_root_element+ to tell +assert_dom+ what to select from.
492
- # The default implementation raises an exception explaining this.
493
- #
494
- # When called with a block +assert_dom+ passes an array of selected elements
495
- # to the block. Calling +assert_dom+ from the block, with no element specified,
496
- # runs the assertion on the complete set of elements selected by the enclosing assertion.
497
- # Alternatively the array may be iterated through so that +assert_dom+ can be called
498
- # separately for each element.
499
- #
500
- #
501
- # ==== Example
502
- # If the response contains two ordered lists, each with four list elements then:
503
- # assert_dom "ol" do |elements|
504
- # elements.each do |element|
505
- # assert_dom element, "li", 4
506
- # end
507
- # end
508
- #
509
- # will pass, as will:
510
- # assert_dom "ol" do
511
- # assert_dom "li", 8
512
- # end
513
- #
514
- # The selector may be a CSS selector expression (String, Symbol, or Numeric) or an expression
515
- # with substitution values (Array).
516
- # Substitution uses a custom pseudo class match. Pass in whatever attribute you want to match (enclosed in quotes) and a ? for the substitution.
517
- # assert_dom returns nil if called with an invalid css selector.
518
- #
519
- # assert_dom "div:match('id', ?)", "id_string"
520
- # assert_dom "div:match('id', ?)", :id_string
521
- # assert_dom "div:match('id', ?)", 1
522
- # assert_dom "div:match('id', ?)", /\d+/
523
- #
524
- # === Equality Tests
525
- #
526
- # The equality test may be one of the following:
527
- # * <tt>true</tt> - Assertion is true if at least one element selected.
528
- # * <tt>false</tt> - Assertion is true if no element selected.
529
- # * <tt>String/Regexp</tt> - Assertion is true if the text value of at least
530
- # one element matches the string or regular expression.
531
- # * <tt>Integer</tt> - Assertion is true if exactly that number of
532
- # elements are selected.
533
- # * <tt>Range</tt> - Assertion is true if the number of selected
534
- # elements fit the range.
535
- # If no equality test specified, the assertion is true if at least one
536
- # element selected.
537
- #
538
- # To perform more than one equality tests, use a hash with the following keys:
539
- # * <tt>:text</tt> - Narrow the selection to elements that have this text
540
- # value (string or regexp).
541
- # * <tt>:html</tt> - Narrow the selection to elements that have this HTML
542
- # content (string or regexp).
543
- # * <tt>:count</tt> - Assertion is true if the number of selected elements
544
- # is equal to this value.
545
- # * <tt>:minimum</tt> - Assertion is true if the number of selected
546
- # elements is at least this value.
547
- # * <tt>:maximum</tt> - Assertion is true if the number of selected
548
- # elements is at most this value.
549
- #
550
- # If the method is called with a block, once all equality tests are
551
- # evaluated the block is called with an array of all matched elements.
552
- #
553
- # # At least one form element
554
- # assert_dom "form"
555
- #
556
- # # Form element includes four input fields
557
- # assert_dom "form input", 4
558
- #
559
- # # Page title is "Welcome"
560
- # assert_dom "title", "Welcome"
561
- #
562
- # # Page title is "Welcome" and there is only one title element
563
- # assert_dom "title", {count: 1, text: "Welcome"},
564
- # "Wrong title or more than one title element"
565
- #
566
- # # Page contains no forms
567
- # assert_dom "form", false, "This page must contain no forms"
568
- #
569
- # # Test the content and style
570
- # assert_dom "body div.header ul.menu"
571
- #
572
- # # Use substitution values
573
- # assert_dom "ol>li:match('id', ?)", /item-\d+/
574
- #
575
- # # All input fields in the form have a name
576
- # assert_dom "form input" do
577
- # assert_dom ":match('name', ?)", /.+/ # Not empty
578
- # end
579
- #
580
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#163
581
- def assert_select(*args, &block); end
582
-
583
- # Extracts the body of an email and runs nested assertions on it.
584
- #
585
- # You must enable deliveries for this assertion to work, use:
586
- # ActionMailer::Base.perform_deliveries = true
587
- #
588
- # Example usage:
589
- #
590
- # assert_dom_email do
591
- # assert_dom "h1", "Email alert"
592
- # end
593
- #
594
- # assert_dom_email do
595
- # items = assert_dom "ol>li"
596
- # items.each do
597
- # # Work with items here...
598
- # end
599
- # end
600
- #
601
- # The DOM is created using an HTML parser specified by
602
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
603
- #
604
- # When testing in a Rails application, the parser default can also be set by setting
605
- # +Rails.application.config.dom_testing_default_html_version+.
606
- #
607
- # If you want to specify the HTML parser just for a particular assertion, pass
608
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
609
- #
610
- # assert_dom_email(html_version: :html5) do
611
- # assert_dom "h1", "Email alert"
612
- # end
613
- #
614
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#318
615
- def assert_select_email(html_version: T.unsafe(nil), &block); end
616
-
617
- # Extracts the content of an element, treats it as encoded HTML and runs
618
- # nested assertion on it.
619
- #
620
- # You typically call this method within another assertion to operate on
621
- # all currently selected elements. You can also pass an element or array
622
- # of elements.
623
- #
624
- # The content of each element is un-encoded, and wrapped in the root
625
- # element +encoded+. It then calls the block with all un-encoded elements.
626
- #
627
- # # Selects all bold tags from within the title of an Atom feed's entries (perhaps to nab a section name prefix)
628
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
629
- # # Select each entry item and then the title item
630
- # assert_dom "entry>title" do
631
- # # Run assertions on the encoded title elements
632
- # assert_dom_encoded do
633
- # assert_dom "b"
634
- # end
635
- # end
636
- # end
637
- #
638
- #
639
- # # Selects all paragraph tags from within the description of an RSS feed
640
- # assert_dom "rss[version=2.0]" do
641
- # # Select description element of each feed item.
642
- # assert_dom "channel>item>description" do
643
- # # Run assertions on the encoded elements.
644
- # assert_dom_encoded do
645
- # assert_dom "p"
646
- # end
647
- # end
648
- # end
649
- #
650
- # The DOM is created using an HTML parser specified by
651
- # Rails::Dom::Testing.default_html_version (either :html4 or :html5).
652
- #
653
- # When testing in a Rails application, the parser default can also be set by setting
654
- # +Rails.application.config.dom_testing_default_html_version+.
655
- #
656
- # If you want to specify the HTML parser just for a particular assertion, pass
657
- # <tt>html_version: :html4</tt> or <tt>html_version: :html5</tt> keyword arguments:
658
- #
659
- # assert_dom "feed[xmlns='http://www.w3.org/2005/Atom']" do
660
- # assert_dom "entry>title" do
661
- # assert_dom_encoded(html_version: :html5) do
662
- # assert_dom "b"
663
- # end
664
- # end
665
- # end
666
- #
667
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#265
668
- def assert_select_encoded(element = T.unsafe(nil), html_version: T.unsafe(nil), &block); end
669
-
670
- # Select and return all matching elements.
671
- #
672
- # If called with a single argument, uses that argument as a selector.
673
- # Called without an element +css_select+ selects from
674
- # the element returned in +document_root_element+
675
- #
676
- # The default implementation of +document_root_element+ raises an exception explaining this.
677
- #
678
- # Returns an empty Nokogiri::XML::NodeSet if no match is found.
679
- #
680
- # If called with two arguments, uses the first argument as the root
681
- # element and the second argument as the selector. Attempts to match the
682
- # root element and any of its children.
683
- # Returns an empty Nokogiri::XML::NodeSet if no match is found.
684
- #
685
- # The selector may be a CSS selector expression (String).
686
- # css_select returns nil if called with an invalid css selector.
687
- #
688
- # # Selects all div tags
689
- # divs = css_select("div")
690
- #
691
- # # Selects all paragraph tags and does something interesting
692
- # pars = css_select("p")
693
- # pars.each do |par|
694
- # # Do something fun with paragraphs here...
695
- # end
696
- #
697
- # # Selects all list items in unordered lists
698
- # items = css_select("ul>li")
699
- #
700
- # # Selects all form tags and then all inputs inside the form
701
- # forms = css_select("form")
702
- # forms.each do |form|
703
- # inputs = css_select(form, "input")
704
- # ...
705
- # end
706
- #
707
- # @raise [ArgumentError]
708
- #
709
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#58
710
- def css_select(*args); end
711
-
712
- # The negated form of +assert_dom+.
713
- #
714
- # === Equality Tests
715
- #
716
- # Supports the same equality tests as +assert_dom+ except for:
717
- # * <tt>true</tt>
718
- # * <tt>false</tt>
719
- # * <tt>Integer</tt>
720
- # * <tt>Range</tt>
721
- # * <tt>:count</tt>
722
- # * <tt>:minimum</tt>
723
- # * <tt>:maximum</tt>
724
- #
725
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#183
726
- def refute_dom(*args, &block); end
727
-
728
- # The negated form of +assert_dom+.
729
- #
730
- # === Equality Tests
731
- #
732
- # Supports the same equality tests as +assert_dom+ except for:
733
- # * <tt>true</tt>
734
- # * <tt>false</tt>
735
- # * <tt>Integer</tt>
736
- # * <tt>Range</tt>
737
- # * <tt>:count</tt>
738
- # * <tt>:minimum</tt>
739
- # * <tt>:maximum</tt>
740
- #
741
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#183
742
- def refute_select(*args, &block); end
743
-
744
- private
745
-
746
- # +equals+ must contain :minimum, :maximum and :count keys
747
- #
748
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#340
749
- def assert_size_match!(size, equals, css_selector, message = T.unsafe(nil)); end
750
-
751
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#352
752
- def count_description(min, max, count); end
753
-
754
- # @raise [NotImplementedError]
755
- #
756
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#334
757
- def document_root_element; end
758
-
759
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#193
760
- def dom_assertions(selector, &block); end
761
-
762
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#368
763
- def nest_selection(selection); end
764
-
765
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#377
766
- def nodeset(node); end
767
-
768
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions.rb#364
769
- def pluralize_element(quantity); end
770
- end
771
-
772
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#12
773
- class Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector
774
- include ::Minitest::Assertions
775
-
776
- # @return [HTMLSelector] a new instance of HTMLSelector
777
- #
778
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#17
779
- def initialize(values, previous_selection = T.unsafe(nil), refute: T.unsafe(nil), &root_fallback); end
780
-
781
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46
782
- def context; end
783
-
784
- # Returns the value of attribute css_selector.
785
- #
786
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13
787
- def css_selector; end
788
-
789
- # Returns the value of attribute message.
790
- #
791
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13
792
- def message; end
793
-
794
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#39
795
- def select; end
796
-
797
- # @return [Boolean]
798
- #
799
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#33
800
- def selecting_no_body?; end
801
-
802
- # Returns the value of attribute tests.
803
- #
804
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#13
805
- def tests; end
806
-
807
- private
808
-
809
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#146
810
- def collapse_html_whitespace!(text); end
811
-
812
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#102
813
- def extract_equality_tests(refute); end
814
-
815
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#74
816
- def extract_root(previous_selection, root_fallback); end
817
-
818
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#91
819
- def extract_selectors; end
820
-
821
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#48
822
- def filter(matches); end
823
-
824
- class << self
825
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#46
826
- def context; end
827
- end
828
- end
829
-
830
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/html_selector.rb#44
831
- Rails::Dom::Testing::Assertions::SelectorAssertions::HTMLSelector::NO_STRIP = T.let(T.unsafe(nil), Array)
832
-
833
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#8
834
- class Rails::Dom::Testing::Assertions::SelectorAssertions::SubstitutionContext
835
- # @return [SubstitutionContext] a new instance of SubstitutionContext
836
- #
837
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#9
838
- def initialize; end
839
-
840
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#20
841
- def match(matches, attribute, matcher); end
842
-
843
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#13
844
- def substitute!(selector, values, format_for_presentation = T.unsafe(nil)); end
845
-
846
- private
847
-
848
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#25
849
- def matcher_for(value, format_for_presentation); end
850
-
851
- # @return [Boolean]
852
- #
853
- # source://rails-dom-testing//lib/rails/dom/testing/assertions/selector_assertions/substitution_context.rb#36
854
- def substitutable?(value); end
855
- end
856
-
857
- # source://rails-dom-testing//lib/rails/dom/testing/railtie.rb#6
858
- class Rails::Dom::Testing::Railtie < ::Rails::Railtie; end