Skip to content

Commit

Permalink
test(SLB-297): update quote tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chindris committed Apr 22, 2024
1 parent 0cdaf5b commit 4079da7
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
_meta:
version: '1.0'
entity_type: file
uuid: 2f1be18f-dc18-4b56-8ff0-ce24d8ff7df7
default_langcode: en
default:
uid:
-
target_id: 1
filename:
-
value: the_silverback.jpeg
uri:
-
value: 'public://2024-04/the_silverback.jpeg'
filemime:
-
value: image/jpeg
filesize:
-
value: 146269
status:
-
value: true
created:
-
value: 1713785099
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
_meta:
version: '1.0'
entity_type: media
uuid: 5dfc1856-e9e4-4f02-9cd6-9d888870ce1a
bundle: image
default_langcode: en
depends:
2f1be18f-dc18-4b56-8ff0-ce24d8ff7df7: file
default:
revision_user:
-
target_id: 1
status:
-
value: true
uid:
-
target_id: 1
name:
-
value: the_silverback.jpeg
created:
-
value: 1713785099
path:
-
alias: ''
langcode: en
pathauto: 0
content_translation_source:
-
value: und
content_translation_outdated:
-
value: false
field_media_image:
-
entity: 2f1be18f-dc18-4b56-8ff0-ce24d8ff7df7
alt: 'The silverback'
title: ''
width: 1280
height: 720
translations:
de:
status:
-
value: true
uid:
-
target_id: 1
name:
-
value: the_silverback.jpeg
created:
-
value: 1713785205
path:
-
alias: ''
langcode: de
pathauto: 0
content_translation_source:
-
value: en
content_translation_outdated:
-
value: false
field_media_image:
-
entity: 2f1be18f-dc18-4b56-8ff0-ce24d8ff7df7
alt: 'The silverback DE'
title: ''
width: 1280
height: 720
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ _meta:
3a0fe860-a6d6-428a-9474-365bd57509aa: media
478c4289-961d-4ce8-85d6-578ae05f3019: media
72187a1f-3e48-4b45-a9b7-189c6fd7ee26: media
5dfc1856-e9e4-4f02-9cd6-9d888870ce1a: media
default:
revision_uid:
-
Expand Down Expand Up @@ -76,10 +77,6 @@ default:
<h3 class="wp-block-custom-heading">Heading 3</h3>
<!-- /wp:custom/heading -->
<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Quote</p><cite>Citation</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:custom/image-teasers -->
<!-- wp:custom/image-teaser {"mediaEntityIds":["3a0fe860-a6d6-428a-9474-365bd57509aa"],"title":"Teaser 1","ctaUrl":"https://google.com","ctaText":"Foo"} /-->
Expand All @@ -92,7 +89,7 @@ default:
<!-- wp:custom/cta {"url":"/media/1","text":"CTA with link to media","data-id":"b998ae5e-8b56-40ca-8f80-fd4404e7e716","data-entity-type":"media"} /-->
<!-- wp:custom/quote {"quote":"Lorem ipsum dolor sit amet, \u003cstrong\u003econsectetur\u003c/strong\u003e adipiscing elit. Vivamus sagittis nisi nec neque porta, a ornare ligula efficitur.","author":"John Doe","role":"Project manager","mediaEntityIds":["3a0fe860-a6d6-428a-9474-365bd57509aa"]} /-->
<!-- wp:custom/quote {"quote":"Lorem ipsum dolor sit amet, \u003cstrong\u003econsectetur\u003c/strong\u003e adipiscing elit. Vivamus sagittis nisi nec neque porta, a ornare ligula efficitur.","author":"John Doe","role":"Project manager","mediaEntityIds":["5dfc1856-e9e4-4f02-9cd6-9d888870ce1a"]} /-->
<!-- wp:paragraph -->
<p></p>
Expand Down Expand Up @@ -166,17 +163,13 @@ translations:
<h3 class="wp-block-custom-heading">Heading 3 DE</h3>
<!-- /wp:custom/heading -->
<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Quote DE</p><cite>Citation DE</cite></blockquote>
<!-- /wp:quote -->
<!-- wp:custom/cta {"url":"/en/drupal","text":"Internal CTA DE","data-id":"f1f827c9-ed06-4e7d-b89d-a169e70a459c","data-entity-type":"node"} /-->
<!-- wp:custom/cta {"url":"https://www.example.com","text":"External CTA DE","data-id":"https://www.example.com","data-entity-type":"","openInNewTab":true} /-->
<!-- wp:custom/cta {"url":"/media/1","text":"CTA with link to media DE","data-id":"b998ae5e-8b56-40ca-8f80-fd4404e7e716","data-entity-type":"media"} /-->
<!-- wp:custom/quote {"quote":"Lorem ipsum dolor sit amet, consectetur \u003cstrong\u003eadipiscing\u003c/strong\u003e elit. Vivamus sagittis nisi nec neque porta, a ornare ligula efficitur DE.","author":"John Doe","role":"Projektmanager","mediaEntityIds":["3a0fe860-a6d6-428a-9474-365bd57509aa"]} /-->
<!-- wp:custom/quote {"quote":"Lorem ipsum dolor sit amet, consectetur \u003cstrong\u003eadipiscing\u003c/strong\u003e elit. Vivamus sagittis nisi nec neque porta, a ornare ligula efficitur DE.","author":"John Doe","role":"Projektmanager","mediaEntityIds":["5dfc1856-e9e4-4f02-9cd6-9d888870ce1a"]} /-->
<!-- /wp:custom/content -->
format: gutenberg
summary: ''
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ default:
<figure class="wp-block-table"><table><tbody><tr><td></td><td></td></tr><tr><td></td><td></td></tr></tbody></table></figure>
<!-- /wp:table -->
<!-- wp:quote -->
<blockquote class="wp-block-quote"><p></p></blockquote>
<!-- /wp:quote -->
<!-- wp:custom/heading -->
<h2 class="wp-block-custom-heading"></h2>
<!-- /wp:custom/heading -->
Expand Down
10 changes: 5 additions & 5 deletions tests/e2e/specs/drupal/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ test('All blocks are rendered', async ({ page }) => {
page.locator(
'img:not([data-test-id=hero-image])[alt="A beautiful landscape."]',
),
).toHaveCount(2);
).toHaveCount(1);
await expect(page.locator('figcaption:text("Media image")')).toHaveCount(1);

