diff --git a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php index b653c35..d6d1f10 100644 --- a/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php +++ b/core/modules/views/tests/src/Functional/Plugin/ExposedFormTest.php @@ -264,6 +264,17 @@ public function testExposedBlock($display) { $this->assertSession()->elementsCount('xpath', $xpath, 1); $element = $this->assertSession()->elementExists('xpath', $xpath); + if ($display === 'page_1') { + // Disable the exposed block and ensure the filter appears as normal. + $view->display_handler->setOption('exposed_block', FALSE); + $view->save(); + $this->drupalGet('test_exposed_block'); + $elements = $this->xpath('//form[@id=:id]', [':id' => $this->getExpectedExposedFormId($view)]); + $this->assertCount(1, $elements); + $result = $this->xpath($xpath); + $this->assertCount(0, $result); + } + // Test that the correct option is selected after form submission. $this->assertCacheContext('url'); $this->assertTrue($this->assertSession()->optionExists('Content: Type', 'All')->isSelected());