function BigPipeRegressionTest::doTestMultipleReplacements
Same name in other branches
- 11.x core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php \Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeRegressionTest::doTestMultipleReplacements()
Test BigPipe replacement of multiple complex replacements.
In some situations with either a large number of replacements or multiple replacements involving complex operations, some replacements were not completed. This is a simulation of such a situation by rendering a lot of placeholders on a page.
See also
https://www.drupal.org/node/3390178
1 call to BigPipeRegressionTest::doTestMultipleReplacements()
- BigPipeRegressionTest::testPlaceholderHtmlEdgeCases in core/
modules/ big_pipe/ tests/ src/ FunctionalJavascript/ BigPipeRegressionTest.php - Tests edge cases with placeholder HTML.
File
-
core/
modules/ big_pipe/ tests/ src/ FunctionalJavascript/ BigPipeRegressionTest.php, line 170
Class
- BigPipeRegressionTest
- BigPipe regression tests.
Namespace
Drupal\Tests\big_pipe\FunctionalJavascriptCode
protected function doTestMultipleReplacements() : void {
$user = $this->drupalCreateUser();
$this->drupalLogin($user);
$assert_session = $this->assertSession();
$this->drupalGet(Url::fromRoute('big_pipe_test_multiple_replacements'));
$this->assertNotNull($assert_session->waitForElement('css', 'script[data-big-pipe-event="stop"]'));
$this->assertCount(0, $this->getDrupalSettings()['bigPipePlaceholderIds']);
$this->assertCount(0, $this->getSession()
->getPage()
->findAll('css', 'span[data-big-pipe-placeholder-id]'));
$this->assertCount(BigPipeRegressionTestController::PLACEHOLDER_COUNT + 1, $this->getSession()
->getPage()
->findAll('css', 'script[data-big-pipe-replacement-for-placeholder-with-id]'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.