From 38cdb2d3c65114d1a7ee16d4a43c9b17c0fe2179 Mon Sep 17 00:00:00 2001
From: nod_ <nod_@598310.no-reply.drupal.org>
Date: Thu, 22 Aug 2024 21:51:04 +0200
Subject: [PATCH] Issue #3469623 by catch, smustgrave: Speed up ExposedFormTest

---
 .../src/Functional/Plugin/ExposedFormTest.php  | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
index 0d4fe6e4973d..c1266d6f4d02 100644
--- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
+++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php
@@ -334,7 +334,17 @@ public static function providerTestExposedBlock() {
   /**
    * Tests the input required exposed form type.
    */
-  public function testInputRequired(): void {
+  public function testExposedForm(): void {
+    $this->testFormErrorWithExposedForm();
+    $this->testInputRequired();
+    $this->testTextInputRequired();
+    $this->testRememberSelected();
+  }
+
+  /**
+   * Tests the input required exposed form type.
+   */
+  protected function testInputRequired(): void {
     $view = View::load('test_exposed_form_buttons');
     $display = &$view->getDisplay('default');
     $display['display_options']['exposed_form']['type'] = 'input_required';
@@ -357,7 +367,7 @@ public function testInputRequired(): void {
   /**
    * Tests the "on demand text" for the input required exposed form type.
    */
-  public function testTextInputRequired(): void {
+  protected function testTextInputRequired(): void {
     $view = Views::getView('test_exposed_form_buttons');
     $display = &$view->storage->getDisplay('default');
     $display['display_options']['exposed_form']['type'] = 'input_required';
@@ -480,7 +490,7 @@ protected function getExpectedExposedFormId(ViewExecutable $view) {
   /**
    * Tests a view which is rendered after a form with a validation error.
    */
-  public function testFormErrorWithExposedForm(): void {
+  protected function testFormErrorWithExposedForm(): void {
     $this->drupalGet('views_test_data_error_form_page');
     $this->assertSession()->statusCodeEquals(200);
     $form = $this->cssSelect('form.views-exposed-form');
@@ -548,7 +558,7 @@ protected function assertNodesExist(array $bundles): void {
   /**
    * Tests the "Remember the last selection" functionality.
    */
-  public function testRememberSelected(): void {
+  protected function testRememberSelected(): void {
     $this->drupalGet('test_remember_selected');
     $this->getSession()->getPage()->fillField('type', 'page');
     $this->getSession()->getPage()->pressButton('Apply');
-- 
GitLab