MDL-75669 theme_boost: Fix BS5 related behat steps and scenarios
- Fix some behat steps and scenarios that are failing because of Bootstrap 5 syntax changes. - Add a new $behatsite SCSS variable when behat is runinng that disables Bootstrap transitions and effects.
This commit is contained in:
@@ -34,7 +34,7 @@ Feature: Use the activity chooser to insert activities anywhere in a section
|
||||
Given I change window size to "large"
|
||||
And I hover "Insert content before 'Test Forum'" "button"
|
||||
And I press "Insert content before 'Test Forum'"
|
||||
And I click on "Activity or resource" "button" in the ".dropdown .show" "css_element"
|
||||
And I click on "Activity or resource" "button" in the ".dropdown-menu.show" "css_element"
|
||||
When I click on "Add a new Assignment" "link" in the "Add an activity or resource" "dialogue"
|
||||
And I set the following fields to these values:
|
||||
| Assignment name | Test Assignment |
|
||||
|
||||
@@ -84,7 +84,7 @@ class behat_action_menu extends behat_base {
|
||||
$menuitems = explode('>', $menuitemstring);
|
||||
foreach ($menuitems as $menuitem) {
|
||||
// Gets the node based on the requested selector type and locator.
|
||||
$menuselector = ".moodle-actionmenu .dropdown.show .dropdown-menu";
|
||||
$menuselector = ".moodle-actionmenu .dropdown .dropdown-menu.show";
|
||||
$node = $this->get_node_in_container("link", trim($menuitem), "css_element", $menuselector);
|
||||
$node->click();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ Feature: Teacher can enable anonymous submissions for an assignment
|
||||
And I set the field "Grade out of 100" to "70"
|
||||
And I press "Save changes"
|
||||
And I am on the "Assign 1" "assign activity" page
|
||||
And I follow "Reveal student identities"
|
||||
And I navigate to "Reveal student identities" in current page administration
|
||||
And I should see "Are you sure you want to reveal student identities for this assignment? This operation cannot be undone. Once the student identities have been revealed, the marks will be released to the gradebook."
|
||||
And I press "Continue"
|
||||
# Confirm that student identity is no longer hidden and grade is retained
|
||||
|
||||
@@ -179,6 +179,11 @@ function theme_boost_get_pre_scss($theme) {
|
||||
}, (array) $targets);
|
||||
}
|
||||
|
||||
// Add a new variable to indicate that we are running behat.
|
||||
if (defined('BEHAT_SITE_RUNNING')) {
|
||||
$scss .= "\$behatsite: true;\n";
|
||||
}
|
||||
|
||||
// Prepend pre-scss.
|
||||
if (!empty($theme->settings->scsspre)) {
|
||||
$scss .= $theme->settings->scsspre;
|
||||
|
||||
@@ -106,6 +106,11 @@ $spacers: (
|
||||
6: ($spacer * 3)
|
||||
) !default;
|
||||
|
||||
// Behat site specific variable values.
|
||||
$behatsite: false !default;
|
||||
$enable-transitions: not $behatsite !default;
|
||||
$enable-smooth-scroll: not $behatsite !default;
|
||||
|
||||
// Import FontAwesome.
|
||||
@import "fontawesome";
|
||||
|
||||
|
||||
@@ -75,6 +75,11 @@ function theme_classic_get_pre_scss($theme) {
|
||||
}, (array) $targets);
|
||||
}
|
||||
|
||||
// Add a new variable to indicate that we are running behat.
|
||||
if (defined('BEHAT_SITE_RUNNING')) {
|
||||
$scss .= "\$behatsite: true;\n";
|
||||
}
|
||||
|
||||
// Prepend pre-scss.
|
||||
if (!empty($theme->settings->scsspre)) {
|
||||
$scss .= $theme->settings->scsspre;
|
||||
|
||||
@@ -37,14 +37,12 @@ $table-accent-bg: rgba($black, .03) !default;
|
||||
|
||||
// Options
|
||||
$enable-rounded: true !default;
|
||||
$enable-responsive-font-sizes: true !default;
|
||||
|
||||
// Body
|
||||
$body-color: $gray-900 !default;
|
||||
|
||||
// Fonts
|
||||
$font-size-base: 0.9375rem !default;
|
||||
$rfs-base-font-size: 0.9rem !default;
|
||||
$headings-font-weight: 300 !default;
|
||||
|
||||
// Navbar
|
||||
@@ -102,6 +100,11 @@ $spacers: (
|
||||
6: ($spacer * 3)
|
||||
) !default;
|
||||
|
||||
// Behat site specific variable values.
|
||||
$behatsite: false !default;
|
||||
$enable-transitions: not $behatsite !default;
|
||||
$enable-smooth-scroll: not $behatsite !default;
|
||||
|
||||
// Import FontAwesome.
|
||||
@import "fontawesome";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user