function BigPipeRegressionTest::doTestBigPipeLargeContent
Same name in other branches
- 10 core/modules/big_pipe/tests/src/FunctionalJavascript/BigPipeRegressionTest.php \Drupal\Tests\big_pipe\FunctionalJavascript\BigPipeRegressionTest::doTestBigPipeLargeContent()
Tests BigPipe large content.
Repeat loading of same page for two times, after second time the page is cached and the bug consistently reproducible.
1 call to BigPipeRegressionTest::doTestBigPipeLargeContent()
- 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 144
Class
- BigPipeRegressionTest
- BigPipe regression tests.
Namespace
Drupal\Tests\big_pipe\FunctionalJavascriptCode
public function doTestBigPipeLargeContent() : void {
$assert_session = $this->assertSession();
$this->drupalGet(Url::fromRoute('big_pipe_test_large_content'));
$this->assertNotNull($assert_session->waitForElement('css', 'script[data-big-pipe-event="stop"]'));
$this->assertCount(0, $this->getDrupalSettings()['bigPipePlaceholderIds']);
$this->assertCount(2, $this->getSession()
->getPage()
->findAll('css', 'script[data-big-pipe-replacement-for-placeholder-with-id]'));
$assert_session->elementExists('css', '#big-pipe-large-content');
$this->drupalGet(Url::fromRoute('big_pipe_test_large_content'));
$this->assertNotNull($assert_session->waitForElement('css', 'script[data-big-pipe-event="stop"]'));
$this->assertCount(0, $this->getDrupalSettings()['bigPipePlaceholderIds']);
$this->assertCount(2, $this->getSession()
->getPage()
->findAll('css', 'script[data-big-pipe-replacement-for-placeholder-with-id]'));
$assert_session->elementExists('css', '#big-pipe-large-content');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.