MDL-86488 qbank_columnsortorder: Use action menu Behat steps

This commit is contained in:
Jun Pataleta
2025-09-18 19:27:36 +08:00
parent 11607a0a57
commit e419d66acf
2 changed files with 9 additions and 18 deletions
@@ -33,8 +33,7 @@ Feature: Set default question bank column order and size
Given I log in as "admin"
And I navigate to "Plugins > Question bank plugins > Column sort order" in site administration
And "Created by" "table_row" should exist
When I click on "Actions menu" "link" in the "Created by" "table_row"
And I choose "Remove" in the open action menu
When I choose the "Remove" item in the "Actions menu" action menu of the "Created by" "table_row"
Then "Created by" "table_row" should not exist
And I reload the page
And "Created by" "table_row" should not exist
@@ -88,8 +87,7 @@ Feature: Set default question bank column order and size
And I follow "Back"
And "checkboxcustomcolumn" "table_row" should appear before "Comments" "table_row"
And the field "Width of 'checkboxcustomcolumn' in pixels" matches value "200"
And I click on "Actions menu" "link" in the "checkboxcustomcolumn" "table_row"
And I choose "Remove" in the open action menu
And I choose the "Remove" item in the "Actions menu" action menu of the "checkboxcustomcolumn" "table_row"
And "checkboxcustomcolumn" "table_row" should not exist
And I follow "Preview"
And "checkboxcustomcolumn" "qbank_columnsortorder > column header" should not exist
@@ -130,8 +128,7 @@ Feature: Set default question bank column order and size
And I navigate to "Plugins > Question bank plugins > Column sort order" in site administration
And "Field 1" "table_row" should exist
And "Field 2" "table_row" should exist
And I click on "Actions menu" "link" in the "Field 1" "table_row"
And I choose "Remove" in the open action menu
And I choose the "Remove" item in the "Actions menu" action menu of the "Field 1" "table_row"
# Delete a question custom field.
And I navigate to "Plugins > Question bank plugins > Question custom fields" in site administration
@@ -140,8 +137,7 @@ Feature: Set default question bank column order and size
And I navigate to "Plugins > Question bank plugins > Column sort order" in site administration
Then I should see "Column sort order"
And "Field 2" "table_row" should exist
And I click on "Actions menu" "link" in the "Field 2" "table_row"
And I choose "Remove" in the open action menu
And I choose the "Remove" item in the "Actions menu" action menu of the "Field 2" "table_row"
# Delete the question custom category.
And I navigate to "Plugins > Question bank plugins > Question custom fields" in site administration
@@ -70,8 +70,7 @@ Feature: Set question bank column order and size
Given I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
And I apply question bank filter "Category" with value "Question category 1"
And "Comments" "qbank_columnsortorder > column header" should exist
And I click on "Actions menu" "link" in the "Comments" "qbank_columnsortorder > column header"
And I choose "Remove" in the open action menu
And I choose the "Remove" item in the "Actions menu" action menu of the "Comments" "qbank_columnsortorder > column header"
Then "Comments" "qbank_columnsortorder > column header" should not exist
And I reload the page
And "Comments" "qbank_columnsortorder > column header" should not exist
@@ -90,8 +89,7 @@ Feature: Set question bank column order and size
Given I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
And I apply question bank filter "Category" with value "Question category 1"
And the "style" attribute of "Question" "qbank_columnsortorder > column header" should contain "width: 300px"
When I click on "Actions menu" "link" in the "Question" "qbank_columnsortorder > column header"
And I choose "Resize" in the open action menu
When I choose the "Resize" item in the "Actions menu" action menu of the "Question" "qbank_columnsortorder > column header"
And I set the field "Column width (pixels)" to "400"
And I press "Save changes"
Then the "style" attribute of "Question" "qbank_columnsortorder > column header" should contain "width: 400px"
@@ -113,8 +111,7 @@ Feature: Set question bank column order and size
Given I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
And I apply question bank filter "Category" with value "Question category 1"
And "Comments" "qbank_columnsortorder > column header" should appear before "Question" "qbank_columnsortorder > column header"
When I click on "Actions menu" "link" in the "Comments" "qbank_columnsortorder > column header"
And I choose "Move" in the open action menu
When I choose the "Move" item in the "Actions menu" action menu of the "Comments" "qbank_columnsortorder > column header"
And I follow "After \"Question\""
Then "Comments" "qbank_columnsortorder > column header" should appear after "Question" "qbank_columnsortorder > column header"
And I reload the page
@@ -152,10 +149,8 @@ Feature: Set question bank column order and size
| Field 2 | Category for test | text | f2 | {"visibility":"2"} |
And I am on the "Test quiz Q001" "mod_quiz > question bank" page logged in as "teacher1"
And I apply question bank filter "Category" with value "Question category 1"
And I click on "Actions menu" "link" in the "Field 1" "qbank_columnsortorder > column header"
And I choose "Remove" in the open action menu
And I click on "Actions menu" "link" in the "Field 2" "qbank_columnsortorder > column header"
And I choose "Remove" in the open action menu
And I choose the "Remove" item in the "Actions menu" action menu of the "Field 1" "qbank_columnsortorder > column header"
And I choose the "Remove" item in the "Actions menu" action menu of the "Field 2" "qbank_columnsortorder > column header"
And "Field 2" "qbank_columnsortorder > column header" should not exist
# Delete a question custom field.