Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 3 additions & 2 deletions apps/workplace/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ export default defineConfig({
// No HMR: every compiled component otherwise imports
// /@ng/component?c=…&t=… at load (96 of the 159 asset requests on each
// browser-only meeting page), which those specs proxy through route.fetch, and
// the app never receives HMR updates here anyway.
command: `bunx nx serve workplace --port=${PORT} --hmr=false`,
// the app never receives HMR updates here anyway. The `e2e`
// configuration turns Sentry off (settings.e2e.ts).
command: `bunx nx serve workplace --configuration=e2e --port=${PORT} --hmr=false`,
url: APP_URL,
reuseExistingServer: !CI,
cwd: workspaceRoot,
Expand Down
11 changes: 11 additions & 0 deletions apps/workplace/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@
"browser": "apps/workplace/src/main.ts"
},
"configurations": {
"e2e": {
"fileReplacements": [
{
"replace": "libs/common/src/lib/settings.ts",
"with": "apps/workplace/src/environments/settings.e2e.ts"
}
]
},
"staging": {
"optimization": true,
"fileReplacements": [
Expand Down Expand Up @@ -157,6 +165,9 @@
"buildTarget": "workplace:build"
},
"configurations": {
"e2e": {
"buildTarget": "workplace:build:e2e"
},
"production": {
"buildTarget": "workplace:build:production"
}
Expand Down
10 changes: 10 additions & 0 deletions apps/workplace/src/environments/settings.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { DEFAULT_SETTINGS as WORKPLACE_SETTINGS } from './settings';

/**
* Workplace build-time settings for the `e2e` build configuration, which
* Playwright serves. Sentry is off, so the app sends nothing to Sentry.
*/
export const DEFAULT_SETTINGS: any = {
...WORKPLACE_SETTINGS,
app: { ...WORKPLACE_SETTINGS.app, sentry_dsn: '' },
};
6 changes: 4 additions & 2 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ bunx playwright test --config apps/workplace/playwright.config.ts --ui
`local` and `settings` depend on `preflight`, which checks the stack is up. Add
`--no-deps` to skip it.

Playwright starts the Angular dev server itself (`nx serve workplace --port=4214`)
and points its API proxy at the stack. Nothing reaches the network.
Playwright starts the Angular dev server itself
(`nx serve workplace --configuration=e2e --port=4214`) and points its API proxy
at the stack. The `e2e` configuration turns Sentry off, so nothing reaches the
network.

If a run dies with "Executable doesn't exist", the workspace's pinned Playwright
needs its browser: `bunx playwright install chromium`.
Expand Down
Loading