Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit fb46ec9

Browse files
committed
test(actions): add a test showing how to use an action sequence to drag and drop
1 parent bf5b076 commit fb46ec9

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Diff for: spec/basic/actions_spec.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
describe('using an ActionSequence', function() {
2+
beforeEach(function() {
3+
browser.get('index.html#/form');
4+
});
5+
6+
it('should drag and drop', function() {
7+
var sliderBar = element(by.name('points'));
8+
9+
expect(sliderBar.getAttribute('value')).toEqual('1');
10+
11+
browser.actions().
12+
dragAndDrop(sliderBar.find(), {x: 400, y: 20}).
13+
perform();
14+
15+
expect(sliderBar.getAttribute('value')).toEqual('10');
16+
});
17+
});

Diff for: testapp/form/form.html

+5
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,8 @@ <h4>Checkboxes</h4>
4444

4545
<span id="letterlist">{{check.w}}{{check.x}}{{check.y}}{{check.z}}</span>
4646
</div>
47+
48+
<div>
49+
<h4>Drag and Drop</h4>
50+
<input type="range" name="points" min="1" max="10" value="1">
51+
</div>

0 commit comments

Comments
 (0)