protected function AjaxTest::checkIndexProcessorJavascript in Search API 8
Tests JS-based display of processors when they are added.
File
- tests/
src/ FunctionalJavascript/ AjaxTest.php, line 141
Class
- AjaxTest
- Tests AJAX functionality in the Search API module.
Namespace
Drupal\Tests\search_api\FunctionalJavascriptCode
protected function checkIndexProcessorJavascript() {
$assert_session = $this
->assertSession();
$this
->drupalGet('admin/config/search/search-api/index/test_index/processors');
$assert_session
->pageTextContains('Highlight');
$assert_session
->checkboxNotChecked('status[highlight]');
$postprocess = '[data-drupal-selector="edit-weights-postprocess-query"]';
$postprocess_highlight = $postprocess . ' [data-drupal-selector="edit-weights-postprocess-query-order-highlight"]';
$element = $assert_session
->elementExists('css', $postprocess_highlight);
$this
->assertFalse($element
->isVisible());
$settings = '[data-drupal-selector="edit-processor-settings"]';
$highlight_settings = $settings . ' a[href="#edit-processors-html-filter-settings"]';
$element = $assert_session
->elementExists('css', $highlight_settings);
$this
->assertFalse($element
->isVisible());
$this
->click('input.form-checkbox[name="status[highlight]"]');
$element = $assert_session
->elementExists('css', $postprocess_highlight);
$this
->assertFalse($element
->isVisible());
$element = $assert_session
->elementExists('css', $highlight_settings);
$this
->assertFalse($element
->isVisible());
}