Skip to content
Open
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
1 change: 0 additions & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"zod": "catalog:"
},
"devDependencies": {
"@argos-ci/playwright": "catalog:",
"@playwright/test": "catalog:",
"@tailwindcss/postcss": "catalog:",
"@types/mdast": "^4.0.4",
Expand Down
25 changes: 1 addition & 24 deletions apps/docs/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
import { defineConfig, devices } from "@playwright/test";
import { createArgosReporterOptions } from "@argos-ci/playwright/reporter";

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.ARGOS_TOKEN
? [
// Use "dot" reporter on CI, "list" otherwise (Playwright default).
process.env.CI ? ["dot"] : ["list"],
// Add Argos reporter.
[
"@argos-ci/playwright/reporter",
createArgosReporterOptions({
// Upload to Argos on CI only.
uploadToArgos: !!process.env.CI,
token: process.env.ARGOS_TOKEN,
}),
],
]
: [
// Use "dot" reporter on CI, "list" otherwise (Playwright default).
process.env.CI ? ["dot"] : ["list"],
],
reporter: process.env.CI ? [["dot"]] : [["list"]],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove stale ARGOS_TOKEN from CI test jobs.

Line 12 removes Argos reporter/token usage, but the Playwright workflows still inject ARGOS_TOKEN (for Docs and Eclipse). Keeping an unused secret in test job env broadens secret exposure and leaves the Argos cleanup incomplete; please remove it from .github/workflows/docs-test.yml and .github/workflows/eclipse-test.yml.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/playwright.config.ts` at line 12, The Playwright configuration in
playwright.config.ts has been updated to remove Argos reporter usage, but the
GitHub Actions workflows still inject the ARGOS_TOKEN environment variable.
Remove the ARGOS_TOKEN environment variable injection from both
`.github/workflows/docs-test.yml` and `.github/workflows/eclipse-test.yml` to
complete the Argos cleanup and avoid unnecessarily exposing secrets in test
jobs.

/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down
5 changes: 2 additions & 3 deletions apps/docs/tests/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { test } from "@playwright/test";
import { argosScreenshot } from "@argos-ci/playwright";
import { test, expect } from "@playwright/test";

test("screenshot homepage", async ({ page }) => {
await page.goto("/");
await argosScreenshot(page, "homepage");
await expect(page).toHaveScreenshot("homepage.png");
});
1 change: 0 additions & 1 deletion apps/eclipse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
"zod": "catalog:"
},
"devDependencies": {
"@argos-ci/playwright": "catalog:",
"@playwright/test": "catalog:",
"@tailwindcss/postcss": "catalog:",
"@types/mdx": "catalog:",
Expand Down
25 changes: 1 addition & 24 deletions apps/eclipse/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
import { defineConfig, devices } from "@playwright/test";
import { createArgosReporterOptions } from "@argos-ci/playwright/reporter";

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: "./tests",
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: process.env.ARGOS_TOKEN
? [
// Use "dot" reporter on CI, "list" otherwise (Playwright default).
process.env.CI ? ["dot"] : ["list"],
// Add Argos reporter.
[
"@argos-ci/playwright/reporter",
createArgosReporterOptions({
// Upload to Argos on CI only.
uploadToArgos: !!process.env.CI,
token: process.env.ARGOS_TOKEN,
}),
],
]
: [
// Use "dot" reporter on CI, "list" otherwise (Playwright default).
process.env.CI ? ["dot"] : ["list"],
],
reporter: process.env.CI ? [["dot"]] : [["list"]],
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('/')`. */
Expand Down
5 changes: 2 additions & 3 deletions apps/eclipse/tests/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { test } from "@playwright/test";
import { argosScreenshot } from "@argos-ci/playwright";
import { test, expect } from "@playwright/test";

test("screenshot homepage", async ({ page }) => {
await page.goto("/");
await argosScreenshot(page, "homepage");
await expect(page).toHaveScreenshot("homepage.png");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

for p in \
  "apps/eclipse/tests/example.spec.ts-snapshots/homepage-chromium-linux.png" \
  "apps/docs/tests/example.spec.ts-snapshots/homepage-chromium-linux.png"
do
  if [ -f "$p" ]; then
    echo "FOUND: $p"
  else
    echo "MISSING: $p"
  fi
done

echo "--- tracked snapshot files ---"
git ls-files 'apps/*/tests/*.spec.ts-snapshots/*' || true

Repository: prisma/web

Length of output: 246


🏁 Script executed:

# Verify the test file exists and check its content
if [ -f "apps/eclipse/tests/example.spec.ts" ]; then
  echo "=== Test file content ==="
  cat -n "apps/eclipse/tests/example.spec.ts"
else
  echo "Test file not found"
fi

Repository: prisma/web

Length of output: 305


🏁 Script executed:

# Check for any snapshot files that might exist
echo "=== Checking for any existing snapshot files ==="
find apps/eclipse/tests -name "*snapshot*" -o -name "*.png" 2>/dev/null || echo "No snapshot files found"

# Also check the exact directory structure
echo "=== Directory structure under apps/eclipse/tests ==="
find apps/eclipse/tests -type f 2>/dev/null | head -20

Repository: prisma/web

Length of output: 191


🏁 Script executed:

# Verify Playwright configuration and snapshot expectations
echo "=== Checking Playwright config ==="
find . -maxdepth 3 -name "playwright.config.*" -o -name "playwright.json" 2>/dev/null | xargs cat 2>/dev/null || echo "No Playwright config found"

Repository: prisma/web

Length of output: 2481


🏁 Script executed:

# Check if docs test file exists with same assertion
if [ -f "apps/docs/tests/example.spec.ts" ]; then
  echo "=== Docs test file found ==="
  cat -n "apps/docs/tests/example.spec.ts"
else
  echo "Docs test file not found at apps/docs/tests/example.spec.ts"
fi

Repository: prisma/web

Length of output: 308


Add and commit Playwright baseline snapshot(s) for the new assertion.

The test at line 5 uses toHaveScreenshot("homepage.png") which requires a baseline snapshot to be tracked in the repository. Without the committed baseline, the test will fail in CI. Both the Eclipse and Docs tests have this same requirement.

To fix this, generate the snapshot locally by running the test (which will create the baseline), then commit the resulting snapshot files. Playwright will automatically name them following the pattern homepage-chromium.png or similar depending on your test environment.

Expected snapshot locations:

  • apps/eclipse/tests/example.spec.ts-snapshots/
  • apps/docs/tests/example.spec.ts-snapshots/
🧰 Tools
🪛 GitHub Actions: Eclipse Tests / 0_Playwright Tests (Eclipse).txt

[error] 5-5: Playwright screenshot assertion failed (toHaveScreenshot). A snapshot doesn't exist at /home/runner/work/web/web/apps/eclipse/tests/example.spec.ts-snapshots/homepage-chromium-linux.png; writing actual. Expected tests/example.spec.ts-snapshots/homepage-chromium-linux.png, received test-results/example-screenshot-homepage-chromium/homepage-actual.png.

🪛 GitHub Actions: Eclipse Tests / Playwright Tests (Eclipse)

[error] 5-6: Playwright screenshot assertion failed (toHaveScreenshot). Snapshot does not exist at /home/runner/work/web/web/apps/eclipse/tests/example.spec.ts-snapshots/homepage-chromium-linux.png; Playwright wrote the actual screenshot to test-results/example-screenshot-homepage-chromium/homepage-actual.png.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/eclipse/tests/example.spec.ts` at line 5, The test uses
toHaveScreenshot("homepage.png") which requires baseline snapshot files to be
committed to the repository for CI to pass. Generate the baseline snapshots
locally by running the test in the Eclipse and Docs test suites, which will
create snapshot files in the directories
apps/eclipse/tests/example.spec.ts-snapshots/ and
apps/docs/tests/example.spec.ts-snapshots/ following the pattern
homepage-chromium.png or similar based on your environment, then commit these
generated snapshot files to the repository.

Source: Pipeline failures

});
171 changes: 29 additions & 142 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ packages:
- "packages/*"

catalog:
"@argos-ci/playwright": "^6.4.1"
"@base-ui/react": "^1.2.0"
"@fumadocs/base-ui": "16.6.3"
"@fumadocs/cli": "^1.2.5"
Expand Down
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"inputs": ["$TURBO_DEFAULT$", ".env"],
"outputs": [".next/**", "!.next/cache/**", "cache/**", "dist/**"],
"env": [
"ARGOS_TOKEN",
"MIXEDBREAD_API_KEY",
"SENTRY_AUTH_TOKEN",
"ENABLE_DOCS_SUBDOMAIN_PROXY"
Expand Down
Loading