diff --git a/src/Tests/IntegrationTest.php b/src/Tests/IntegrationTest.php index 6047d24..18247cf 100644 --- a/src/Tests/IntegrationTest.php +++ b/src/Tests/IntegrationTest.php @@ -86,15 +86,13 @@ class IntegrationTest extends WebTestBase { // Verify that facet blocks appear as expected. $this->assertFacetBlocksAppear(); - // Show the facet only when the facet source is visible. - // @TODO Only for SearchApiViews for the moment. + // Verify that the facet only shows when the facet source is visible. $this->setOptionShowOnlyWhenFacetSourceVisible($facet_name); $this->goToDeleteFacetPage($facet_name); $this->assertNoText('item'); $this->assertNoText('article'); // Do not show the block on empty behaviors. - // Remove data from index. $this->clearIndex(); $this->drupalGet('search-api-test-fulltext'); @@ -139,6 +137,10 @@ class IntegrationTest extends WebTestBase { $this->drupalPostForm(NULL, ['facet_source_id' => 'search_api_views:search_api_test_view:block_1'], $this->t('Configure facet source')); $this->drupalPostForm(NULL, $form_values, $this->t('Save')); + $facet = Facet::load($facet_id); + $this->assertEqual($facet_name, $facet->label()); + $this->assertEqual(FALSE, $facet->getOnlyVisibleWhenFacetSourceIsVisible()); + // Place the views block in the footer of all pages. $block_settings = [ 'region' => 'footer',