// Video
Expand All @@ -50,10 +50,10 @@ test('All blocks are rendered', async ({ page }) => {
await expect(page.locator('h3:text("Heading 3")')).toHaveCount(1);

// Quote
await expect(page.locator('blockquote > p:text("Quote")')).toHaveCount(1);
await expect(page.locator('blockquote > cite:text("Citation")')).toHaveCount(
1,
);
await expect(page.locator('blockquote:text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus sagittis nisi nec neque porta, a ornare ligula efficitur.")')).toHaveCount(1);
await expect(page.locator('blockquote p.not-prose:text("John Doe")')).toHaveCount(1);
await expect(page.locator('blockquote p.not-prose span:text("Project manager")')).toHaveCount(1);
await expect(page.locator('blockquote img[alt="The silverback"]')).toHaveCount(1);

// Form
await expect(
Expand Down
4 changes: 0 additions & 4 deletions tests/schema/specs/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ test('Blocks', async () => {
<ul><li>list 1</li><li>list 2<ol><li>list 2.2</li></ol></li></ul>
<h3 class="wp-block-custom-heading">Heading 3</h3>
<blockquote class="wp-block-quote"><p>Quote</p><cite>Citation</cite></blockquote>
",
},
{
Expand Down Expand Up @@ -215,8 +213,6 @@ test('Blocks', async () => {
<figure class="wp-block-table"><table><tbody><tr><td></td><td></td></tr><tr><td></td><td></td></tr></tbody></table></figure>
<blockquote class="wp-block-quote"><p></p></blockquote>
<h2 class="wp-block-custom-heading"></h2>
",
},
Expand Down

0 comments on commit 4079da7

Please sign in to comment.