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

feat(e2e): add playright config and createBrain e2e test #1177

Merged
merged 4 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
chore: add playright config
  • Loading branch information
mamadoudicko committed Sep 15, 2023
commit 23e51a65604b1c4c3c6162d8e9e6db2a16e05527
3 changes: 3 additions & 0 deletions .frontend_env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=<change-me>
NEXT_PUBLIC_GROWTHBOOK_CLIENT_KEY=<ignore-me-or-change-me>
NEXT_PUBLIC_JUNE_API_KEY=<ignore-me-or-change-me>
NEXT_PUBLIC_GROWTHBOOK_URL=<ignore-me-or-change-me>
NEXT_PUBLIC_E2E_URL=<ignore-me-or-change-me>
NEXT_PUBLIC_E2E_EMAIL=<ignore-me-or-change-me>
NEXT_PUBLIC_E2E_PASSWORD=<ignore-me-or-change-me>
3 changes: 3 additions & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ next-env.d.ts

# Sentry Auth Token
.sentryclirc
/test-results/
/playwright-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
"victory": "^36.6.10"
},
"devDependencies": {
"@playwright/test": "^1.37.1",
"@tailwindcss/typography": "^0.5.9",
"@testing-library/react": "^14.0.0",
"@vitejs/plugin-react": "^4.0.1",
Expand Down
19 changes: 19 additions & 0 deletions frontend/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { defineConfig, devices } from "@playwright/test";

export default defineConfig({
testDir: "./e2e",
fullyParallel: true,
forbidOnly: !(process.env.CI == null),
retries: process.env.CI != null ? 2 : 0,
workers: process.env.CI != null ? 1 : undefined,
reporter: "html",
use: {
trace: "on-first-retry",
},
projects: [
{
name: "chromium",
use: { ...devices["Desktop Chrome"] },
},
],
});
17 changes: 16 additions & 1 deletion frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,16 @@
picocolors "^1.0.0"
tslib "^2.6.0"

"@playwright/test@^1.37.1":
version "1.37.1"
resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.37.1.tgz#e7f44ae0faf1be52d6360c6bbf689fd0057d9b6f"
integrity sha512-bq9zTli3vWJo8S3LwB91U0qDNQDpEXnw7knhxLM0nwDvexQAwx9tO8iKDZSqqneVq+URd/WIoz+BALMqUTgdSg==
dependencies:
"@types/node" "*"
playwright-core "1.37.1"
optionalDependencies:
fsevents "2.3.2"

"@popperjs/core@^2.11.8":
version "2.11.8"
resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.8.tgz#6b79032e760a0899cd4204710beede972a3a185f"
Expand Down Expand Up @@ -4266,7 +4276,7 @@ fs.realpath@^1.0.0:
resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==

fsevents@~2.3.2:
fsevents@2.3.2, fsevents@~2.3.2:
version "2.3.2"
resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
Expand Down Expand Up @@ -5948,6 +5958,11 @@ pkg-types@^1.0.3:
mlly "^1.2.0"
pathe "^1.1.0"

[email protected]:
version "1.37.1"
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.37.1.tgz#cb517d52e2e8cb4fa71957639f1cd105d1683126"
integrity sha512-17EuQxlSIYCmEMwzMqusJ2ztDgJePjrbttaefgdsiqeLWidjYz9BxXaTaZWxH1J95SHGk6tjE+dwgWILJoUZfA==

postcss-import@^15.1.0:
version "15.1.0"
resolved "https://registry.npmjs.org/postcss-import/-/postcss-import-15.1.0.tgz"
Expand Down