mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-56511 behat: Fix failing behat tests (again)
This commit is contained in:
parent
837b937511
commit
8787ffaa40
5 changed files with 10 additions and 10 deletions
|
@ -27,4 +27,4 @@
|
||||||
"triggerextraclasses": ""
|
"triggerextraclasses": ""
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
<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>
|
<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>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<a href="#" class="{{triggerextraclasses}} dropdown-toggle" id="dropdown-{{instance}}" title="{{title}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<a href="#" class="{{triggerextraclasses}} dropdown-toggle" id="dropdown-{{instance}}" title="{{title}}" role="menuitem" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
{{{actiontext}}}
|
{{{actiontext}}}
|
||||||
{{{menutrigger}}}
|
{{{menutrigger}}}
|
||||||
{{#icon}}
|
{{#icon}}
|
||||||
|
|
|
@ -39,7 +39,7 @@ class behat_theme_boost_behat_action_menu extends behat_action_menu {
|
||||||
|
|
||||||
public function i_open_the_action_menu_in($element, $selectortype) {
|
public function i_open_the_action_menu_in($element, $selectortype) {
|
||||||
// Gets the node based on the requested selector type and locator.
|
// Gets the node based on the requested selector type and locator.
|
||||||
$node = $this->get_node_in_container("css_element", "[role=button][aria-haspopup=true]", $selectortype, $element);
|
$node = $this->get_node_in_container("css_element", "[role=menuitem][aria-haspopup=true]", $selectortype, $element);
|
||||||
|
|
||||||
// Check if it is not already opened.
|
// Check if it is not already opened.
|
||||||
if ($node->getAttribute('aria-expanded') === 'true') {
|
if ($node->getAttribute('aria-expanded') === 'true') {
|
||||||
|
|
|
@ -18,7 +18,7 @@ Feature: Context settings menu
|
||||||
Scenario: Teacher can use the context settings menu
|
Scenario: Teacher can use the context settings menu
|
||||||
And I log in as "teacher1"
|
And I log in as "teacher1"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And I click on ".context-header-settings-menu [role=button]" "css_element"
|
And I click on ".context-header-settings-menu [role=menuitem]" "css_element"
|
||||||
And I choose "Edit settings" in the open action menu
|
And I choose "Edit settings" in the open action menu
|
||||||
And I should see "Edit course settings"
|
And I should see "Edit course settings"
|
||||||
And I log out
|
And I log out
|
||||||
|
@ -26,5 +26,5 @@ Feature: Context settings menu
|
||||||
Scenario: Student cannot use the context settings menu
|
Scenario: Student cannot use the context settings menu
|
||||||
And I log in as "student1"
|
And I log in as "student1"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And ".context-header-settings-menu [role=button]" "css_element" should not exist
|
And ".context-header-settings-menu [role=menuitem]" "css_element" should not exist
|
||||||
And I log out
|
And I log out
|
||||||
|
|
|
@ -21,13 +21,13 @@ Feature: Region main settings menu
|
||||||
Scenario: Teacher can use the region main settings menu
|
Scenario: Teacher can use the region main settings menu
|
||||||
And I log in as "teacher1"
|
And I log in as "teacher1"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And "#region-main-settings-menu [role=button]" "css_element" should not exist
|
And "#region-main-settings-menu [role=menuitem]" "css_element" should not exist
|
||||||
And I follow "Choice name"
|
And I follow "Choice name"
|
||||||
And I click on "#region-main-settings-menu [role=button]" "css_element"
|
And I click on "#region-main-settings-menu [role=menuitem]" "css_element"
|
||||||
And I choose "Edit settings" in the open action menu
|
And I choose "Edit settings" in the open action menu
|
||||||
And I should see "Updating: Choice"
|
And I should see "Updating: Choice"
|
||||||
And I navigate to course participants
|
And I navigate to course participants
|
||||||
And I click on "#region-main-settings-menu [role=button]" "css_element"
|
And I click on "#region-main-settings-menu [role=menuitem]" "css_element"
|
||||||
And I choose "Enrolment methods" in the open action menu
|
And I choose "Enrolment methods" in the open action menu
|
||||||
And I should see "Enrolment methods"
|
And I should see "Enrolment methods"
|
||||||
And I log out
|
And I log out
|
||||||
|
@ -35,7 +35,7 @@ Feature: Region main settings menu
|
||||||
Scenario: Student cannot use all options in the region main settings menu
|
Scenario: Student cannot use all options in the region main settings menu
|
||||||
And I log in as "student1"
|
And I log in as "student1"
|
||||||
And I am on "Course 1" course homepage
|
And I am on "Course 1" course homepage
|
||||||
And "#region-main-settings-menu [role=button]" "css_element" should not exist
|
And "#region-main-settings-menu [role=menuitem]" "css_element" should not exist
|
||||||
And I follow "Choice name"
|
And I follow "Choice name"
|
||||||
And "#region-main-settings-menu [role=button]" "css_element" should not exist
|
And "#region-main-settings-menu [role=menuitem]" "css_element" should not exist
|
||||||
And I log out
|
And I log out
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue