Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
c5a76cb
Add Playwright PR smoke automation pipeline
Abhi1992002 Apr 6, 2026
b782e11
Remove redundant Playwright seeded user pool setup
Abhi1992002 Apr 6, 2026
189d86d
Add 16 happy-path smoke tests
Abhi1992002 Apr 6, 2026
9710f4a
Convert smoke suite to PR E2E happy paths
Abhi1992002 Apr 6, 2026
d9d42b8
Use deterministic marketplace agent for PR E2E
Abhi1992002 Apr 6, 2026
7ec2abf
Fix backend lint issues
Abhi1992002 Apr 6, 2026
ed476b4
Harden PR E2E happy path tests
Abhi1992002 Apr 6, 2026
d4fc0ac
feat(copilot): add Fast/Thinking mode toggle with full tool parity (#…
majdyz Apr 6, 2026
5f9873d
ci(frontend): stabilize pr e2e smoke tests
Abhi1992002 Apr 6, 2026
de20742
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 6, 2026
2688d39
fix(frontend): resolve lint and codeql issues
Abhi1992002 Apr 7, 2026
ff63e42
refactor(frontend): consolidate e2e and integration test suites
Abhi1992002 Apr 7, 2026
dad858d
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 7, 2026
033df72
fix(backend): remove unintended source changes
Abhi1992002 Apr 7, 2026
1f574e8
fix(frontend): resolve pr local type regressions
Abhi1992002 Apr 7, 2026
0581138
fix(frontend): stabilize library e2e run action
Abhi1992002 Apr 7, 2026
dc62738
fix(frontend): format library e2e helper
Abhi1992002 Apr 7, 2026
865cca6
ci(frontend): expand pr e2e coverage
Abhi1992002 Apr 7, 2026
f76ce87
fix(frontend): stabilize e2e happy paths
Abhi1992002 Apr 7, 2026
4a0c378
fix(frontend): stabilize remaining e2e cases
Abhi1992002 Apr 7, 2026
69fa573
fix(frontend): add library agent page e2e coverage
Abhi1992002 Apr 7, 2026
b59a9dc
fix(frontend): stabilize e2e happy paths
Abhi1992002 Apr 7, 2026
15c0839
ci(frontend): set playwright workers to 6
Abhi1992002 Apr 7, 2026
8d711c7
merge: resolve conflicts with dev
Abhi1992002 Apr 7, 2026
a77b61d
fix(frontend): restore useDeleteWorkspaceFile import and prettier for…
Abhi1992002 Apr 7, 2026
c8dc1c4
fix(frontend): drop flaky e2e schedule test and brittle marketplace t…
Abhi1992002 Apr 7, 2026
edf79c5
test(frontend): refactor e2e happy paths into page objects
Abhi1992002 Apr 9, 2026
5f3d5b8
fix(frontend): stabilize playwright smoke suite
Abhi1992002 Apr 9, 2026
2493fde
fix(platform): address e2e review follow-ups
Abhi1992002 Apr 9, 2026
ac47ffb
fix(frontend): harden playwright helper URLs
Abhi1992002 Apr 9, 2026
188fe7d
fix(frontend): pin marketplace smoke agent
Abhi1992002 Apr 9, 2026
dab71d1
fix(frontend): wait for wallet popover state
Abhi1992002 Apr 9, 2026
eab2780
fix(tests): enhance API key creation and import agent workflows with …
Abhi1992002 Apr 9, 2026
fa9e8c5
fix(frontend): revert non-test schedule modal edits
Abhi1992002 Apr 9, 2026
6b166a9
test(frontend): strengthen release e2e checklist assertions
Abhi1992002 Apr 9, 2026
f639d7a
test(frontend): extend release coverage for library and profile flows
Abhi1992002 Apr 9, 2026
ad83b5e
fix(frontend): stabilize seeded e2e auth user selection
Abhi1992002 Apr 9, 2026
471ace3
fix(frontend): repair library e2e graph typing
Abhi1992002 Apr 9, 2026
d9e7330
fix(frontend): avoid busy polling library run status
Abhi1992002 Apr 9, 2026
ef0715c
fix(platform): stabilize marketplace e2e run flow
Abhi1992002 Apr 9, 2026
e23e94b
fix(frontend): address PR review feedback
Abhi1992002 Apr 13, 2026
8ed7af8
fix(platform): stabilize marketplace calculator smoke flow
Abhi1992002 Apr 13, 2026
7226320
fix(backend): merge dev and fix lint
Abhi1992002 Apr 13, 2026
7d197ea
fix(backend): format platform cost tests
Abhi1992002 Apr 13, 2026
bd3bd72
fix(frontend): drop hardcoded auth storage origin
Abhi1992002 Apr 13, 2026
33e99ad
fix(frontend): restore marketplace image components
Abhi1992002 Apr 13, 2026
16ed3f4
fix(frontend/marketplace): stabilize marketplace run smoke test
Abhi1992002 Apr 13, 2026
1a29bd9
fix(frontend): unflake playwright marketplace and library flows
Abhi1992002 Apr 13, 2026
7e8998a
fix(frontend): stabilize playwright output and schedule waits
Abhi1992002 Apr 13, 2026
9a9acb9
fix(platform): stabilize playwright marketplace and schedule flows
Abhi1992002 Apr 13, 2026
c139077
fix(frontend): distinguish missing schedule listener from post failure
Abhi1992002 Apr 13, 2026
147291c
fix(backend): reassign seeded marketplace graph ids
Abhi1992002 Apr 13, 2026
7c9d72f
fix(frontend): stabilize and speed up playwright smoke suite
Abhi1992002 Apr 13, 2026
4c0c5e5
fix(frontend): simplify flaky playwright smoke flows
Abhi1992002 Apr 13, 2026
b941524
fix(frontend): stabilize flaky playwright auth and library flows
Abhi1992002 Apr 13, 2026
45ccf1d
fix(platform): stabilize scheduler and export e2e flow
Abhi1992002 Apr 13, 2026
5c709d0
fix(platform): skip scheduler startup backfill in e2e
Abhi1992002 Apr 13, 2026
790672f
fix(frontend): stabilize library and builder e2e flows
Abhi1992002 Apr 13, 2026
2f52e04
fix(frontend): format playwright library helpers
Abhi1992002 Apr 13, 2026
58a7ffb
fix(frontend): address library e2e review feedback
Abhi1992002 Apr 13, 2026
d968124
fix(backend): revert scheduler startup backfill gate
Abhi1992002 Apr 13, 2026
ed79fac
fix(frontend): stabilize export e2e flow
Abhi1992002 Apr 13, 2026
387a76b
ci(platform): wait for scheduler before e2e
Abhi1992002 Apr 13, 2026
5bbbde6
ci(platform): wait for scheduler via container health
Abhi1992002 Apr 13, 2026
e1385ca
ci(platform): remove scheduler readiness check
Abhi1992002 Apr 13, 2026
51880c1
dx(frontend): trim and stabilize e2e smoke suite
Abhi1992002 Apr 13, 2026
36d1585
Revert "dx(frontend): trim and stabilize e2e smoke suite"
Abhi1992002 Apr 13, 2026
07cab22
fix(platform): remove scheduler smoke test and reuse seeded listing
Abhi1992002 Apr 13, 2026
dd99112
fix(frontend): harden flaky e2e selectors
Abhi1992002 Apr 13, 2026
cb30f6a
fix(frontend): tolerate schedule fetch failures in library e2e
Abhi1992002 Apr 13, 2026
441f7bb
fix(frontend): restore schedule stale tracking
Abhi1992002 Apr 13, 2026
43c7587
fix(frontend): increase waitForExportActionSurface timeout to 30s
Abhi1992002 Apr 13, 2026
c11154f
fix(frontend): simplify flaky export test to wait directly for button
Abhi1992002 Apr 14, 2026
e395825
fix(frontend): revert useSidebarRunsList changes to match dev
Abhi1992002 Apr 14, 2026
b47915a
fix(frontend): simplify flaky export test to wait directly for button
Abhi1992002 Apr 14, 2026
7d9ae07
fix(frontend): remove flaky export agent e2e test
Abhi1992002 Apr 14, 2026
4de08ee
fix(frontend): format builder-happy-path.spec.ts with prettier
Abhi1992002 Apr 14, 2026
244142a
fix(frontend): remove brittle agent name assertion from marketplace e2e
Abhi1992002 Apr 14, 2026
f439eb1
fix(frontend): use search flow for marketplace e2e instead of hardcod…
Abhi1992002 Apr 14, 2026
596e937
fix(frontend): search for agent in library after marketplace add
Abhi1992002 Apr 14, 2026
ab54448
fix(platform): fix flaky marketplace e2e search and calculator graph …
Abhi1992002 Apr 14, 2026
a93a9e3
fix(backend): format e2e_test_data.py with black
Abhi1992002 Apr 14, 2026
c137fe1
fix(frontend): use visible selector for marketplace e2e store-card lo…
Abhi1992002 Apr 14, 2026
3e000d4
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 14, 2026
4ce7d77
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 14, 2026
964a69f
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 14, 2026
936bb46
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 14, 2026
7222b6b
fix(platform): make graph seeding idempotent and address PR review fe…
Abhi1992002 Apr 14, 2026
312fe44
Merge branch 'abhimanyuyadav/secrt-2184-automated-qa-testing-pipeline…
Abhi1992002 Apr 14, 2026
514967a
ci(platform): make backend codecov check informational
Abhi1992002 Apr 14, 2026
7466f86
Revert "ci(platform): make backend codecov check informational"
Abhi1992002 Apr 14, 2026
473fec1
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 14, 2026
12110c7
Merge branch 'dev' into abhimanyuyadav/secrt-2184-automated-qa-testin…
Abhi1992002 Apr 14, 2026
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
88 changes: 86 additions & 2 deletions .github/workflows/platform-fullstack-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,103 @@ jobs:
- name: Set up tests - Install browser 'chromium'
run: pnpm playwright install --with-deps chromium

- name: Select Playwright suite
id: playwright-suite
run: |
if [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "merge_group" ]]; then
echo "command=pnpm test:smoke:no-build" >> "$GITHUB_OUTPUT"
echo "mode=smoke" >> "$GITHUB_OUTPUT"
else
echo "command=pnpm test:no-build" >> "$GITHUB_OUTPUT"
echo "mode=full" >> "$GITHUB_OUTPUT"
fi

