Verified Commit 359cb8f4 authored by godotislate's avatar godotislate
Browse files

fix: #3614520 [random test failure] LayoutBuilderTest::testLayoutBuilderUi

By: velmir_taky
By: danielveza
By: longwave
By: godotislate
(cherry picked from commit d4cf531e)
parent dd283a43
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -155,6 +155,7 @@ public function testLayoutBuilderUi(): void {

    // Save the layout, and the new block is visible.
    $page->pressButton('Save layout');
    $this->assertTrue($assert_session->waitForText('The layout override has been saved.'));
    $assert_session->addressEquals($node_url);
    $assert_session->pageTextContains('Powered by Drupal');
    $assert_session->pageTextContains('This is the label');
@@ -192,6 +193,7 @@ public function testLayoutBuilderUi(): void {

    // Ensure the dragged block is still in the correct position after save.
    $page->pressButton('Save layout');
    $this->assertTrue($assert_session->waitForText('The layout override has been saved.'));
    $assert_session->elementExists('css', '.layout__region--second .block-system-powered-by-block');
    $assert_session->elementTextContains('css', '.layout__region--second', 'Powered by Drupal');

@@ -227,6 +229,7 @@ public function testLayoutBuilderUi(): void {
    $this->assertPageNotReloaded();

    $page->pressButton('Save layout');
    $this->assertTrue($assert_session->waitForText('The layout override has been saved.'));
    $assert_session->elementExists('css', '.layout');

    // Test deriver-based blocks.
@@ -258,6 +261,7 @@ public function testLayoutBuilderUi(): void {
    $this->assertPageNotReloaded();

    $page->pressButton('Save layout');
    $this->assertTrue($assert_session->waitForText('The layout override has been saved.'));

    // Removing all sections results in no layout being used.
    $assert_session->addressEquals($node_url);