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
304
Merge Requests
304
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
4889cf6b
Commit
4889cf6b
authored
May 08, 2013
by
alexpott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue
#1862352
by damiankloip: Move Views UI tests to Views UI module.
parent
dced5e11
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
215 additions
and
175 deletions
+215
-175
core/modules/translation_entity/lib/Drupal/translation_entity/Tests/Views/TranslationEntityViewsUITest.php
...ation_entity/Tests/Views/TranslationEntityViewsUITest.php
+1
-1
core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
...s/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
+4
-126
core/modules/views_ui/lib/Drupal/views_ui/Tests/AnalyzeTest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/AnalyzeTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/CachedDataUITest.php
...s/views_ui/lib/Drupal/views_ui/Tests/CachedDataUITest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/CustomBooleanTest.php
.../views_ui/lib/Drupal/views_ui/Tests/CustomBooleanTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/DefaultViewsTest.php
...s/views_ui/lib/Drupal/views_ui/Tests/DefaultViewsTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayAttachmentTest.php
...ws_ui/lib/Drupal/views_ui/Tests/DisplayAttachmentTest.php
+5
-5
core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayExtenderUITest.php
...ws_ui/lib/Drupal/views_ui/Tests/DisplayExtenderUITest.php
+5
-5
core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php
...odules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
.../views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
+162
-0
core/modules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/OverrideDisplaysTest.php
...ews_ui/lib/Drupal/views_ui/Tests/OverrideDisplaysTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/PreviewTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/QueryTest.php
.../modules/views_ui/lib/Drupal/views_ui/Tests/QueryTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/RedirectTest.php
...dules/views_ui/lib/Drupal/views_ui/Tests/RedirectTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/RowUITest.php
.../modules/views_ui/lib/Drupal/views_ui/Tests/RowUITest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/SettingsTest.php
...dules/views_ui/lib/Drupal/views_ui/Tests/SettingsTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/StorageTest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/StorageTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/StyleUITest.php
...odules/views_ui/lib/Drupal/views_ui/Tests/StyleUITest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/TagTest.php
core/modules/views_ui/lib/Drupal/views_ui/Tests/TagTest.php
+2
-2
core/modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php
...modules/views_ui/lib/Drupal/views_ui/Tests/UITestBase.php
+2
-2
core/modules/views_ui/tests/Drupal/views_ui/Tests/ViewUIObjectTest.php
...views_ui/tests/Drupal/views_ui/Tests/ViewUIObjectTest.php
+2
-2
No files found.
core/modules/translation_entity/lib/Drupal/translation_entity/Tests/Views/TranslationEntityViewsUITest.php
View file @
4889cf6b
...
...
@@ -7,7 +7,7 @@
namespace
Drupal\translation_entity\Tests\Views
;
use
Drupal\views
\Tests\UI
\UITestBase
;
use
Drupal\views
_ui
\
Tests
\UITestBase
;
/**
* Tests the views UI when translation_entity is enabled.
...
...
core/modules/views/lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
View file @
4889cf6b
...
...
@@ -2,24 +2,24 @@
/**
* @file
*
Definition of
Drupal\views\Tests\Plugin\ExposedFormTest.
*
Contains \
Drupal\views\Tests\Plugin\ExposedFormTest.
*/
namespace
Drupal\views\Tests\Plugin
;
use
Drupal\views\Tests\
UI\UI
TestBase
;
use
Drupal\views\Tests\
View
TestBase
;
/**
* Tests exposed forms.
*/
class
ExposedFormTest
extends
UI
TestBase
{
class
ExposedFormTest
extends
View
TestBase
{
/**
* Views used by this test.
*
* @var array
*/
public
static
$testViews
=
array
(
'test_reset_button'
,
'test_exposed_admin_ui'
);
public
static
$testViews
=
array
(
'test_reset_button'
);
/**
* Modules to enable.
...
...
@@ -40,7 +40,6 @@ protected function setUp() {
parent
::
setUp
();
$this
->
drupalCreateContentType
(
array
(
'type'
=>
'article'
));
$this
->
drupalCreateContentType
(
array
(
'type'
=>
'page'
));
// Create some random nodes.
for
(
$i
=
0
;
$i
<
5
;
$i
++
)
{
...
...
@@ -104,125 +103,4 @@ public function testExposedFormRender() {
$this
->
assertFieldByXPath
(
'//form/@action'
,
$expected_action
,
'The expected value for the action attribute was found.'
);
}
/**
* Tests the admin interface of exposed filter and sort items.
*/
function
testExposedAdminUi
()
{
menu_router_rebuild
();
$edit
=
array
();
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
// Be sure that the button is called exposed.
$this
->
helperButtonHasLabel
(
'edit-options-expose-button-button'
,
t
(
'Expose filter'
));
// 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-value-page'
,
''
,
'Checkbox for Page exists'
);
$this
->
assertFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article exists'
);
// Click the Expose filter button.
$this
->
drupalPost
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
,
$edit
,
t
(
'Expose filter'
));
// Check the label of the expose button.
$this
->
helperButtonHasLabel
(
'edit-options-expose-button-button'
,
t
(
'Hide filter'
));
// Check the label of the grouped exposed button
$this
->
helperButtonHasLabel
(
'edit-options-group-button-button'
,
t
(
'Grouped filters'
));
// 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-value-page'
,
''
,
'Checkbox for Page exists'
);
$this
->
assertFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article exists'
);
// Check the validations of the filter handler.
$edit
=
array
();
$edit
[
'options[expose][identifier]'
]
=
''
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertText
(
t
(
'The identifier is required if the filter is exposed.'
));
$edit
=
array
();
$edit
[
'options[expose][identifier]'
]
=
'value'
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertText
(
t
(
'This identifier is not allowed.'
));
// Now check the sort criteria.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/sort/created'
);
$this
->
helperButtonHasLabel
(
'edit-options-expose-button-button'
,
t
(
'Expose sort'
));
$this
->
assertNoFieldById
(
'edit-options-expose-label'
,
''
,
t
(
'Make sure no label field is shown'
));
// Click the Grouped Filters button.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$this
->
drupalPost
(
NULL
,
array
(),
t
(
'Grouped filters'
));
// 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-value-page'
,
''
,
'Checkbox for Page not exists'
);
$this
->
assertNoFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article not exists'
);
// Check that after click on 'Grouped Filters', a new button is shown to
// add more items to the list.
$this
->
helperButtonHasLabel
(
'edit-options-group-info-add-group'
,
t
(
'Add another item'
));
// Create a grouped filter
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$edit
=
array
();
$edit
[
"options[group_info][group_items][1][title]"
]
=
'Is Article'
;
$edit
[
"options[group_info][group_items][1][value][article]"
]
=
'article'
;
$edit
[
"options[group_info][group_items][2][title]"
]
=
'Is Page'
;
$edit
[
"options[group_info][group_items][2][value][page]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][title]"
]
=
'Is Page and Article'
;
$edit
[
"options[group_info][group_items][3][value][article]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][value][page]"
]
=
TRUE
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
// Select the empty operator, so the empty value should not trigger a form
// error.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/body_value'
);
$edit
=
array
();
$edit
[
"options[group_info][group_items][1][title]"
]
=
$this
->
randomName
();
$edit
[
"options[group_info][group_items][1][operator]"
]
=
'empty'
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertUrl
(
'admin/structure/views/view/test_exposed_admin_ui/edit/default'
,
array
(),
'Validation did not run for the empty operator.'
);
// Test the validation error message text is not shown.
$this
->
assertNoText
(
t
(
'The value is required if title for this item is defined.'
));
// Validate that all the titles are defined for each group
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$edit
=
array
();
$edit
[
"options[group_info][group_items][1][title]"
]
=
'Is Article'
;
$edit
[
"options[group_info][group_items][1][value][article]"
]
=
TRUE
;
// This should trigger an error
$edit
[
"options[group_info][group_items][2][title]"
]
=
''
;
$edit
[
"options[group_info][group_items][2][value][page]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][title]"
]
=
'Is Page and Article'
;
$edit
[
"options[group_info][group_items][3][value][article]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][value][page]"
]
=
TRUE
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertRaw
(
t
(
'The title is required if value for this item is defined.'
),
t
(
'Group items should have a title'
));
// Un-expose the filter.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$this
->
drupalPost
(
NULL
,
array
(),
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-value-page'
,
''
,
'Checkbox for Page exists after hide filter'
);
$this
->
assertFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article exists after hide filter'
);
// Click the Expose sort button.
$edit
=
array
();
$this
->
drupalPost
(
'admin/structure/views/nojs/config-item/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'
,
''
,
t
(
'Make sure a label field is shown'
));
}
}
core/modules/views
/lib/Drupal/views/Tests/UI
/AnalyzeTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/AnalyzeTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\views
\Tests\UI
\AnalyzeTest.
* Contains \Drupal\views
_ui\Tests
\AnalyzeTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
use
Drupal\views\Tests\ViewTestBase
;
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/CachedDataUITest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/CachedDataUITest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\views
\Tests\UI
\CachedDataUITest.
* Contains \Drupal\views
_ui\Tests
\CachedDataUITest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the user tempstore cache in the UI.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/CustomBooleanTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/CustomBooleanTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\views
\Tests\UI
\CustomBooleanTest.
* Contains \Drupal\views
_ui\Tests
\CustomBooleanTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the UI and functionality for the Custom boolean field handler options.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/DefaultViewsTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/DefaultViewsTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\DefaultViewsTest.
*
Contains \Drupal\views_ui\Tests
\DefaultViewsTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests enabling, disabling, and reverting default views via the listing page.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/DisplayAttachmentTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/DisplayAttachmentTest.php
View file @
4889cf6b
<?php
/**
* @file
* Contains \Drupal\views\Tests\UI
\DisplayAttachmentTest.
*/
/**
* @file
* Contains \Drupal\views_ui\Tests
\DisplayAttachmentTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the UI for the attachment display plugin.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/DisplayExtenderUITest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/DisplayExtenderUITest.php
View file @
4889cf6b
<?php
/**
* @file
* Definition of Drupal\views\Tests\UI
\DisplayExtenderUITest.
*/
/**
* @file
* Contains \Drupal\views_ui\Tests
\DisplayExtenderUITest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the display extender UI.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/DisplayPath.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/DisplayPath.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\views
\Tests\UI
\DisplayPath
* Contains \Drupal\views
_ui\Tests
\DisplayPath
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the UI of generic display path plugin.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/DisplayTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/DisplayTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\DisplayTest.
*
Contains \Drupal\views_ui\Tests
\DisplayTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the handling of displays in the UI, adding removing etc.
...
...
core/modules/views_ui/lib/Drupal/views_ui/Tests/ExposedFormUITest.php
0 → 100644
View file @
4889cf6b
<?php
/**
* @file
* Contains \Drupal\views_ui\Tests\ExposedFormUITest.
*/
namespace
Drupal\views_ui\Tests
;
/**
* Tests exposed form UI.
*/
class
ExposedFormUITest
extends
UITestBase
{
/**
* Views used by this test.
*
* @var array
*/
public
static
$testViews
=
array
(
'test_exposed_admin_ui'
);
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'Exposed forms'
,
'description'
=>
'Test exposed forms UI functionality.'
,
'group'
=>
'Views UI'
,
);
}
protected
function
setUp
()
{
parent
::
setUp
();
$this
->
drupalCreateContentType
(
array
(
'type'
=>
'article'
));
$this
->
drupalCreateContentType
(
array
(
'type'
=>
'page'
));
// Create some random nodes.
for
(
$i
=
0
;
$i
<
5
;
$i
++
)
{
$this
->
drupalCreateNode
();
}
}
/**
* Tests the admin interface of exposed filter and sort items.
*/
function
testExposedAdminUi
()
{
menu_router_rebuild
();
$edit
=
array
();
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
// Be sure that the button is called exposed.
$this
->
helperButtonHasLabel
(
'edit-options-expose-button-button'
,
t
(
'Expose filter'
));
// 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-value-page'
,
''
,
'Checkbox for Page exists'
);
$this
->
assertFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article exists'
);
// Click the Expose filter button.
$this
->
drupalPost
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
,
$edit
,
t
(
'Expose filter'
));
// Check the label of the expose button.
$this
->
helperButtonHasLabel
(
'edit-options-expose-button-button'
,
t
(
'Hide filter'
));
// Check the label of the grouped exposed button
$this
->
helperButtonHasLabel
(
'edit-options-group-button-button'
,
t
(
'Grouped filters'
));
// 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-value-page'
,
''
,
'Checkbox for Page exists'
);
$this
->
assertFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article exists'
);
// Check the validations of the filter handler.
$edit
=
array
();
$edit
[
'options[expose][identifier]'
]
=
''
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertText
(
t
(
'The identifier is required if the filter is exposed.'
));
$edit
=
array
();
$edit
[
'options[expose][identifier]'
]
=
'value'
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertText
(
t
(
'This identifier is not allowed.'
));
// Now check the sort criteria.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/sort/created'
);
$this
->
helperButtonHasLabel
(
'edit-options-expose-button-button'
,
t
(
'Expose sort'
));
$this
->
assertNoFieldById
(
'edit-options-expose-label'
,
''
,
t
(
'Make sure no label field is shown'
));
// Click the Grouped Filters button.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$this
->
drupalPost
(
NULL
,
array
(),
t
(
'Grouped filters'
));
// 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-value-page'
,
''
,
'Checkbox for Page not exists'
);
$this
->
assertNoFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article not exists'
);
// Check that after click on 'Grouped Filters', a new button is shown to
// add more items to the list.
$this
->
helperButtonHasLabel
(
'edit-options-group-info-add-group'
,
t
(
'Add another item'
));
// Create a grouped filter
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$edit
=
array
();
$edit
[
"options[group_info][group_items][1][title]"
]
=
'Is Article'
;
$edit
[
"options[group_info][group_items][1][value][article]"
]
=
'article'
;
$edit
[
"options[group_info][group_items][2][title]"
]
=
'Is Page'
;
$edit
[
"options[group_info][group_items][2][value][page]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][title]"
]
=
'Is Page and Article'
;
$edit
[
"options[group_info][group_items][3][value][article]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][value][page]"
]
=
TRUE
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
// Select the empty operator, so the empty value should not trigger a form
// error.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/body_value'
);
$edit
=
array
();
$edit
[
"options[group_info][group_items][1][title]"
]
=
$this
->
randomName
();
$edit
[
"options[group_info][group_items][1][operator]"
]
=
'empty'
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertUrl
(
'admin/structure/views/view/test_exposed_admin_ui/edit/default'
,
array
(),
'Validation did not run for the empty operator.'
);
// Test the validation error message text is not shown.
$this
->
assertNoText
(
t
(
'The value is required if title for this item is defined.'
));
// Validate that all the titles are defined for each group
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$edit
=
array
();
$edit
[
"options[group_info][group_items][1][title]"
]
=
'Is Article'
;
$edit
[
"options[group_info][group_items][1][value][article]"
]
=
TRUE
;
// This should trigger an error
$edit
[
"options[group_info][group_items][2][title]"
]
=
''
;
$edit
[
"options[group_info][group_items][2][value][page]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][title]"
]
=
'Is Page and Article'
;
$edit
[
"options[group_info][group_items][3][value][article]"
]
=
TRUE
;
$edit
[
"options[group_info][group_items][3][value][page]"
]
=
TRUE
;
$this
->
drupalPost
(
NULL
,
$edit
,
t
(
'Apply'
));
$this
->
assertRaw
(
t
(
'The title is required if value for this item is defined.'
),
t
(
'Group items should have a title'
));
// Un-expose the filter.
$this
->
drupalGet
(
'admin/structure/views/nojs/config-item/test_exposed_admin_ui/default/filter/type'
);
$this
->
drupalPost
(
NULL
,
array
(),
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-value-page'
,
''
,
'Checkbox for Page exists after hide filter'
);
$this
->
assertFieldById
(
'edit-options-value-article'
,
''
,
'Checkbox for Article exists after hide filter'
);
// Click the Expose sort button.
$edit
=
array
();
$this
->
drupalPost
(
'admin/structure/views/nojs/config-item/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'
,
''
,
t
(
'Make sure a label field is shown'
));
}
}
core/modules/views
/lib/Drupal/views/Tests/UI
/GroupByTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/GroupByTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\GroupByTest.
*
Contains \Drupal\views_ui\Tests
\GroupByTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests UI of aggregate functionality..
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/HandlerTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/HandlerTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\views
\Tests\UI
\HandlerTest.
* Contains \Drupal\views
_ui\Tests
\HandlerTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
use
Drupal\views\ViewExecutable
;
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/OverrideDisplaysTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/OverrideDisplaysTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\OverrideDisplaysTest.
*
Contains \Drupal\views_ui\Tests
\OverrideDisplaysTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests that displays can be correctly overridden via the user interface.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/PreviewTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/PreviewTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\views
\Tests\UI
\PreviewTest.
* Contains \Drupal\views
_ui\Tests
\PreviewTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the preview form in the UI.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/QueryTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/QueryTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\QueryTest.
*
Contains \Drupal\views_ui\Tests
\QueryTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
use
Drupal\views\Tests\ViewTestBase
;
use
Drupal\views_test_data
\
Plugin\views\query\QueryTest
as
QueryTestPlugin
;
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/RedirectTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/RedirectTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\tests\UI
\RedirectTest.
*
Contains \Drupal\views_ui\tests
\RedirectTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the redirecting after saving a views.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/RowUITest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/RowUITest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\RowUITest.
*
Contains \Drupal\views_ui\Tests
\RowUITest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the UI of row plugins.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/SettingsTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/SettingsTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\SettingsTest.
*
Contains \Drupal\views_ui\Tests
\SettingsTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
/**
* Tests the various settings in the views UI.
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/StorageTest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/StorageTest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\tests\UI
\StorageTest.
*
Contains \Drupal\views_ui\tests
\StorageTest.
*/
namespace
Drupal\views
\Tests\UI
;
namespace
Drupal\views
_ui\Tests
;
use
Drupal\Core\Language\Language
;
...
...
core/modules/views
/lib/Drupal/views/Tests/UI
/StyleUITest.php
→
core/modules/views
_ui/lib/Drupal/views_ui/Tests
/StyleUITest.php
View file @
4889cf6b
...
...
@@ -2,10 +2,10 @@
/**
* @file
*
Definition of Drupal\views\Tests\UI
\StyleUITest.