capybara 3.7.0 → 3.7.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: e081025be98ae57e3e43ef0fb2a156b3bfb3ff4d54f8f25bfc09a4bcff2fc59c
4
- data.tar.gz: 95e8d6fffe004d4802cd0f97d3bddeae5394041dc774d341c3ad10a60d0b04eb
3
+ metadata.gz: ff4996d8188f7398e7998aa1295fca9e92ece2bee9a2d662a77ab66a182d7884
4
+ data.tar.gz: 05f243132820c10cf6c6e49a032cbebb390d270c88655d4410d79c827cca7467
5
5
  SHA512:
6
- metadata.gz: 93e42ca9e9ad0bde5911fe2c7e86ad2d0ac1c40428dfcd256aa01b21b6a8c2e1755df018a272f1917e0628c5c7e1a68b35eb930c3abdb5ffec4e9079187ca5b8
7
- data.tar.gz: c7faa43983241d170cf725c22fcc595d2fde4572a71abcf3271d32993bbb6e2874a96c74b850090089598d277b8793b072315fc1e34c9e7a876daeb64a007f7e
6
+ metadata.gz: eabe1a0080dea2a6cdce45eb65707ebd1696f6fca805eec2e1cad1cbbb3aed9f2a87f61e072401968845778607a50f14bcf36231827cbcacc0d88fe6785021f1
7
+ data.tar.gz: 716a3b11ad853a8d0440cfb21a1e7c0975f9cbcb409dcc2daac92bbbd71b6f47f8d1312fed4881fe49ce312c8093ec3cc55d12080f78ca75ba7c9514f67ba565
data/History.md CHANGED
@@ -1,3 +1,10 @@
1
+ # Version 3.7.1
2
+ Release date: 2018-09-05
3
+
4
+ ### Fixed
5
+
6
+ * Restored ability to pass symbol as the CSS selector when calling `has_css?`/`have_css`/etc - Issue #2093
7
+
1
8
  # Version 3.7.0
2
9
  Release date: 2018-09-02
3
10
 
@@ -30,7 +30,7 @@ module Capybara
30
30
  class Splitter
31
31
  def split(css)
32
32
  selectors = []
33
- StringIO.open(css) do |str|
33
+ StringIO.open(css.to_s) do |str|
34
34
  selector = ''
35
35
  while (char = str.getc)
36
36
  case char
@@ -10,6 +10,13 @@ Capybara::SpecHelper.spec '#has_css?' do
10
10
  expect(@session).to have_css('p a#foo')
11
11
  end
12
12
 
13
+ it 'should take a symbol as the selector' do
14
+ # This was never a specifically accepted format but it has worked for a
15
+ # lot of versions. Probably should keep it until at least 4.0
16
+ # TODO: consider not supporting symbol for the CSS selector.
17
+ expect(@session).to have_css(:p)
18
+ end
19
+
13
20
  it 'should be false if the given selector is not on the page' do
14
21
  expect(@session).not_to have_css('abbr')
15
22
  expect(@session).not_to have_css('p a#doesnotexist')
@@ -130,13 +130,11 @@ Capybara::SpecHelper.spec Capybara::Window, requires: [:windows] do
130
130
  @other_window = @session.window_opened_by do
131
131
  @session.find(:css, '#openWindow').click
132
132
  end
133
- @other_window.resize_to(400, 300)
133
+ @other_window.resize_to(600, 300)
134
134
  expect(@session.current_window).to eq(@window)
135
135
 
136
- # #size returns values larger than availWidth, availHeight with Chromedriver
137
136
  @session.within_window(@other_window) do
138
- expect(@session.current_window.size).to eq([400, 300])
139
- # expect(@session.evaluate_script("[window.outerWidth, window.outerHeight]")).to eq([400,300])
137
+ expect(@session.current_window.size).to eq([600, 300])
140
138
  end
141
139
  end
142
140
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.7.0'
4
+ VERSION = '3.7.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.7.0
4
+ version: 3.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Walpole
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain:
12
12
  - gem-public_cert.pem
13
- date: 2018-09-03 00:00:00.000000000 Z
13
+ date: 2018-09-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable