feat(internals/playwright-config): [input] Change the default e2e test environment to site (#855)

* feat(internals/playwright-config): Change the default e2e test environment to site

* feat(internals/playwright-config): Change the default e2e test environment to site 2
This commit is contained in:
yoyo 2023-11-17 17:09:55 +08:00 committed by GitHub
parent f7c7b78ebc
commit e748f3c41d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 11 additions and 5 deletions

View File

@ -41,7 +41,7 @@ jobs:
run: pnpm i --no-frozen-lockfile
- name: dev start
run: pnpm dev & sleep 5
run: pnpm site & sleep 5
- name: update playwright
run: pnpm recursive update @playwright/test
- name: Install Playwright browsers

View File

@ -43,7 +43,7 @@ jobs:
run: pnpm i --no-frozen-lockfile
- name: dev start
run: pnpm dev & sleep 5
run: pnpm site & sleep 5
- name: Install Playwright browsers
run: pnpm install:browser --with-deps chromium

View File

@ -75,10 +75,10 @@ jobs:
run: pnpm i --no-frozen-lockfile
- name: dev start
run: pnpm dev & sleep 5
run: pnpm site & sleep 5
- name: Install Playwright browsers
run: pnpm install:browser --with-deps chromium
- name: E2E Test
run: pnpm test:e2e3 ${{ env.TEST_COMPONENTS }} --reporter=line
run: pnpm test:e2e3 ${{ env.TEST_COMPONENTS }} --reporter=line --retries=0 --workers=2

1
.gitignore vendored
View File

@ -23,6 +23,7 @@ coverage/
/packages/react/app.ts
/examples/**/playwright-report
/examples/**/test-results
vite.config.ts.timestamp*
vitest.config.ts.timestamp*

View File

@ -1,6 +1,11 @@
import Config from '@opentiny-internal/playwright-config'
const origin = 'http://localhost:3101'
// or 'http://localhost:7130/pc/'
const baseURL = `${origin}/tiny-vue/zh-CN/os-theme/components/`
export default Config({
testDir: '../sites/demos',
baseURL: 'http://localhost:7130/pc/'
baseURL,
storageState: { origins: [{ origin, localStorage: [{ name: 'tiny-vue-demo-mode', value: 'single' }] }] }
})