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_pipeasset library - AJAX loading of new asset libraries
- placeholder replacement order
- presence of
- when JS is off
-
- absence of
big_pipe/big_pipeasset 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
@todogone: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:
BigPipeNoJsDetectionTesttoBigPipeTestComment #11
wim leersUpdate
big_pipe_test.moduleso that\Drupal\big_pipe\Tests\BigPipeTest::testNoJsDetection()no longer needs to install thesession_exists_cache_context_testmodule.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 commentedRTBC in retrospective