Skip to content

Commit

Permalink
test: split block e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
mstrasinskis committed Oct 4, 2023
1 parent 8a49c20 commit 34e2d14
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
13 changes: 13 additions & 0 deletions e2e/split-block.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { expect, test } from "@playwright/test";

const testUrl = "/components/split-block";

test("Should display start slot content", async ({ page }) => {
await page.goto(testUrl);
await expect(page.getByTestId("start")).toHaveText("Start slot content");
});

test("Should display end slot content", async ({ page }) => {
await page.goto(testUrl);
await expect(page.getByTestId("end")).toHaveText("End slot content");
});
4 changes: 2 additions & 2 deletions src/routes/(split)/components/split-block/+page.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ No properties
<div class="container">
<SplitBlock>
<div slot="start" class="item">Content A</div>
<div slot="end" class="item">Content B</div>
<div slot="start" class="item" data-tid="start">Start slot content</div>
<div slot="end" class="item" data-tid="end">End slot content</div>
</SplitBlock>
</div>

Expand Down

0 comments on commit 34e2d14

Please sign in to comment.