Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace vite module server with wmr/custom module server #115

Merged
merged 18 commits into from
Jun 25, 2021
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist
node_modules
.browser-cache.json
.cache
6 changes: 0 additions & 6 deletions examples/menu/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,27 +106,21 @@ test(
'Desktop menus toggle open/closed',
withBrowser(async ({ screen, utils, page, user }) => {
await renderMenu({ utils, data });

const aboutBtn = await screen.getByRole('button', { name: /about/i });
const productsBtn = await screen.getByRole('button', { name: /products/i });

// First click: opens about menu
await user.click(aboutBtn);
await expect(await screen.getByText(aboutText)).toBeVisible();

// Second click: closes about menu
await user.click(aboutBtn);
await expect(await screen.getByText(aboutText)).not.toBeVisible();

// Open products menu
await user.click(productsBtn);
await expect(await screen.getByText(productsText)).toBeVisible();

// Clicking about button should close products menu and open about menu
await user.click(aboutBtn);
await expect(await screen.getByText(productsText)).not.toBeVisible();
await expect(await screen.getByText(aboutText)).toBeVisible();

// Click near the bottom of the screen (outside the menu), and the menu should close
await page.mouse.click(page.viewport().width / 2, page.viewport().height);
await expect(await screen.getByText(aboutText)).not.toBeVisible();
Expand Down
Loading