summaryrefslogtreecommitdiffstats
path: root/core/modules/views_ui
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-09-21 12:58:56 (GMT)
committerNathaniel Catchpole2017-09-21 12:58:56 (GMT)
commit7bf7cebeb79559e775d7e0149e98c8d2a5d6eb39 (patch)
tree6688946a37c799bbbf61a36e5e376527f26e185e /core/modules/views_ui
parentfbb8a06f9120de1c3903fd857d74583d6feaa22b (diff)
Issue #2864610 by Manuel Garcia, andypost, Lendude: Convert ExposedFormUITest in views_ui module to BrowserTestBase
Diffstat (limited to 'core/modules/views_ui')
-rw-r--r--core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php (renamed from core/modules/views_ui/src/Tests/ExposedFormUITest.php)24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/modules/views_ui/src/Tests/ExposedFormUITest.php b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
index 0aaa6ee..0822eb8 100644
--- a/core/modules/views_ui/src/Tests/ExposedFormUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/ExposedFormUITest.php
@@ -1,6 +1,6 @@
<?php
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
use Drupal\views\Entity\View;
@@ -32,8 +32,8 @@ class ExposedFormUITest extends UITestBase {
*/
protected $groupFormUiErrors = [];
- protected function setUp() {
- parent::setUp();
+ protected function setUp($import_test_views = TRUE) {
+ parent::setUp($import_test_views);
$this->drupalCreateContentType(['type' => 'article']);
$this->drupalCreateContentType(['type' => 'page']);
@@ -61,8 +61,8 @@ class ExposedFormUITest extends UITestBase {
// The first time the filter UI is displayed, the operator and the
// value forms should be shown.
- $this->assertFieldById('edit-options-operator-in', '', 'Operator In exists');
- $this->assertFieldById('edit-options-operator-not-in', '', 'Operator Not In exists');
+ $this->assertFieldById('edit-options-operator-in', 'in', 'Operator In exists');
+ $this->assertFieldById('edit-options-operator-not-in', 'not in', 'Operator Not In exists');
$this->assertFieldById('edit-options-value-page', '', 'Checkbox for Page exists');
$this->assertFieldById('edit-options-value-article', '', 'Checkbox for Article exists');
@@ -72,8 +72,8 @@ class ExposedFormUITest extends UITestBase {
$this->helperButtonHasLabel('edit-options-expose-button-button', t('Hide filter'));
// After exposing the filter, Operator and Value should be still here.
- $this->assertFieldById('edit-options-operator-in', '', 'Operator In exists');
- $this->assertFieldById('edit-options-operator-not-in', '', 'Operator Not In exists');
+ $this->assertFieldById('edit-options-operator-in', 'in', 'Operator In exists');
+ $this->assertFieldById('edit-options-operator-not-in', 'not in', 'Operator Not In exists');
$this->assertFieldById('edit-options-value-page', '', 'Checkbox for Page exists');
$this->assertFieldById('edit-options-value-article', '', 'Checkbox for Article exists');
@@ -98,8 +98,8 @@ class ExposedFormUITest extends UITestBase {
$this->drupalPostForm(NULL, [], t('Hide filter'));
// After Un-exposing the filter, Operator and Value should be shown again.
- $this->assertFieldById('edit-options-operator-in', '', 'Operator In exists after hide filter');
- $this->assertFieldById('edit-options-operator-not-in', '', 'Operator Not In exists after hide filter');
+ $this->assertFieldById('edit-options-operator-in', 'in', 'Operator In exists after hide filter');
+ $this->assertFieldById('edit-options-operator-not-in', 'not in', 'Operator Not In exists after hide filter');
$this->assertFieldById('edit-options-value-page', '', 'Checkbox for Page exists after hide filter');
$this->assertFieldById('edit-options-value-article', '', 'Checkbox for Article exists after hide filter');
@@ -108,7 +108,7 @@ class ExposedFormUITest extends UITestBase {
$this->drupalPostForm('admin/structure/views/nojs/handler/test_exposed_admin_ui/default/sort/created', $edit, t('Expose sort'));
// Check the label of the expose button.
$this->helperButtonHasLabel('edit-options-expose-button-button', t('Hide sort'));
- $this->assertFieldById('edit-options-expose-label', '', 'Make sure a label field is shown');
+ $this->assertFieldById('edit-options-expose-label', 'Authored on', 'Make sure a label field is shown');
// Test adding a new exposed sort criteria.
$view_id = $this->randomView()['id'];
@@ -150,8 +150,8 @@ class ExposedFormUITest extends UITestBase {
// After click on 'Grouped Filters', the standard operator and value should
// not be displayed.
- $this->assertNoFieldById('edit-options-operator-in', '', 'Operator In not exists');
- $this->assertNoFieldById('edit-options-operator-not-in', '', 'Operator Not In not exists');
+ $this->assertNoFieldById('edit-options-operator-in', 'in', 'Operator In not exists');
+ $this->assertNoFieldById('edit-options-operator-not-in', 'not in', 'Operator Not In not exists');
$this->assertNoFieldById('edit-options-value-page', '', 'Checkbox for Page not exists');
$this->assertNoFieldById('edit-options-value-article', '', 'Checkbox for Article not exists');