Skip to content

Commit

Permalink
Replace vite module server with wmr/custom module server (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby committed Jun 25, 2021
1 parent 994b810 commit b4eb08d
Show file tree
Hide file tree
Showing 28 changed files with 10,373 additions and 4,277 deletions.
6 changes: 6 additions & 0 deletions .changeset/curly-shirts-kneel.md
@@ -0,0 +1,6 @@
---
'pleasantest': minor
---

Replace vite-based module server with wmr-based custom module server
(This is probably a breaking change - minor bump is only because pre-1.0)
1 change: 1 addition & 0 deletions .gitignore
@@ -1,3 +1,4 @@
dist
node_modules
.browser-cache.json
.cache
6 changes: 0 additions & 6 deletions examples/menu/index.test.ts
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

0 comments on commit b4eb08d

Please sign in to comment.