diff --git a/core/drupalci.yml b/core/drupalci.yml index 6687c1f0a2..05bdd9da59 100644 --- a/core/drupalci.yml +++ b/core/drupalci.yml @@ -14,4 +14,4 @@ build: testgroups: '--class "Drupal\Tests\layout_builder\FunctionalJavascript\LayoutBuilderTest"' suppress-deprecations: false halt-on-fail: false - repeat: 5 + repeat: 20 diff --git a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php index f0c7961e4c..4fa330b16b 100644 --- a/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/LayoutBuilderTest.php @@ -97,6 +97,9 @@ public function testFormsLinksDisabled() { $this->clickLink('Manage layout'); $this->addBlock('Search form', '#layout-builder .search-block-form'); $this->drupalGet("$field_ui_prefix/display-layout/default"); + // Ensure the links and forms are disabled using the defaults before the + // layout is saved. + $this->assertLinksFormDisabled(); $this->clickLink('Save Layout'); $this->clickLink('Manage layout'); @@ -141,8 +144,6 @@ protected function addBlock($block_link_text, $rendered_locator) { // Wait for block form to be rendered in the Layout Builder. $this->assertNotEmpty($assert_session->waitForElement('css', $rendered_locator)); - - $this->assertNoElementAfterWait('#drupal-off-canvas'); } /** @@ -168,26 +169,4 @@ protected function assertLinksFormDisabled() { $assert_session->addressEquals($address); } - /** - * Waits for an element to be removed from the page. - * - * @param string $selector - * CSS selector. - * @param int $timeout - * (optional) Timeout in milliseconds, defaults to 10000. - * @param string $message - * (optional) Custom message to display with the assertion. - * - * @todo: Remove after https://www.drupal.org/project/drupal/issues/2892440 - */ - public function assertNoElementAfterWait($selector, $timeout = 10000, $message = '') { - $page = $this->getSession()->getPage(); - if ($message === '') { - $message = "Element '$selector' was not on the page after wait."; - } - $this->assertTrue($page->waitFor($timeout / 1000, function () use ($page, $selector) { - return empty($page->find('css', $selector)); - }), $message); - } - }