Skip to content

Commit

Permalink
test(SLB-288): adjust e2e tests for new element
Browse files Browse the repository at this point in the history
  • Loading branch information
HagerDakroury committed May 3, 2024
1 parent 2f80ac1 commit 60c9134
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ default:
<h2 class="wp-block-custom-heading">Heading</h2>
<!-- /wp:custom/heading -->
<!-- wp:table -->
<figure class="wp-block-table"><table><tbody><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></tbody></table><figcaption>Caption</figcaption></figure>
<!-- /wp:table -->
<!-- wp:quote -->
<blockquote class="wp-block-quote"><p>Quote</p><cite>Citation</cite></blockquote>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { BlockMarkup } from './BlockMarkup';

export function BlockImageWithText(props: BlockImageWithTextFragment) {
return (
<div className="container-page my-12 lg:my-16">
<div className="my-12 lg:my-16">
<div
className={clsx(
'flex flex-col lg:flex-row gap-2 lg:gap-16 items-start lg:items-center',
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/specs/drupal/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ test('All blocks are rendered', async ({ page }) => {
page.locator('a:text("link")[href="/en/architecture"]'),
).toHaveCount(1);

// Image
// Image and ImageWithText block
await expect(
page.locator(
'img:not([data-test-id=hero-image])[alt="A beautiful landscape."]',
),
).toHaveCount(1);
).toHaveCount(2);
await expect(page.locator('figcaption:text("Media image")')).toHaveCount(1);

// Video
Expand Down
2 changes: 0 additions & 2 deletions tests/schema/specs/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,6 @@ test('Blocks', async () => {
<h2 class="wp-block-custom-heading">Heading</h2>
<figure class="wp-block-table"><table><tbody><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></tbody></table><figcaption>Caption</figcaption></figure>
<blockquote class="wp-block-quote"><p>Quote</p><cite>Citation</cite></blockquote>
<p></p>
Expand Down

0 comments on commit 60c9134

Please sign in to comment.