diff --git a/modules/ui_patterns_field_formatters/tests/src/Functional/LayoutBuilderFieldFormatterRenderTest.php b/modules/ui_patterns_field_formatters/tests/src/Functional/LayoutBuilderFieldFormatterRenderTest.php index f7b12d2fa00f610885083759b1e3b2c6e2050861..deb177050bf42964fd6d3019b761a14bbef8752f 100644 --- a/modules/ui_patterns_field_formatters/tests/src/Functional/LayoutBuilderFieldFormatterRenderTest.php +++ b/modules/ui_patterns_field_formatters/tests/src/Functional/LayoutBuilderFieldFormatterRenderTest.php @@ -28,6 +28,23 @@ class LayoutBuilderFieldFormatterRenderTest extends UiPatternsFunctionalTestBase 'block', ]; + /** + * {@inheritdoc} + */ + protected function setUp(): void { + parent::setUp(); + if ($this->user) { + // Create a role with a specific permission. + $custom_role = $this->drupalCreateRole(['configure any layout'], 'custom_role'); + // Create a user and assign the role. + $user = $this->drupalCreateUser([], 'test_user'); + $this->user->addRole('custom_role'); + $this->user->save(); + // $this->drupalLogout(); + // $this->drupalLogin($this->user); + } + } + /** * Test the form and the existence of the. */ diff --git a/modules/ui_patterns_views/tests/src/Functionnal/ViewsRenderTest.php b/modules/ui_patterns_views/tests/src/Functionnal/ViewsRenderTest.php new file mode 100644 index 0000000000000000000000000000000000000000..cdeb79feba86bd3ec160c16b20970fa636b1d9b0 --- /dev/null +++ b/modules/ui_patterns_views/tests/src/Functionnal/ViewsRenderTest.php @@ -0,0 +1,140 @@ +<?php + +namespace Drupal\Tests\ui_patterns_views\Functional; + +use Drupal\Tests\ui_patterns\Functional\UiPatternsFunctionalTestBase; +use Drupal\Tests\ui_patterns\Traits\TestDataTrait; + +/** + * Test pattern preview rendering. + * + * @group ui_patterns_layouts + */ +class ViewsRenderTest extends UiPatternsFunctionalTestBase { + + use TestDataTrait; + + /** + * {@inheritdoc} + */ + protected static $modules = [ + 'node', + 'ui_patterns', + 'ui_patterns_test', + 'ui_patterns_field_formatters', + 'ui_patterns_views', + 'views', + 'views_ui', + 'block', + ]; + + /** + * Test to see if UIP plugins appear. + */ + public function testPlugins(): void { + $this->createTestContentContentType(); + $assert_session = $this->assertSession(); + + $view_test_data = self::loadTestDataFixture(__DIR__ . "/../fixtures/TestDataSet.yml"); + // --- + // View Style + // --- + $config_import = $this->loadConfigFixture(__DIR__ . '/../fixtures/views.view.test.yml'); + + $this->importConfigFixture( + 'views.view.test', + $config_import + ); + // Check that the Views style plugin appears. + $this->drupalGet('admin/structure/views/nojs/display/test/default/style'); + // $text = $this->getSession()->getPage()->getContent(); + $text_views_style_plugin = "Component (UI Patterns)"; + $assert_session->elementTextEquals("css", ".form-item label", $text_views_style_plugin); + // Configure the style plugin. + $config_import = $this->loadConfigFixture(__DIR__ . '/../fixtures/views.view.test.style.yml'); + $ui_patterns_config = &$config_import['display']['page_1']['display_options']["style"]["options"]["ui_patterns"]['ui_patterns']; + $tests = $view_test_data->getTestSets(); + foreach ($tests as $test_set_name => $test_set) { + if (!str_starts_with($test_set_name, 'style')) { + continue; + } + $node = $this->createTestContentNode('page', $test_set['entity'] ?? []); + $ui_patterns_config = $this->buildUiPatternsConfig($test_set); + $this->importConfigFixture( + 'views.view.test', + $config_import + ); + \Drupal::service('router.builder')->rebuild(); + $this->drupalGet('test'); + + if (isset($test_set["assertSession"])) { + $this->assertSessionObject($test_set["assertSession"]); + } + $node->delete(); + } + // --- + // View Row + // --- + $config_import = $this->loadConfigFixture(__DIR__ . '/../fixtures/views.view.test.yml'); + $this->importConfigFixture( + 'views.view.test', + $config_import + ); + // Check that the Views style plugin appears. + $this->drupalGet('admin/structure/views/nojs/display/test/default/row'); + $text_row_style_plugin = "Component (UI Patterns)"; + // Check that the style plugins appears. + $assert_session->elementTextEquals("css", ".form-item label", $text_row_style_plugin); + // Configure the row style plugin. + $config_import = $this->loadConfigFixture(__DIR__ . '/../fixtures/views.view.test.row_style.yml'); + $ui_patterns_config = &$config_import['display']['page_1']['display_options']["row"]["options"]["ui_patterns"]; + $tests = $view_test_data->getTestSets(); + foreach ($tests as $test_set_name => $test_set) { + if (!str_starts_with($test_set_name, 'row_style')) { + continue; + } + $node = $this->createTestContentNode('page', $test_set['entity'] ?? []); + $ui_patterns_config = $this->buildUiPatternsConfig($test_set); + $this->importConfigFixture( + 'views.view.test', + $config_import + ); + \Drupal::service('router.builder')->rebuild(); + $this->drupalGet('test'); + if (isset($test_set["assertSession"])) { + $this->assertSessionObject($test_set["assertSession"]); + } + $node->delete(); + } + // --- + // View field + // --- + $config_import = $this->loadConfigFixture(__DIR__ . '/../fixtures/views.view.test.yml'); + $this->importConfigFixture( + 'views.view.test', + $config_import + ); + // Check that field formatter plugin appears. + $this->drupalGet('admin/structure/views/nojs/handler/test/default/field/title'); + $text_field_formatter_plugin = "Component per item (UI Patterns)"; + // Check that the style plugins appears. + $page = $this->getSession()->getPage(); + $nodes = $page->findAll("css", "select[name='options[type]'] option"); + $textFound = FALSE; + $valueFound = FALSE; + foreach ($nodes as $node) { + $text = $node->getText(); + if ($text === $text_field_formatter_plugin) { + $textFound = TRUE; + } + if ($node->getAttribute("value") === "ui_patterns_component_per_item") { + $valueFound = TRUE; + } + } + if (!$textFound || !$valueFound) { + $this->fail(sprintf("Option not found for field formatter: %s / %s", "ui_patterns_component_per_item", $text_field_formatter_plugin)); + } + + } + +} diff --git a/modules/ui_patterns_views/tests/src/fixtures/TestDataSet.yml b/modules/ui_patterns_views/tests/src/fixtures/TestDataSet.yml new file mode 100644 index 0000000000000000000000000000000000000000..74767c638980056004f12daeecaa97b859b99b61 --- /dev/null +++ b/modules/ui_patterns_views/tests/src/fixtures/TestDataSet.yml @@ -0,0 +1,81 @@ +--- +style_1: + component: + component_id: ui_patterns_test:test-wrapper-component + variant_id: null + slots: + wrapper: + sources: + - source: + ui_patterns_views_field: '' + source_id: view_rows + entity: + title: + value: 'title_entity_1' + + assertSession: + elementExists: + - ['css', '#ui-patterns-wrapper'] + - ['css', '#ui-patterns-wrapper-wrapper'] + pageTextContains: + - ['title_entity_1'] + +style_2: + component: + component_id: ui_patterns_test:test-wrapper-component + variant_id: null + slots: + wrapper: + sources: + - source: + ui_patterns_views_field: 'title' + source_id: view_rows + entity: + title: + value: 'title_entity_2' + assertSession: + elementExists: + - ['css', '#ui-patterns-wrapper'] + - ['css', '#ui-patterns-wrapper-wrapper'] + pageTextContains: + - ['title_entity_2'] + +style_3: + component: + component_id: ui_patterns_test:test-component + props: + string: + source_id: view_title + assertSession: + elementTextEquals: + - ['css', '#ui-patterns-props-string', 'custom view title'] + +row_style_1: + component: + component_id: ui_patterns_test:test-wrapper-component + variant_id: null + slots: + wrapper: + sources: + - source: + ui_patterns_views_field: 'title' + source_id: view_field + entity: + title: + value: 'title_entity_3' + assertSession: + elementExists: + - ['css', '#ui-patterns-wrapper'] + - ['css', '#ui-patterns-wrapper-wrapper'] + pageTextContains: + - ['title_entity_3'] + +row_style_2: + component: + component_id: ui_patterns_test:test-component + props: + string: + source_id: view_title + assertSession: + elementTextEquals: + - ['css', '#ui-patterns-props-string', 'custom view title'] diff --git a/modules/ui_patterns_views/tests/src/fixtures/views.view.test.row_style.yml b/modules/ui_patterns_views/tests/src/fixtures/views.view.test.row_style.yml new file mode 100644 index 0000000000000000000000000000000000000000..92947f238b127bb42d762f8a4139afae4d3f5c21 --- /dev/null +++ b/modules/ui_patterns_views/tests/src/fixtures/views.view.test.row_style.yml @@ -0,0 +1,214 @@ +uuid: afbf5442-7d05-4ee8-a3cd-a84a1f8370fa +langcode: en +status: true +dependencies: + config: + - node.type.page + module: + - node + - ui_patterns + - ui_patterns_views +id: test +label: test +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + 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: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + 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: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: mini + options: + offset: 0 + pagination_heading_level: h4 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + 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 + 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: none + options: { } + cache: + type: tag + options: { } + empty: { } + sorts: { } + 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 + entity_type: node + entity_field: type + plugin_id: bundle + value: + page: page + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + tags: { } + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + title: "custom view title" + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: ui_patterns + options: + hide_empty: 0 + ui_patterns: {} + defaults: + title: false + style: false + row: false + display_extenders: { } + path: test + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + tags: { } diff --git a/modules/ui_patterns_views/tests/src/fixtures/views.view.test.style.yml b/modules/ui_patterns_views/tests/src/fixtures/views.view.test.style.yml new file mode 100644 index 0000000000000000000000000000000000000000..37a83a44b2e7199e4b90a56af332cd70e6214c39 --- /dev/null +++ b/modules/ui_patterns_views/tests/src/fixtures/views.view.test.style.yml @@ -0,0 +1,215 @@ +uuid: afbf5442-7d05-4ee8-a3cd-a84a1f8370fa +langcode: en +status: true +dependencies: + config: + - node.type.page + module: + - node + - ui_patterns + - ui_patterns_views +id: test +label: test +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + 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: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + 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: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: mini + options: + offset: 0 + pagination_heading_level: h4 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + 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 + 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: none + options: { } + cache: + type: tag + options: { } + empty: { } + sorts: { } + 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 + entity_type: node + entity_field: type + plugin_id: bundle + value: + page: page + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + tags: { } + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + title: "custom view title" + style: + type: ui_patterns + options: + ui_patterns: + ui_patterns: {} + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + defaults: + title: false + style: false + row: false + display_extenders: { } + path: test + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + tags: { } diff --git a/modules/ui_patterns_views/tests/src/fixtures/views.view.test.yml b/modules/ui_patterns_views/tests/src/fixtures/views.view.test.yml new file mode 100644 index 0000000000000000000000000000000000000000..15ef050b8be8a0e7ddf4cf7d2da7723ebe180265 --- /dev/null +++ b/modules/ui_patterns_views/tests/src/fixtures/views.view.test.yml @@ -0,0 +1,199 @@ +uuid: afbf5442-7d05-4ee8-a3cd-a84a1f8370fa +langcode: en +status: true +dependencies: + config: + - node.type.page + module: + - node +id: test +label: test +module: views +description: '' +tag: '' +base_table: node_field_data +base_field: nid +display: + default: + id: default + display_title: Default + display_plugin: default + position: 0 + display_options: + 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: '' + exclude: false + alter: + alter_text: false + text: '' + make_link: false + path: '' + absolute: false + external: false + replace_spaces: false + path_case: none + trim_whitespace: false + alt: '' + rel: '' + link_class: '' + prefix: '' + suffix: '' + target: '' + nl2br: false + max_length: 0 + word_boundary: false + ellipsis: false + more_link: false + more_link_text: '' + more_link_path: '' + strip_tags: false + trim: false + preserve_tags: '' + html: false + element_type: '' + element_class: '' + element_label_type: '' + element_label_class: '' + element_label_colon: false + element_wrapper_type: '' + 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: false + group_column: value + group_columns: { } + group_rows: true + delta_limit: 0 + delta_offset: 0 + delta_reversed: false + delta_first_last: false + multi_type: separator + separator: ', ' + field_api_classes: false + pager: + type: mini + options: + offset: 0 + pagination_heading_level: h4 + items_per_page: 10 + total_pages: null + id: 0 + tags: + next: ›› + previous: ‹‹ + 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 + 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: none + options: { } + cache: + type: tag + options: { } + empty: { } + sorts: { } + 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 + entity_type: node + entity_field: type + plugin_id: bundle + value: + page: page + style: + type: default + options: + grouping: { } + row_class: '' + default_row_class: true + row: + type: fields + options: + default_field_elements: true + inline: { } + separator: '' + hide_empty: false + query: + type: views_query + options: + query_comment: '' + disable_sql_rewrite: false + distinct: false + replica: false + query_tags: { } + relationships: { } + header: { } + footer: { } + display_extenders: { } + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + tags: { } + page_1: + id: page_1 + display_title: Page + display_plugin: page + position: 1 + display_options: + defaults: + style: true + row: true + display_extenders: { } + path: test + cache_metadata: + max-age: -1 + contexts: + - 'languages:language_content' + - 'languages:language_interface' + - url.query_args + - 'user.node_grants:view' + tags: { } diff --git a/tests/src/Functional/UiPatternsFunctionalTestBase.php b/tests/src/Functional/UiPatternsFunctionalTestBase.php index af4525c89201ecd33ec479646e5ae9bae19d366c..bb2721fa36206c247bf26c551f0fdc7bc23f7213 100644 --- a/tests/src/Functional/UiPatternsFunctionalTestBase.php +++ b/tests/src/Functional/UiPatternsFunctionalTestBase.php @@ -34,6 +34,13 @@ abstract class UiPatternsFunctionalTestBase extends BrowserTestBase { 'field_ui', ]; + /** + * The user. + * + * @var \Drupal\user\Entity\User|false + */ + protected mixed $user = FALSE; + /** * Config is initialized. */ @@ -44,13 +51,11 @@ abstract class UiPatternsFunctionalTestBase extends BrowserTestBase { */ protected function setUp(): void { parent::setUp(); - - $user = $this->drupalCreateUser([ - 'configure any layout', + $this->user = $this->drupalCreateUser([ 'administer node display', ], NULL, TRUE); - if ($user) { - $this->drupalLogin($user); + if ($this->user) { + $this->drupalLogin($this->user); } } diff --git a/tests/src/Traits/RunSourcePluginTestTrait.php b/tests/src/Traits/RunSourcePluginTestTrait.php index 048045b681b41bcb6c488f8996b35ee49ac429ff..577487c1d6759df142196cab595c9d13fdccd30e 100644 --- a/tests/src/Traits/RunSourcePluginTestTrait.php +++ b/tests/src/Traits/RunSourcePluginTestTrait.php @@ -138,7 +138,7 @@ trait RunSourcePluginTestTrait { foreach ($component_configuration[$prop_or_slot] as $prop_or_slot_id => $prop_or_slot_configuration) { if (isset($expected_outputs[$prop_or_slot][$prop_or_slot_id])) { // For slots, there is a table of sources for each slot. - $source_to_tests = ($prop_or_slot === "props") ? [$prop_or_slot_configuration] : $prop_or_slot_configuration; + $source_to_tests = ($prop_or_slot === "props") ? [$prop_or_slot_configuration] : $prop_or_slot_configuration["sources"]; $expected_outputs_here = ($prop_or_slot === "props") ? [$expected_outputs[$prop_or_slot][$prop_or_slot_id]] : $expected_outputs[$prop_or_slot][$prop_or_slot_id]; foreach ($source_to_tests as $index => $source_to_test) { if (!isset($source_to_test["source_id"])) { diff --git a/tests/src/Traits/TestDataTrait.php b/tests/src/Traits/TestDataTrait.php index eaa50d40f2be2108652139f9046329ba3c08d953..6d93af2b7be282e1e251c690eebe7bc5eea58a6f 100644 --- a/tests/src/Traits/TestDataTrait.php +++ b/tests/src/Traits/TestDataTrait.php @@ -11,6 +11,33 @@ use Drupal\Component\Serialization\Yaml; */ trait TestDataTrait { + /** + * Assert session object with the configuration from the test set. + * + * @param array $assert_session_expectations + * The expected actions to run on the session object. + */ + protected function assertSessionObject(array $assert_session_expectations): void { + if (method_exists($this, 'assertSession')) { + $assert_session = $this->assertSession(); + foreach ($assert_session_expectations as $method => $list_of_method_arguments) { + if (!method_exists($assert_session, $method)) { + throw new \RuntimeException(sprintf('Method "%s" not found in assert session object.', $method)); + } + foreach ($list_of_method_arguments as $method_arguments) { + if (is_array($method_arguments)) { + // @phpstan-ignore-next-line + call_user_func_array([$assert_session, $method], $method_arguments); + } + else { + // @phpstan-ignore-next-line + call_user_func_array([$assert_session, $method], [$method_arguments]); + } + } + } + } + } + /** * Assert an expected output with the configuration from the test set. * diff --git a/tests/src/fixtures/TestDataSet.yml b/tests/src/fixtures/TestDataSet.yml index c3341682d77a573dd945a8411cb2bcd8ca11f6a7..44e6a2cdc718c6f4d9cd610da235c06fd3ba038b 100644 --- a/tests/src/fixtures/TestDataSet.yml +++ b/tests/src/fixtures/TestDataSet.yml @@ -17,10 +17,11 @@ textfield_slot: component_id: ui_patterns_test:test-component slots: slot: - - - source_id: textfield - source: - value: 'test input' + sources: + - + source_id: textfield + source: + value: 'test input' entity: {} output: slots: @@ -46,8 +47,9 @@ field_property_default: component_id: ui_patterns_test:test-component slots: slot: - - - source_id: field_property:node:field_text_1:value + sources: + - + source_id: field_property:node:field_text_1:value entity: field_text_1: value: 'value_text_1'