Issue #3586325: Fix functional-test dual-container traps in AiContextAdminSettingsTest.
Description
Converts two form_builder programmatic submissions in
AiContextAdminSettingsTest to browser-level $this->submitForm() calls,
matching the recommendation from the issue. The third usage in
testOverviewPageToggleSubmitRequiresAdminPermission is kept intentionally
with a docblock explaining why: it tests a server-side access boundary that
cannot be exercised via the browser since the form element is not rendered
for non-admin users.
Also removes the now-unused AiContextSettingsForm import.
Testing instructions
- Set up a DDEV environment following tests/README.md.
- Run: ddev phpunit tests/src/Functional/AiContextAdminSettingsTest.php
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 updated documentation for any new or changed functionality
- I have written testing instructions and verified them locally
- I have noted any required post-merge steps (config imports, cache rebuilds, manual changes)
- This MR contains no breaking API or hook changes, or they are explicitly documented in the description
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 #3586325