- name: Run Playwright tests
run: pnpm test:no-build
run: ${{ steps.playwright-suite.outputs.command }}
continue-on-error: false

- name: Upload E2E coverage to Codecov
if: ${{ !cancelled() }}
if: ${{ !cancelled() && steps.playwright-suite.outputs.mode == 'full' }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: platform-frontend-e2e
files: ./autogpt_platform/frontend/coverage/e2e/cobertura-coverage.xml
disable_search: true

- name: Build Playwright smoke summary
if: always() && steps.playwright-suite.outputs.mode == 'smoke'
run: |
if [[ -f test-results/smoke-report.json ]]; then
pnpm test:smoke:summary
else
echo "Smoke report not found; skipping smoke summary generation."
fi

- name: Upload Playwright smoke summary
if: always() && steps.playwright-suite.outputs.mode == 'smoke'
uses: actions/upload-artifact@v4
with:
name: playwright-smoke-summary
path: |
autogpt_platform/frontend/test-results/smoke-summary.json
autogpt_platform/frontend/test-results/smoke-summary.md
if-no-files-found: ignore
retention-days: 3

- name: Comment Playwright smoke summary on PR
if: always() && github.event_name == 'pull_request'
uses: actions/github-script@v8
with:
script: |
const fs = require("fs");
const path = require("path");

const summaryPath = path.join(
process.cwd(),
"autogpt_platform/frontend/test-results/smoke-summary.md",
);

if (!fs.existsSync(summaryPath)) {
core.info("No smoke summary found; skipping PR comment.");
return;
}

const marker = "<!-- playwright-pr-smoke -->";
const body = `${marker}\n${fs.readFileSync(summaryPath, "utf8")}`;
const issue_number = context.issue.number;
const { owner, repo } = context.repo;

const comments = await github.paginate(github.rest.issues.listComments, {
owner,
repo,
issue_number,
});

const existingComment = comments.find(
(comment) =>
comment.user?.type === "Bot" &&
comment.body?.includes(marker),
);

if (existingComment) {
await github.rest.issues.updateComment({
owner,
repo,
comment_id: existingComment.id,
body,
});
core.info(`Updated Playwright smoke summary comment ${existingComment.id}.`);
} else {
await github.rest.issues.createComment({
owner,
repo,
issue_number,
body,
});
core.info("Created Playwright smoke summary comment.");
}

- name: Upload Playwright report
if: always()
uses: actions/upload-artifact@v4
Expand Down
16 changes: 13 additions & 3 deletions autogpt_platform/backend/test/e2e_test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@
GUARANTEED_FEATURED_AGENTS = 8
GUARANTEED_FEATURED_CREATORS = 5
GUARANTEED_TOP_AGENTS = 10
SEEDED_TEST_EMAILS = [
"test123@gmail.com",
"e2e.qa.auth@example.com",
"e2e.qa.builder@example.com",
"e2e.qa.library@example.com",
"e2e.qa.marketplace@example.com",
"e2e.qa.settings@example.com",
"e2e.qa.parallel.a@example.com",
"e2e.qa.parallel.b@example.com",
]


def get_image():
Expand Down Expand Up @@ -123,9 +133,9 @@ async def create_test_users(self) -> List[Dict[str, Any]]:
for i in range(NUM_USERS):
try:
# Generate test user data
if i == 0:
# First user should have test123@gmail.com email for testing
email = "test123@gmail.com"
if i < len(SEEDED_TEST_EMAILS):
# Keep a deterministic pool for Playwright global setup and PR smoke flows
email = SEEDED_TEST_EMAILS[i]
else:
email = faker.unique.email()
password = "testpassword123" # Standard test password # pragma: allowlist secret # noqa
Comment thread
Abhi1992002 marked this conversation as resolved.
Expand Down
33 changes: 16 additions & 17 deletions autogpt_platform/frontend/TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,35 @@
1. Start the backend + Supabase stack:
- From `autogpt_platform`: `docker compose --profile local up deps_backend -d`
- Or run the full stack: `docker compose up -d`
2. Seed rich E2E data (creates `test123@gmail.com` with library agents):
2. Seed deterministic E2E data (creates the shared Playwright QA accounts and library agents):
- From `autogpt_platform/backend`: `poetry run python test/e2e_test_data.py`
3. Run Playwright:
- From `autogpt_platform/frontend`: `pnpm test` or `pnpm test-ui`
- PR smoke suite only: `pnpm test:smoke` or `pnpm test:smoke:no-build`

## How Playwright setup works 🎭

- Playwright runs from `frontend/playwright.config.ts` with a global setup step.
- The global setup creates a user pool via the real signup UI and stores it in `frontend/.auth/user-pool.json`.
- Most tests call `getTestUser()` (from `src/tests/utils/auth.ts`) which pulls a random user from that pool.
- these users do not contain library agents, it's user that just "signed up" on the platform, hence some tests to make use of users created via script (see below) with more data
- It also logs in a small set of smoke-test accounts once and stores reusable auth states in `frontend/.auth/states`.
- Most tests call `getTestUser()` (from `src/tests/utils/auth.ts`) which pulls directly from the deterministic seeded account list.
- PR smoke tests use dedicated storage states so they skip repeated login and stay parallel without colliding.

## Test users 👤

- **User pool (basic users)**
Created automatically by the Playwright global setup through `/signup`.
Used by `getTestUser()` in `src/tests/utils/auth.ts`.

- **Rich user with library agents**
- **Deterministic seeded QA accounts**
Created by `backend/test/e2e_test_data.py`.
Accessed via `getTestUserWithLibraryAgents()` in `src/tests/credentials/index.ts`.
Used by `getTestUser()` in `src/tests/utils/auth.ts`.

Use the rich user when a test needs existing library agents (e.g. `library.spec.ts`).
- **Reusable smoke-test auth states**
Generated by Playwright global setup from seeded accounts defined in `src/tests/credentials/accounts.ts`.
Used by the `src/tests/smoke/*.spec.ts` PR-gating flows.

## Resetting or wiping the DB 🔁

If you reset the Docker DB and logins start failing:

1. Delete `frontend/.auth/user-pool.json` so the pool is regenerated.
2. Re-run the E2E data script to recreate the rich user + library agents:
1. Delete `frontend/.auth/states` so the stored auth states are regenerated.
2. Re-run the E2E data script to recreate the seeded QA users + library agents:
- `poetry run python test/e2e_test_data.py`

## Storybook 📚
Expand All @@ -45,10 +44,10 @@ If you reset the Docker DB and logins start failing:
flowchart TD
A[Start Docker stack] --> B[Run e2e_test_data.py]
B --> C[Run Playwright tests]
C --> D[Global setup creates user pool]
D --> E{Test needs rich data?}
E -->|No| F[getTestUser from user pool]
E -->|Yes| G[getTestUserWithLibraryAgents]
C --> D[Global setup generates smoke auth states]
D --> E{PR smoke or broader E2E?}
E -->|Smoke| F[Use dedicated storageState per flow]
E -->|Broader E2E| G[getTestUser from seeded account list]
```

- `pnpm storybook` – Run Storybook locally
Expand Down
3 changes: 3 additions & 0 deletions autogpt_platform/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
"test:unit": "vitest run --coverage",
"test:unit:watch": "vitest",
"test:no-build": "playwright test",
"test:smoke": "NEXT_PUBLIC_PW_TEST=true next build --turbo && cross-env PLAYWRIGHT_SUITE=smoke PLAYWRIGHT_JSON_OUTPUT_FILE=test-results/smoke-report.json playwright test --grep @smoke",
"test:smoke:no-build": "cross-env PLAYWRIGHT_SUITE=smoke PLAYWRIGHT_JSON_OUTPUT_FILE=test-results/smoke-report.json playwright test --grep @smoke",
"test:smoke:summary": "node ./scripts/playwright-smoke-summary.mjs",
"gentests": "playwright codegen http://localhost:3000",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down
38 changes: 15 additions & 23 deletions autogpt_platform/frontend/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ import { defineConfig, devices } from "@playwright/test";
import dotenv from "dotenv";
import fs from "fs";
import path from "path";
import { buildCookieConsentStorageState } from "./src/tests/credentials/storage-state";
dotenv.config({ path: path.resolve(__dirname, ".env") });
dotenv.config({ path: path.resolve(__dirname, "../backend/.env") });

const frontendRoot = __dirname.replaceAll("\\", "/");
const baseURL = process.env.PLAYWRIGHT_BASE_URL ?? "http://localhost:3000";
const jsonReporterOutputFile = process.env.PLAYWRIGHT_JSON_OUTPUT_FILE;

// Directory where CI copies .next/static from the Docker container
const staticCoverageDir = path.resolve(__dirname, ".next-static-coverage");
Expand Down Expand Up @@ -65,9 +68,13 @@ export default defineConfig({
/* 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 ? 1 : 0,
retries: process.env.CI ? Number(process.env.PLAYWRIGHT_RETRIES ?? 2) : 0,
Comment thread
Abhi1992002 marked this conversation as resolved.
/* use more workers on CI. */
workers: process.env.CI ? 4 : undefined,
workers: process.env.CI
? process.env.PLAYWRIGHT_SUITE === "smoke"
? 6
: 4
: undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: [
["list"],
Expand All @@ -92,11 +99,14 @@ export default defineConfig({
},
},
],
...(jsonReporterOutputFile
? [["json", { outputFile: jsonReporterOutputFile }] as const]
: []),
],
/* 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('/')`. */
baseURL: "http://localhost:3000/",
baseURL: `${baseURL}/`,

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
screenshot: "only-on-failure",
Expand All @@ -107,33 +117,15 @@ export default defineConfig({
video: "retain-on-failure",

/* Auto-accept cookies in all tests to prevent banner interference */
storageState: {
cookies: [],
origins: [
{
origin: "http://localhost:3000",
localStorage: [
{
name: "autogpt_cookie_consent",
value: JSON.stringify({
hasConsented: true,
timestamp: Date.now(),
analytics: true,
monitoring: true,
}),
},
],
},
],
},
storageState: buildCookieConsentStorageState(baseURL),
},
/* Maximum time one test can run for */
timeout: 25000,

/* Configure web server to start automatically (local dev only) */
webServer: {
command: "pnpm start",
url: "http://localhost:3000",
url: baseURL,
reuseExistingServer: true,
},

Expand Down
Loading
Loading