capybara 3.35.0 → 3.35.1

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: 00bf1cfd1e72093422fb61df1dae86d72948e8026d57fb00084d5bedceb0967e
4
- data.tar.gz: 65a8c6b66d1ef91586ca39f7eabcf800019f853e33e087d1bb65f02a85140c8b
3
+ metadata.gz: 2913f83c980b16f28c90df040eea7a31502facb4d78a0dc9cd54a37e2faee9e7
4
+ data.tar.gz: 105f72f39f609d3865a7414d8103ae0fd12f23b3f437d867994d395487eeaf55
5
5
  SHA512:
6
- metadata.gz: f961de052aa75cb3e3a941ea031d40d6d0f1fc2a9a80190c7dbe2f7d8e96b462fa71d4ed96d4dc45687e2baaf151579ca4508a2753a6e2073814857e2dee9bb4
7
- data.tar.gz: 4b02c84f7bd1d9da419e3f43848da87290ba303541df516e6217fd3fc2e4cf5263e212e9a4a5329c8505b2f6111c0ce6ea17537ea3099b04f12c9b662d364088
6
+ metadata.gz: ec65b7e51aaf5df4fc9a3370deafd98ea35d20bc1aecd4d3349f6a64f7406f647bbdf632601c6a27db4846a6f68a32cf3c95e6d5d7a038c3fd2c48724c3a3e23
7
+ data.tar.gz: 8a14863dae239561f674899ee7209ab54d02b1c7b3890aaf2d8cbeb8d3a349d341c7bb6a021aa85702aa7f885aa5e2602f1c64cefc488a4d2ea9f9dd86e7710f
data/History.md CHANGED
@@ -1,3 +1,11 @@
1
+ # Version 3.35.1
2
+ Release date: 2020-01-26
3
+
4
+ ### Fixed
5
+
6
+ * Default chrome driver registrations use chrome - Issue #2442 [Yuriy Alekseyev]
7
+ * 'Capybara.test_id' usage with the :button selector - Issue #2443
8
+
1
9
  # Version 3.35.0
2
10
  Release date: 2020-01-25
3
11
 
@@ -25,7 +25,7 @@ Capybara.register_driver :selenium_chrome do |app|
25
25
  opts.add_argument('--disable-site-isolation-trials')
26
26
  end
27
27
 
28
- Capybara::Selenium::Driver.new(app, **Hash[:browser => :firefox, options_key => browser_options])
28
+ Capybara::Selenium::Driver.new(app, **Hash[:browser => :chrome, options_key => browser_options])
29
29
  end
30
30
 
31
31
  Capybara.register_driver :selenium_chrome_headless do |app|
@@ -38,5 +38,5 @@ Capybara.register_driver :selenium_chrome_headless do |app|
38
38
  opts.add_argument('--disable-site-isolation-trials')
39
39
  end
40
40
 
41
- Capybara::Selenium::Driver.new(app, **Hash[:browser => :firefox, options_key => browser_options])
41
+ Capybara::Selenium::Driver.new(app, **Hash[:browser => :chrome, options_key => browser_options])
42
42
  end
@@ -57,7 +57,7 @@ Capybara.add_selector(:button, locator_type: [String, Symbol]) do
57
57
  XPath.attr(:title).is(locator),
58
58
  (XPath.attr(:id) == XPath.anywhere(:label)[XPath.string.n.is(locator)].attr(:for)),
59
59
  (XPath.attr(:'aria-label').is(locator) if config.enable_aria_label),
60
- (XPath.attr(test_id) == locator if config.test_id)
60
+ (XPath.attr(config.test_id) == locator if config.test_id)
61
61
  ].compact.inject(&:|)
62
62
  end
63
63
  end
@@ -38,6 +38,15 @@ Capybara::SpecHelper.spec '#click_link_or_button' do
38
38
  expect(extract_results(@session)['first_name']).to eq('John')
39
39
  end
40
40
 
41
+ context 'with test_id' do
42
+ it 'should click on a button' do
43
+ Capybara.test_id = 'data-test-id'
44
+ @session.visit('/form')
45
+ @session.click_link_or_button('test_id_button')
46
+ expect(extract_results(@session)['first_name']).to eq('John')
47
+ end
48
+ end
49
+
41
50
  context 'with :exact option' do
42
51
  context 'when `false`' do
43
52
  it 'clicks on approximately matching link' do
@@ -449,7 +449,7 @@ New line after and before textarea tag
449
449
 
450
450
  <p>
451
451
  <input type="button" aria-label="Aria button" name="form[fresh]" id="fresh_btn" value="i am fresh"/>
452
- <input type="submit" name="form[awesome]" id="awe123" title="What an Awesome Button" value="awesome"/>
452
+ <input type="submit" name="form[awesome]" id="awe123" data-test-id="test_id_button" title="What an Awesome Button" value="awesome"/>
453
453
  <input type="submit" name="form[crappy]" id="crap321" value="crappy"/>
454
454
  <input type="image" name="form[okay]" id="okay556" title="Okay 556 Image" value="okay" alt="oh hai thar"/>
455
455
  <button type="submit" id="click_me_123" title="Click Title button" value="click_me">Click me!</button>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.35.0'
4
+ VERSION = '3.35.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.35.0
4
+ version: 3.35.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Walpole