Commit 22d18168 authored by alexpott's avatar alexpott

Issue #2325269 by Gábor Hojtsy, Arla: Test and fix views in test_views...

Issue #2325269 by Gábor Hojtsy, Arla: Test and fix views in test_views directories against their configuration schema
parent 6eaa4d39
......@@ -84,18 +84,21 @@ public function parentSelectElement($menu_parent, $id = '', array $menus = NULL)
$options = $this->getParentSelectOptions($id, $menus);
// If no options were found, there is nothing to select.
if ($options) {
$element = array(
'#type' => 'select',
'#options' => $options,
);
if (!isset($options[$menu_parent])) {
// Try putting it at the top level in the current menu.
// The requested menu parent cannot be found in the menu anymore. Try
// setting it to the top level in the current menu.
list($menu_name, $parent) = explode(':', $menu_parent, 2);
$menu_parent = $menu_name . ':';
}
if (isset($options[$menu_parent])) {
return array(
'#type' => 'select',
'#options' => $options,
'#default_value' => $menu_parent,
);
// Only provide the default value if it is valid among the options.
$element += array('#default_value' => $menu_parent);
}
return $element;
}
return array();
}
......
......@@ -113,18 +113,20 @@ display:
element_default_classes: true
empty: ''
hide_alter_empty: true
link_to_node: false
link_to_entity: false
plugin_id: comment
filters:
status:
value: '1'
value: true
table: comment_field_data
field: status
id: status
expose:
operator: ''
group: 1
plugin_id: boolean
status_node:
value: '1'
value: true
table: node_field_data
field: status
relationship: node
......@@ -132,6 +134,7 @@ display:
expose:
operator: ''
group: 1
plugin_id: boolean
sorts: { }
title: test_comment_row
header: { }
......
......@@ -84,7 +84,7 @@ display:
html: false
hide_empty: false
empty_zero: false
link_to_comment: 1
link_to_comment: true
relationship: none
group_type: group
admin_label: ''
......
......@@ -94,8 +94,9 @@ display:
table: views
field: area
empty: true
content: 'No people available.'
format: plain_text
content:
value: 'No people available.'
format: plain_text
plugin_id: text
field_langcode: '***LANGUAGE_language_content***'
field_langcode_add_to_query: null
......
......@@ -16,7 +16,6 @@ display:
fields: false
relationships: false
pager: false
pager_options: false
sorts: false
fields:
id:
......@@ -28,7 +27,6 @@ display:
id_1:
field: id
id: id_1
order: ASC
relationship: test_relationship
table: entity_test
plugin_id: numeric
......@@ -36,7 +34,6 @@ display:
options:
offset: 0
type: none
pager_options: { }
sorts:
id:
field: id
......
......@@ -26,18 +26,24 @@ views.field.field:
type:
type: string
label: 'Formatter'
field_api_classes:
type: boolean
label: 'Use field template'
settings:
type: sequence
label: 'Settings'
sequence:
- type: string
label: 'Setting'
group_column:
type: string
label: 'Group by column'
group_columns:
type: sequence
label: 'Group by columns'
sequence:
- type: string
label: 'Column'
group_rows:
type: boolean
label: 'Display all values in the same row'
multi_type:
type: string
label: 'Display type'
separator:
type: label
label: 'Separator'
delta_limit:
type: string
label: 'Field'
......@@ -50,6 +56,15 @@ views.field.field:
delta_first_last:
type: boolean
label: 'First and last only'
multi_type:
type: string
label: 'Display type'
separator:
type: label
label: 'Separator'
field_api_classes:
type: boolean
label: 'Use field template'
views.filter.field_list:
type: views.filter.many_to_one
......
......@@ -679,7 +679,6 @@ display:
display_description: ''
defaults:
pager: true
pager_options: true
relationships: false
relationships:
fid:
......@@ -704,7 +703,6 @@ display:
defaults:
empty: false
pager: false
pager_options: false
filters: false
filter_groups: false
fields: false
......@@ -732,7 +730,6 @@ display:
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
pager_options: false
filters: { }
filter_groups:
operator: AND
......
......@@ -15,7 +15,6 @@ display:
defaults:
fields: false
pager: false
pager_options: false
sorts: false
fields:
age:
......@@ -40,7 +39,6 @@ display:
options:
offset: 0
type: none
pager_options: { }
sorts:
id:
field: id
......
......@@ -94,12 +94,12 @@ views.argument_validator.node:
label: 'Filter value format'
views.field.node_language:
type: views_field
type: views.field.node
label: 'Node language'
mapping:
link_to_node:
native_language:
type: boolean
label: 'Link this field to the original piece of content'
label: 'Native language'
views.field.node:
type: views_field
......
......@@ -90,7 +90,7 @@ display:
type: tab
title: 'Test contextual link'
description: ''
name: tools
menu_name: tools
weight: 0
context: '1'
field_langcode: '***LANGUAGE_language_content***'
......
......@@ -107,7 +107,8 @@ display:
hide_empty: false
empty_zero: false
hide_alter_empty: true
link_to_node: 0
link_to_node: false
plugin_id: node
langcode:
id: langcode
table: node_field_data
......@@ -157,7 +158,7 @@ display:
empty_zero: false
hide_alter_empty: true
link_to_node: false
native_language: 0
native_language: false
plugin_id: node_language
filters:
status:
......@@ -168,12 +169,14 @@ display:
expose:
operator: ''
group: 1
plugin_id: boolean
type:
id: type
table: node_field_data
field: type
value:
page: page
plugin_id: bundle
langcode:
id: langcode
table: node_field_data
......
......@@ -23,6 +23,10 @@ views.filter.search:
type: string
label: 'On empty input'
views.filter_value.search_keywords:
type: string
label: 'Search keywords'
views.row.search_view:
type: views_row
label: 'Source link'
......
......@@ -53,6 +53,7 @@ display:
hide_empty: false
empty_zero: false
link_to_node: true
plugin_id: node
timestamp:
id: timestamp
table: node_counter
......@@ -104,6 +105,7 @@ display:
date_format: html_year
custom_date_format: ''
timezone: ''
plugin_id: date
totalcount:
id: totalcount
table: node_counter
......@@ -153,7 +155,7 @@ display:
empty_zero: false
hide_alter_empty: true
set_precision: false
precision: false
precision: 0
decimal: .
separator: ''
format_plural: false
......@@ -161,6 +163,7 @@ display:
format_plural_plural: '@count'
prefix: ''
suffix: ''
plugin_id: numeric
daycount:
id: daycount
table: node_counter
......@@ -210,7 +213,7 @@ display:
empty_zero: false
hide_alter_empty: true
set_precision: false
precision: false
precision: 0
decimal: .
separator: ''
format_plural: false
......@@ -218,6 +221,7 @@ display:
format_plural_plural: '@count'
prefix: ''
suffix: ''
plugin_id: numeric
filters:
status:
value: true
......@@ -227,6 +231,7 @@ display:
expose:
operator: ''
group: 1
plugin_id: boolean
sorts:
created:
id: created
......
......@@ -79,17 +79,13 @@ views.argument_default.taxonomy_tid:
sequence:
- type: string
label: 'Vocabulary'
anyall:
type: string
label: 'Multiple-value handling'
views.field.taxonomy_term_language:
type: views_field
type: views.field.taxonomy
label: 'Taxonomy language'
mapping:
link_to_taxonomy:
type: boolean
label: 'Link this field to its taxonomy term page'
convert_spaces:
type: boolean
label: 'Convert spaces in term names to hyphens'
views.field.term_link_edit:
type: views_field
......@@ -110,7 +106,6 @@ views.field.taxonomy:
type: boolean
label: 'Convert spaces in term names to hyphens'
views.field.taxonomy_index_tid:
type: views_field
label: 'Taxonomy language'
......@@ -135,18 +130,9 @@ views.field.taxonomy_index_tid:
label: 'Vocabulary'
views.filter.taxonomy_index_tid:
type: views.filter.in_operator
type: views.filter.many_to_one
label: 'Taxonomy term ID'
mapping:
operator:
type: string
label: 'Operator'
value:
type: sequence
label: 'Values'
sequence:
- type: string
label: 'Value'
vid:
type: string
label: 'Vocabulary'
......@@ -156,6 +142,12 @@ views.filter.taxonomy_index_tid:
hierarchy:
type: boolean
label: 'Show hierarchy in dropdown'
limit:
type: boolean
label: 'Limit to vocabulary'
error_message:
type: boolean
label: 'Display error message'
views.filter.taxonomy_index_tid_depth:
type: views.filter.in_operator
......
......@@ -48,7 +48,7 @@ protected function defineOptions() {
$options['type'] = array('default' => 'textfield');
$options['limit'] = array('default' => TRUE);
$options['vid'] = array('default' => '');
$options['hierarchy'] = array('default' => 0);
$options['hierarchy'] = array('default' => FALSE);
$options['error_message'] = array('default' => TRUE);
return $options;
......
......@@ -95,7 +95,7 @@ display:
html: false
hide_empty: false
empty_zero: false
link_to_taxonomy: 1
link_to_taxonomy: true
relationship: none
group_type: group
admin_label: ''
......@@ -111,6 +111,7 @@ display:
empty: ''
hide_alter_empty: true
convert_spaces: false
plugin_id: taxonomy
filters: { }
sorts: { }
header: { }
......
......@@ -70,7 +70,7 @@ display:
html: false
hide_empty: false
empty_zero: false
link_to_taxonomy: 1
link_to_taxonomy: true
relationship: none
group_type: group
admin_label: ''
......@@ -86,6 +86,7 @@ display:
empty: ''
hide_alter_empty: true
convert_spaces: false
plugin_id: taxonomy
filters:
name:
id: name
......
......@@ -112,6 +112,7 @@ display:
element_default_classes: true
empty: ''
hide_alter_empty: true
plugin_id: node
filters:
status:
value: true
......@@ -121,6 +122,7 @@ display:
expose:
operator: '0'
group: 1
plugin_id: boolean
tid:
id: tid
table: taxonomy_index
......
......@@ -42,11 +42,10 @@ display:
type: views_query
relationships:
tid_representative:
admin_label: ''
admin_label: 'Representative node'
field: tid_representative
group_type: group
id: tid_representative
label: 'Representative node'
relationship: none
required: false
subquery_namespace: ''
......
......@@ -55,7 +55,7 @@ display:
term_node_tid:
field: term_node_tid
id: term_node_tid
label: 'Term #1'
admin_label: 'Term #1'
table: node
vids:
tags: ''
......@@ -63,7 +63,7 @@ display:
term_node_tid_1:
field: term_node_tid
id: term_node_tid_1
label: 'Term #2'
admin_label: 'Term #2'
table: node
vids:
tags: ''
......
......@@ -96,7 +96,7 @@ display:
html: false
hide_empty: false
empty_zero: false
link_to_taxonomy: 1
link_to_taxonomy: true
relationship: none
group_type: group
admin_label: ''
......@@ -112,6 +112,7 @@ display:
empty: ''
hide_alter_empty: true
convert_spaces: false
plugin_id: taxonomy
filters: { }
sorts: { }
header: { }
......
......@@ -103,6 +103,7 @@ display:
empty_zero: false
hide_alter_empty: true
link_to_node: true
plugin_id: node
filters:
uid_touch_tracker:
id: uid_touch_tracker
......
......@@ -129,6 +129,17 @@ views.field.user_bulk_form:
type: views_field_bulk_form
label: 'User operations bulk form'
views.field.user_data:
type: views_field
label: 'User data field'
mapping:
data_module:
type: string
label: 'Module name'
data_name:
type: string
label: 'Name'
views.filter.user_current:
type: views.filter.boolean
label: 'Current user'
......
......@@ -16,7 +16,8 @@ display:
default:
display_options:
access:
perm: 'access user profiles'
options:
perm: 'access user profiles'
type: perm
cache:
type: none
......@@ -52,11 +53,10 @@ display:
type: views_query
relationships:
uid_representative:
admin_label: ''
admin_label: 'Representative node'
field: uid_representative
group_type: group
id: uid_representative
label: 'Representative node'
relationship: none
required: false
subquery_namespace: ''
......
......@@ -22,9 +22,9 @@ display:
default_argument_type: current_user
field: 'null'
id: 'null'
must_not_be: '0'
style_plugin: default_summary
must_not_be: false
table: views
plugin_id: 'null'
cache:
type: none
exposed_form:
......@@ -43,8 +43,9 @@ display:
field: title
hide_empty: false
id: title
link_to_node: '0'
link_to_node: false
table: node_field_data
plugin_id: node
pager:
options:
id: 0
......
......@@ -37,6 +37,7 @@ display:
field: changed
label: 'Updated date'
date_format: html_date
plugin_id: date
filters: { }
field_langcode: '***LANGUAGE_language_content***'
field_langcode_add_to_query: null
......
......@@ -20,7 +20,8 @@ display:
display_options:
access:
type: perm
perm: 'access user profiles'
options:
perm: 'access user profiles'
cache:
type: none
query:
......@@ -50,9 +51,9 @@ display:
html: false
hide_empty: false
empty_zero: false
link_to_user: '1'
overwrite_anonymous: '0'
plugin_id: string
link_to_user: true
overwrite_anonymous: false
plugin_id: user_name
data:
id: data
table: users
......@@ -107,7 +108,7 @@ display:
filters:
uid:
value:
- '2'
value: '2'
table: users
field: uid
id: uid
......
......@@ -20,7 +20,6 @@ display:
field: 'null'
id: 'null'
must_not_be: false
style_plugin: default_summary
table: views
validate:
type: 'entity:user'
......
......@@ -20,7 +20,6 @@ display:
field: 'null'
id: 'null'
must_not_be: false
style_plugin: default_summary
table: views
validate:
type: user_name
......
......@@ -20,7 +20,8 @@ display:
display_options:
access:
type: perm
perm: 'access user profiles'
options:
perm: 'access user profiles'
cache:
type: none
query:
......
......@@ -51,7 +51,6 @@ views.area.result:
type: text
label: 'The shown text of the result summary area'
views.area.title:
type: views_area
label: 'Title'
......@@ -67,6 +66,15 @@ views.area.view:
view_to_insert: