mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-60207 javascript: close modal when user touch/click outside it
- Loading branch information
1 parent
6b2e046
commit 30e1f5a
Showing
8 changed files
with
116 additions
and
6 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
@core | ||
Feature: Close modals by clicking outside them | ||
In order to easily close the currently open pop-up | ||
As a user | ||
Clicking outside the modal should close it. | ||
|
||
@javascript | ||
Scenario: The popup closes when clicked on dead space - YUI | ||
Given the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | C1 | | ||
And the following "activities" exist: | ||
| activity | name | intro | course | idnumber | | ||
| quiz | Test quiz name | Test quiz description | C1 | quiz1 | | ||
And I log in as "admin" | ||
And I am on "Course 1" course homepage | ||
And I follow "Test quiz name" | ||
And I click on "Edit quiz" "button" | ||
And I click on "Add" "link" | ||
And I click on "a new question" "link" | ||
# Cannot use the normal ‘I click on’ here, because the pop-up gets in the way. | ||
And I click on ".moodle-dialogue-lightbox" "css_element" skipping visibility check | ||
Then I should not see "Choose a question type to add" | ||
|
||
@javascript | ||
Scenario: The popup closes when clicked on dead space - Modal | ||
And I log in as "admin" | ||
And I click on "Site home" "link" | ||
And I turn editing mode on | ||
And I click on "Add a block" "link" | ||
And I click on ".modal" "css_element" | ||
Then ".modal-backdrop" "css_element" should not be visible | ||
And ".modal-content" "css_element" should not be visible | ||
|
||
@javascript | ||
Scenario: The popup help closes when clicked | ||
Given the following "courses" exist: | ||
| fullname | shortname | | ||
| Course 1 | C1 | | ||
And the following "activities" exist: | ||
| activity | name | intro | course | idnumber | | ||
| quiz | Test quiz name | Test quiz description | C1 | quiz1 | | ||
And I log in as "admin" | ||
And I am on "Course 1" course homepage | ||
And I follow "Test quiz name" | ||
And I click on "Edit quiz" "button" | ||
And I click on "Help with Editing quiz" "icon" | ||
And I should see "More help" | ||
And I click on "body" "css_element" | ||
Then I should not see "More help" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.