AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
TypeScript ai-agentai-agent-toolsai-agentsai-agents-frameworkmcpmcp-servermcp-toolsmcpsn8n-alternativeno-code-automationworkflowworkflow-automationworkflows
test(e2e): one state-independent flow journey from creation to run history (#16939)
Othman Abu Ajamieh280f6bb396f1
diff --git a/.github/workflows/continuous-delivery-stg.yml b/.github/workflows/continuous-delivery-stg.ymlindex 65e5baf199e..655a764b718 100644--- a/.github/workflows/continuous-delivery-stg.yml+++ b/.github/workflows/continuous-delivery-stg.yml@@ -157,7 +157,7 @@ jobs:# Runs the Playwright suite against staging once both deploys finish. The job's# check run on the commit SHA is the result the candidate cut reads.# Report-only for now (continue-on-error): it never fails the workflow.- # Global setup deletes every flow of the E2E account, so the account must hold nothing else.+ # Each spec deletes the flows it creates; global setup deletes only `E2E `-prefixed flows older than an hour.e2e-staging:needs: [deploy-staging-app, deploy-staging-workers]if: always() && needs.deploy-staging-app.result == 'success' && needs.deploy-staging-workers.result == 'success'diff --git a/.github/workflows/e2e-matrix.yml b/.github/workflows/e2e-matrix.ymlindex 6a25ae1f21c..7cb27cdc72f 100644--- a/.github/workflows/e2e-matrix.yml+++ b/.github/workflows/e2e-matrix.yml@@ -215,7 +215,7 @@ jobs:- name: Show app and worker logs on failureif: failure()- run: docker compose logs --tail=200 app worker+ run: docker compose logs --tail=2000 app worker# The stack lives only for this job, so traces hold no real credentials.- name: Upload test resultsdiff --git a/.gitignore b/.gitignoreindex 6f1fe35f4d2..838bb9b545e 100644--- a/.gitignore+++ b/.gitignore@@ -98,6 +98,9 @@ scratch.md/playwright-report//blob-report//playwright/.cache/+/packages/tests-e2e/.auth/+/packages/tests-e2e/test-results/+/packages/tests-e2e/playwright-report//redis-binaries/# Terraformdiff --git a/brain/knowledge/engineering/e2e-tests-and-monitors.md b/brain/knowledge/engineering/e2e-tests-and-monitors.mdindex cb8e81a1188..dcdff76848d 100644--- a/brain/knowledge/engineering/e2e-tests-and-monitors.md+++ b/brain/knowledge/engineering/e2e-tests-and-monitors.md@@ -6,7 +6,7 @@ icon: 🎭One Playwright suite in `packages/tests-e2e` feeds three consumers that fail independently: CI on a fresh throwaway instance, Checkly monitors against **production Cloud**, and a single BetterStack monitor. A change that only breaks one of them looks green everywhere else, so it is worth knowing which reads what.-**Local / CI suite** — `playwright.config.ts`, `testMatch: **/*.spec.ts`, split by `AP_EDITION` into `scenarios/ce` and `scenarios/ee`. Boots the whole stack itself via the `webServer` block.+**Local / CI suite** — `playwright.config.ts` runs every `scenarios/**/*.spec.ts`; `AP_EDITION=ce` skips `scenarios/ee`. Boots the whole stack itself via the `webServer` block unless `E2E_INSTANCE_URL` is set. Global setup signs in once and saves the session to `.auth/user.json`, so specs start signed in.**Checkly monitors** — `checkly.config.ts` picks up the *same* `**/scenarios/**/*.spec.ts` files and runs them every 10 minutes with `baseURL: https://cloud.activepieces.com`, signing in with `E2E_EMAIL` / `E2E_PASSWORD`.**BetterStack monitor** — one standalone file, `scenarios/betterstack/*.flat.spec.js`.@@ -23,11 +23,15 @@ One Playwright suite in `packages/tests-e2e` feeds three consumers that fail ind- **CE sign-up is invitation-only once a platform exists** (`INVITATION_ONLY_SIGN_UP`), so the suite's sign-up path only works on a genuinely fresh instance. Against a dev-seeded database, set `E2E_EMAIL` / `E2E_PASSWORD` instead — `global-setup.ts` prefers them and signs in rather than signing up.- **Every workspace declares its own deps.** `@faker-js/faker` was imported by the page objects for months while only `server/api` declared it; under Bun's isolated linker that means the suite cannot import its own page objects at all.- **`npx playwright test` can resolve a globally installed Playwright** instead of the repo's, and the two copies fail with `Playwright Test did not expect test.describe() to be called here` on *every* spec, including ones that have not been touched. The message points at your file and the cause is elsewhere. Run `./node_modules/.bin/playwright test --config=packages/tests-e2e/playwright.config.ts` instead.-- **`BuilderPage.addAction` assumes the action name renders twice** (`getByText(action).nth(1)`). For a piece whose action title appears once in the picker there is no second match, so the step hangs until the test times out with no hint that the selector is the problem. `selectInitialTrigger` has the same shape, and it also types the *trigger* name into the *piece* search box, which only works when that search happens to surface triggers.+- **Specs own their data.** Each flow a spec makes is named `E2E …` and deleted by the `flowCleanup` fixture, also on failure; global setup only sweeps `E2E ` flows older than an hour. The old setup deleted every flow, which put staging in the empty state on every run and once wiped a shared account.+- **Automations renders "Create New" while it loads, then may swap to the empty state.** Clicking it during the load opens a menu that disappears. `AutomationsPage.createFlow` waits for `automations-loading` to detach before it picks an entry.+- **"Test Flow" does not flush pending edits.** Step edits save through a 1 s debounce, and a test run started inside that window runs the old draft. The page object waits for the `POST /api/v1/flows/<id>` save after each edit; Publish flushes on its own.+- **Playwright sees every button in the builder breadcrumb as disabled.** `BreadcrumbPage` renders `role="link" aria-disabled="true"`, which Playwright inherits, so the flow menu button never clicks. Click the flow name text to rename instead.+- **Checkly runs no global setup.** It matches the same `*.spec.ts` files, so a spec that relies on the saved session fails there.- **A spec that needs a live third-party connection cannot live in `scenarios/`.** Checkly and CI both pick up every `*.spec.ts` there, and neither has the connection, so it fails for everyone but its author. Keep piece-connection specs outside the repo and pin the regression in the piece's own unit tests instead.## Key files-- `packages/tests-e2e` — `playwright.config.ts` (local/CI), `checkly.config.ts` (Cloud monitors), `global-setup.ts` (provisions or signs in the seed account), `pages/` (shared page objects), `scenarios/betterstack/` (the standalone monitor script)+- `packages/tests-e2e` — `playwright.config.ts` (local/CI), `checkly.config.ts` (Cloud monitors), `global-setup.ts` (signs in or signs up, saves the session, sweeps stale `E2E ` flows), `fixtures/` (`flowCleanup`, `e2eFlows`), `pages/` (shared page objects), `scenarios/betterstack/` (the standalone monitor script)- `.github/workflows/e2e-matrix.yml` — the only E2E suite that gates a release: the built image in four CE/EE configurations- `.github/workflows/e2e.yml` — the `ready-for-e2e` label trigger for that matrix- `.github/workflows/sync-betterstack-playwright.yml` — the push-to-`main` uploaddiff --git a/packages/tests-e2e/README.md b/packages/tests-e2e/README.mdindex 9f94156638f..dea050077d5 100644--- a/packages/tests-e2e/README.md+++ b/packages/tests-e2e/README.md@@ -6,15 +6,26 @@ This package holds the monorepo's full-stack end-to-end tests. Under the canonic```packages/tests-e2e/-├── scenarios/-│ ├── ce/ # Community Edition specs (*.spec.ts)-│ └── ee/ # Enterprise Edition specs (*.spec.ts)-├── pages/ # Page Object Models (base.ts, flows.page.ts, builder.page.ts, ...)-├── helper/ # Config and env utilities-├── playwright.config.ts-└── project.json # Nx project config+├── scenarios/ # Specs (*.spec.ts) for every edition+│ ├── ce/ # Community Edition only+│ └── ee/ # Enterprise Edition only (skipped when AP_EDITION=ce)+├── pages/ # Page objects (automations, builder, runs, authentication)+├── fixtures/ # Test fixtures, the session file and API cleanup helpers+├── global-setup.ts # Signs in once and saves the session to .auth/user.json+└── playwright.config.ts```+## Writing a spec++A spec must pass whatever the project already holds: nothing, many flows, or another run's flows.++- Create what the spec needs, and name each flow with `e2eFlows.uniqueFlowName()` (prefix `E2E `).+- Pass each flow id to `flowCleanup.track()`. The fixture deletes it after the test, also when the test fails.+- Find your data by its id or unique name, never by its position in a list.+- Wait for a visible result (a status text, a step output, a response), never for a fixed time.+- Select by role or `data-testid`. Add a `data-testid` to the web app when an element has no stable name.+- The tests start signed in. Use `test.use({ storageState: { cookies: [], origins: [] } })` to start signed out.+## Running the tests```bash@@ -32,7 +43,7 @@ npx turbo run deploy-checkly --filter=tests-e2eRequired environment variables:-- `E2E_INSTANCE_URL` — target Activepieces URL (defaults to `http://localhost:4200` and starts the dev server when unset). When set, global setup deletes every flow of the signed-in account, so use an account that exists only for E2E.+- `E2E_INSTANCE_URL` — target Activepieces URL (defaults to `http://localhost:4200` and starts the dev server when unset). Global setup deletes `E2E `-prefixed flows older than one hour, which crashed runs leave behind. It does not touch other flows.- `E2E_EMAIL` — test user email- `E2E_PASSWORD` — test user passworddiff --git a/packages/tests-e2e/fixtures/api.ts b/packages/tests-e2e/fixtures/api.tsnew file mode 100644index 00000000000..fcb79d98f36--- /dev/null+++ b/packages/tests-e2e/fixtures/api.ts@@ -0,0 +1,59 @@+import { readFileSync } from 'node:fs';+import path from 'node:path';+import type { APIRequestContext } from '@playwright/test';++function readSession(): E2eSession {+ const state: StorageState = JSON.parse(readFileSync(STORAGE_STATE, 'utf-8'));+ const entries = state.origins.flatMap((origin) => origin.localStorage);+ const token = entries.find((entry) => entry.name === 'token')?.value;+ const projectId = entries.find((entry) => entry.name === 'projectId')?.value;+ if (!token || !projectId) {+ throw new Error(`${STORAGE_STATE} holds no token or projectId: global setup did not finish signing in`);+ }+ return { token, projectId };+}++async function deleteFlow({ request, session, flowId }: { request: APIRequestContext; session: E2eSession; flowId: string }) {+ const response = await request.delete(`/api/v1/flows/${flowId}`, {+ headers: { Authorization: `Bearer ${session.token}` },+ });+ if (!response.ok() && response.status() !== 404) {+ throw new Error(`Deleting flow ${flowId} failed with ${response.status()}: ${await response.text()}`);+ }+}++async function deleteStaleFlows({ request, session }: { request: APIRequestContext; session: E2eSession }) {+ const staleFlows = await listStaleFlows({ request, session, cursor: undefined });+ for (const flow of staleFlows) {+ await deleteFlow({ request, session, flowId: flow.id });+ }+ return staleFlows.length;+}++async function listStaleFlows({ request, session, cursor }: { request: APIRequestContext; session: E2eSession; cursor: string | undefined }): Promise<FlowSummary[]> {+ const response = await request.get('/api/v1/flows', {+ headers: { Authorization: `Bearer ${session.token}` },+ params: { projectId: session.projectId, limit: 100, ...(cursor ? { cursor } : {}) },+ });+ if (!response.ok()) {+ throw new Error(`Listing flows failed with ${response.status()}: ${await response.text()}`);+ }+ const page: { data: FlowSummary[]; next: string | null } = await response.json();+ const cutoff = Date.now() - STALE_AFTER_MS;+ const stale = page.data.filter(+ (flow) => flow.version.displayName.startsWith(E2E_FLOW_PREFIX) && Date.parse(flow.created) < cutoff,+ );+ const rest = page.next ? await listStaleFlows({ request, session, cursor: page.next }) : [];+ return [...stale, ...rest];+}++const STALE_AFTER_MS = 60 * 60 * 1000;++export const STORAGE_STATE = path.join(__dirname, '..', '.auth', 'user.json');+export const E2E_FLOW_PREFIX = 'E2E ';+export const e2eApi = { readSession, deleteFlow, deleteStaleFlows };++export type E2eSession = { token: string; projectId: string };++type FlowSummary = { id: string; created: string; version: { displayName: string } };+type StorageState = { origins: { localStorage: { name: string; value: string }[] }[] };diff --git a/packages/tests-e2e/fixtures/flows.ts b/packages/tests-e2e/fixtures/flows.tsnew file mode 100644index 00000000000..e568e7c68bc--- /dev/null+++ b/packages/tests-e2e/fixtures/flows.ts@@ -0,0 +1,26 @@+import { randomInt, randomUUID } from 'node:crypto';+import { AutomationsPage, BuilderPage } from '../pages';+import { E2E_FLOW_PREFIX } from './api';++async function publishWebhookEchoFlow({ automationsPage, builderPage, flowCleanup }: {+ automationsPage: AutomationsPage;+ builderPage: BuilderPage;+ flowCleanup: { track: (flowId: string) => void };+}): Promise<{ webhookUrl: string }> {+ const flowId = await automationsPage.createFlow();+ flowCleanup.track(flowId);+ await builderPage.nameNewFlow(uniqueFlowName('echo'));+ await builderPage.selectTrigger({ piece: 'Webhook', trigger: 'Catch Webhook' });+ const webhookUrl = await builderPage.webhookUrl();+ await builderPage.testWebhookTrigger({ webhookUrl, value: randomInt(1, 1000000) });+ await builderPage.addStep({ after: 'trigger', piece: 'Webhook', action: 'Return Response' });+ await builderPage.setJsonBody(`{"value": "{{trigger['output']['queryParams']['value']}}"}`);+ await builderPage.publish();+ return { webhookUrl };+}++function uniqueFlowName(label: string) {+ return `${E2E_FLOW_PREFIX}${label} ${randomUUID().slice(0, 8)}`;+}++export const e2eFlows = { publishWebhookEchoFlow, uniqueFlowName };diff --git a/packages/tests-e2e/fixtures/index.ts b/packages/tests-e2e/fixtures/index.tsindex bc8b4026ffa..27dda9025b1 100644--- a/packages/tests-e2e/fixtures/index.ts+++ b/packages/tests-e2e/fixtures/index.ts@@ -3,42 +3,11 @@ import {AuthenticationPage,AutomationsPage,BuilderPage,+ RunsPage,} from '../pages';-import { signUp, AuthenticationResponse } from './users';-import { DEFAULT_EMAIL, DEFAULT_PASSWORD } from '../global-setup';--type CustomFixtures = {- authenticationPage: AuthenticationPage;- automationsPage: AutomationsPage;- builderPage: BuilderPage;- authenticatedPage: AuthenticationPage;- users: {- apiSignUp: () => Promise<AuthenticationResponse>;- }-};+import { e2eApi, E2eSession } from './api';export const test = base.extend<CustomFixtures>({- // Authenticate before each test, then land on the automations dashboard.- page: async ({ page }, use) => {- const authPage = new AuthenticationPage(page);-- if (process.env.E2E_EMAIL && process.env.E2E_PASSWORD) {- await authPage.signIn({- email: process.env.E2E_EMAIL,- password: process.env.E2E_PASSWORD,- });- } else {- await authPage.signIn({- email: DEFAULT_EMAIL,- password: DEFAULT_PASSWORD,- });- }-- await new AutomationsPage(page).open();-- await use(page);- },-authenticationPage: async ({ page }, use) => {await use(new AuthenticationPage(page));},@@ -51,15 +20,30 @@ export const test = base.extend<CustomFixtures>({await use(new BuilderPage(page));},- authenticatedPage: async ({ page }, use) => {- await use(new AuthenticationPage(page));+ runsPage: async ({ page }, use) => {+ await use(new RunsPage(page));+ },++ session: async ({}, use) => {+ await use(e2eApi.readSession());},- users: async ({ request, page }, use) => {- await use({- apiSignUp: async () => await signUp(request, page),- });+ flowCleanup: async ({ request, session }, use) => {+ const flowIds: string[] = [];+ await use({ track: (flowId) => flowIds.push(flowId) });+ for (const flowId of flowIds) {+ await e2eApi.deleteFlow({ request, session, flowId });+ }},});export { expect } from '@playwright/test';++type CustomFixtures = {+ authenticationPage: AuthenticationPage;+ automationsPage: AutomationsPage;+ builderPage: BuilderPage;+ runsPage: RunsPage;+ session: E2eSession;+ flowCleanup: { track: (flowId: string) => void };+};diff --git a/packages/tests-e2e/fixtures/users.ts b/packages/tests-e2e/fixtures/users.tsdeleted file mode 100644index 6d58aec086d..00000000000--- a/packages/tests-e2e/fixtures/users.ts+++ /dev/null@@ -1,50 +0,0 @@-import { faker } from '@faker-js/faker';-import type { APIRequestContext, Page } from '@playwright/test';--export async function signUp(request: APIRequestContext, page: Page): Promise<AuthenticationResponse> {- const signUpPayload = {- email: faker.internet.email(),- password: '12345678',- firstName: 'Test',- lastName: 'User',- trackEvents: false,- platformId: null,- newsLetter: false,- provider: UserIdentityProvider.EMAIL,- };-- const response = await request.post('/api/v1/authentication/sign-up', {- data: signUpPayload,- });-- const authResponse = await response.json();-- await page.addInitScript((tokenValue) => {- localStorage.setItem('token', tokenValue);- }, authResponse.token);- return authResponse;-}--// cant import from shared: https://www.checklyhq.com/docs/runtimes/#why-cant-i-import-any-npm-package-or-other-3rd-party-dependencies-export enum UserIdentityProvider {- EMAIL = 'EMAIL',- GOOGLE = 'GOOGLE',- SAML = 'SAML',- JWT = 'JWT',-}--export type AuthenticationResponse = {- id: string;- platformRole: string;- status: string;- externalId: string;- platformId: string;- verified: boolean;- firstName: string;- lastName: string;- email: string;- trackEvents: boolean;- newsLetter: boolean;- token: string;- projectId: string;-}diff --git a/packages/tests-e2e/global-setup.ts b/packages/tests-e2e/global-setup.tsindex 9ec1da3f8ca..a373b2651ff 100644--- a/packages/tests-e2e/global-setup.ts+++ b/packages/tests-e2e/global-setup.ts@@ -1,11 +1,8 @@-import { readFileSync } from 'node:fs';+import { mkdirSync, readFileSync } from 'node:fs';import path from 'node:path';import { chromium, FullConfig, Page } from '@playwright/test';import { AuthenticationPage } from './pages/authentication.page';-import { AutomationsPage } from './pages/automations.page';--export const DEFAULT_EMAIL = '[email protected]';-export const DEFAULT_PASSWORD = 'TestPassword123!@#';+import { e2eApi, STORAGE_STATE } from './fixtures/api';async function globalSetup(config: FullConfig) {console.log('🔧 Running global setup...');@@ -35,14 +32,18 @@ async function globalSetup(config: FullConfig) {});}- await new AutomationsPage(page).open();+ await authPage.waitForSignedIn();+ mkdirSync(path.dirname(STORAGE_STATE), { recursive: true });+ await context.storageState({ path: STORAGE_STATE });+ const session = e2eApi.readSession();if (process.env.E2E_PIECES_MANIFEST) {- await installPieceArchives(page, process.env.E2E_PIECES_MANIFEST);+ await installPieceArchives({ page, token: session.token, manifestPath: process.env.E2E_PIECES_MANIFEST });}- if (process.env.E2E_INSTANCE_URL) {- await deleteAllFlows(page);+ const deleted = await e2eApi.deleteStaleFlows({ request: page.request, session });+ if (deleted > 0) {+ console.log(`✓ Deleted ${deleted} flows that crashed runs left behind`);}console.log('✓ Global setup completed successfully');@@ -57,37 +58,7 @@ async function globalSetup(config: FullConfig) {export default globalSetup;-async function deleteAllFlows(page: Page) {- const { token, projectId } = await page.evaluate(() => ({- token: localStorage.getItem('token'),- projectId: localStorage.getItem('projectId'),- }));- const headers = { Authorization: `Bearer ${token}` };-- while (true) {- const listResponse = await page.request.get('/api/v1/flows', {- headers,- params: { projectId: projectId ?? '', limit: 100 },- });- if (!listResponse.ok()) {- throw new Error(`Listing flows to clean up failed with ${listResponse.status()}`);- }- const { data }: { data: { id: string }[] } = await listResponse.json();- if (data.length === 0) {- return;- }- console.log(`✓ Deleting ${data.length} flows left by earlier runs`);- for (const flow of data) {- const deleteResponse = await page.request.delete(`/api/v1/flows/${flow.id}`, { headers });- if (!deleteResponse.ok()) {- throw new Error(`Deleting flow ${flow.id} failed with ${deleteResponse.status()}`);- }- }- }-}--async function installPieceArchives(page: Page, manifestPath: string) {- const token = await page.evaluate(() => localStorage.getItem('token'));+async function installPieceArchives({ page, token, manifestPath }: { page: Page; token: string; manifestPath: string }) {const pieces: { name: string; version: string; filename: string }[] = JSON.parse(readFileSync(manifestPath, 'utf-8'));for (const piece of pieces) {const response = await page.request.post('/api/v1/pieces', {@@ -110,3 +81,6 @@ async function installPieceArchives(page: Page, manifestPath: string) {console.log(`✓ Installed ${piece.name}@${piece.version} from its archive`);}}++export const DEFAULT_EMAIL = '[email protected]';+export const DEFAULT_PASSWORD = 'TestPassword123!@#';diff --git a/packages/tests-e2e/pages/authentication.page.ts b/packages/tests-e2e/pages/authentication.page.tsindex 1cd447c4997..f8c0617feeb 100644--- a/packages/tests-e2e/pages/authentication.page.ts+++ b/packages/tests-e2e/pages/authentication.page.ts@@ -21,6 +21,16 @@ export class AuthenticationPage extends BasePage {await this.page.getByTestId('sign-in-button').click();}+ async waitForSignedIn() {+ await this.page.waitForURL(+ (url) => !ONBOARDING_PATHS.some((path) => url.pathname.startsWith(path)),+ { timeout: 30000 },+ );+ await this.page.waitForFunction(+ () => Boolean(localStorage.getItem('token') && localStorage.getItem('projectId')),+ );+ }+async signUp(params?: { email?: string; password?: string; firstName?: string; lastName?: string }) {await this.page.goto(this.signUpUrl);await this.openPasswordForm();diff --git a/packages/tests-e2e/pages/automations.page.ts b/packages/tests-e2e/pages/automations.page.tsindex 0c66bdf58b0..46faf5c7d76 100644--- a/packages/tests-e2e/pages/automations.page.ts+++ b/packages/tests-e2e/pages/automations.page.ts@@ -3,42 +3,27 @@ import { BasePage } from './base';export class AutomationsPage extends BasePage {url = `/automations`;- async navigate() {- await this.page.getByRole('link', { name: 'Automations' }).click();- await this.waitFor();- }-- // Login may land on the chat page when chat is enabled, so navigate to- // automations explicitly instead of relying on the landing page.- async open() {- await this.page.waitForURL(- (url) =>- !url.pathname.includes('/sign-in') &&- !url.pathname.includes('/sign-up') &&- !url.pathname.includes('/create-platform'),- { timeout: 15000 },- );+ async createFlow(): Promise<string> {await this.visit();- await this.waitFor();- }-- async waitFor() {- await this.page.waitForURL('**/automations**');- await this.page- .getByRole('button', { name: 'Start from scratch' })- .or(this.page.getByRole('button', { name: 'Actions', exact: true }))- .first()- .waitFor();- }+ const startFromScratch = this.page.getByRole('button', { name: 'Start from scratch' }).first();+ const createNew = this.page.getByRole('button', { name: 'Create New' });+ await startFromScratch.or(createNew).first().waitFor();+ await this.page.getByTestId('automations-loading').waitFor({ state: 'detached' });- async newFlowFromScratch() {- const createNewButton = this.page.getByRole('button', { name: 'Create New' });- if (await createNewButton.isVisible()) {- await createNewButton.click();- await this.page.getByRole('menuitem', { name: 'New Flow' }).click();+ if (await startFromScratch.isVisible()) {+ await startFromScratch.click();} else {- // Empty state - click "Start from scratch" in the "Build a Flow" card- await this.page.getByRole('button', { name: 'Start from scratch' }).first().click();+ await createNew.click();+ await this.page.getByRole('menuitem', { name: 'New Flow' }).click();}++ await this.page.waitForURL(FLOW_URL);+ const flowId = FLOW_URL.exec(this.page.url())?.[1];+ if (!flowId) {+ throw new Error(`No flow id in ${this.page.url()}`);+ }+ return flowId;}}++const FLOW_URL = /\/flows\/([^/?#]+)/;diff --git a/packages/tests-e2e/pages/builder.page.ts b/packages/tests-e2e/pages/builder.page.tsindex b585415b13a..760036ae146 100644--- a/packages/tests-e2e/pages/builder.page.ts+++ b/packages/tests-e2e/pages/builder.page.ts@@ -2,77 +2,120 @@ import { expect } from '@playwright/test';import { BasePage } from './base';export class BuilderPage extends BasePage {- url = `/builder`;+ url = `/flows`;- async selectInitialTrigger(params: { piece: string; trigger: string }) {- await this.page.getByTestId('rf__node-trigger').filter({ hasText: 'Select Trigger' }).click();- await this.page.getByTestId('pieces-search-input').fill(params.trigger);- await this.page.getByText(params.trigger).click();+ async nameNewFlow(name: string) {+ const breadcrumb = this.page.getByRole('navigation', { name: 'breadcrumb' });+ await breadcrumb.getByText('Untitled', { exact: true }).click();+ await this.page.keyboard.press('ControlOrMeta+a');+ await this.page.keyboard.insertText(name);+ await this.page.keyboard.press('Enter');+ await expect(breadcrumb.getByText(name, { exact: true })).toBeVisible();}- async addAction(params: { piece: string; action: string }) {- await this.page.getByTestId('add-action-button').click();- await this.page.getByTestId('pieces-search-input').fill(params.piece);- await this.page.getByTestId(params.piece).click();- await this.page.getByText(params.action).nth(1).click();+ async selectTrigger({ piece, trigger }: { piece: string; trigger: string }) {+ await this.page.getByTestId('rf__node-trigger').click();+ await this.page.getByTestId('pieces-search-input').fill(piece);+ await this.page.getByTestId(`action-or-trigger-${trigger}`).click();}- async testFlowAndWaitForSuccess() {- await this.page.getByRole('button', { name: 'Test Flow' }).click();- await this.page.waitForTimeout(1000);- const runSuccessLocator = this.page.locator('text=Run Succeeded');- const runSuccessText = await runSuccessLocator.textContent({ timeout: 60000 });- expect(runSuccessText).toContain('Run Succeeded');+ async addStep({ after, piece, action }: { after: string; piece: string; action: string }) {+ await this.page.locator(`[data-testid="add-action-button"][data-parent-step="${after}"]`).click();+ await this.page.getByTestId('pieces-search-input').fill(piece);+ await this.page.getByTestId(`action-or-trigger-${action}`).click();}- async testStep() {- await this.page.getByRole('button', { name: 'Test Step Ctrl + G' }).click();- await this.page.waitForTimeout(8000);+ async webhookUrl(): Promise<string> {+ const url = await this.sidebar().getByTestId('markdown-code-block').first().textContent();+ if (!url?.trim()) {+ throw new Error('The webhook trigger shows no URL');+ }+ return url.trim();}- async testTrigger() {+ async testWebhookTrigger({ webhookUrl, value }: { webhookUrl: string; value: number }) {await this.page.getByTestId('test-trigger-button').click();- await this.page.waitForTimeout(5000);+ await this.page.getByRole('button', { name: 'Generate Sample Data' }).waitFor();+ const sample = this.sidebar().getByRole('button', { name: `queryParams value: ${value}` });+ await expect(async () => {+ await this.page.request.get(`${webhookUrl}/test?value=${value}`);+ await expect(sample).toBeVisible({ timeout: 5000 });+ }).toPass({ timeout: 60000 });}- async handleDismissButton() {- const dismissButton = this.page.getByRole('button', { name: 'Dismiss' });- if (await dismissButton.isVisible()) {- await dismissButton.click();- }+ async setCodeInput({ key, value }: { key: string; value: string }) {+ await this.sidebar().getByRole('button', { name: 'Add Item' }).click();+ const fields = this.sidebar().getByRole('textbox');+ await fields.nth(0).fill(key);+ await fields.nth(1).click();+ await this.page.keyboard.insertText(value);+ await this.waitForSaveOfLastEdit();}- async loadSampleData() {- await this.page.getByText('Load Sample data').click();- await this.page.waitForTimeout(8000);+ async setCode(code: string) {+ await this.replaceEditorText({ testId: 'code-editor', text: code });}- async publishFlow() {- await this.page.getByRole('button', { name: 'Publish' }).click();- await this.page.waitForTimeout(15000);+ async setJsonBody(json: string) {+ await this.replaceEditorText({ testId: 'json-editor', text: json });}- async waitFor() {- await this.page.waitForURL('**/flows/**');- await this.page.waitForSelector('.react-flow__nodes', { state: 'visible' });- await this.page.waitForSelector('.react-flow__node', { state: 'visible' });+ async testStep() {+ await this.sidebar().getByTestId('test-step-button').click();+ const succeeded = this.sidebar().getByText('Tested Successfully');+ await succeeded.or(this.sidebar().getByText('Test Failed')).first().waitFor({ timeout: 60000 });+ await expect(succeeded, 'The step test failed').toBeVisible();}- // A freshly published version may not serve synchronous requests immediately- // (the sync URL can briefly 404), so poll until the Return Response reflects- // the published flow.- async expectSyncWebhookResponse(params: { url: string; key: string; expected: string }) {+ async expectStepOutput({ key, value }: { key: string; value: string }) {+ await expect(this.sidebar().getByRole('tabpanel', { name: 'Friendly View' })).toContainText(+ new RegExp(`${key}\\s*${value}`),+ );+ }++ async testFlow() {+ await this.page.getByRole('button', { name: /^Test Flow/ }).click();+ const succeeded = this.page.getByText('Run Succeeded');+ await succeeded.or(this.page.getByText('Run Failed')).first().waitFor({ timeout: 60000 });+ await expect(succeeded, 'The test run failed').toBeVisible();+ await this.page.getByRole('button', { name: 'Edit flow', exact: true }).click();+ }++ async publish() {+ const publishButton = this.page.getByRole('button', { name: 'Publish' });+ await publishButton.click();+ await expect(publishButton).toBeHidden({ timeout: 60000 });+ }++ async expectSyncWebhookResponse({ url, expected }: { url: string; expected: Record<string, unknown> }) {await expect.poll(async () => {- const response = await this.page.context().request.get(params.url);- const body: Record<string, unknown> = await response- .json()- .catch(() => ({}));- return body[params.key];+ const response = await this.page.request.get(url);+ return { status: response.status(), body: await response.json().catch(() => undefined) };},{ timeout: 60000, intervals: [2000, 3000, 5000] },)- .toBe(params.expected);+ .toEqual({ status: 200, body: expected });+ }++ private sidebar() {+ return this.page.getByTestId('right-sidebar');+ }++ private async replaceEditorText({ testId, text }: { testId: string; text: string }) {+ await this.sidebar().getByTestId(testId).getByRole('textbox').click();+ await this.page.keyboard.press('ControlOrMeta+a');+ await this.page.keyboard.insertText(text);+ await this.waitForSaveOfLastEdit();+ }++ private async waitForSaveOfLastEdit() {+ const save = await this.page.waitForRequest(+ (request) => request.method() === 'POST' && FLOW_SAVE.test(new URL(request.url()).pathname),+ );+ await save.response();}}++const FLOW_SAVE = /\/api\/v1\/flows\/[^/]+$/;diff --git a/packages/tests-e2e/pages/index.ts b/packages/tests-e2e/pages/index.tsindex b7a87b43fe9..986322e1d5f 100644--- a/packages/tests-e2e/pages/index.ts+++ b/packages/tests-e2e/pages/index.ts@@ -2,3 +2,4 @@ export { BasePage } from './base';export { AuthenticationPage } from './authentication.page';export { AutomationsPage } from './automations.page';export { BuilderPage } from './builder.page';+export { RunsPage } from './runs.page';diff --git a/packages/tests-e2e/pages/runs.page.ts b/packages/tests-e2e/pages/runs.page.tsnew file mode 100644index 00000000000..af2d1169541--- /dev/null+++ b/packages/tests-e2e/pages/runs.page.ts@@ -0,0 +1,14 @@+import { expect } from '@playwright/test';+import { BasePage } from './base';++export class RunsPage extends BasePage {+ url = `/runs`;++ async expectLatestRun({ flowId, flowName, status }: { flowId: string; flowName: string; status: string }) {+ const latestRun = this.page.getByRole('row').filter({ hasText: flowName }).first();+ await expect(async () => {+ await this.page.goto(`${this.url}?flowId=${flowId}`);+ await expect(latestRun).toContainText(status, { timeout: 5000 });+ }).toPass({ timeout: 60000 });+ }+}diff --git a/packages/tests-e2e/playwright.config.ts b/packages/tests-e2e/playwright.config.tsindex e8767b9bc39..eead96ea1e5 100644--- a/packages/tests-e2e/playwright.config.ts+++ b/packages/tests-e2e/playwright.config.ts@@ -1,6 +1,7 @@import { defineConfig, devices, PlaywrightTestConfig } from '@playwright/test';import dotenv from 'dotenv';import path from 'path';+import { STORAGE_STATE } from './fixtures/api';// Load environment variables from the .env.e2e file (local dev)// In CI, use inherited environment variables instead@@ -14,18 +15,19 @@ const E2E_INSTANCE_URL = process.env.E2E_INSTANCE_URL || undefined;const editionConfigs = {ce: {- testDir: './scenarios/ce',+ testIgnore: ['**/ee/**'],},ee: {- testDir: './scenarios',+ testIgnore: [],},};const editionConfig = editionConfigs[AP_EDITION as keyof typeof editionConfigs];const config: PlaywrightTestConfig = {- testDir: editionConfig.testDir,+ testDir: './scenarios',testMatch: '**/*.spec.ts',+ testIgnore: editionConfig.testIgnore,/* Run tests in files in parallel */fullyParallel: true,/* Fail the build on CI if you accidentally left test.only in the source code. */@@ -43,6 +45,8 @@ const config: PlaywrightTestConfig = {/* Base URL to use in actions like `await page.goto('/')`. */baseURL: E2E_INSTANCE_URL ?? LOCAL_URL,+ storageState: STORAGE_STATE,+/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */trace: 'on-first-retry',@@ -58,7 +62,6 @@ const config: PlaywrightTestConfig = {...devices['Desktop Chrome'],headless: true,},- testDir: editionConfig.testDir,},],diff --git a/packages/tests-e2e/scenarios/auth/sign-in.spec.ts b/packages/tests-e2e/scenarios/auth/sign-in.spec.tsnew file mode 100644index 00000000000..8c77947e0a7--- /dev/null+++ b/packages/tests-e2e/scenarios/auth/sign-in.spec.ts@@ -0,0 +1,13 @@+import { expect, test } from '../../fixtures';+import { DEFAULT_EMAIL, DEFAULT_PASSWORD } from '../../global-setup';++test.use({ storageState: { cookies: [], origins: [] } });++test.describe('Sign in', () => {+ test('signs in with email and password', async ({ page, authenticationPage }) => {+ const email = process.env.E2E_EMAIL ?? DEFAULT_EMAIL;+ await authenticationPage.signIn({ email, password: process.env.E2E_PASSWORD ?? DEFAULT_PASSWORD });+ await authenticationPage.waitForSignedIn();+ await expect(page.getByRole('button', { name: email })).toBeVisible();+ });+});diff --git a/packages/tests-e2e/scenarios/ce/flows/webhook-should-return-response.check.ts b/packages/tests-e2e/scenarios/ce/flows/webhook-should-return-response.check.tsdeleted file mode 100644index 70f416c88ac..00000000000--- a/packages/tests-e2e/scenarios/ce/flows/webhook-should-return-response.check.ts+++ /dev/null@@ -1,11 +0,0 @@-import * as path from 'path'-import { BrowserCheck } from 'checkly/constructs'--new BrowserCheck('webhook-should-return-response-check', {- name: 'Webhook Should Return Response',- frequency: 30, // every 30 minutes- locations: ['eu-west-1'],- code: {- entrypoint: path.join(__dirname, 'webhook-should-return-response.spec.ts')- }-})diff --git a/packages/tests-e2e/scenarios/ce/flows/webhook-should-return-response.spec.ts b/packages/tests-e2e/scenarios/ce/flows/webhook-should-return-response.spec.tsdeleted file mode 100644index 9b374a02553..00000000000--- a/packages/tests-e2e/scenarios/ce/flows/webhook-should-return-response.spec.ts+++ /dev/null@@ -1,50 +0,0 @@-import { test } from '../../../fixtures';--test.describe('Webhooks', () => {- test('should handle webhook with return response', async ({ page, automationsPage, builderPage }) => {- test.setTimeout(120000);-- await automationsPage.waitFor();-- await automationsPage.newFlowFromScratch();-- await builderPage.selectInitialTrigger({- piece: 'Webhook',- trigger: 'Catch Webhook'- });-- const webhookUrlBlock = page.getByTestId('markdown-code-block');- const webhookUrl = (await webhookUrlBlock.textContent())?.trim() ?? '';- const runVersion = Math.floor(Math.random() * 100000);- const urlWithParams = `${webhookUrl}/sync?targetRunVersion=${runVersion}`;-- await builderPage.testTrigger();-- await page.context().request.get(urlWithParams);- await page.waitForTimeout(5000);-- await builderPage.addAction({- piece: 'Webhook',- action: 'Return Response'- });-- //clear- await page.locator('div.cm-activeLine.cm-line').fill(- ''- );-- await page.locator('div.cm-activeLine.cm-line').fill(- '{"targetRunVersion": "{{trigger[\'output\'][\'queryParams\'][\'targetRunVersion\']}}"}'- );-- await page.waitForTimeout(1000);- await builderPage.publishFlow();-- await builderPage.expectSyncWebhookResponse({- url: urlWithParams,- key: 'targetRunVersion',- expected: runVersion.toString(),- });- });--});\ No newline at end of filediff --git a/packages/tests-e2e/scenarios/ce/pieces/piece-isolation.spec.ts b/packages/tests-e2e/scenarios/ce/pieces/piece-isolation.spec.tsindex d47b43d04e8..cf7f019ef93 100644--- a/packages/tests-e2e/scenarios/ce/pieces/piece-isolation.spec.ts+++ b/packages/tests-e2e/scenarios/ce/pieces/piece-isolation.spec.ts@@ -1,4 +1,6 @@+import { randomInt } from 'node:crypto';import { test } from '../../../fixtures';+import { e2eFlows } from '../../../fixtures/flows';/*** Warmup resilience smoke test.@@ -9,49 +11,19 @@ import { test } from '../../../fixtures';* flows from executing.*/test.describe('Piece isolation — CE', () => {- test('worker stays healthy after piece sync and can execute a webhook flow', async ({ page, automationsPage, builderPage, request }) => {+ test('worker stays healthy after piece sync and can execute a webhook flow', async ({ automationsPage, builderPage, request, session, flowCleanup }) => {test.setTimeout(120000);// Trigger a piece sync — this exercises the warmup path- const token = await page.evaluate(() => localStorage.getItem('token'));await request.post('/api/v1/pieces/sync', {- headers: { Authorization: `Bearer ${token}` },+ headers: { Authorization: `Bearer ${session.token}` },});- await automationsPage.waitFor();- await automationsPage.newFlowFromScratch();-- await builderPage.selectInitialTrigger({- piece: 'Webhook',- trigger: 'Catch Webhook'- });-- const webhookUrlBlock = page.getByTestId('markdown-code-block');- const webhookUrl = (await webhookUrlBlock.textContent())?.trim() ?? '';-- await builderPage.testTrigger();-- const runVersion = Math.floor(Math.random() * 100000);- await page.context().request.get(`${webhookUrl}?runVersion=${runVersion}`);- await page.waitForTimeout(3000);-- await builderPage.addAction({- piece: 'Webhook',- action: 'Return Response'- });-- await page.locator('div.cm-activeLine.cm-line').fill('');- await page.locator('div.cm-activeLine.cm-line').fill(- '{"runVersion": "{{trigger[\'output\'][\'queryParams\'][\'runVersion\']}}"}'- );-- await page.waitForTimeout(1000);- await builderPage.publishFlow();-+ const { webhookUrl } = await e2eFlows.publishWebhookEchoFlow({ automationsPage, builderPage, flowCleanup });+ const value = randomInt(1, 1000000);await builderPage.expectSyncWebhookResponse({- url: `${webhookUrl}/sync?runVersion=${runVersion}`,- key: 'runVersion',- expected: runVersion.toString(),+ url: `${webhookUrl}/sync?value=${value}`,+ expected: { value: String(value) },});});});diff --git a/packages/tests-e2e/scenarios/ee/dummy.spec.ts b/packages/tests-e2e/scenarios/ee/dummy.spec.tsdeleted file mode 100644index 2feed0d93f4..00000000000--- a/packages/tests-e2e/scenarios/ee/dummy.spec.ts+++ /dev/null@@ -1,7 +0,0 @@-import { test, expect } from '@playwright/test';--test.describe('Enterprise Edition - Placeholder Tests', () => {- test('dummy test to ensure test suite runs successfully', async () => {- expect(true).toBe(true);- });-});diff --git a/packages/tests-e2e/scenarios/ee/pieces/piece-isolation.spec.ts b/packages/tests-e2e/scenarios/ee/pieces/piece-isolation.spec.tsindex fa322db7274..68c7e8ded5c 100644--- a/packages/tests-e2e/scenarios/ee/pieces/piece-isolation.spec.ts+++ b/packages/tests-e2e/scenarios/ee/pieces/piece-isolation.spec.ts@@ -1,6 +1,8 @@import { gzipSync } from 'node:zlib';+import { randomInt } from 'node:crypto';import { test } from '../../../fixtures';+import { e2eFlows } from '../../../fixtures/flows';/*** EE: Bad piece isolation test.@@ -12,11 +14,10 @@ import { test } from '../../../fixtures';* Requires a platform admin token (EE only).*/test.describe('Piece isolation — EE', () => {- test('broken custom piece does not prevent webhook flow from running', async ({ page, automationsPage, builderPage, request }) => {+ test('broken custom piece does not prevent webhook flow from running', async ({ automationsPage, builderPage, request, session, flowCleanup }) => {test.setTimeout(180000);- const token = await page.evaluate(() => localStorage.getItem('token'));- const authHeaders = { Authorization: `Bearer ${token}` };+ const authHeaders = { Authorization: `Bearer ${session.token}` };// Upload a bad custom piece that has workspace:* in its dependencies.// The archive is a minimal tarball with a package.json that contains a@@ -48,40 +49,11 @@ test.describe('Piece isolation — EE', () => {// Even if the upload succeeds and bun fails to install the broken piece,// a regular Webhook flow must still execute successfully- await automationsPage.waitFor();- await automationsPage.newFlowFromScratch();-- await builderPage.selectInitialTrigger({- piece: 'Webhook',- trigger: 'Catch Webhook'- });-- const webhookUrlBlock = page.getByTestId('markdown-code-block');- const webhookUrl = (await webhookUrlBlock.textContent())?.trim() ?? '';-- await builderPage.testTrigger();-- const runVersion = Math.floor(Math.random() * 100000);- await page.context().request.get(`${webhookUrl}?runVersion=${runVersion}`);- await page.waitForTimeout(3000);-- await builderPage.addAction({- piece: 'Webhook',- action: 'Return Response'- });-- await page.locator('div.cm-activeLine.cm-line').fill('');- await page.locator('div.cm-activeLine.cm-line').fill(- '{"runVersion": "{{trigger[\'output\'][\'queryParams\'][\'runVersion\']}}"}'- );-- await page.waitForTimeout(1000);- await builderPage.publishFlow();-+ const { webhookUrl } = await e2eFlows.publishWebhookEchoFlow({ automationsPage, builderPage, flowCleanup });+ const value = randomInt(1, 1000000);await builderPage.expectSyncWebhookResponse({- url: `${webhookUrl}/sync?runVersion=${runVersion}`,- key: 'runVersion',- expected: runVersion.toString(),+ url: `${webhookUrl}/sync?value=${value}`,+ expected: { value: String(value) },});});});diff --git a/packages/tests-e2e/scenarios/flows/flow-journey.spec.ts b/packages/tests-e2e/scenarios/flows/flow-journey.spec.tsnew file mode 100644index 00000000000..bdef2e1714f--- /dev/null+++ b/packages/tests-e2e/scenarios/flows/flow-journey.spec.ts@@ -0,0 +1,56 @@+import { randomInt } from 'node:crypto';+import { test } from '../../fixtures';+import { e2eFlows } from '../../fixtures/flows';++test.describe('Flow journey', () => {+ test('build, test, publish and run a webhook flow with a code step', async ({ automationsPage, builderPage, runsPage, flowCleanup }) => {+ test.setTimeout(240000);+ const flowName = e2eFlows.uniqueFlowName('journey');+ const sampleValue = randomInt(1, 1000000);+ const liveValue = randomInt(1, 1000000);++ const flowId = await test.step('Create a flow from the automations page', async () => {+ const id = await automationsPage.createFlow();+ flowCleanup.track(id);+ await builderPage.nameNewFlow(flowName);+ return id;+ });++ const webhookUrl = await test.step('Catch a webhook and capture sample data', async () => {+ await builderPage.selectTrigger({ piece: 'Webhook', trigger: 'Catch Webhook' });+ const url = await builderPage.webhookUrl();+ await builderPage.testWebhookTrigger({ webhookUrl: url, value: sampleValue });+ return url;+ });++ await test.step('Double the value in a code step and test it', async () => {+ await builderPage.addStep({ after: 'trigger', piece: 'Code', action: 'Code' });+ await builderPage.setCodeInput({ key: 'value', value: "{{trigger['output']['queryParams']['value']}}" });+ await builderPage.setCode(DOUBLE_THE_VALUE);+ await builderPage.testStep();+ await builderPage.expectStepOutput({ key: 'doubled', value: String(sampleValue * 2) });+ });++ await test.step('Return the code output and test the whole flow', async () => {+ await builderPage.addStep({ after: 'step_1', piece: 'Webhook', action: 'Return Response' });+ await builderPage.setJsonBody(`{"doubled": "{{step_1['output']['doubled']}}"}`);+ await builderPage.testFlow();+ });++ await test.step('Publish and call the live webhook', async () => {+ await builderPage.publish();+ await builderPage.expectSyncWebhookResponse({+ url: `${webhookUrl}/sync?value=${liveValue}`,+ expected: { doubled: liveValue * 2 },+ });+ });++ await test.step('See the live run in the run history', async () => {+ await runsPage.expectLatestRun({ flowId, flowName, status: 'Succeeded' });+ });+ });+});++const DOUBLE_THE_VALUE = `export const code = async (inputs) => {+ return { doubled: Number(inputs.value) * 2 };+};`;diff --git a/packages/web/src/app/builder/flow-canvas/edges/add-button.tsx b/packages/web/src/app/builder/flow-canvas/edges/add-button.tsxindex 9958f78b037..6b39833a291 100644--- a/packages/web/src/app/builder/flow-canvas/edges/add-button.tsx+++ b/packages/web/src/app/builder/flow-canvas/edges/add-button.tsx@@ -114,6 +114,7 @@ const ApAddButton = React.memo((props: ApButtonData) => {},)}data-testid="add-action-button"+ data-parent-step={props.parentStepName}>{!isPieceSelectorOpen && (<Plus className="w-3 h-3 stroke-[3px] text-gray-12" />diff --git a/packages/web/src/app/builder/pieces-selector/generic-piece-selector-item.tsx b/packages/web/src/app/builder/pieces-selector/generic-piece-selector-item.tsxindex d9829237012..5ab92d5933d 100644--- a/packages/web/src/app/builder/pieces-selector/generic-piece-selector-item.tsx+++ b/packages/web/src/app/builder/pieces-selector/generic-piece-selector-item.tsx@@ -52,7 +52,12 @@ const GenericActionOrTriggerItem = ({};const pieceSelectorItemInfo = getPieceSelectorItemInfo(item);return (- <CardListItem className="p-2 w-full" onClick={onClick} style={style}>+ <CardListItem+ className="p-2 w-full"+ onClick={onClick}+ style={style}+ data-testid={`action-or-trigger-${pieceSelectorItemInfo.displayName}`}+ ><div className="flex gap-3 items-center w-full min-w-0"><divclassName={cn({diff --git a/packages/web/src/app/builder/step-settings/code-settings/code-editor.tsx b/packages/web/src/app/builder/step-settings/code-settings/code-editor.tsxindex 425495e13b4..10c537476af 100644--- a/packages/web/src/app/builder/step-settings/code-settings/code-editor.tsx+++ b/packages/web/src/app/builder/step-settings/code-settings/code-editor.tsx@@ -142,6 +142,7 @@ const CodeEditor = ({)}</div><CodeMirror+ data-testid="code-editor"value={activeTab === 'code' ? code : packageJson}className="border-none"minHeight={minHeight ?? '200px'}diff --git a/packages/web/src/components/custom/json-editor.tsx b/packages/web/src/components/custom/json-editor.tsxindex 3ae3610aa41..97d26b4d42b 100644--- a/packages/web/src/components/custom/json-editor.tsx+++ b/packages/web/src/components/custom/json-editor.tsx@@ -59,6 +59,7 @@ const JsonEditor = React.memo(<div className="flex flex-col gap-2 border rounded-md py-2 px-2"><CodeMirrorref={ref}+ data-testid="json-editor"value={value}className={cn('border-none', className)}height="250px"diff --git a/packages/web/src/features/automations/components/automations-table.tsx b/packages/web/src/features/automations/components/automations-table.tsxindex 02e09473b95..a4884fdb5b1 100644--- a/packages/web/src/features/automations/components/automations-table.tsx+++ b/packages/web/src/features/automations/components/automations-table.tsx@@ -195,7 +195,7 @@ export const AutomationsTable = ({</div>{isLoading ? (- <div>+ <div data-testid="automations-loading">{Array.from({ length: 10 }).map((_, i) => (<AutomationsSkeletonRowkey={i}