capybara_active_admin 0.3.0 → 0.3.1

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: 4da4f63c41b38a64d538b7b68481643e46b1889fbe0872aed20f382e141a0775
4
- data.tar.gz: 84731f3fc29c973dec00c1def2f2796de9635850012f99f7bcd5788f0425ffd6
3
+ metadata.gz: ffad605d6aa8c00d8bd2c3e52a6e951965adca36ec416e73051793b163d83757
4
+ data.tar.gz: 68b2c38a0fe0ee8f711cad15982495e3d5f6680a284c65232d5ffefa05ae9aad
5
5
  SHA512:
6
- metadata.gz: 98c30e82888cee2fd037151143fe0123427d322a8953bcc62d662654d98424a98bfe936ed7bc9ec0b4d0dbcb26ceae55f07c710b6ecb8fbee34368ddd88e1d7a
7
- data.tar.gz: 6afe3d0d6568155abb51806a61fbbba2aa161a05d42b91faedec5690d5bda399024a9e3b865078bc65cb5501ecd2f825764d2cdc010388f5b2c973b2e4287408
6
+ metadata.gz: 63dfa20b4d356d3759617a2c81ee57dd06bddc4beefdc3b4cdefa650a5a116687ec9ad108fbd494a6e83b1b0447f893175cc7b72f27438c48fc8d76ba060e8f7
7
+ data.tar.gz: 1b67771979a8b8ab0e255112bf585eb97611226b08fa258debc409042803a022d81a5b74539d1839b14011d2cbfc00ab5f7404c0092c458d11f9974a87a39af9
data/CHANGELOG.md CHANGED
@@ -6,10 +6,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.3.1] - 2020-04-15
10
+ ### Added
11
+ - `within_attribute_row` finder
12
+
13
+ ### Removed
14
+ - `find_input` finder
15
+ - `have_input`, `have_no_input` matchers
16
+ - `input_selector` selector
17
+
9
18
  ## [0.3.0] - 2020-04-15
10
19
  ### Added
11
- - implement DSL for tabs, batch actions, modal dialog, attributes table, panel, sidebar, footer
12
- - improve form DSL
20
+ - implement DSL for tabs, batch actions, modal dialog, attributes table, panel, sidebar, footer
21
+ - improve form DSL
13
22
 
14
23
  ## [0.2.1] - 2020-04-14
15
24
  ### Fixed
@@ -11,6 +11,11 @@ module Capybara
11
11
  selector = attributes_table_selector(model_name, record_id)
12
12
  within(selector) { yield }
13
13
  end
14
+
15
+ def within_attribute_row(label)
16
+ selector = attributes_row_selector(label)
17
+ within(selector) { yield }
18
+ end
14
19
  end
15
20
  end
16
21
  end
@@ -22,15 +22,6 @@ module Capybara
22
22
  within(fieldset) { yield }
23
23
  end
24
24
 
25
- def find_input(label, options = {})
26
- label_opts = Util.options_with_text label, options.slice(:exact)
27
- label_node = find(label_selector, label_opts)
28
-
29
- input_id = label_node[:for]
30
- opts = options.except(:exact)
31
- find("##{input_id}", opts)
32
- end
33
-
34
25
  def within_filters
35
26
  selector = filter_form_selector
36
27
  within(selector) { yield }
@@ -28,21 +28,10 @@ module Capybara
28
28
  have_selector(semantic_error_selector, options)
29
29
  end
30
30
 
31
- def have_no_input(text, options = {})
32
- opts = Util.options_with_text(text, options)
33
- have_none_of_selectors(:css, label_selector, opts)
34
- end
35
-
36
31
  def have_has_many_fields_for(association_name, options = {})
37
32
  selector = has_many_fields_selector(association_name)
38
33
  have_selector(selector, options)
39
34
  end
40
-
41
- def have_input(text, options = {})
42
- selector = input_selector text, options.slice(:type, :text)
43
- opts = options.except(:type, :text)
44
- have_selector(selector, opts)
45
- end
46
35
  end
47
36
  end
48
37
  end
@@ -31,20 +31,6 @@ module Capybara
31
31
  selector
32
32
  end
33
33
 
34
- def input_selector(label, options)
35
- text = options.delete(:text)
36
- type = options.delete(:type) || :text
37
-
38
- label_opts = options.merge(text: label)
39
- label = find(label_selector, label_opts)
40
-
41
- input_id = label[:for]
42
- tag_name = type.to_sym == :select ? 'select' : 'input'
43
- selector = "#{tag_name}##{input_id}"
44
- selector = %(#{selector}[value="#{text}"]) unless text.nil?
45
- selector
46
- end
47
-
48
34
  def input_container_selector(label, exact: nil)
49
35
  return 'li' if label.nil?
50
36
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capybara
4
4
  module ActiveAdmin
5
- VERSION = '0.3.0'
5
+ VERSION = '0.3.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara_active_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich