Skip to content

Commit

Permalink
test: add e2e test for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
DavieReid committed Nov 14, 2023
1 parent 7c94fb0 commit 8e3314d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
19 changes: 19 additions & 0 deletions docs/test/tags/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Tags Test
layout: DetailTechnical
data:
in-stock:
$tag: in-stock#/data
out-of-stock:
$tag: out-of-stock#/data
---

# {meta.title}

## In Stock

<PageFilterView view={meta.data['in-stock']} />

## Out of Stock

<PageFilterView view={meta.data['out-of-stock']} />
8 changes: 8 additions & 0 deletions packages/site/e2e/tags.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test';

test('page can subscribe to tags ', async ({ page }) => {
await page.goto('/mosaic/test/tags/index');
await expect(page.getByRole('heading', { name: 'Tags Test' })).toBeVisible();
await expect(page.getByText('Product A', { exact: true })).toBeVisible();
await expect(page.getByText('Product B', { exact: true })).toBeVisible();
});

0 comments on commit 8e3314d

Please sign in to comment.