From e419d66acfc3decb65ce8fbffde6fdfe4970da43 Mon Sep 17 00:00:00 2001 From: Jun Pataleta Date: Sat, 13 Sep 2025 10:33:32 +0800 Subject: [PATCH] MDL-86488 qbank_columnsortorder: Use action menu Behat steps --- .../tests/behat/admin_settings.feature | 12 ++++-------- .../tests/behat/question_bank.feature | 15 +++++---------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/question/bank/columnsortorder/tests/behat/admin_settings.feature b/question/bank/columnsortorder/tests/behat/admin_settings.feature index ad5d10670a7..7a3a0dc841a 100644 --- a/question/bank/columnsortorder/tests/behat/admin_settings.feature +++ b/question/bank/columnsortorder/tests/behat/admin_settings.feature @@ -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 diff --git a/question/bank/columnsortorder/tests/behat/question_bank.feature b/question/bank/columnsortorder/tests/behat/question_bank.feature index 5dc966070a0..5ace9f44d8a 100644 --- a/question/bank/columnsortorder/tests/behat/question_bank.feature +++ b/question/bank/columnsortorder/tests/behat/question_bank.feature @@ -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.