Sha256: aaea1ed226af7a3ddb291a56a3f9dc9cf92b9bf4d3872406143cf8a827d2f8e5

Contents?: true

Size: 756 Bytes

Versions: 5

Compression:

Stored size: 756 Bytes

Contents

require 'watirspec_helper'

describe 'Element' do
  context 'drag and drop' do
    before { browser.goto WatirSpec.url_for('drag_and_drop.html') }

    let(:draggable) { browser.div id: 'draggable' }
    let(:droppable) { browser.div id: 'droppable' }

    it 'can drag and drop an element onto another' do
      expect(droppable.text).to include 'Drop here'
      draggable.drag_and_drop_on droppable
      expect(droppable.text).to include 'Dropped!'
    end

    bug 'Element is getting moved to the wrong spot', :w3c do
      it 'can drag an element by the given offset' do
        expect(droppable.text).to include 'Drop here'
        draggable.drag_and_drop_by 200, 50
        expect(droppable.text).to include 'Dropped!'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
watir-7.0.0.beta1 spec/watirspec/drag_and_drop_spec.rb
watir-6.19.1 spec/watirspec/drag_and_drop_spec.rb
watir-6.19.0 spec/watirspec/drag_and_drop_spec.rb
watir-6.18.0 spec/watirspec/drag_and_drop_spec.rb
watir-6.17.0 spec/watirspec/drag_and_drop_spec.rb