diff --git a/site/e2e/README.md b/site/e2e/README.md index 72ef360335439..76af72b17d182 100644 --- a/site/e2e/README.md +++ b/site/e2e/README.md @@ -41,6 +41,15 @@ pnpm build pnpm playwright:test ``` +To run the playwright debugger from VSCode, just launch VSCode from the nix +environment and have the extension installed. + +```shell +# Optionally add '--command zsh' to choose your shell. +nix develop +code . +``` + # Enterprise tests Enterprise tests require a license key to run. diff --git a/site/e2e/reporter.ts b/site/e2e/reporter.ts index f981dede78e66..466bc564d238a 100644 --- a/site/e2e/reporter.ts +++ b/site/e2e/reporter.ts @@ -133,7 +133,14 @@ class CoderReporter implements Reporter { } } -const logLines = (chunk: string): string[] => chunk.trimEnd().split("\n"); +const logLines = (chunk: string | Buffer): string[] => { + if (chunk instanceof Buffer) { + // When running in a debugger, the input to this is a Buffer instead of a string. + // Unsure why, but this prevents the `trimEnd` from throwing an error. + return [chunk.toString()]; + } + return chunk.trimEnd().split("\n"); +}; const exportDebugPprof = async (outputFile: string) => { const response = await axiosInstance.get(