mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-59882-master' of git://github.com/andrewnicols/moodle
This commit is contained in:
commit
34ecee16bb
@ -60,8 +60,8 @@ Feature: Perform basic calendar functionality
|
||||
When I am on "Course 1" course homepage
|
||||
And I follow "This month"
|
||||
And I click on "Really awesome event!" "link"
|
||||
And "Course 1" "link" should exist in the ".modal-body" "css_element"
|
||||
And I click on ".close" "css_element"
|
||||
And "Course 1" "link" should exist in the "Really awesome event!" "dialogue"
|
||||
And I click on ".close" "css_element" in the "Really awesome event!" "dialogue"
|
||||
And I log out
|
||||
And I log in as "student2"
|
||||
And I follow "This month"
|
||||
|
@ -114,5 +114,5 @@ Feature: Enrolments are synchronised with meta courses
|
||||
And I navigate to course participants
|
||||
# Suspended users can be unenrolled.
|
||||
When I click on "//a[@data-action='unenrol']" "xpath_element" in the "student2" "table_row"
|
||||
And I click on "Unenrol" "button" in the "[data-region='modal']" "css_element"
|
||||
And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
|
||||
Then I should not see "Student 2" in the "participants" "table"
|
||||
|
@ -123,5 +123,5 @@ Feature: Users can auto-enrol themself in courses where self enrolment is allowe
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to course participants
|
||||
When I click on "//a[@data-action='unenrol']" "xpath_element" in the "student1" "table_row"
|
||||
And I click on "Unenrol" "button" in the "[data-region='modal']" "css_element"
|
||||
And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
|
||||
Then I should not see "Student 1" in the "participants" "table"
|
||||
|
@ -131,6 +131,8 @@ XPATH
|
||||
]) = %locator%] |
|
||||
.//div[contains(concat(' ', normalize-space(@class), ' '), ' yui-dialog ') and
|
||||
normalize-space(descendant::div[@class='hd']) = %locator%]
|
||||
|
|
||||
.//div[@data-region='modal' and descendant::*[@data-region='title'] = %locator%]
|
||||
XPATH
|
||||
, 'icon' => <<<XPATH
|
||||
.//*[contains(concat(' ', normalize-space(@class), ' '), ' icon ') and ( contains(normalize-space(@title), %locator%))]
|
||||
|
@ -19,7 +19,7 @@ Feature: Delete all messages
|
||||
And I click on "start-delete-messages" "message_area_action"
|
||||
And I click on "Delete all" "button"
|
||||
# Confirm dialogue.
|
||||
And I click on "Delete" "button" in the ".modal-footer" "css_element"
|
||||
And I click on "Delete" "button" in the "Confirm" "dialogue"
|
||||
# Confirm the interface is immediately updated.
|
||||
Then I should not see "User 2" in the "conversations" "message_area_region_content"
|
||||
# Confirm the changes are persisted.
|
||||
|
@ -38,12 +38,13 @@ require_once(__DIR__ . '/../../../../blocks/tests/behat/behat_blocks.php');
|
||||
class behat_theme_boost_behat_blocks extends behat_blocks {
|
||||
|
||||
public function i_add_the_block($blockname) {
|
||||
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', get_string('addblock'));
|
||||
$addblock = get_string('addblock');
|
||||
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', $addblock);
|
||||
|
||||
if (!$this->running_javascript()) {
|
||||
$this->execute('behat_general::i_click_on_in_the', [$blockname, 'link_exact', '#region-main', 'css_element']);
|
||||
} else {
|
||||
$this->execute('behat_general::i_click_on_in_the', [$blockname, 'link_exact', '.modal-body', 'css_element']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$blockname, 'link_exact', $addblock, 'dialogue']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,28 +67,30 @@ class behat_theme_boost_behat_blocks extends behat_blocks {
|
||||
}
|
||||
|
||||
public function the_add_block_selector_should_contain_block($blockname) {
|
||||
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', get_string('addblock'));
|
||||
$addblock = get_string('addblock');
|
||||
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', $addblock);
|
||||
|
||||
$cancelstr = get_string('cancel');
|
||||
if (!$this->running_javascript()) {
|
||||
$this->execute('behat_general::should_exist_in_the', [$blockname, 'link_exact', '#region-main', 'css_element']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$cancelstr, 'link_exact', '#region-main', 'css_element']);
|
||||
} else {
|
||||
$this->execute('behat_general::should_exist_in_the', [$blockname, 'link_exact', '.modal-body', 'css_element']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$cancelstr, 'link_exact', '.modal-body', 'css_element']);
|
||||
$this->execute('behat_general::should_exist_in_the', [$blockname, 'link_exact', $addblock, 'dialogue']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$cancelstr, 'button', $addblock, 'dialogue']);
|
||||
}
|
||||
}
|
||||
|
||||
public function the_add_block_selector_should_not_contain_block($blockname) {
|
||||
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', get_string('addblock'));
|
||||
$addblock = get_string('addblock');
|
||||
$this->execute('behat_navigation::i_select_from_flat_navigation_drawer', $addblock);
|
||||
|
||||
$cancelstr = get_string('cancel');
|
||||
if (!$this->running_javascript()) {
|
||||
$this->execute('behat_general::should_not_exist_in_the', [$blockname, 'link_exact', '#region-main', 'css_element']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$cancelstr, 'link_exact', '#region-main', 'css_element']);
|
||||
} else {
|
||||
$this->execute('behat_general::should_not_exist_in_the', [$blockname, 'link_exact', '.modal-body', 'css_element']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$cancelstr, 'link_exact', '.modal-body', 'css_element']);
|
||||
$this->execute('behat_general::should_not_exist_in_the', [$blockname, 'link_exact', $addblock, 'dialogue']);
|
||||
$this->execute('behat_general::i_click_on_in_the', [$cancelstr, 'button', $addblock, 'dialogue']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ Feature: Edit user enrolment
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to course participants
|
||||
When I click on "Unenrol" "icon" in the "student1" "table_row"
|
||||
And I click on "Unenrol" "button" in the ".modal-footer" "css_element"
|
||||
And I click on "Unenrol" "button" in the "Unenrol" "dialogue"
|
||||
Then I should not see "Student 1" in the "participants" "table"
|
||||
|
||||
@javascript
|
||||
|
Loading…
x
Reference in New Issue
Block a user