Skip to content

Commit

Permalink
Tweak E2E tests (#2075)
Browse files Browse the repository at this point in the history
  • Loading branch information
HiDeoo committed Jul 2, 2024
1 parent 788aabf commit a37f935
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 14 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ concurrency:

env:
NODE_VERSION: 18
ASTRO_TELEMETRY_DISABLED: true

jobs:
unit-test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineConfig({
integrations: [
starlight({
title: 'Basics',
pagefind: false,
}),
],
});
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export default defineConfig({
integrations: [
starlight({
title: 'Custom src directory',
pagefind: false,
}),
],
});
2 changes: 2 additions & 0 deletions packages/starlight/__e2e__/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { build, preview } from 'astro';

export { expect, type Locator } from '@playwright/test';

process.env.ASTRO_TELEMETRY_DISABLED = 'true';

// Setup a test environment that will build and start a preview server for a given fixture path and
// provide a Starlight Playwright fixture accessible from within all tests.
export async function testFactory(fixturePath: string) {
Expand Down
2 changes: 1 addition & 1 deletion packages/starlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^5.1.0",
"@playwright/test": "^1.44.1",
"@playwright/test": "^1.45.0",
"@types/node": "^18.16.19",
"@vitest/coverage-v8": "^1.6.0",
"astro": "^4.10.2",
Expand Down
1 change: 1 addition & 0 deletions packages/starlight/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ export default defineConfig({
},
],
testMatch: '__e2e__/*.test.ts',
timeout: 40 * 1_000,
workers: 1,
});
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a37f935

Please sign in to comment.