Needs work
Project:
Drupal core
Version:
main
Component:
phpunit
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 Aug 2026 at 22:43 UTC
Updated:
5 Sep 2026 at 10:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
longwaveComment #3
kieran.cottSounds like a good idea, I'll take a look. :)
Comment #4
kieran.cottAh, forgot about the Drupal Core assignee policy - unassigning.
https://www.drupal.org/docs/develop/issues/fields-and-other-parts-of-an-...
Comment #5
kieran.cottI've taken a look at these tests and I think most of them (15) can be moved over without much in the way of changes. 3 of those 15 (from the
WorkspaceTestclass) are already based onBrowserTestBase, so can simply be moved from theFunctionalJavascriptdirectory/namespace as-is.The remaining 3 probably need more discussion as to what we want to do with them:
1.
BigPipeMessagesTest::testMessages():Verifies the final DOM after BigPipe’s JavaScript processes streamed placeholder commands, inserts the placeholder output and consolidates messages. I think a Functional client would only receive BigPipe script/command payloads; it would not necessarily create the asserted
p.logged-messageand message elements. Inspecting the raw payload would be materially different coverage.2.
TimestampFormatterWithTimeDiffTest::testNoRefreshInterval()Even with
refreshset to zero, JavaScript still runs once to replace the server-rendered fallback date with text such as “2 seconds ago”. The method asserts that transformed text, as well as therefresh: 0setting. A Functional test could verify thedata-drupal-time-diffJSON, but not the relative-time text; that would be reduced coverage. The method is also currently skipped before setup.3.
ClaroTableDragTest::testNoDuplicates().tabledrag-handleelements are created bycore/misc/tabledrag.js. Without JavaScript the Functional DOM contains zero handles, so it cannot verify that behaviour attachment creates exactly one rather than duplicates.I'll open an MR converting the other 15 tests to use
BrowserTestBaseas suggested but would be good to get some input from the community as to what to do with the above three highlighted exceptions.Comment #6
longwaveThanks for the analysis. I think we can just skip those here if it turns out they are non trivial, converting 15 methods is still a win.
Comment #8
kieran.cottGreat, thanks - I've implemented this as MR 16838.
The 15 converted methods now live in Functional tests across:
I've left the three test methods mentioned in comment #5 unchanged.
Comment #9
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.