From 4901174640149d0fbba0d16ddf769c656da9b1d6 Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Thu, 16 Jun 2022 12:30:01 +0100
Subject: [PATCH] Issue #3268244 by Spokje, xjm, Wim Leers: [random test
 failure] Un-skip and fix QuickEditIntegrationTest::testArticleNode()

---
 .../LayoutBuilderIntegrationTest.php                 | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderIntegrationTest.php b/core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderIntegrationTest.php
index 7bc4e2a4ef70..ab8f1f0a1b20 100644
--- a/core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderIntegrationTest.php
+++ b/core/modules/quickedit/tests/src/FunctionalJavascript/LayoutBuilderIntegrationTest.php
@@ -119,7 +119,6 @@ protected function setUp(): void {
    * Tests if an article node can be in-place edited with Quick Edit.
    */
   public function testArticleNode() {
-    $this->markTestSkipped();
     $term = Term::create([
       'name' => 'foo',
       'vid' => 'tags',
@@ -138,6 +137,17 @@ public function testArticleNode() {
       ],
     ]);
 
+    // Move "tags" field to the top of all fields, so its Quick Edit Toolbar
+    // won't overlap any Quick Edit-able fields, which causes (semi-)random test
+    // failures.
+    \Drupal::entityTypeManager()
+      ->getStorage('entity_view_display')
+      ->load('node.article.default')
+      ->setComponent('field_tags', [
+        'type' => 'entity_reference_label',
+        'weight' => 0,
+      ])->save();
+
     $this->drupalGet('node/' . $node->id());
 
     // Initial state.
-- 
GitLab