Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Must verify:
- always
-
- the response headers required for BigPipe (
\Drupal\big_pipe\EventSubscriber\HtmlResponseBigPipeSubscriber::onRespond()
- works with all types of placeholders (look at #2674334: BigPipeStrategy test coverage + remaining @todos for a comprehensive list, including representative edge cases): test on a page with all these types
- the response headers required for BigPipe (
- when JS is on
-
- presence of
big_pipe/big_pipe
asset library - AJAX loading of new asset libraries
- placeholder replacement order
- presence of
- when JS is off
-
- absence of
big_pipe/big_pipe
asset library - in-line loading of new asset libraries using HTML
- absence of
Comment | File | Size | Author |
---|---|---|---|
#14 | 2675670-14.patch | 46.21 KB | Wim Leers |
|
Comments
Comment #2
Wim LeersHere is a first iteration. This tests 2 out of the 5 types of placeholders I want to test. And it only tests the "JS on" case, not the "JS off" case yet.
But the bulk of the test infrastructure is here, I should be able to finish this swiftly tomorrow morning.
I'll continue working on this tomorrow morning.
Comment #4
Wim LeersFixed those failures. Both due to expectations assuming Drupal is installed in a subdirectory.
At the same time got rid of all that hardcoded JSON. Instead keeping more legible data structures in PHP that are converted to JSON when testing.
Comment #5
Wim LeersAddressed
Also improved test debug output, which should help a lot in making these tests and their results easier to understand & maintain.
Comment #6
Wim LeersOne less
@todo
:90% of the time to get this one working was spent on this beauty:
Oh, Symfony…
Comment #7
Wim LeersAnd another
@todo
gone:This one was painless (and glorious, check out the markup it generates!)
Comment #8
Wim LeersAnd here's then the corresponding BigPipe no-JS test.
Comment #9
Wim LeersI defined the wrong expectation here. That's not the status message markup.
The actual expected markup (patch attached) would also verify the additional CSS that gets loaded, which means
's second point in the IS is then also verified.Comment #10
Wim LeersFirst round of clean-up:
BigPipeNoJsDetectionTest
toBigPipeTest
Comment #11
Wim LeersUpdate
big_pipe_test.module
so that\Drupal\big_pipe\Tests\BigPipeTest::testNoJsDetection()
no longer needs to install thesession_exists_cache_context_test
module.Comment #12
Wim LeersImprove docs/helper function name for the special
<meta>
refresh handling.Comment #13
Wim LeersThis was already using the same five test cases as the unit tests were. This reroll makes that more maintainable by centralizing all aspects of all five test cases in a single class, that then both the unit test and the integration tests can call out to.
Comment #14
Wim LeersFinal clean-up. The test logic of
\Drupal\big_pipe\Tests\BigPipeTest::testBigPipe()
and\Drupal\big_pipe\Tests\BigPipeTest::testBigPipeNoJs()
is now much easier to follow, and should be clear on at least a high level to all readers.Comment #16
Wim Leerslgtm
Comment #17
Fabianx CreditAttribution: Fabianx as a volunteer and at Tag1 Consulting commentedRTBC in retrospective