From 8b19bc6ad54fdd6cac3bb39e194dc2153669471e Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Tue, 16 Apr 2024 23:07:41 +0100
Subject: [PATCH] Issue #3439899 by SolimanHarkas, vensires: Fix Menu tests
 that rely on UID1's super user behavior

---
 .../menu_ui/tests/src/Functional/MenuUiNodeTest.php | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
index 8e4e2a62787b..bbebee16c31a 100644
--- a/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
+++ b/core/modules/menu_ui/tests/src/Functional/MenuUiNodeTest.php
@@ -43,14 +43,6 @@ class MenuUiNodeTest extends BrowserTestBase {
     'content_translation',
   ];
 
-  /**
-   * {@inheritdoc}
-   *
-   * @todo Remove and fix test to not rely on super user.
-   * @see https://www.drupal.org/project/drupal/issues/3437620
-   */
-  protected bool $usesSuperUserAccessPolicy = TRUE;
-
   /**
    * {@inheritdoc}
    */
@@ -439,7 +431,10 @@ public function testMenuNodeWithGrantsFormWidget() {
    * @see menu_ui_get_menu_link_defaults()
    */
   public function testMainMenuIsPrioritized(): void {
-    $this->drupalLogin($this->rootUser);
+    $this->drupalLogin($this->drupalCreateUser([
+      'administer menu',
+      'edit any page content',
+    ]));
     $menu_name = $this->randomMachineName();
     $mainLinkTitle = $this->randomMachineName();
     $nonMainLinkTitle = $this->randomMachineName();
-- 
GitLab