Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright #1407

Merged
merged 30 commits into from
Jul 24, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
caa0414
chore: remove cypress related stuff
BrickheadJohnny Jul 20, 2024
3b91556
feat: set up Playwright & create an example test
BrickheadJohnny Jul 23, 2024
435b74d
feat: add the `Playwright Tests` GitHub Action
BrickheadJohnny Jul 23, 2024
ba20157
fix(gh action): add Build step
BrickheadJohnny Jul 23, 2024
7d7cb24
cleanup(.gitignore): remove unnecessary line
BrickheadJohnny Jul 23, 2024
e12955c
fix(gh action): install browsers before dependencies
BrickheadJohnny Jul 23, 2024
c5ab404
cleanup(fixtures): remove `console.log`
BrickheadJohnny Jul 23, 2024
1b1e2d9
fix(gh action): provide envs
BrickheadJohnny Jul 23, 2024
2fcb6f9
feat: run workflow on successful deployment
BrickheadJohnny Jul 23, 2024
1bf45f9
feat: use `navigator.userAgent` to detect test user
BrickheadJohnny Jul 23, 2024
157a275
fix(gh action): run for specific URLs & pass deployment URL as env var
BrickheadJohnny Jul 23, 2024
10939d7
fix(env): add `NEXT_PUBLIC_E2E_WALLET_MNEMONIC`
BrickheadJohnny Jul 23, 2024
1bd9b97
fix(gh action): more specific url
BrickheadJohnny Jul 23, 2024
241a982
fix invalid workflow file
BrickheadJohnny Jul 23, 2024
04c7c65
trigger
BrickheadJohnny Jul 23, 2024
49467ea
fix(gh action): negate `contains`
BrickheadJohnny Jul 23, 2024
aa5c472
fix(gh action): install dependencies
BrickheadJohnny Jul 23, 2024
dd5579a
fix(playwright.config): webServer config
BrickheadJohnny Jul 23, 2024
a27a0c7
debug: temporarily log deployment_url
BrickheadJohnny Jul 23, 2024
d72ff87
fix(playwright): always generate html report
BrickheadJohnny Jul 23, 2024
e6f7e90
fix(gh action): use `deployment_status.target_url`
BrickheadJohnny Jul 23, 2024
36e3452
cleanup: revert env changes
BrickheadJohnny Jul 23, 2024
b1a4323
cleanup: remove unnecessary steps from workflow file
BrickheadJohnny Jul 24, 2024
1cc9fea
fix: install `@playwright/test` globally
BrickheadJohnny Jul 24, 2024
382198c
fix: copy playwright to node_modules
BrickheadJohnny Jul 24, 2024
1abdc7b
fix: install `@playwright/test` only
BrickheadJohnny Jul 24, 2024
6021b6c
cleanup: remove fake success returns in onchain tx related tests
BrickheadJohnny Jul 24, 2024
3e8d5d0
chore: upgrade `@playwright/test`
BrickheadJohnny Jul 24, 2024
b6bb4e8
fix: revert workflow changes, just run `npm ci`
BrickheadJohnny Jul 24, 2024
815953c
fix(gh action): concurrency
BrickheadJohnny Jul 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ ALCHEMY_KEY=""
ARBITRUM_ALCHEMY_KEY=""
BALANCY_TOKEN=""
BASE_ALCHEMY_KEY=""
CYPRESS_RECORD_KEY=""
EDGE_CONFIG=""
GOERLI_ALCHEMY_KEY=""
GUILD_API_KEY=""
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Playwright Tests
on:
deployment_status:
jobs:
test:
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
# && !contains(github.event.deployment_status.target_url, 'guild-xyz-storybook')
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Debug
run: echo "${{ github.event.deployment_status.target_url }}"
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
env:
DEPLOYMENT_URL: ${{ github.event.deployment_status.target_url }}
run: npm run test
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ yarn-error.log*

.vercel

cypress/screenshots
cypress/videos

.idea
*.tsbuildinfo

*storybook.log
storybook-static

bun.lockb

/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
/playwright/results
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"attributePosition": "auto"
},
"files": {
"include": ["src", "cypress"],
"include": ["src", "playwright", "playwright.config.ts"],
"ignore": ["node_modules", ".next", "public", ".out", "package-lock.json"]
},
"organizeImports": {
Expand Down
53 changes: 0 additions & 53 deletions cypress.config.ts

This file was deleted.

167 changes: 0 additions & 167 deletions cypress/e2e/1-roles-requirements-rewards/0-manage-roles.spec.ts

This file was deleted.

98 changes: 0 additions & 98 deletions cypress/e2e/2-guild-checkout/0-payment-requirement.spec.ts

This file was deleted.

Loading
Loading