diff --git a/ai/placement/editor/tests/utils_test.php b/ai/placement/editor/tests/utils_test.php index d2c0da15021..c8a558be8cf 100644 --- a/ai/placement/editor/tests/utils_test.php +++ b/ai/placement/editor/tests/utils_test.php @@ -20,7 +20,7 @@ use core_ai\aiactions\generate_image; use core_ai\aiactions\generate_text; /** - * HTML Text Editor Placement utils test. + * Text editor placement utils test. * * @package aiplacement_editor * @copyright 2024 Huong Nguyen diff --git a/ai/tests/behat/admin.feature b/ai/tests/behat/admin.feature index edf8dc72e2a..30a2debe9bf 100644 --- a/ai/tests/behat/admin.feature +++ b/ai/tests/behat/admin.feature @@ -8,43 +8,43 @@ Feature: An administrator can manage AI subsystem settings Scenario: An administrator can control the enabled state of AI Provider plugins using JavaScript Given I am logged in as "admin" And I navigate to "AI > AI providers" in site administration - When I toggle the "Enable OpenAI API Provider" admin switch "on" - And I should see "OpenAI API Provider enabled." + When I toggle the "Enable OpenAI API provider" admin switch "on" + And I should see "OpenAI API provider enabled." And I reload the page - And I should see "Disable OpenAI API Provider" - And I toggle the "Disable OpenAI API Provider" admin switch "off" - Then I should see "OpenAI API Provider disabled." + And I should see "Disable OpenAI API provider" + And I toggle the "Disable OpenAI API provider" admin switch "off" + Then I should see "OpenAI API provider disabled." @javascript - Scenario: An administrator can control the enabled state of AI Placement plugins using JavaScript + Scenario: An administrator can control the enabled state of AI placement plugins using JavaScript Given I am logged in as "admin" And I navigate to "AI > AI placements" in site administration - When I toggle the "Enable HTML Text Editor Placement" admin switch "on" - And I should see "HTML Text Editor Placement enabled." + When I toggle the "Enable Text editor placement" admin switch "on" + And I should see "Text editor placement enabled." And I reload the page - And I should see "Disable HTML Text Editor Placement" - And I toggle the "Disable HTML Text Editor Placement" admin switch "off" - Then I should see "HTML Text Editor Placement disabled." + And I should see "Disable Text editor placement" + And I toggle the "Disable Text editor placement" admin switch "off" + Then I should see "Text editor placement disabled." @javascript Scenario: Placement actions should be available when an Administrator enables AI Providers using JavaScript Given I am logged in as "admin" And I navigate to "AI > AI providers" in site administration - When I toggle the "Enable OpenAI API Provider" admin switch "on" - And I should see "OpenAI API Provider enabled." + When I toggle the "Enable OpenAI API provider" admin switch "on" + And I should see "OpenAI API provider enabled." And the following config values are set as admin: | apikey | 123 | aiprovider_openai | And I navigate to "AI > AI placements" in site administration - And I click on the "Settings" link in the table row containing "HTML Text Editor Placement" + And I click on the "Settings" link in the table row containing "Text editor placement" Then I should not see "This action is unavailable." @javascript Scenario: Placement actions should not be available when an Administrator disables AI Providers using JavaScript Given I am logged in as "admin" And I navigate to "AI > AI providers" in site administration - When I toggle the "Enable OpenAI API Provider" admin switch "off" + When I toggle the "Enable OpenAI API provider" admin switch "off" And I navigate to "AI > AI placements" in site administration - And I click on the "Settings" link in the table row containing "HTML Text Editor Placement" + And I click on the "Settings" link in the table row containing "Text editor placement" And I should see "This action is unavailable." in the table row containing "Generate text" Then I should see "This action is unavailable." in the table row containing "Generate image" @@ -52,13 +52,13 @@ Feature: An administrator can manage AI subsystem settings Scenario: Placement actions should not be available for enabled Providers when an Administrator disables an Action using JavaScript Given I am logged in as "admin" And I navigate to "AI > AI providers" in site administration - When I toggle the "Enable OpenAI API Provider" admin switch "on" - And I should see "OpenAI API Provider enabled." + When I toggle the "Enable OpenAI API provider" admin switch "on" + And I should see "OpenAI API provider enabled." And the following config values are set as admin: | apikey | 123 | aiprovider_openai | - And I click on the "Settings" link in the table row containing "OpenAI API Provider" + And I click on the "Settings" link in the table row containing "OpenAI API provider" And I toggle the "Generate text" admin switch "off" And I navigate to "AI > AI placements" in site administration - And I click on the "Settings" link in the table row containing "HTML Text Editor Placement" + And I click on the "Settings" link in the table row containing "Text editor placement" And I should see "This action is unavailable." in the table row containing "Generate text" Then I should not see "This action is unavailable." in the table row containing "Generate image" diff --git a/lib/tests/behat/behat_general.php b/lib/tests/behat/behat_general.php index 5913f13bf4e..6dcf250cd2b 100644 --- a/lib/tests/behat/behat_general.php +++ b/lib/tests/behat/behat_general.php @@ -2649,7 +2649,7 @@ EOF; * Good for clicking links on tables where links have repeated text in diiferent rows. * * Example: - * - I click on the "Settings" link in the row containing "HTML Text Editor Placement" + * - I click on the "Settings" link in the row containing "Text editor placement" * * @Given /^I click on the "(?P(?:[^"]|\\")*)" link in the table row containing "(?P(?:[^"]|\\")*)"$/ * @param string $linktext