Verified Commit b0573731 authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3468827 by catch, smustgrave: Speed up BigPipeRegressionTest

(cherry picked from commit aae2ffb6)
parent ae83dab2
Loading
Loading
Loading
Loading
Loading
+13 −6
Original line number Diff line number Diff line
@@ -114,13 +114,22 @@ public function testMessages_2712935(): void {
    }
  }

  /**
   * Tests edge cases with placeholder HTML.
   */
  public function testPlaceholderHtmlEdgeCases(): void {
    $this->drupalLogin($this->drupalCreateUser());
    $this->doTestPlaceholderInParagraph_2802923();
    $this->doTestBigPipeLargeContent();
    $this->doTestMultipleReplacements();
  }

  /**
   * Ensure default BigPipe placeholder HTML cannot split paragraphs.
   *
   * @see https://www.drupal.org/node/2802923
   */
  public function testPlaceholderInParagraph_2802923(): void {
    $this->drupalLogin($this->drupalCreateUser());
  protected function doTestPlaceholderInParagraph_2802923(): void {
    $this->drupalGet(Url::fromRoute('big_pipe_regression_test.2802923'));

    $this->assertJsCondition('document.querySelectorAll(\'p\').length === 1');
@@ -132,9 +141,7 @@ public function testPlaceholderInParagraph_2802923(): void {
   * Repeat loading of same page for two times, after second time the page is
   * cached and the bug consistently reproducible.
   */
  public function testBigPipeLargeContent(): void {
    $user = $this->drupalCreateUser();
    $this->drupalLogin($user);
  public function doTestBigPipeLargeContent(): void {
    $assert_session = $this->assertSession();

    $this->drupalGet(Url::fromRoute('big_pipe_test_large_content'));
@@ -160,7 +167,7 @@ public function testBigPipeLargeContent(): void {
   *
   * @see https://www.drupal.org/node/3390178
   */
  public function testMultipleReplacements(): void {
  protected function doTestMultipleReplacements(): void {
    $user = $this->drupalCreateUser();
    $this->drupalLogin($user);