protected function ProcessorIntegrationTest::checkHideActiveItems in Facets 8
Tests hiding active results.
1 call to ProcessorIntegrationTest::checkHideActiveItems()
- ProcessorIntegrationTest::testProcessorIntegration in tests/
src/ Functional/ ProcessorIntegrationTest.php - Tests the for processors in the frontend with a 'keywords' facet.
File
- tests/
src/ Functional/ ProcessorIntegrationTest.php, line 543
Class
- ProcessorIntegrationTest
- Tests the processor functionality.
Namespace
Drupal\Tests\facets\FunctionalCode
protected function checkHideActiveItems() {
$form = [
'facet_settings[hide_active_items_processor][status]' => TRUE,
];
$this
->drupalPostForm($this->editForm, $form, 'Save');
$this
->drupalGet('search-api-test-fulltext');
$this
->assertSession()
->pageTextContains('Displaying 10 search results');
$this
->assertFacetLabel('grape');
$this
->assertFacetLabel('banana');
$this
->clickLink('grape');
$this
->assertSession()
->pageTextContains('Displaying 6 search results');
$this
->assertSession()
->linkNotExists('grape');
$this
->assertFacetLabel('banana');
$form = [
'facet_settings[hide_active_items_processor][status]' => FALSE,
];
$this
->drupalPostForm($this->editForm, $form, 'Save');
}