Skip to content
Snippets Groups Projects

Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS

Closed Issue #3238915: Refactor (if feasible) uses of the jQuery ready function to use VanillaJS
Closed Harumi Jang requested to merge issue/drupal-3238915:3238915-refactor-if-feasible into 9.3.x
1 file
+ 4
4
Compare changes
  • Side-by-side
  • Inline
  • dcf0fd3b
    Issue #3268678 by bnjmnm: [random test failure] Restore... · dcf0fd3b
    Alex Pott authored
    Issue #3268678 by bnjmnm: [random test failure] Restore ContentPreviewToggleTest::testContentPreviewToggle()
@@ -5,6 +5,7 @@
use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
use Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay;
use Drupal\Tests\contextual\FunctionalJavascript\ContextualLinkClickTrait;
use Drupal\Tests\system\Traits\OffCanvasTestTrait;
/**
* Tests toggling of content preview.
@@ -15,7 +16,7 @@ class ContentPreviewToggleTest extends WebDriverTestBase {
use ContextualLinkClickTrait;
use LayoutBuilderSortTrait;
use OffCanvasTestTrait;
/**
* {@inheritdoc}
*/
@@ -24,6 +25,7 @@ class ContentPreviewToggleTest extends WebDriverTestBase {
'block',
'node',
'contextual',
'off_canvas_test',
];
/**
@@ -53,7 +55,6 @@ protected function setUp(): void {
* Tests the content preview toggle.
*/
public function testContentPreviewToggle() {
$this->markTestSkipped();
$assert_session = $this->assertSession();
$page = $this->getSession()->getPage();
$links_field_placeholder_label = '"Links" field';
@@ -89,7 +90,6 @@ public function testContentPreviewToggle() {
$this->getSession()->reload();
$this->assertNotEmpty($assert_session->waitForElement('css', '.layout-builder-block__content-preview-placeholder-label'));
$assert_session->pageTextNotContains($content_preview_body_text);
$this->markTestSkipped('Temporarily skipped due to random failures.');
$this->assertContextualLinks();
// Confirm repositioning blocks works with content preview disabled.
@@ -130,7 +130,7 @@ protected function assertContextualLinks(): void {
$assert_session = $this->assertSession();
$this->clickContextualLink('.block-field-blocknodebundle-for-this-particular-testbody', 'Configure');
$this->assertNotEmpty($assert_session->waitForElement('css', "#drupal-off-canvas"));
$this->waitForOffCanvasArea();
$this->assertSession()->assertWaitOnAjaxRequest();
$this->assertNotEmpty($this->assertSession()->waitForButton('Close'));
$page->pressButton('Close');
Loading