Verified Commit e115fb8f authored by Théodore Biadala's avatar Théodore Biadala
Browse files

Issue #3469623 by catch, smustgrave: Speed up ExposedFormTest

(cherry picked from commit 38cdb2d3)
parent 4630029b
Loading
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -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');