Skip to content

Commit

Permalink
MDL-56511 Theme: behat fixes for theme clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Bas Brands authored and David Monllao committed Apr 20, 2018
1 parent 88d184b commit 1801b90
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion blocks/tests/behat/behat_blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -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")
);
}

Expand Down
2 changes: 1 addition & 1 deletion course/classes/management_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
12 changes: 6 additions & 6 deletions course/tests/behat/category_change_visibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions course/tests/behat/category_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions course/tests/behat/course_change_visibility.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/templates/action_menu_trigger.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@
"triggerextraclasses": ""
}
}}
<a href="#" class="{{triggerextraclasses}} toggle-display {{#menutrigger}}textmenu{{/menutrigger}}" id="action-menu-toggle-{{instance}}" title="{{title}}" role="menuitem">{{{actiontext}}}{{{menutrigger}}}{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{#rawicon}}{{{.}}}{{/rawicon}}{{#menutrigger}}<b class="caret"></b>{{/menutrigger}}</a>
<a href="#" class="{{triggerextraclasses}} toggle-display {{#menutrigger}}textmenu{{/menutrigger}}" id="action-menu-toggle-{{instance}}" title="{{title}}">{{{actiontext}}}{{{menutrigger}}}{{#icon}}{{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}{{/icon}}{{#rawicon}}{{{.}}}{{/rawicon}}{{#menutrigger}}<b class="caret"></b>{{/menutrigger}}</a>
8 changes: 4 additions & 4 deletions lib/templates/initials_bar.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,21 @@
<div class="initialbar {{class}}">
<span class="initialbarlabel">{{title}}</span>
{{#current}}
<a class="initialbarall letter" href="{{url}}">{{all}}</a>
<a class="initialbarall page-item letter" href="{{url}}">{{all}}</a>
{{/current}}
{{^current}}
<div class="initialbarall letter active">{{all}}</div>
<div class="initialbarall letter page-item active">{{all}}</div>
{{/current}}

<div class="initialbargroups">
{{#group}}
<ul class="initialbargroup">
{{#letter}}
{{#selected}}
<li><span class="letter active {{name}}">{{name}}</span></li>
<li><span class="letter page-item active {{name}}">{{name}}</span></li>
{{/selected}}
{{^selected}}
<li><a class="letter {{name}}" href="{{url}}">{{name}}</a></li>
<li><a class="letter page-item {{name}}" href="{{url}}">{{name}}</a></li>
{{/selected}}
{{/letter}}
</ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion theme/boost/templates/core/action_menu_trigger.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
}
}}
<div class="dropdown">
<a href="#" class="{{triggerextraclasses}} dropdown-toggle" id="dropdown-{{instance}}" title="{{title}}" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<a href="#" class="{{triggerextraclasses}} dropdown-toggle" id="dropdown-{{instance}}" title="{{title}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{{actiontext}}}
{{{menutrigger}}}
{{#icon}}
Expand Down

0 comments on commit 1801b90

Please sign in to comment.