Issue #3586323: Update agent edit form path in test.

Description

Fixes CI phpunit failures caused by a hardcoded agent edit form path in AiContextAgentSettingsTest::testAgentNameLinkRespectsEditAccess.

drupal/ai_agents 1.3.2 (#3586032) moved the agent admin base path from admin/config/ai/agents to admin/config/ai/tools-automation/agents. The test still asserted the old URL, so CI started failing on multiple MRs once composer resolved ai_agents 1.3.2.

Production code is already correct: AiContextAgentsForm::buildAgentNameMarkup() uses Url::fromRoute('entity.ai_agent.edit_form', ...). Only the test assertion needed updating.

Changes

  • Update tests/src/Functional/AiContextAgentSettingsTest.php to derive the expected edit form path from entity.ai_agent.edit_form instead of hardcoding /admin/config/ai/agents/{id}/edit/form.

Why this is separate

This is unrelated to prefilter, scope index, or agent settings feature work. Merging it on 1.0.x lets blocked MRs rebase/cherry-pick and get green CI without mixing in unrelated changes.

Test plan

  • vendor/bin/phpunit --filter testAgentNameLinkRespectsEditAccess
  • vendor/bin/phpunit tests/src/Functional/AiContextAgentSettingsTest.php
  • Confirm CI phpunit is green on this MR.
  • Later: Merge into other open MRs and confirm CI phpunit is green (e.g. !208, !210)

Checklist

  • I have updated the MR title to use format: Issue #1234: My issue title.
  • I have updated the MR description to include: Closes #1234
  • I have performed a self-review of my own code
  • I have added or updated tests, or explained in the description why this change is not covered by tests
  • I have written testing instructions and verified them
  • This MR contains no breaking API or hook changes, or they are explicitly documented in the description

Not applicable:

  • I have updated documentation for any new or changed functionality
  • I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)

AI Compliance

Note

Check the one that best describes your usage, or leave all unchecked if AI was not significantly used.

  • AI Assisted Code
    Mainly written by a human; AI used for autocomplete or partial generation under full human supervision.

  • AI Generated Code
    Mainly generated by AI, reviewed and approved by a human before this MR was created.

  • Vibe Coded
    Generated by AI and only functionally reviewed before this MR was created.

Closes #3586323 (closed)

Edited by Kristen Pol

Merge request reports

Loading