Skip to content

Commit

Permalink
test(SLB-300): accordion block
Browse files Browse the repository at this point in the history
  • Loading branch information
colorfield committed May 3, 2024
1 parent f93cc5e commit 6835bb6
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,23 @@ default:
<!-- 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:custom/accordion -->
<!-- wp:custom/accordion-item-text {"title":"With a single paragraph and no icon","icon":""} -->
<!-- wp:paragraph -->
<p></p>
<p>Incididunt laborum velit non proident nostrud velit. Minim excepteur ut aliqua nisi. Culpa laboris consectetur proident. Tempor esse ullamco et dolor proident id officia laborum voluptate nostrud elit dolore qui amet. Ex Lorem irure eu anim ipsum officia.</p>
<!-- /wp:paragraph -->
<!-- /wp:custom/accordion-item-text -->
<!-- wp:custom/accordion-item-text {"title":"With a list and a paragraph and arrow icon","icon":"arrow"} -->
<!-- wp:list -->
<ul><li>Moitié-moitié</li><li>Fribourgeoise</li></ul>
<!-- /wp:list -->
<!-- wp:paragraph -->
<p>Incididunt laborum velit non proident nostrud velit. Minim excepteur ut aliqua nisi. Culpa laboris consectetur proident. Tempor esse ullamco et dolor proident id officia laborum voluptate nostrud elit dolore qui amet. Ex Lorem irure eu anim ipsum officia.</p>
<!-- /wp:paragraph -->
<!-- /wp:custom/accordion-item-text -->
<!-- /wp:custom/accordion -->
<!-- /wp:custom/content -->
format: gutenberg
summary: ''
Expand Down
40 changes: 37 additions & 3 deletions tests/schema/specs/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,19 @@ test('Blocks', async () => {
__typename
}
}
... on BlockAccordion {
items {
__typename
... on BlockAccordionItemText {
__typename
title
icon
textContent {
markup
}
}
}
}
}
}
{
Expand Down Expand Up @@ -210,10 +223,31 @@ test('Blocks', async () => {
"role": "Project manager",
},
{
"__typename": "BlockMarkup",
"markup": "
<p></p>
"__typename": "BlockAccordion",
"items": [
{
"__typename": "BlockAccordionItemText",
"icon": "",
"textContent": {
"markup": "
<p>Incididunt laborum velit non proident nostrud velit. Minim excepteur ut aliqua nisi. Culpa laboris consectetur proident. Tempor esse ullamco et dolor proident id officia laborum voluptate nostrud elit dolore qui amet. Ex Lorem irure eu anim ipsum officia.</p>
",
},
"title": "With a single paragraph and no icon",
},
{
"__typename": "BlockAccordionItemText",
"icon": "arrow",
"textContent": {
"markup": "
<ul><li>Moitié-moitié</li><li>Fribourgeoise</li></ul>
<p>Incididunt laborum velit non proident nostrud velit. Minim excepteur ut aliqua nisi. Culpa laboris consectetur proident. Tempor esse ullamco et dolor proident id officia laborum voluptate nostrud elit dolore qui amet. Ex Lorem irure eu anim ipsum officia.</p>
",
},
"title": "With a list and a paragraph and arrow icon",
},
],
},
],
"hero": {
Expand Down

0 comments on commit 6835bb6

Please sign in to comment.