1 |
efrain |
1 |
@core
|
|
|
2 |
Feature: Close modals by clicking outside them
|
|
|
3 |
In order to easily close the currently open pop-up
|
|
|
4 |
As a user
|
|
|
5 |
Clicking outside the modal should close it if it doesn't contain a form.
|
|
|
6 |
|
|
|
7 |
@javascript
|
|
|
8 |
Scenario: The popup closes when clicked on dead space - YUI
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname |
|
|
|
11 |
| Course 1 | C1 |
|
|
|
12 |
And the following "activities" exist:
|
|
|
13 |
| activity | name | intro | course | idnumber |
|
|
|
14 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
|
|
|
15 |
And I am on the "quiz1" "Activity" page logged in as "admin"
|
|
|
16 |
And I follow "Add question"
|
|
|
17 |
And I click on "Add" "link"
|
|
|
18 |
And I click on "a new question" "link"
|
|
|
19 |
# Cannot use the normal ‘I click on’ here, because the pop-up gets in the way.
|
|
|
20 |
And I click on ".moodle-dialogue-lightbox" "css_element" skipping visibility check
|
|
|
21 |
# The modal does not close because it contains a form.
|
|
|
22 |
Then I should see "Choose a question type to add"
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: The popup closes when clicked on dead space - Modal
|
|
|
26 |
Given I log in as "admin"
|
|
|
27 |
And I follow "Full calendar"
|
|
|
28 |
And I press "New event"
|
|
|
29 |
When I click on "[data-region='modal-container']" "css_element"
|
|
|
30 |
# The modal does not close becaue it contains a form.
|
|
|
31 |
Then ".modal-backdrop" "css_element" should be visible
|
|
|
32 |
# Confirm that the contents of the new calendar event modal are visible.
|
|
|
33 |
And I should see "New event" in the ".modal-title" "css_element"
|
|
|
34 |
And I should see "Event title" in the ".modal-body" "css_element"
|
|
|
35 |
|
|
|
36 |
@javascript
|
|
|
37 |
Scenario: The popup help closes when clicked
|
|
|
38 |
Given the following "courses" exist:
|
|
|
39 |
| fullname | shortname |
|
|
|
40 |
| Course 1 | C1 |
|
|
|
41 |
And the following "activities" exist:
|
|
|
42 |
| activity | name | intro | course | idnumber |
|
|
|
43 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
|
|
|
44 |
And I am on the "quiz1" "Activity" page logged in as "admin"
|
|
|
45 |
And I follow "Add question"
|
|
|
46 |
Then I should not see "More help"
|