MDL-44711 course: fixed navigation expansion in course tests

This commit is contained in:
Sam Hemelryk 2014-05-21 20:58:16 +12:00
parent 65ae0a1bde
commit 37d39fe348
3 changed files with 3 additions and 7 deletions

View File

@ -122,9 +122,7 @@ class behat_course extends behat_base {
public function i_go_to_the_courses_management_page() {
return array(
new Given('I am on homepage'),
new Given('I expand "' . get_string('administrationsite') . '" node'),
new Given('I expand "' . get_string('courses', 'admin') . '" node'),
new Given('I follow "' . get_string('coursemgmt', 'admin') . '"')
new Given('I navigate to "' . get_string('coursemgmt', 'admin') . '" node in "' . get_string('administrationsite') . ' > ' . get_string('courses', 'admin') . '"')
);
}

View File

@ -12,9 +12,7 @@ Feature: The maximum number of weeks/topics in a course can be configured
| user | course | role |
| manager1 | Acceptance test site | manager |
And I log in as "admin"
And I expand "Site administration" node
And I expand "Courses" node
And I follow "Course default settings"
And I navigate to "Course default settings" node in "Site administration > Courses"
@javascript
Scenario: The number of sections can be increased and the limits are applied to courses

View File

@ -63,7 +63,7 @@ class behat_navigation extends behat_base {
$nodetextliteral = $this->getSession()->getSelectorsHandler()->xpathLiteral($text);
$hasblocktree = "[contains(concat(' ', normalize-space(@class), ' '), ' block_tree ')]";
$hasbranch = "[contains(concat(' ', normalize-space(@class), ' '), ' branch ')]";
$hascollapsed = "li[contains(concat(' ', normalize-space(@class), ' '), ' collapsed ') or @data-exandable='1']";
$hascollapsed = "li[contains(concat(' ', normalize-space(@class), ' '), ' collapsed ') or @data-expandable='1']";
$notcollapsed = "li[not(contains(concat(' ', normalize-space(@class), ' '), ' collapsed '))]";
$match = "[normalize-space(.)={$nodetextliteral}]";