Full patch test 1.2.x
This is a full patch test for the 1.2.x branch. It includes all changes made since the last full patch test. Note that this is very shallow testing and does not cover all edge cases. Please go through all the issues being added in this patch and test the relevant functionality as well.
Setup a new environment
- Create a new folder called
drupal-11-testwith latest version of Drupal 11. cd drupal-11-testddev config --project-type=drupal11 --docroot=webddev startddev composer create-project "drupal/recommended-project:^11"ddev composer require drush/drushddev drush site:install --account-name=admin --account-pass=admin -yddev composer require 'drupal/ai:^1.2' 'drupal/ai_agents:^1.2' 'drupal/ai_provider_openai:^1.2' 'drupal/ai_vdb_provider_milvus:^1.1@beta'ddev composer require 'drupal/field_validation:^3.0@beta' 'drupal/search_api:^1.40' 'drupal/token:^1.17' 'drupal/admin_toolbar:^3.6'- Copy the file docker-compose.milvus.yaml to the
.ddevfolder. ddev restart
Install the current versions of everything
ddev drush pm:en ai ai_agents ai_provider_openai ai_logging ai_automators field_widget_actions ai_api_explorer ai_assistant_api ai_chatbot ai_ckeditor ai_content_suggestions ai_search ai_observability ai_translate ai_validations ai_vdb_provider_milvus admin_toolbar admin_toolbar_tools ai_agents_explorer -y
Login to the website
- Open browser to
http://drupal-11-test.ddev.site/user/login - Login with username
adminand passwordadmin
Setup the VDB Provider:
- In the menu go
Configuration->AI->Vector DB Settings->Milvus Provider - In host enter
http://milvusand in port enter19530, no key needed. - Click
Save configuration
Setup OpenAI Provider:
- In the menu go to
Configuration->AI->Provider Settings->OpenAI Authentication - Click "Create a new key".
- Name key name
OpenAI Keyand for the key value use your OpenAI API key. - Click
Save configuration - Go back twice
- Reload and select the key
OpenAI Keyfrom the dropdown for the OpenAI Provider. - Click
Save configuration
Test the base functionality
- You can see this under Testing a AI Provider. Just test the OpenAI provider as normal.
Setup AI Search
- Visit https://drupal11-test.ddev.site/admin/config/search/search-api
- Click
Add server - For
Server nameenterMilvus Server - For
Embeddings EngineselectOpenAI | text-embedding-3-small - For
Vector DatabaseselectMilvus DB - For
Database Namewritedefault - For
Collectionwritearticles - Click
Save - Visit https://drupal11-test.ddev.site/admin/config/search/search-api again
- Click
Add index - For
Index nameenterArticles Index - For
DatasourcesselectContent - For
BundleschooseOnly those selectedand selectArticle - For
ServerselectMilvus Server - Click
Save and add fields - Add the fields
TitleandBodyand clickDone - For
TitleselectContextual contentasIndexing options - For
BodyselectMain contentasIndexing options - Click
Save changes
Test AI Search
- Create a new article with title "Living Standards" and body "Living standards refer to the level of wealth, comfort, material goods, and necessities available to a certain socioeconomic class or geographic area."
- Click
Save - Visit https://drupal11-test.ddev.site/admin/config/ai/explorers/vector_db_generator
- Enter the prompt
Affluance Leveland select theArticles Indexas the index. - Click
Run DB Query - The article should show up with over 0.3 in score.
- Change the prompt to
Cars and Motorbikesand clickRun DB Queryagain. - The article should show up with under 0.3 in score.
Setup AI Automators
- Visit https://drupal11-test.ddev.site/admin/structure/types/manage/article/fields
- Click
EditunderTags - Check
Enable AI Automators - Choose
LLM: Taxonomyas the Automator Type - Select
Bodyas theAutomator Base Field - In Automator Prompt write
Based on the context text create up to 2 tags that fits the context. Context: {{ context }} - Click
Save settings
Test AI Automators
- Visit the article you created earlier.
- Click
Edit - Click
Savewithout changing anything. - After the page reloads, the Tags field should be populated with 2 tags that fit the article.
Test Agents
- Visit https://drupal11-test.ddev.site/admin/config/ai/agents
- On the Content Type Agent, click the dropdown and select
Explore - In the prompt enter
What article types are available on this website? - Click
Run Agent - The explorer should run once and tell you that Article and Basic page are available content types.
Setup AI Logging
- Visit https://drupal11-test.ddev.site/admin/config/ai/logging/settings
- Check
Automatically log requests - Check
Automatically log responses - Click
Save configuration
Test AI Logging
- Visit https://drupal11-test.ddev.site/admin/config/ai/explorers/chat_generator
- Enter the prompt
What is Drupal? - Click
Ask The AI - Visit https://drupal11-test.ddev.site/admin/config/ai/logging/collection
- You should see the request logged with the prompt and response.
Test AI Observability
- Visit https://drupal11-test.ddev.site/admin/reports/dblog
- You should see log entries for AI requests and responses with details about the provider used, tokens consumed, and time taken.
Setup AI Translate
- Visit https://drupal11-test.ddev.site/admin/structure/types/manage/article
- Click the tab
Language settings - Check
Enable translation - Visit https://drupal11-test.ddev.site/admin/config/regional/language/add
- Add
Germanas a new language. - Visit https://drupal11-test.ddev.site/admin/config/ai/settings
- Under
Translate TextchooseChat proxy to LLMand provider andgpt-4.1as the model. - Click
Save configuration
Test AI Translate
- Go to the article you created earlier.
- Click
Edit - Click the
Translatetab - On the German row, click
Translate using gpt-4.1 - You should now see the translated title being
Lebensstandard.
Setup AI Content Suggestions
- Visit https://drupal11-test.ddev.site/admin/config/ai/suggestions
- Click
Enable Evaluate Readability - Click
Save configuration
Test AI Content Suggestions
- Go to the article you created earlier.
- Click
Edit - Open the tab called
Evaluate Readability - Click
Score readability - You should see a readability score and suggestions to improve the content.
Setup AI CKEditor
- Visit https://drupal11-test.ddev.site/admin/config/content/formats
- Click
Configureon theBasic HTMLtext format. - Drag the
AI CKEditorbutton fromAvailable buttonstoActive toolbar - Open the
Generate with AIsection. - Check
Enabled - Click
Save configuration
Test AI CKEditor
- Go to the article you created earlier.
- Click
Edit - In the Body field, place the cursor at the end of the content.
- Click the
AI Assistantbutton in the toolbar andGenerate with AI. - In the modal, enter the prompt
Add a conclusion about living standards. - Click
Generate - The AI should generate a conclusion. Click
Save changes to editor - The conclusion should now be added to the article body.
Setup AI Validations
- Visit https://drupal11-test.ddev.site/admin/structure/field_validation
- Click
Add field validation rule set - Pick
ContentasEntity TypeandArticleasBundle - Click
Create new field validation rule set - Select
Imageas the field andAI Image Constraintas the constraint. - Click
Add - In the
Field Validation Rule TitleenterCar Image Validation - In the
Column of fieldselecttarget_id - Change the prompt to
Check if the image is of a car. Respond with XTRUE if it is a car and XFALSE if it is not. - In
MessageaddThe image must be of a car. - Click
Add Rule
Test AI Validations
- Go to the article you created earlier.
- Click
Edit - In the
Imagefield, upload an image of a tree. - You should see the validation message
The image must be of a car. - Replace the image with an image of a car.
- You should be able to save the article without validation errors.
Setup AI Chatbot and AI Assistants API
- Visit https://drupal11-test.ddev.site/admin/config/ai/ai-assistant
- Click
Add AI Assistant - In
LabelenterContent Type Assistant - In
InstructionsenterJust forward everything to the content type agent. - Enable the
Content Type AgentunderAgents Enabled - Click
Save - Visit https://drupal11-test.ddev.site/admin/structure/block
- Under
Content BelowclickPlace block9 . ClickPlace blocknext toAI DeepChat Chatbot - Under
AI AssistantselectContent Type Assistant - Under
Styling settingsselectStyleasBard,widthas500px,heightas600pxandPlacementasBottom right - Click
Save block - Click the tab
Claro - Under
ContentclickPlace block - Click
Place blocknext toAI DeepChat Chatbot - Select the
Content Type AssistantunderAI Assistant - Under
Styling settingsselectStyleasToolbar,widthasauto,heightas100%andPlacementasToolbar - Click
Save block
Test AI Chatbot and AI Assistants API
- Visit https://drupal11-test.ddev.site/
- In the bottom right, the chatbot should be visible. Click it open.
- In the input, enter
What content types are available on this website? - The chatbot should respond with
The available content types on this website are Article and Basic page. - Visit https://drupal11-test.ddev.site/admin/config
- In the Toolbar on the top click
Assistant - An assistant should slide out from the left side.
- In the input, enter
What content types are available on this website? - The assistant should respond with
The available content types on this website are Article and Basic page.
Upgrade test (on first run only)
- Now run
ddev composer require 'drupal/ai:1.2.x-dev@dev'to get the latest changes in the 1.2.x branch. - Run database updates with
ddev drush updb -y. Usually this is not needed for patch releases, but run it to be sure. - Clear caches with
ddev drush cr
Re-test the base functionality
- No rerun all test categories above to ensure everything still works after the upgrade.
Re-test with the updated code on install
- Run
ddev delete -O && ddev startto delete the environment. - Rerun all test categories above to ensure everything works on a fresh install with the updated code.
- The upgrade test is not needed here.
When finished
- Run
ddev delete -Oto delete the test environment. - Remove the
drupal-11-testfolder if you no longer need it.