From 63a9f6b61c0b983f0d3d985e75705e220b0b337e Mon Sep 17 00:00:00 2001 From: Vasile Chindris Date: Tue, 16 Apr 2024 20:44:05 +0300 Subject: [PATCH] test(SLB-297): update default content and schema tests to include quote blocks --- .../a397ca48-8fad-411e-8901-0eba2feb989c.yml | 74 +++++++++++++------ .../ceb9b2a7-4c4c-4084-ada9-d5f6505d466b.yml | 2 + tests/schema/specs/blocks.spec.ts | 24 ++++++ 3 files changed, 77 insertions(+), 23 deletions(-) diff --git a/packages/drupal/test_content/content/node/a397ca48-8fad-411e-8901-0eba2feb989c.yml b/packages/drupal/test_content/content/node/a397ca48-8fad-411e-8901-0eba2feb989c.yml index 2a18b3664..0ee37d6aa 100644 --- a/packages/drupal/test_content/content/node/a397ca48-8fad-411e-8901-0eba2feb989c.yml +++ b/packages/drupal/test_content/content/node/a397ca48-8fad-411e-8901-0eba2feb989c.yml @@ -10,31 +10,43 @@ _meta: 72187a1f-3e48-4b45-a9b7-189c6fd7ee26: media default: revision_uid: - - target_id: 1 + - + target_id: 1 status: - - value: true + - + value: true uid: - - target_id: 1 + - + target_id: 1 title: - - value: 'Blocks: complete' + - + value: 'Blocks: complete' created: - - value: 1686759493 + - + value: 1686759493 promote: - - value: false + - + value: false sticky: - - value: false + - + value: false moderation_state: - - value: published + - + value: published path: - - alias: /blocks-complete + - + alias: /blocks-complete langcode: en pathauto: 0 content_translation_source: - - value: und + - + value: und content_translation_outdated: - - value: false + - + value: false body: - - value: |- + - + value: |- @@ -79,6 +91,9 @@ default: + + +

@@ -88,29 +103,40 @@ default: translations: de: status: - - value: true + - + value: true uid: - - target_id: 1 + - + target_id: 1 title: - - value: 'Blocks: complete DE' + - + value: 'Blocks: complete DE' created: - - value: 1687338353 + - + value: 1687338353 promote: - - value: false + - + value: false sticky: - - value: false + - + value: false moderation_state: - - value: published + - + value: published path: - - alias: /blocks-complete + - + alias: /blocks-complete langcode: de pathauto: 0 content_translation_source: - - value: en + - + value: en content_translation_outdated: - - value: false + - + value: false body: - - value: |- + - + value: |- @@ -149,6 +175,8 @@ translations: + + format: gutenberg summary: '' diff --git a/packages/drupal/test_content/content/node/ceb9b2a7-4c4c-4084-ada9-d5f6505d466b.yml b/packages/drupal/test_content/content/node/ceb9b2a7-4c4c-4084-ada9-d5f6505d466b.yml index 6c19a491d..704d39565 100644 --- a/packages/drupal/test_content/content/node/ceb9b2a7-4c4c-4084-ada9-d5f6505d466b.yml +++ b/packages/drupal/test_content/content/node/ceb9b2a7-4c4c-4084-ada9-d5f6505d466b.yml @@ -67,6 +67,8 @@ default: + + format: gutenberg summary: '' diff --git a/tests/schema/specs/blocks.spec.ts b/tests/schema/specs/blocks.spec.ts index 5a9c453af..762315702 100644 --- a/tests/schema/specs/blocks.spec.ts +++ b/tests/schema/specs/blocks.spec.ts @@ -53,6 +53,14 @@ test('Blocks', async () => { text openInNewTab } + ... on BlockQuote { + quote + author + role + image { + __typename + } + } } } { @@ -161,6 +169,15 @@ test('Blocks', async () => { "text": "CTA with link to media", "url": "/media/[numeric]", }, + { + "__typename": "BlockQuote", + "author": "John Doe", + "image": { + "__typename": "MediaImage", + }, + "quote": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sagittis nisi nec neque porta, a ornare ligula efficitur.", + "role": "Project manager", + }, { "__typename": "BlockMarkup", "markup": " @@ -209,6 +226,13 @@ test('Blocks', async () => { "text": null, "url": null, }, + { + "__typename": "BlockQuote", + "author": "Jane Doe", + "image": null, + "quote": "In vitae diam quis odio tincidunt faucibus eget ut libero", + "role": null, + }, ], "hero": { "__typename": "Hero",