You are here

public function WidgetIntegrationTest::testCheckboxWidget in Facets 8

Tests checkbox widget.

File

tests/src/Functional/WidgetIntegrationTest.php, line 42

Class

WidgetIntegrationTest
Tests the overall functionality of the Facets admin UI.

Namespace

Drupal\Tests\facets\Functional

Code

public function testCheckboxWidget() {
  $id = 't';
  $this
    ->createFacet('Facet & checkbox~', $id);
  $this
    ->drupalGet('admin/config/search/facets/' . $id . '/edit');
  $this
    ->drupalPostForm(NULL, [
    'widget' => 'checkbox',
  ], 'Save');
  $this
    ->drupalGet('search-api-test-fulltext');
  $this
    ->assertFacetLabel('item');
  $this
    ->assertFacetLabel('article');
}