From e58adb7fa5b87d9d8a570eb5d81a6b4e65af87d7 Mon Sep 17 00:00:00 2001 From: Joe Corall <jjc223@lehigh.edu> Date: Tue, 23 Apr 2024 07:36:09 -0400 Subject: [PATCH] Fixup js tests --- .../views.view.test_integer_weight.yml | 221 ++++++++++-------- .../IntegerWeightTest.php | 5 +- 2 files changed, 130 insertions(+), 96 deletions(-) diff --git a/tests/modules/integer_weight_test_views/test_views/views.view.test_integer_weight.yml b/tests/modules/integer_weight_test_views/test_views/views.view.test_integer_weight.yml index 08dc4912..9ccb76a8 100644 --- a/tests/modules/integer_weight_test_views/test_views/views.view.test_integer_weight.yml +++ b/tests/modules/integer_weight_test_views/test_views/views.view.test_integer_weight.yml @@ -4,6 +4,7 @@ dependencies: config: - node.type.repo_item module: + - islandora - node - user id: test_integer_weight @@ -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: '' @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: { } diff --git a/tests/src/FunctionalJavascript/IntegerWeightTest.php b/tests/src/FunctionalJavascript/IntegerWeightTest.php index 2572c191..4f07be96 100644 --- a/tests/src/FunctionalJavascript/IntegerWeightTest.php +++ b/tests/src/FunctionalJavascript/IntegerWeightTest.php @@ -8,6 +8,7 @@ use Drupal\Tests\field_ui\Traits\FieldUiTestTrait; use Drupal\field\Entity\FieldStorageConfig; use Drupal\field\Entity\FieldConfig; use Drupal\node\Entity\Node; +use Drupal\views\Tests\ViewTestData; /** * Test integer weight selector. @@ -102,7 +103,7 @@ class IntegerWeightTest extends WebDriverTestBase { $this->container->get('router.builder')->rebuild(); $fieldStorage = FieldStorageConfig::create([ - 'fieldName' => static::$fieldName, + 'field_name' => static::$fieldName, 'entity_type' => 'node', 'type' => static::$fieldType, ]); @@ -124,7 +125,7 @@ class IntegerWeightTest extends WebDriverTestBase { $this->nodes[] = $node; } - ViewsTestData::createTestViews(get_class($this), ['integer_weight_test_views']); + ViewTestData::createTestViews(get_class($this), ['integer_weight_test_views']); } /**