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 6e2668c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 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 Expand Up @@ -65,6 +65,11 @@ test('All blocks are rendered', async ({ page }) => {
page.locator('blockquote img[alt="The silverback"]'),
).toHaveCount(1);

// CTA blocks
await expect(page.locator('a:text("Internal CTA")')).toHaveCount(1);
await expect(page.locator('a:text("External CTA")')).toHaveCount(1);
await expect(page.locator('a:text("CTA with link to media")')).toHaveCount(1);

// Form
await expect(
page.locator('.silverback-iframe iframe').last(),
Expand Down

0 comments on commit 6e2668c

Please sign in to comment.