Skip to content

Commit

Permalink
fix: test:e2e being flaky (#95)
Browse files Browse the repository at this point in the history
* fix: test:e2e being flaky

* feat: adds a changeset
  • Loading branch information
ixahmedxi authored Jul 6, 2024
1 parent ee22b5c commit 9ff85db
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 9 deletions.
20 changes: 20 additions & 0 deletions .changeset/tasty-grapes-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
'@orbitkit/eslint': patch
'@orbitkit/marketing': patch
'@orbitkit/web': patch
'@orbitkit/docs': patch
'@orbitkit/api': patch
'@orbitkit/assets': patch
'@orbitkit/auth': patch
'@orbitkit/storybook': patch
'@orbitkit/tailwind': patch
'@orbitkit/tsconfig': patch
'@orbitkit/vite': patch
'@orbitkit/core': patch
'@orbitkit/db': patch
'@orbitkit/env': patch
'@orbitkit/ui': patch
'@orbitkit/utils': patch
---

fix: flaky e2e test & ci
1 change: 1 addition & 0 deletions apps/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"dev": "astro dev",
"lint": "eslint . --max-warnings 0",
"start": "astro preview",
"sync": "astro sync",
"test:e2e": "playwright test",
"typecheck": "astro check"
},
Expand Down
2 changes: 1 addition & 1 deletion apps/marketing/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineConfig({
},
],
webServer: {
command: 'bun dev --port 4200',
command: 'bun start --port 4200',
url: 'http://localhost:4200',
reuseExistingServer: !process.env['CI'],
},
Expand Down
12 changes: 11 additions & 1 deletion apps/marketing/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"extends": ["//"],
"tasks": {
"lint": {
"dependsOn": ["^build", "build"]
"dependsOn": ["^build", "sync"]
},
"build": {
"outputs": [".astro/**", "dist/**"],
Expand All @@ -15,6 +15,16 @@
"SENTRY_PROJECT",
"SENTRY_AUTH_TOKEN"
]
},
"test:e2e": {
"passThroughEnv": [
"PUBLIC_POSTHOG_KEY",
"PUBLIC_POSTHOG_HOST",
"PUBLIC_SENTRY_DSN",
"SENTRY_ORG",
"SENTRY_PROJECT",
"SENTRY_AUTH_TOKEN"
]
}
}
}
3 changes: 0 additions & 3 deletions apps/web/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ const nextConfig = {
typescript: {
ignoreBuildErrors: true,
},
experimental: {
typedRoutes: true,
},
}

export default withSentryConfig(withBundleAnalyzer(nextConfig), {
Expand Down
2 changes: 1 addition & 1 deletion apps/web/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default defineConfig({
},
],
webServer: {
command: 'bun dev --port 4201',
command: 'bun start --port 4201',
url: 'http://localhost:4201',
reuseExistingServer: !process.env['CI'],
},
Expand Down
Binary file modified bun.lockb
Binary file not shown.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/config/eslint/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="../eslint.d.ts" />
/// <reference types="../eslint-types.d.ts" />

import type { FlatCompat } from '@eslint/eslintrc'
import type { FlatConfig } from '@typescript-eslint/utils/ts-eslint'
Expand Down
5 changes: 3 additions & 2 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"outputs": ["dist/**"]
},
"test:e2e": {
"dependsOn": ["^build"],
"dependsOn": ["^build", "build"],
"outputs": ["playwright-report/**", "test-results/**"],
"inputs": [
"$TURBO_DEFAULT$",
Expand Down Expand Up @@ -99,6 +99,7 @@
},
"//#lint:md": {
"inputs": ["**/*.md"]
}
},
"sync": { "cache": false }
}
}

0 comments on commit 9ff85db

Please sign in to comment.