Skip to content

Commit

Permalink
Fixup js tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 23, 2024
1 parent 56ce713 commit e58adb7
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 96 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ dependencies:
config:
- node.type.repo_item
module:
- islandora
- node
- user
id: test_integer_weight
Expand All @@ -13,87 +14,36 @@ description: ''
tag: ''
base_table: node_field_data
base_field: nid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
display_plugin: default
position: 0
display_options:
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: table
row:
type: fields
title: 'test weight'
fields:
title:
id: title
table: node_field_data
field: title
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: title
plugin_id: field
label: Title
exclude: false
alter:
alter_text: false
make_link: false
absolute: false
trim: false
word_boundary: false
ellipsis: false
strip_tags: false
trim: false
html: false
hide_empty: false
empty_zero: false
settings:
link_to_entity: true
plugin_id: field
relationship: none
group_type: group
admin_label: ''
label: Title
exclude: false
element_type: ''
element_class: ''
element_label_type: ''
Expand All @@ -103,9 +53,13 @@ display:
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings:
link_to_entity: true
group_column: value
group_columns: { }
group_rows: true
Expand All @@ -123,7 +77,8 @@ display:
relationship: none
group_type: group
admin_label: ''
label: 'Integer weight selector (field_integer_weight)'
plugin_id: integer_weight_selector
label: 'Integer Weight Selector (field_integer_weight)'
exclude: false
alter:
alter_text: false
Expand Down Expand Up @@ -164,44 +119,57 @@ display:
hide_empty: false
empty_zero: false
hide_alter_empty: true
range: '20'
plugin_id: integer_weight_selector
filters:
status:
value: '1'
table: node_field_data
field: status
plugin_id: boolean
entity_type: node
entity_field: status
id: status
pager:
type: mini
options:
offset: 0
items_per_page: 10
total_pages: null
id: 0
tags:
next: ››
previous: ‹‹
expose:
operator: ''
group: 1
type:
id: type
table: node_field_data
field: type
value:
repo_item:repo_item
entity_type: node
entity_field: type
plugin_id: bundle
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
empty: { }
sorts:
created:
id: created
table: node_field_data
field: created
order: DESC
entity_type: node
entity_field: created
plugin_id: date
relationship: none
group_type: group
admin_label: ''
exposed: false
entity_type: node
entity_field: created
plugin_id: date
order: DESC
expose:
label: ''
exposed: false
granularity: second
field_integer_weight_value:
id: field_integer_weight_value
Expand All @@ -210,17 +178,82 @@ display:
relationship: none
group_type: group
admin_label: ''
plugin_id: standard
order: ASC
expose:
label: ''
field_identifier: ''
exposed: false
arguments: { }
filters:
status:
id: status
table: node_field_data
field: status
entity_type: node
entity_field: status
plugin_id: boolean
value: '1'
group: 1
expose:
operator: ''
type:
id: type
table: node_field_data
field: type
relationship: none
group_type: group
admin_label: ''
entity_type: node
entity_field: type
plugin_id: bundle
operator: in
value:
repo_item: repo_item
group: 1
exposed: false
expose:
operator_id: ''
label: ''
plugin_id: standard
title: 'test weight'
description: ''
use_operator: false
operator: ''
operator_limit_selection: false
operator_list: { }
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
reduce: false
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
style:
type: table
row:
type: fields
query:
type: views_query
options:
query_comment: ''
disable_sql_rewrite: false
distinct: false
replica: false
query_tags: { }
relationships: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: -1
Expand All @@ -232,9 +265,9 @@ display:
- user.permissions
tags: { }
page_1:
display_plugin: page
id: page_1
display_title: Page
display_plugin: page
position: 1
display_options:
display_extenders: { }
Expand Down
5 changes: 3 additions & 2 deletions tests/src/FunctionalJavascript/IntegerWeightTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\field\Entity\FieldConfig;
use Drupal\node\Entity\Node;
use Drupal\views\Tests\ViewTestData;

/**
* Test integer weight selector.
Expand Down Expand Up @@ -102,7 +103,7 @@ public function setUp(): void {
$this->container->get('router.builder')->rebuild();

$fieldStorage = FieldStorageConfig::create([
'fieldName' => static::$fieldName,
'field_name' => static::$fieldName,
'entity_type' => 'node',
'type' => static::$fieldType,
]);
Expand All @@ -124,7 +125,7 @@ public function setUp(): void {
$this->nodes[] = $node;
}

ViewsTestData::createTestViews(get_class($this), ['integer_weight_test_views']);
ViewTestData::createTestViews(get_class($this), ['integer_weight_test_views']);
}

/**
Expand Down

0 comments on commit e58adb7

Please sign in to comment.