Merge branch 'MDL-73366-master' of git://github.com/abgreeve/moodle

This commit is contained in:
Sara Arjona 2022-01-17 09:00:24 +01:00
commit a654a1674a
3 changed files with 5 additions and 5 deletions

View File

@ -97,12 +97,12 @@ Feature: Test tertiary navigation as various users
When I navigate to "Badges > Manage badges" in site administration
Then "Manage badges" "button" should not exist
And "Add a new badge" "button" should exist
And I should see "Site administration" is active in secondary navigation
And I should see "General" is active in secondary navigation
And I click on "Testing site badge" "link"
And "Manage badges" "button" should not exist
And "Add a new badge" "button" should not exist
And "Back" "button" should exist
And I should see "Site administration" is active in secondary navigation
And I should see "General" is active in secondary navigation
And I click on "Back" "button"
And "Back" "button" should not exist
And "Manage badges" "button" should not exist
@ -113,7 +113,7 @@ Feature: Test tertiary navigation as various users
And I navigate to "Badges > Manage badges" in site administration
And I click on "Testing site badge" "link"
When I select "<option>" from the "jump" singleselect
Then I should see "Site administration" is active in secondary navigation
Then I should see "General" is active in secondary navigation
Examples:
| option |

View File

@ -607,7 +607,7 @@ class secondary extends view {
// tab. Note this value refers to being present on the page itself, before a search has been performed.
$isadminsearchpage = $PAGE->url->compare(new \moodle_url('/admin/search.php', ['query' => '']), URL_MATCH_PARAMS);
if ($node) {
$siteadminnode = $this->add($node->text, "#link$node->key", null, null, 'siteadminnode');
$siteadminnode = $this->add(get_string('general'), "#link$node->key", null, null, 'siteadminnode');
if ($isadminsearchpage) {
$siteadminnode->action = false;
$siteadminnode->tab = "#link$node->key";

View File

@ -138,7 +138,7 @@ class secondary_test extends \advanced_testcase {
return [
'Testing in a course context' => ['course', 'coursehome', 'courseheader', 'Course'],
'Testing in a module context' => ['module', 'modulepage', 'activityheader', 'Assignment'],
'Testing in a site admin' => ['system', 'siteadminnode', 'homeheader', 'Site administration'],
'Testing in a site admin' => ['system', 'siteadminnode', 'homeheader', 'General'],
];
}