Skip to content

Commit

Permalink
fix: add e2e-tests as a pnpm workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
nelitow committed Oct 12, 2024
1 parent efdbde8 commit 2dca2df
Show file tree
Hide file tree
Showing 5 changed files with 261 additions and 60 deletions.
17 changes: 10 additions & 7 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ jobs:
working-directory: ./packages/fuelet-wallet
json-summary-path: ./coverage/coverage-summary.json
json-final-path: ./coverage/coverage-final.json

tests-e2e-connectors:
runs-on: ubuntu-latest

Expand All @@ -93,12 +92,16 @@ jobs:
- name: Run PNPM install
id: pnpm-cache
run: pnpm install --frozen-lockfile
working-directory: ./e2e-tests

- name: Install Playwright browsers
run: pnpm --filter e2e-tests exec playwright install --with-deps
working-directory: .
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium

- name: Run build:connectors
run: pnpm build:connectors

- name: Run Playwright tests
run: pnpm --filter e2e-tests exec playwright test e2e-tests/react-app --project=react-app
working-directory: .
run: xvfb-run --auto-servernum -- pnpm test:react-app:ci
env:
VITE_FUEL_PROVIDER_URL: "http://localhost:4000/v1/graphql"
VITE_MASTER_WALLET_MNEMONIC: "approve task live lift describe basket warm razor ginger deny stairs matter"
PORT: 5173
15 changes: 2 additions & 13 deletions e2e-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,8 @@
"author": "Fuel Labs <[email protected]> (https://fuel.network/)",
"homepage": "https://github.com/FuelLabs/fuel-connectors",
"type": "module",
"scripts": {
"test:react-app": "pnpm test:react-app:ci -- --ui",
"test:react-app:ci": "npx playwright test e2e-tests/react-app --project=react-app"
},
"devDependencies": {
"@fuels/playwright-utils": "0.23.0",
"@fuels/ts-config": "0.20.0",
"@playwright/test": "1.46.1",
"@types/node": "20.12.11",
"dotenv": "16.4.5",
"fuels": "0.95.0",
"playwright": "1.46.1"
},
"scripts": {},
"devDependencies": {},
"engines": {
"node": ">=18",
"pnpm": ">=9"
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,14 @@
"changeset": "changeset",
"changeset:next": "tsx ./scripts/changeset-next",
"packages:version": "node ./scripts/version.js",
"test:react-app": "pnpm test:react-app:ci -- --ui",
"test:react-app:ci": "npx playwright test e2e-tests/react-app --config=e2e-tests/playwright.config.ts --project=react-app",
"prepare": "husky"
},
"devDependencies": {
"@biomejs/biome": "1.7.3",
"@changesets/changelog-github": "0.5.0",
"@playwright/test": "^1.41.2",
"@changesets/cli": "2.26.2",
"@fuels/ts-config": "0.20.0",
"@fuels/tsup-config": "0.20.0",
Expand All @@ -36,7 +39,11 @@
"husky": "9.0.11",
"lint-staged": "15.2.2",
"tsx": "^4.16.2",
"fuels": "0.95.0",
"dotenv": "16.4.5",
"@types/node": "20.12.11",
"turbo": "2.0.11",
"@fuels/playwright-utils": "0.23.0",
"vitest": "2.0.2"
},
"engines": {
Expand Down
Loading

0 comments on commit 2dca2df

Please sign in to comment.