-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ dist | |
.idea | ||
.__mf__win | ||
lib | ||
**/.__mf__temp | ||
**/.__mf__temp | ||
reports/* | ||
nohup.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,19 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
# Format staged files | ||
npx pretty-quick --staged | ||
|
||
# Build project | ||
pnpm build | ||
|
||
# Check if the server is already running on http://localhost:5173 | ||
if ! pnpm exec wait-on http://localhost:5173 --timeout 5000; then | ||
# If not running, start multi-example in the background | ||
pnpm run multi-example & | ||
# Wait for the server to be ready before proceeding | ||
pnpm exec wait-on http://localhost:5173 | ||
fi | ||
|
||
# Run Playwright tests after ensuring the server is up | ||
pnpm playwright test --project=vite-webpack-rspack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
import { expect, test } from '@playwright/test'; | ||
|
||
test('example.com basic test', async ({ page }) => { | ||
// Go to example.com | ||
await page.goto('https://example.com'); | ||
test('basic test', async ({ page, baseURL }) => { | ||
await page.goto(baseURL!); | ||
|
||
// Check the title of the page | ||
await expect(page).toHaveTitle('Example Domain'); | ||
// Get the heading by role with exact name 'Rust Host' | ||
const heading = page.getByRole('heading', { name: 'Nuxt host', exact: true }); | ||
|
||
// Check if the heading exists on the page | ||
const heading = page.locator('h1'); | ||
await expect(heading).toHaveText('Example Domain'); | ||
// Expect the heading to be visible | ||
await expect(heading).toBeVisible(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters