agilibox 1.5.3 → 1.5.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: eed2492d572a37237541595041a3361e816e1e876c450c7851bde6e1eddb06b4
4
- data.tar.gz: 74bf7d7f345b10ea0b79f0d3f28b6f54365887aba5d5e8de73859bc24d4b2e4c
3
+ metadata.gz: f1e2ec00d9a41c00749d3cb21f37eba75ed8d295deba5a6734b793a579c5a7be
4
+ data.tar.gz: 457451658386f627c225d89d2060b6cc69a63ff3421ff039ae184722cbac9d78
5
5
  SHA512:
6
- metadata.gz: 50dcd18b1d21c3eb7d5a21584ed00e9bf2aef7b9180921514b85489299664d51539b306073a8b9aee4195df1dd7c2b5db0efb0746d94d153de87fcb2168b6f1b
7
- data.tar.gz: e74c60b4a6cbb182c17a74b44c9a88ae9ead35d59dabf408a46a7f64996a13711d4bf83c1b163f192da3a9f2e088798cc73b31187563bd10000aff70727c1e25
6
+ metadata.gz: 3a4d2774be4df2daf2434d7caee2191d220dae84d4b9db20e856ba1a8155ea62d50ff8ac121b9bd97439cc7636d9f72af815af2980c98af76a61094a2bd6a172
7
+ data.tar.gz: 42ba2148fd0ff7b5d4e533fe45cac01524e11e889323cdb63526f623a54ef6d139021ce89206aca1a4c4eb51856d98567e11c6f00be79e2dce1284cd517fb512
data/CHANGELOG.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## Next version
4
4
 
5
+ ## 1.5.4
6
+ - Cucumber "click on" steps improvement
7
+
5
8
  ## 1.5.3
6
9
  - Fix FontAwesome >=5.6
7
10
 
@@ -0,0 +1,8 @@
1
+ Capybara.add_selector(:agilibox_clickable) do
2
+ xpath do |locator, **options|
3
+ self.class.all
4
+ .values_at(:link, :button, :label)
5
+ .map { |selector| instance_exec(locator, options, &selector.xpath) }
6
+ .reduce(:union)
7
+ end
8
+ end
@@ -1,17 +1,17 @@
1
1
  # Clicks / Keyboard
2
2
 
3
3
  When("I click on {string}") do |text|
4
- find("a, button, label", text: text).click
4
+ find(:agilibox_clickable, text).click
5
5
  end
6
6
 
7
7
  When("I click on first {string}") do |text|
8
8
  expect(page).to have_content(text)
9
- all("a, button, input[type=button], label", text: text).first.click
9
+ all(:agilibox_clickable, text).first.click
10
10
  end
11
11
 
12
12
  When("I click on last {string}") do |text|
13
13
  expect(page).to have_content(text)
14
- all("a, button, input[type=button], label", text: text).last.click
14
+ all(:agilibox_clickable, text).last.click
15
15
  end
16
16
 
17
17
  When("I click on {string} element") do |selector|
@@ -1,3 +1,3 @@
1
1
  module Agilibox
2
- VERSION = "1.5.3"
2
+ VERSION = "1.5.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: agilibox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - agilidée
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-02 00:00:00.000000000 Z
11
+ date: 2019-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails-i18n
@@ -169,6 +169,7 @@ files:
169
169
  - lib/agilibox/cucumber_helpers/agilibox.rb
170
170
  - lib/agilibox/cucumber_helpers/ajax.rb
171
171
  - lib/agilibox/cucumber_helpers/capybara.rb
172
+ - lib/agilibox/cucumber_helpers/capybara_selectors.rb
172
173
  - lib/agilibox/cucumber_helpers/chrome_headless.rb
173
174
  - lib/agilibox/cucumber_helpers/common_steps.rb
174
175
  - lib/agilibox/cucumber_helpers/database_cleaner.rb