capybara 3.8.0 → 3.8.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: 814367062843328d421eb8c9db0476cabe5a16405866951855507dd63250bfb9
4
- data.tar.gz: 2b6605e124b8eed5d4efbc7f2e06d56dcf2ddaa8775d2ec7f42b18aca4144f3a
3
+ metadata.gz: cc35446857b540db49c4c67f5f70ad80dcb49d8642a39c178886f0429e14e44f
4
+ data.tar.gz: 75cdc8e0b3014fdebe9d58cc454045874144b4d9aa647b2b7636cce9dc92f61a
5
5
  SHA512:
6
- metadata.gz: 76d6d964d8e204497e9f57b61e96ecf32631325c6c4b600ead18009817f45e324f241520d134881bfa62bba754d820f5e1d91710e4c78ca98ccdd06325a206fb
7
- data.tar.gz: ee215bc20878dcce34e1df44f2081e3867528358bd1c7cae542b5996e945ca1f6c16decba834ec3c13bd46052873c6988ef7c141674648eae8f5894fec405f38
6
+ metadata.gz: d63a63b21444a97e292346593a221dd5339ec32ec9c243f37b3761f526dc810bbc0488da7caa38252dca25601aea1a70f9a1863a7756c3e766ce82a1f9f2a7e5
7
+ data.tar.gz: f3c2a58ecec72d56d8cad3df1868012a5f000173dd9d43b976df316eec1186279c8c557fab294f8e2e7e48ac1c0de088af34757986aa9ac0ecc147bc320497d8
data/History.md CHANGED
@@ -1,9 +1,16 @@
1
+ # Version 3.8.1
2
+ Release date: 2018-09-22
3
+
4
+ ### Fixed
5
+
6
+ * Filling in of date fields with a string when using selenium chrome regression [Micah Geisel]
7
+
1
8
  # Version 3.8.0
2
9
  Release date: 2018-09-20
3
10
 
4
11
  ### Added
5
12
 
6
- * Workaround gecodriver 0.22 issue with undefined pause durations
13
+ * Workaround geckodriver 0.22 issue with undefined pause durations
7
14
  * :element selector ignores XML namespaces
8
15
 
9
16
  ### Fixed
@@ -355,6 +355,10 @@ private
355
355
  @value = value
356
356
  end
357
357
 
358
+ def to_s
359
+ value.to_s
360
+ end
361
+
358
362
  def dateable?
359
363
  !value.is_a?(String) && value.respond_to?(:to_date)
360
364
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Capybara
4
- VERSION = '3.8.0'
4
+ VERSION = '3.8.1'
5
5
  end
@@ -84,4 +84,32 @@ RSpec.describe 'Capybara::Session with chrome' do
84
84
  end
85
85
  end
86
86
  end
87
+
88
+ describe 'filling in Chrome-specific date and time fields with keystrokes' do
89
+ let(:datetime) { Time.new(1983, 6, 19, 6, 30) }
90
+
91
+ before do
92
+ @session = TestSessions::Chrome
93
+ @session.visit('/form')
94
+ end
95
+
96
+ it 'should fill in a date input with a String' do
97
+ @session.fill_in('form_date', with: "06/19/1983")
98
+ @session.click_button('awesome')
99
+ expect(Date.parse(extract_results(@session)['date'])).to eq datetime.to_date
100
+ end
101
+
102
+ it 'should fill in a time input with a String' do
103
+ @session.fill_in('form_time', with: "06:30A")
104
+ @session.click_button('awesome')
105
+ results = extract_results(@session)['time']
106
+ expect(Time.parse(results).strftime('%r')).to eq datetime.strftime('%r')
107
+ end
108
+
109
+ it 'should fill in a datetime input with a String' do
110
+ @session.fill_in('form_datetime', with: "06/19/1983\t06:30A")
111
+ @session.click_button('awesome')
112
+ expect(Time.parse(extract_results(@session)['datetime'])).to eq datetime
113
+ end
114
+ end
87
115
  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.8.0
4
+ version: 3.8.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-20 00:00:00.000000000 Z
13
+ date: 2018-09-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable