From 1801b905352469ec9041da4e45fb745cbb0b8fdd Mon Sep 17 00:00:00 2001 From: Bas Brands Date: Thu, 19 Apr 2018 20:51:13 +0200 Subject: [PATCH] MDL-56511 Theme: behat fixes for theme clean --- blocks/tests/behat/behat_blocks.php | 2 +- course/classes/management_renderer.php | 2 +- .../tests/behat/category_change_visibility.feature | 12 ++++++------ course/tests/behat/category_management.feature | 6 +++--- course/tests/behat/course_change_visibility.feature | 6 +++--- lib/templates/action_menu_trigger.mustache | 2 +- lib/templates/initials_bar.mustache | 8 ++++---- .../output/core_course/management/renderer.php | 2 +- .../templates/core/action_menu_trigger.mustache | 2 +- 9 files changed, 21 insertions(+), 21 deletions(-) diff --git a/blocks/tests/behat/behat_blocks.php b/blocks/tests/behat/behat_blocks.php index 9f459f9fe7a0f..b05d84c21b0f2 100644 --- a/blocks/tests/behat/behat_blocks.php +++ b/blocks/tests/behat/behat_blocks.php @@ -108,7 +108,7 @@ public function i_open_the_blocks_action_menu($blockname) { } $this->execute('behat_general::i_click_on_in_the', - array("a[role='button']", "css_element", $this->escape($blockname), "block") + array(get_string('actions'), "link", $this->escape($blockname), "block") ); } diff --git a/course/classes/management_renderer.php b/course/classes/management_renderer.php index 13b9e59849b5f..56e47e97d50da 100644 --- a/course/classes/management_renderer.php +++ b/course/classes/management_renderer.php @@ -528,7 +528,7 @@ public function course_listing(coursecat $category = null, course_in_list $cours array('id' => 'course-listing-title', 'tabindex' => '0')); $html .= $this->course_listing_actions($category, $course, $perpage); $html .= $this->listing_pagination($category, $page, $perpage); - $html .= html_writer::start_tag('ul', array('class' => 'ml-1', 'role' => 'group')); + $html .= html_writer::start_tag('ul', array('class' => 'ml-1 course-list', 'role' => 'group')); foreach ($category->get_courses($options) as $listitem) { $html .= $this->course_listitem($category, $listitem, $courseid); } diff --git a/course/tests/behat/category_change_visibility.feature b/course/tests/behat/category_change_visibility.feature index a59850c74507a..55087bed00290 100644 --- a/course/tests/behat/category_change_visibility.feature +++ b/course/tests/behat/category_change_visibility.feature @@ -134,9 +134,9 @@ Feature: We can change the visibility of categories in the management interface. And I should see "Cat 2" in the "#category-listing ul" "css_element" And I should see "Cat 3" in the "#category-listing ul" "css_element" And I should see "Cat 4" in the "#category-listing ul" "css_element" - And I should see "Course 1" in the "#course-listing ul" "css_element" - And I should see "Course 2" in the "#course-listing ul" "css_element" - And I should see "Course 3" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" + And I should see "Course 2" in the "#course-listing ul.course-list" "css_element" + And I should see "Course 3" in the "#course-listing ul.course-list" "css_element" And category in management listing should be visible "CAT1" And category in management listing should be visible "CAT2" And category in management listing should be visible "CAT3" @@ -211,9 +211,9 @@ Feature: We can change the visibility of categories in the management interface. And I should see "Cat 2" in the "#category-listing ul" "css_element" And I should see "Cat 3" in the "#category-listing ul" "css_element" And I should see "Cat 4" in the "#category-listing ul" "css_element" - And I should see "Course 1" in the "#course-listing ul" "css_element" - And I should see "Course 2" in the "#course-listing ul" "css_element" - And I should see "Course 3" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" + And I should see "Course 2" in the "#course-listing ul.course-list" "css_element" + And I should see "Course 3" in the "#course-listing ul.course-list" "css_element" And category in management listing should be visible "CAT1" And category in management listing should be visible "CAT2" And category in management listing should be visible "CAT3" diff --git a/course/tests/behat/category_management.feature b/course/tests/behat/category_management.feature index 151cd7e794de6..969fcc25980fa 100644 --- a/course/tests/behat/category_management.feature +++ b/course/tests/behat/category_management.feature @@ -101,7 +101,7 @@ Feature: Test category management actions And I should see "Cat 1" in the "#category-listing ul" "css_element" And I should not see "Cat 2" in the "#category-listing ul" "css_element" And I should not see "Cat 3" in the "#category-listing ul" "css_element" - And I should see "Course 1" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" Scenario: Test I can assign roles for a category through the management interface. Given the following "categories" exist: @@ -298,8 +298,8 @@ Feature: Test category management actions And I click on category "Cat 3" in the management interface #Redirect And I should see the "Course categories and courses" management page - And I should see "Course 1" in the "#course-listing ul" "css_element" - And I should see "Course 2" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" + And I should see "Course 2" in the "#course-listing ul.course-list" "css_element" And the "movecategoriesto" "select" should be disabled And the "resortcategoriesby" "select" should be disabled And the "resortcoursesby" "select" should be disabled diff --git a/course/tests/behat/course_change_visibility.feature b/course/tests/behat/course_change_visibility.feature index 2c411161d0528..25c5014dcbf55 100644 --- a/course/tests/behat/course_change_visibility.feature +++ b/course/tests/behat/course_change_visibility.feature @@ -20,7 +20,7 @@ Feature: We can change the visibility of courses in the management interface. # Redirect. And I should see the "Course categories and courses" management page And I should see "Cat 1" in the "#category-listing ul" "css_element" - And I should see "Course 1" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" And category in management listing should be visible "CAT1" And course in management listing should be visible "C1" And I toggle visibility of course "C1" in management listing @@ -69,7 +69,7 @@ Feature: We can change the visibility of courses in the management interface. And I start watching to see if a new page loads And I should see the "Course categories and courses" management page And I should see "Cat 1" in the "#category-listing ul" "css_element" - And I should see "Course 1" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" And category in management listing should be visible "CAT1" And course in management listing should be visible "C1" And I toggle visibility of course "C1" in management listing @@ -98,7 +98,7 @@ Feature: We can change the visibility of courses in the management interface. And I click on "Courses" "link" in the ".view-mode-selector" "css_element" And a new page should have loaded since I started watching And I start watching to see if a new page loads - And I should see "Course 1" in the "#course-listing ul" "css_element" + And I should see "Course 1" in the "#course-listing ul.course-list" "css_element" And I toggle visibility of course "C1" in management listing And a new page should not have loaded since I started watching And course in management listing should be dimmed "C1" diff --git a/lib/templates/action_menu_trigger.mustache b/lib/templates/action_menu_trigger.mustache index fce1a8b7e1fe4..2a79115b58582 100644 --- a/lib/templates/action_menu_trigger.mustache +++ b/lib/templates/action_menu_trigger.mustache @@ -27,4 +27,4 @@ "triggerextraclasses": "" } }} -{{{actiontext}}}{{{menutrigger}}}{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{#rawicon}}{{{.}}}{{/rawicon}}{{#menutrigger}}{{/menutrigger}} +{{{actiontext}}}{{{menutrigger}}}{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{#rawicon}}{{{.}}}{{/rawicon}}{{#menutrigger}}{{/menutrigger}} diff --git a/lib/templates/initials_bar.mustache b/lib/templates/initials_bar.mustache index dcb7001c2b3b7..2fe1331b5ce7b 100644 --- a/lib/templates/initials_bar.mustache +++ b/lib/templates/initials_bar.mustache @@ -76,10 +76,10 @@
{{title}} {{#current}} - {{all}} + {{all}} {{/current}} {{^current}} -
{{all}}
+
{{all}}
{{/current}}
@@ -87,10 +87,10 @@
    {{#letter}} {{#selected}} -
  • {{name}}
  • +
  • {{name}}
  • {{/selected}} {{^selected}} -
  • {{name}}
  • +
  • {{name}}
  • {{/selected}} {{/letter}}
diff --git a/theme/boost/classes/output/core_course/management/renderer.php b/theme/boost/classes/output/core_course/management/renderer.php index d626a6673fcfb..236de1ce45629 100644 --- a/theme/boost/classes/output/core_course/management/renderer.php +++ b/theme/boost/classes/output/core_course/management/renderer.php @@ -461,7 +461,7 @@ public function course_listing(coursecat $category = null, course_in_list $cours $html .= html_writer::start_div('card-body'); $html .= $this->course_listing_actions($category, $course, $perpage); $html .= $this->listing_pagination($category, $page, $perpage); - $html .= html_writer::start_tag('ul', array('class' => 'ml', 'role' => 'group')); + $html .= html_writer::start_tag('ul', array('class' => 'ml course-list', 'role' => 'group')); foreach ($category->get_courses($options) as $listitem) { $html .= $this->course_listitem($category, $listitem, $courseid); } diff --git a/theme/boost/templates/core/action_menu_trigger.mustache b/theme/boost/templates/core/action_menu_trigger.mustache index 93995e1456ff1..f5078f9e0600e 100644 --- a/theme/boost/templates/core/action_menu_trigger.mustache +++ b/theme/boost/templates/core/action_menu_trigger.mustache @@ -78,7 +78,7 @@ } }}