diff --git a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
index 97dc2febc6c7b72f9a6fc74efeed713d89fe6bee..3cbb80e96e5f88f86f31d559fb3cc1a7f7af3e65 100644
--- a/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
+++ b/core/modules/settings_tray/tests/src/FunctionalJavascript/SettingsTrayBlockFormTest.php
@@ -21,6 +21,7 @@ class SettingsTrayBlockFormTest extends SettingsTrayTestBase {
     'node',
     'search',
     'settings_tray_test',
+    'off_canvas_test',
   ];
 
   /**
@@ -241,7 +242,6 @@ public function testEditModeEnableDisable() {
           case 'contextual_link':
             $this->clickContextualLink($this->getBlockSelector($block), "Quick edit");
             $this->waitForOffCanvasToOpen();
-            $this->markTestSkipped("Skipped temporarily for random fails.");
             $this->assertEditModeEnabled();
             break;
 
diff --git a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php
index 352dd45423f122fbfa184052521f2b7abc748951..ef19a8b327203d307c5c5f30e84f14cd4ceeecad 100644
--- a/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php
+++ b/core/modules/system/tests/src/FunctionalJavascript/OffCanvasTestBase.php
@@ -3,18 +3,22 @@
 namespace Drupal\Tests\system\FunctionalJavascript;
 
 use Drupal\FunctionalJavascriptTests\WebDriverTestBase;
+use Drupal\Tests\system\Traits\OffCanvasTestTrait;
 
 /**
  * Base class contains common test functionality for the Off-canvas dialog.
  */
 abstract class OffCanvasTestBase extends WebDriverTestBase {
 
+  use OffCanvasTestTrait;
+
   /**
    * {@inheritdoc}
    */
   protected static $modules = [
     // @todo Remove this in https://www.drupal.org/node/3219959
     'block',
+    'off_canvas_test',
   ];
 
   /**
@@ -75,14 +79,9 @@ protected function enableTheme($theme) {
    * @throws \Behat\Mink\Exception\ElementNotFoundException
    */
   protected function waitForOffCanvasToOpen($position = 'side') {
-    $web_assert = $this->assertSession();
-    // Wait just slightly longer than the off-canvas dialog CSS animation.
-    // @see core/misc/dialog/off-canvas.motion.css
-    $this->getSession()->wait(800);
-    $web_assert->assertWaitOnAjaxRequest();
-    $this->assertElementVisibleAfterWait('css', '#drupal-off-canvas');
+    $this->waitForOffCanvasArea();
     // Check that the canvas is positioned on the side.
-    $web_assert->elementExists('css', '.ui-dialog-position-' . $position);
+    $this->assertSession()->elementExists('css', '.ui-dialog-position-' . $position);
   }
 
   /**