summaryrefslogtreecommitdiffstats
path: root/core/modules/views_ui
diff options
context:
space:
mode:
authorAlex Pott2018-09-18 15:52:03 (GMT)
committerAlex Pott2018-09-18 15:52:10 (GMT)
commit6aabc78b334a6c4ee2a665e5608af92d105580a9 (patch)
treead09ef6eb9a5544b987f21614d8a5a8796444291 /core/modules/views_ui
parent5d37cffdde334c64c4ec9b8efc2f728faf664354 (diff)
Issue #2809553 by Lendude: Convert AJAX part of \Drupal\views_ui\Tests\RowUITest to BrowserTestBase
(cherry picked from commit c51bd29cdfd2cc5a3eaabeb9f65527711a6b5634)
Diffstat (limited to 'core/modules/views_ui')
-rw-r--r--core/modules/views_ui/tests/src/Functional/RowUITest.php (renamed from core/modules/views_ui/src/Tests/RowUITest.php)17
1 files changed, 2 insertions, 15 deletions
diff --git a/core/modules/views_ui/src/Tests/RowUITest.php b/core/modules/views_ui/tests/src/Functional/RowUITest.php
index e8aa2c3..8b256f4 100644
--- a/core/modules/views_ui/src/Tests/RowUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/RowUITest.php
@@ -1,6 +1,6 @@
<?php
-namespace Drupal\views_ui\Tests;
+namespace Drupal\Tests\views_ui\Functional;
use Drupal\Core\Entity\Entity\EntityViewMode;
use Drupal\views\Views;
@@ -55,20 +55,7 @@ class RowUITest extends UITestBase {
$this->assertEqual($row['type'], 'test_row', 'Make sure that the test_row got saved as used row plugin.');
$this->assertEqual($row['options']['test_option'], $random_name, 'Make sure that the custom settings field got saved as expected.');
- // Change the row plugin to fields using ajax.
- // Note: this is the best approximation we can achieve, because we cannot
- // simulate the 'openDialog' command in
- // WebTestBase::drupalProcessAjaxResponse(), hence we have to make do.
- $row_plugin_url_ajax = str_replace('/nojs/', '/ajax/', $row_plugin_url);
- $ajax_settings = [
- 'accepts' => 'application/vnd.drupal-ajax',
- 'submit' => [
- '_triggering_element_name' => 'op',
- '_triggering_element_value' => 'Apply',
- ],
- 'url' => $row_plugin_url_ajax,
- ];
- $this->drupalPostAjaxForm($row_plugin_url, ['row[type]' => 'fields'], NULL, $row_plugin_url_ajax, [], [], NULL, $ajax_settings);
+ $this->drupalPostForm($row_plugin_url, ['row[type]' => 'fields'], 'Apply');
$this->drupalGet($row_plugin_url);
$this->assertResponse(200);
$this->assertFieldByName('row[type]', 'fields', 'Make sure that the fields got saved as used row plugin.');