X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews_ui%2Ftests%2Fsrc%2FFunctional%2FFilterNumericWebTest.php;fp=web%2Fcore%2Fmodules%2Fviews_ui%2Fsrc%2FTests%2FFilterNumericWebTest.php;h=8dc568de9bdf2f784b966aa0ded68e39d9433a73;hp=104d62f54da73f8da14eb8f92b0fbaff712b02e2;hb=bfbba508964731508b9bd6d5835c2edc858db95b;hpb=cb9a80db11fc6b014e5b1e693a5a391c95eb5d9a
diff --git a/web/core/modules/views_ui/src/Tests/FilterNumericWebTest.php b/web/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
similarity index 86%
rename from web/core/modules/views_ui/src/Tests/FilterNumericWebTest.php
rename to web/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
index 104d62f54..8dc568de9 100644
--- a/web/core/modules/views_ui/src/Tests/FilterNumericWebTest.php
+++ b/web/core/modules/views_ui/tests/src/Functional/FilterNumericWebTest.php
@@ -1,6 +1,6 @@
drupalPostForm('admin/structure/views/view/test_view/edit', [], 'Add Page');
+ $this->drupalPostForm('admin/structure/views/nojs/display/test_view/page_1/path', ['path' => $path], 'Apply');
+ $this->drupalPostForm(NULL, [], t('Save'));
+
$this->drupalPostForm('admin/structure/views/nojs/add-handler/test_view/default/filter', ['name[views_test_data.age]' => TRUE], t('Add and configure @handler', ['@handler' => t('filter criteria')]));
$this->drupalPostForm(NULL, [], t('Expose filter'));
@@ -52,13 +58,13 @@ class FilterNumericWebTest extends UITestBase {
$this->assertConfigSchemaByName('views.view.test_view');
// Test that the exposed filter works as expected.
- $this->drupalPostForm(NULL, [], t('Update preview'));
+ $this->drupalGet('test_view-path');
$this->assertText('John');
$this->assertText('Paul');
$this->assertText('Ringo');
$this->assertText('George');
$this->assertText('Meredith');
- $this->drupalPostForm(NULL, ['age' => '2'], t('Update preview'));
+ $this->drupalPostForm(NULL, ['age' => '2'], 'Apply');
$this->assertText('John');
$this->assertText('Paul');
$this->assertNoText('Ringo');
@@ -75,13 +81,13 @@ class FilterNumericWebTest extends UITestBase {
$this->assertConfigSchemaByName('views.view.test_view');
// Test that the filter works as expected.
- $this->drupalPostForm(NULL, [], t('Update preview'));
+ $this->drupalGet('test_view-path');
$this->assertText('John');
$this->assertNoText('Paul');
$this->assertNoText('Ringo');
$this->assertNoText('George');
$this->assertNoText('Meredith');
- $this->drupalPostForm(NULL, ['age' => '26'], t('Update preview'));
+ $this->drupalPostForm(NULL, ['age' => '26'], t('Apply'));
$this->assertNoText('John');
$this->assertText('Paul');
$this->assertNoText('Ringo');
@@ -106,7 +112,7 @@ class FilterNumericWebTest extends UITestBase {
$this->assertRaw('', 'Max field label found');
$this->assertRaw('', 'Min field label found');
// Check that the description is shown in the right place.
- $this->assertEqual(trim($this->cssSelect('.form-item-age-min .description')[0]), 'Description of the exposed filter');
+ $this->assertEqual(trim($this->cssSelect('.form-item-age-min .description')[0]->getText()), 'Description of the exposed filter');
}
}