Skip to content

Commit 00743c5

Browse files
chore(loadable-react-18): stabilize Playwright e2e (use serve webServer, fix imports, build pretest)
1 parent 5a0fde7 commit 00743c5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

loadable-react-18/e2e/checkLoadableReact18Apps.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { test } from '@playwright/test';
22

33
import { BaseMethods } from '../../playwright-e2e/common/base';
4-
import { baseSelectors, selectors } from '../../cypress-e2e/common/selectors';
5-
import { Constants } from '../../cypress-e2e/fixtures/constants';
4+
import { baseSelectors, selectors } from '../../playwright-e2e/common/selectors';
5+
import { Constants } from '../../playwright-e2e/fixtures/constants';
66

77
const standardPhrase = Constants.commonConstantsData.standardPhrase;
88

loadable-react-18/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
"build": "pnpm --filter loadable-react-18_* build",
88
"serve": "pnpm --filter loadable-react-18_* --parallel serve",
99
"clean": "pnpm --filter loadable-react-18_* --parallel clean",
10+
"pretest:e2e": "pnpm build",
1011
"test:e2e": "pnpm exec playwright test",
1112
"test:e2e:ui": "pnpm exec playwright test --ui",
1213
"test:e2e:debug": "pnpm exec playwright test --debug",
13-
"e2e:ci": "pnpm exec playwright install --with-deps && pnpm exec playwright test --reporter=list"
14+
"e2e:ci": "pnpm exec playwright install --with-deps && pnpm build && pnpm exec playwright test --reporter=list"
1415
},
1516
"devDependencies": {
1617
"@playwright/test": "^1.54.2",

loadable-react-18/playwright.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ export default defineConfig({
1414
trace: 'on-first-retry',
1515
},
1616
webServer: {
17-
command: 'pnpm run start',
17+
// Use prebuilt bundles and only start servers for e2e reliability
18+
command: 'pnpm run serve',
1819
url: 'http://localhost:3000',
1920
timeout: 180_000,
2021
reuseExistingServer: !process.env.CI,

0 commit comments

Comments
 (0)