capybara 3.20.2 → 3.21.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -73,6 +73,8 @@ Capybara::SpecHelper.run_specs TestSessions::Safari, SAFARI_DRIVER.to_s, capybar
73
73
  when 'Capybara::Session selenium_safari #go_back should fetch a response from the driver from the previous page',
74
74
  'Capybara::Session selenium_safari #go_forward should fetch a response from the driver from the previous page'
75
75
  skip 'safaridriver loses the ability to find elements in the document after `go_back`'
76
+ when /drag_to.*HTML5/
77
+ pending "Safari doesn't support"
76
78
  end
77
79
  end
78
80
 
@@ -303,57 +303,6 @@ RSpec.shared_examples 'Capybara::Session' do |session, mode|
303
303
  end
304
304
  end
305
305
 
306
- describe 'Element#drag_to' do
307
- before do
308
- skip "Firefox < 62 doesn't support a DataTransfer constuctor" if firefox_lt?(62.0, session)
309
- skip "IE doesn't support a DataTransfer constuctor" if ie?(session)
310
- skip "Safari doesn't support" if safari?(session)
311
- end
312
-
313
- it 'should HTML5 drag and drop an object' do
314
- session.visit('/with_js')
315
- element = session.find('//div[@id="drag_html5"]')
316
- target = session.find('//div[@id="drop_html5"]')
317
- element.drag_to(target)
318
- expect(session).to have_xpath('//div[contains(., "HTML5 Dropped drag_html5")]')
319
- end
320
-
321
- it 'should set clientX/Y in dragover events' do
322
- session.visit('/with_js')
323
- element = session.find('//div[@id="drag_html5"]')
324
- target = session.find('//div[@id="drop_html5"]')
325
- element.drag_to(target)
326
- session.all(:css, 'div.log').each { |el| puts el.text }
327
- expect(session).to have_css('div.log', text: /DragOver with client position: [1-9]\d*,[1-9]\d*/, count: 2)
328
- end
329
-
330
- it 'should not HTML5 drag and drop on a non HTML5 drop element' do
331
- session.visit('/with_js')
332
- element = session.find('//div[@id="drag_html5"]')
333
- target = session.find('//div[@id="drop_html5"]')
334
- target.execute_script("$(this).removeClass('drop');")
335
- element.drag_to(target)
336
- sleep 1
337
- expect(session).not_to have_xpath('//div[contains(., "HTML5 Dropped drag_html5")]')
338
- end
339
-
340
- it 'should HTML5 drag and drop when scrolling needed' do
341
- session.visit('/with_js')
342
- element = session.find('//div[@id="drag_html5_scroll"]')
343
- target = session.find('//div[@id="drop_html5_scroll"]')
344
- element.drag_to(target)
345
- expect(session).to have_xpath('//div[contains(., "HTML5 Dropped drag_html5_scroll")]')
346
- end
347
-
348
- it 'should drag HTML5 default draggable elements' do
349
- session.visit('/with_js')
350
- link = session.find_link('drag_link_html5')
351
- target = session.find(:id, 'drop_html5')
352
- link.drag_to target
353
- expect(session).to have_xpath('//div[contains(., "HTML5 Dropped")]')
354
- end
355
- end
356
-
357
306
  describe 'Capybara#Node#attach_file' do
358
307
  it 'can attach a directory' do
359
308
  pending "Geckodriver doesn't support uploading a directory" if firefox?(session)
@@ -472,6 +421,7 @@ RSpec.shared_examples 'Capybara::Session' do |session, mode|
472
421
  describe 'with react' do
473
422
  context 'controlled components' do
474
423
  it 'can set and clear a text field' do
424
+ skip "This test doesn't support older browsers" if ie?(session)
475
425
  # session.visit 'https://reactjs.org/docs/forms.html'
476
426
  # session.all(:css, 'h2#controlled-components ~ p a', text: 'Try it on CodePen')[0].click
477
427
  # copied into local view
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.20.2
4
+ version: 3.21.0
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: 2019-05-20 00:00:00.000000000 Z
13
+ date: 2019-05-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: addressable
@@ -88,14 +88,14 @@ dependencies:
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '1.2'
91
+ version: '1.5'
92
92
  type: :runtime
93
93
  prerelease: false
94
94
  version_requirements: !ruby/object:Gem::Requirement
95
95
  requirements:
96
96
  - - "~>"
97
97
  - !ruby/object:Gem::Version
98
- version: '1.2'
98
+ version: '1.5'
99
99
  - !ruby/object:Gem::Dependency
100
100
  name: xpath
101
101
  requirement: !ruby/object:Gem::Requirement