From 7058c0a0d52d13da1937bba5636f44e685a12d9f Mon Sep 17 00:00:00 2001
From: "omkar.podey" <omkar.podey@3685158.no-reply.drupal.org>
Date: Fri, 14 Oct 2022 14:46:15 +0000
Subject: [PATCH] Issue #3314946 by omkar.podey: UpdateReady mistakenly assigns
 a special CSS class to all validation results

---
 automatic_updates_extensions/src/Form/UpdateReady.php    | 3 ---
 .../tests/src/Functional/UpdaterFormTest.php             | 9 +++------
 dictionary.txt                                           | 1 +
 3 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/automatic_updates_extensions/src/Form/UpdateReady.php b/automatic_updates_extensions/src/Form/UpdateReady.php
index 6a5d072c85..12daefbc69 100644
--- a/automatic_updates_extensions/src/Form/UpdateReady.php
+++ b/automatic_updates_extensions/src/Form/UpdateReady.php
@@ -351,9 +351,6 @@ final class UpdateReady extends FormBase {
         '#theme' => 'item_list__automatic_updates_validation_results',
         '#prefix' => $result->getSummary(),
         '#items' => $messages,
-        '#context' => [
-          'list_style' => 'automatic-updates-extensions__pending-database-updates',
-        ],
       ];
     }
     return $this->traitFormatResult($result);
diff --git a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
index f0088239d4..870ec56ccb 100644
--- a/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
+++ b/automatic_updates_extensions/tests/src/Functional/UpdaterFormTest.php
@@ -193,12 +193,9 @@ class UpdaterFormTest extends AutomaticUpdatesFunctionalTestBase {
     $assert_session->pageTextNotContains('The following dependencies will also be updated:');
     // Ensure that a list of pending database updates is visible, along with a
     // short explanation, in the warning messages.
-    $warning_messages = $assert_session->elementExists('xpath', '//div[@data-drupal-messages]//div[@aria-label="Warning message"]');
-    $this->assertStringContainsString('Possible database updates have been detected in the following extensions.', $warning_messages->getText());
-    $pending_updates = $warning_messages->findAll('css', 'ul.item-list__automatic-updates-extensions__pending-database-updates li');
-    $this->assertCount(2, $pending_updates);
-    $this->assertSame('System', $pending_updates[0]->getText());
-    $this->assertSame('Automatic Updates Theme With Updates', $pending_updates[1]->getText());
+    $possible_update_message = 'Possible database updates have been detected in the following extensions.<ul><li>System</li><li>Automatic Updates Theme With Updates</li></ul>';
+    $warning_messages = $assert_session->elementExists('css', 'div[data-drupal-messages] div[aria-label="Warning message"]');
+    $this->assertStringContainsString($possible_update_message, $warning_messages->getHtml());
 
     $page->pressButton('Continue');
     $this->checkForMetaRefresh();
diff --git a/dictionary.txt b/dictionary.txt
index e89adcd441..d69a828c01 100644
--- a/dictionary.txt
+++ b/dictionary.txt
@@ -1,3 +1,4 @@
+unrequested
 updater's
 stager's
 syncer
-- 
GitLab