-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
js.feature
42 lines (37 loc) · 1.62 KB
/
js.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Feature: Check that JsTrait works
@javascript
Scenario: Assert javascript click on element
Given I am an anonymous user
When I visit "/sites/default/files/relative.html"
When I click on "#overlay-off-canvas-trigger" element
@javascript
Scenario: Assert javascript trigger event on element
Given I am an anonymous user
When I visit "/sites/default/files/relative.html"
Then I should not see an ".overlay-visible" element
When I trigger JS "click" event on "#overlay-off-canvas-trigger" element
Then I should see an ".overlay-visible" element
@javascript
Scenario: Assert javascript Accept/Not Accept confirmation
Given I am an anonymous user
When I visit "/sites/default/files/relative.html"
Then I should see the button "Test confirm"
Then I should not see the button "You pressed OK!"
Then I accept confirmation dialogs
Then I press the "Test confirm" button
Then I should see the button "You pressed OK!"
@javascript
Scenario: Assert javascript Not Accept confirmation
Given I am an anonymous user
When I visit "/sites/default/files/relative.html"
Then I should see the button "Test confirm"
Then I should not see the button "You canceled!"
Then I do not accept confirmation dialogs
Then I press the "Test confirm" button
Then I should see the button "You canceled!"
@javascript
Scenario: Assert scroll to an element with ID.
Given I am an anonymous user
When I visit "/sites/default/files/relative.html"
Then I scroll to an element with id "main-inner"
Then the element with id "main-inner" should be at the top of the page