Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
221
Merge Requests
221
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
c51bd29c
Unverified
Commit
c51bd29c
authored
Sep 18, 2018
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#2809553
by Lendude: Convert AJAX part of \Drupal\views_ui\Tests\RowUITest to BrowserTestBase
parent
716828db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
core/modules/views_ui/tests/src/Functional/RowUITest.php
core/modules/views_ui/tests/src/Functional/RowUITest.php
+2
-15
No files found.
core/modules/views_ui/
src/Tests
/RowUITest.php
→
core/modules/views_ui/
tests/src/Functional
/RowUITest.php
View file @
c51bd29c
<?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 @@ public function testRowUI() {
$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.'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment