spec/shared_selenium_node.rb in capybara-3.32.0 vs spec/shared_selenium_node.rb in capybara-3.32.1
- old
+ new
@@ -33,9 +33,19 @@
expect(session.find('//input[@spellcheck="TRUE"]')[:spellcheck]).to eq('true')
expect(session.find('//input[@spellcheck="FALSE"]')[:spellcheck]).to eq('false')
end
end
+ describe '#set' do
+ it 'respects maxlength when using rapid set' do
+ session.visit('/form')
+ inp = session.find(:css, '#long_length')
+ value = (0...50).map { |i| ((i % 26) + 65).chr }.join
+ inp.set(value, rapid: true)
+ expect(inp.value).to eq value[0...35]
+ end
+ end
+
describe '#visible?' do
let(:bridge) do
session.driver.browser.send(:bridge)
end