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): schedule trigger and connection step specs, quarantine for flaky specs (#16945)
Othman Abu Ajamieh9c8c9e0599a8
diff --git a/.github/workflows/continuous-delivery-stg.yml b/.github/workflows/continuous-delivery-stg.ymlindex 655a764b718..fcafcd73811 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.- # Each spec deletes the flows it creates; global setup deletes only `E2E `-prefixed flows older than an hour.+ # Each spec deletes the flows and connections it creates; global setup deletes only `E2E `-prefixed ones 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 7cb27cdc72f..871a2c6eca9 100644--- a/.github/workflows/e2e-matrix.yml+++ b/.github/workflows/e2e-matrix.yml@@ -62,11 +62,11 @@ jobs:# from archives of this commit's source instead of from the Cloud registry.- name: Pack the pieces the suite usesrun: |- npx turbo run build --filter=@activepieces/piece-webhook- CHANGED_PIECES=packages/pieces/core/webhook npx ts-node -r tsconfig-paths/register -P packages/server/engine/tsconfig.lib.json tools/scripts/pieces/prepare-pieces-for-publish.ts+ PIECES="packages/pieces/core/webhook packages/pieces/core/schedule packages/pieces/community/activepieces"+ npx turbo run build --filter=@activepieces/piece-webhook --filter=@activepieces/piece-schedule --filter=@activepieces/piece-activepieces+ CHANGED_PIECES="$(printf '%s\n' $PIECES)" npx ts-node -r tsconfig-paths/register -P packages/server/engine/tsconfig.lib.json tools/scripts/pieces/prepare-pieces-for-publish.tsmkdir e2e-pieces- cd packages/pieces/core/webhook/dist- npm pack --json --pack-destination "$GITHUB_WORKSPACE/e2e-pieces" > "$GITHUB_WORKSPACE/e2e-pieces/pieces.json"+ npm pack --json --pack-destination "$GITHUB_WORKSPACE/e2e-pieces" $(printf '%s/dist ' $PIECES) > "$GITHUB_WORKSPACE/e2e-pieces/pieces.json"- uses: actions/upload-artifact@v6with:@@ -116,6 +116,8 @@ jobs:APP_REPLICAS: 1WORKER_REPLICAS: ${{ matrix.workerReplicas }}AP_EXECUTION_MODE: ${{ matrix.executionMode }}+ # The compose file passes an unset value as "", which the worker reads as invalid and replaces with 1 slot.+ AP_WORKER_CONCURRENCY: 5AP_PIECES_SYNC_MODE: NONEAP_LOG_LEVEL: infoAP_FILE_STORAGE_LOCATION: ${{ matrix.fileStorage }}@@ -196,6 +198,7 @@ jobs:# The container joins the stack network and mounts the workspace at the same path, so the env paths hold.# If the background pull is still running, this pull joins it.# Piece isolation exercises the Cloud piece sync, which this stack turns off.+ # The CLI --grep-invert replaces the config's, so it repeats @quarantine.- name: Run E2E testsrun: |docker pull -q "$PLAYWRIGHT_IMAGE"@@ -203,7 +206,7 @@ jobs:-v "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" -w "$GITHUB_WORKSPACE/packages/tests-e2e" \-e CI -e AP_EDITION -e E2E_INSTANCE_URL -e E2E_PIECES_MANIFEST -e PLAYWRIGHT_JSON_OUTPUT_FILE \"$PLAYWRIGHT_IMAGE" \- npx playwright test --config=playwright.config.ts --reporter=github,json --grep-invert "Piece isolation"+ npx playwright test --config=playwright.config.ts --reporter=github,json --grep-invert "Piece isolation|@quarantine"- name: Summarize resultsif: always()diff --git a/brain/knowledge/engineering/e2e-tests-and-monitors.md b/brain/knowledge/engineering/e2e-tests-and-monitors.mdindex dcdff76848d..649d3ea404f 100644--- a/brain/knowledge/engineering/e2e-tests-and-monitors.md+++ b/brain/knowledge/engineering/e2e-tests-and-monitors.md@@ -23,15 +23,19 @@ 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.-- **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.+- **Specs own their data.** Each flow and connection a spec makes is named `E2E …` and deleted by the `flowCleanup` / `connectionCleanup` fixtures, also on failure; global setup only sweeps `E2E ` flows and connections 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.+- **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. To cover the connection path itself, `connection-step.spec.ts` points the Activepieces Platform piece's Base URL at a webhook flow of its own, then reads the `Authorization` header in that flow's run.+- **A `FormLabel` names its input only through `FormControl`.** `FormControl` puts the label's id on its child, so an input outside it, or a wrapper that drops `id`, leaves `getByLabel` with nothing. Fix the markup rather than locate the field by nearby text.+- **A step must not call a `/sync` webhook on the same instance.** The step test holds a worker slot while the called flow waits for one, so with one slot the call times out (408). The matrix split configs run one slot: `benchmark/docker-compose.yml` passes `AP_WORKER_CONCURRENCY` as an empty string, which the worker reads as invalid and replaces with 1, not the default 5. Call the async webhook and check the called flow's run instead.+- **Custom API Call leaves its URL empty in the builder**, although the action's default is the connection's base URL. "Test Step" stays disabled until the spec fills the URL.+- **`@quarantine` specs are skipped only in CI.** The config's `grepInvert` applies when `CI` is set, and a CLI `--grep-invert` replaces it, so `e2e-matrix.yml` repeats `@quarantine` in its own pattern.## Key files-- `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)+- `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 and connections), `fixtures/` (`flowCleanup`, `connectionCleanup`, `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 dea050077d5..14ca518b409 100644--- a/packages/tests-e2e/README.md+++ b/packages/tests-e2e/README.md@@ -19,12 +19,23 @@ packages/tests-e2e/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.+- Create what the spec needs, and name each flow and connection with `e2eFlows.uniqueName()` (prefix `E2E `).+- Pass each flow id to `flowCleanup.track()` and each connection id to `connectionCleanup.track()`. The fixtures delete them 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.+- Select by role and accessible name (`getByRole(…, { name })`, `getByLabel`). When an element has no name, give it one in the web app (a linked label or an `aria-label`); use a `data-testid` only when no name fits. Never locate a field by the text around it or by its position.- The tests start signed in. Use `test.use({ storageState: { cookies: [], origins: [] } })` to start signed out.+- Use only pieces that need no outside service. A spec that needs a server calls a flow of its own, as `connection-step.spec.ts` does.+- A new piece must also go into the `PIECES` list of `e2e-matrix.yml`, because the matrix stack installs only those.++## Flaky specs++A spec is flaky when it fails and then passes on a retry, or fails with no product bug. The run summary counts flaky specs.++1. Open a Linear ticket for the spec.+2. Add the `@quarantine` tag and the ticket to the spec: `test('…', { tag: '@quarantine', annotation: { type: 'issue', description: '<ticket URL>' } }, …)`.+3. CI skips `@quarantine` specs, so the release gate does not wait for the fix. Local runs still run them.+4. The fix removes the tag in the same PR.## Running the tests@@ -43,7 +54,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). Global setup deletes `E2E `-prefixed flows older than one hour, which crashed runs leave behind. It does not touch other flows.+- `E2E_INSTANCE_URL` — target Activepieces URL (defaults to `http://localhost:4200` and starts the dev server when unset). Global setup deletes `E2E `-prefixed flows and connections older than one hour, which crashed runs leave behind. It does not touch other flows or connections.- `E2E_EMAIL` — test user email- `E2E_PASSWORD` — test user passworddiff --git a/packages/tests-e2e/fixtures/api.ts b/packages/tests-e2e/fixtures/api.tsindex fcb79d98f36..709ae92d1b9 100644--- a/packages/tests-e2e/fixtures/api.ts+++ b/packages/tests-e2e/fixtures/api.ts@@ -14,46 +14,64 @@ function readSession(): E2eSession {}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()}`);- }+ await deleteById({ request, session, resource: 'flows', id: flowId });}-async function deleteStaleFlows({ request, session }: { request: APIRequestContext; session: E2eSession }) {- const staleFlows = await listStaleFlows({ request, session, cursor: undefined });+async function deleteConnection({ request, session, connectionId }: { request: APIRequestContext; session: E2eSession; connectionId: string }) {+ await deleteById({ request, session, resource: 'app-connections', id: connectionId });+}++async function deleteStaleData({ request, session }: { request: APIRequestContext; session: E2eSession }) {+ const staleFlows = await listStale({ request, session, resource: 'flows', nameOf: (flow: FlowSummary) => flow.version.displayName, cursor: undefined });for (const flow of staleFlows) {await deleteFlow({ request, session, flowId: flow.id });}- return staleFlows.length;+ const staleConnections = await listStale({ request, session, resource: 'app-connections', nameOf: (connection: ConnectionSummary) => connection.displayName, cursor: undefined });+ for (const connection of staleConnections) {+ await deleteConnection({ request, session, connectionId: connection.id });+ }+ return { flows: staleFlows.length, connections: staleConnections.length };+}++async function deleteById({ request, session, resource, id }: { request: APIRequestContext; session: E2eSession; resource: Resource; id: string }) {+ const response = await request.delete(`/api/v1/${resource}/${id}`, {+ headers: { Authorization: `Bearer ${session.token}` },+ });+ if (!response.ok() && response.status() !== 404) {+ throw new Error(`Deleting ${resource} ${id} failed with ${response.status()}: ${await response.text()}`);+ }}-async function listStaleFlows({ request, session, cursor }: { request: APIRequestContext; session: E2eSession; cursor: string | undefined }): Promise<FlowSummary[]> {- const response = await request.get('/api/v1/flows', {+async function listStale<T extends { id: string; created: string }>({ request, session, resource, nameOf, cursor }: {+ request: APIRequestContext;+ session: E2eSession;+ resource: Resource;+ nameOf: (item: T) => string;+ cursor: string | undefined;+}): Promise<T[]> {+ const response = await request.get(`/api/v1/${resource}`, {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()}`);+ throw new Error(`Listing ${resource} failed with ${response.status()}: ${await response.text()}`);}- const page: { data: FlowSummary[]; next: string | null } = await response.json();+ const page: { data: T[]; 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 }) : [];+ const stale = page.data.filter((item) => nameOf(item).startsWith(E2E_PREFIX) && Date.parse(item.created) < cutoff);+ const rest = page.next ? await listStale({ request, session, resource, nameOf, 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 const E2E_PREFIX = 'E2E ';+export const e2eApi = { readSession, deleteFlow, deleteConnection, deleteStaleData };export type E2eSession = { token: string; projectId: string };+type Resource = 'flows' | 'app-connections';type FlowSummary = { id: string; created: string; version: { displayName: string } };+type ConnectionSummary = { id: string; created: string; 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.tsindex e568e7c68bc..3f6e65797c6 100644--- a/packages/tests-e2e/fixtures/flows.ts+++ b/packages/tests-e2e/fixtures/flows.ts@@ -1,26 +1,27 @@import { randomInt, randomUUID } from 'node:crypto';import { AutomationsPage, BuilderPage } from '../pages';-import { E2E_FLOW_PREFIX } from './api';+import { E2E_PREFIX } from './api';async function publishWebhookEchoFlow({ automationsPage, builderPage, flowCleanup }: {automationsPage: AutomationsPage;builderPage: BuilderPage;flowCleanup: { track: (flowId: string) => void };-}): Promise<{ webhookUrl: string }> {+}): Promise<{ flowId: string; flowName: string; webhookUrl: string }> {const flowId = await automationsPage.createFlow();flowCleanup.track(flowId);- await builderPage.nameNewFlow(uniqueFlowName('echo'));+ const flowName = uniqueName('echo');+ await builderPage.nameNewFlow(flowName);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 };+ return { flowId, flowName, webhookUrl };}-function uniqueFlowName(label: string) {- return `${E2E_FLOW_PREFIX}${label} ${randomUUID().slice(0, 8)}`;+function uniqueName(label: string) {+ return `${E2E_PREFIX}${label} ${randomUUID().slice(0, 8)}`;}-export const e2eFlows = { publishWebhookEchoFlow, uniqueFlowName };+export const e2eFlows = { publishWebhookEchoFlow, uniqueName };diff --git a/packages/tests-e2e/fixtures/index.ts b/packages/tests-e2e/fixtures/index.tsindex 27dda9025b1..d526b90da5b 100644--- a/packages/tests-e2e/fixtures/index.ts+++ b/packages/tests-e2e/fixtures/index.ts@@ -35,6 +35,14 @@ export const test = base.extend<CustomFixtures>({await e2eApi.deleteFlow({ request, session, flowId });}},++ connectionCleanup: async ({ request, session }, use) => {+ const connectionIds: string[] = [];+ await use({ track: (connectionId) => connectionIds.push(connectionId) });+ for (const connectionId of connectionIds) {+ await e2eApi.deleteConnection({ request, session, connectionId });+ }+ },});export { expect } from '@playwright/test';@@ -46,4 +54,5 @@ type CustomFixtures = {runsPage: RunsPage;session: E2eSession;flowCleanup: { track: (flowId: string) => void };+ connectionCleanup: { track: (connectionId: string) => void };};diff --git a/packages/tests-e2e/global-setup.ts b/packages/tests-e2e/global-setup.tsindex a373b2651ff..24f75625393 100644--- a/packages/tests-e2e/global-setup.ts+++ b/packages/tests-e2e/global-setup.ts@@ -41,9 +41,9 @@ async function globalSetup(config: FullConfig) {await installPieceArchives({ page, token: session.token, manifestPath: process.env.E2E_PIECES_MANIFEST });}- const deleted = await e2eApi.deleteStaleFlows({ request: page.request, session });- if (deleted > 0) {- console.log(`✓ Deleted ${deleted} flows that crashed runs left behind`);+ const deleted = await e2eApi.deleteStaleData({ request: page.request, session });+ if (deleted.flows + deleted.connections > 0) {+ console.log(`✓ Deleted ${deleted.flows} flows and ${deleted.connections} connections that crashed runs left behind`);}console.log('✓ Global setup completed successfully');diff --git a/packages/tests-e2e/pages/builder.page.ts b/packages/tests-e2e/pages/builder.page.tsindex 760036ae146..9bfcbe5b249 100644--- a/packages/tests-e2e/pages/builder.page.ts+++ b/packages/tests-e2e/pages/builder.page.ts@@ -1,4 +1,4 @@-import { expect } from '@playwright/test';+import { expect, Locator } from '@playwright/test';import { BasePage } from './base';export class BuilderPage extends BasePage {@@ -19,6 +19,10 @@ export class BuilderPage extends BasePage {await this.page.getByTestId(`action-or-trigger-${trigger}`).click();}+ async openStep(stepName: string) {+ await this.page.getByTestId(`rf__node-${stepName}`).click();+ }+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);@@ -45,9 +49,8 @@ export class BuilderPage extends BasePage {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.sidebar().getByRole('textbox', { name: 'Key', exact: true }).last().fill(key);+ await this.sidebar().getByRole('textbox', { name: 'Value', exact: true }).last().click();await this.page.keyboard.insertText(value);await this.waitForSaveOfLastEdit();}@@ -56,10 +59,32 @@ export class BuilderPage extends BasePage {await this.replaceEditorText({ testId: 'code-editor', text: code });}+ async setTextInput({ name, value }: { name: string; value: string }) {+ await this.replaceText({ field: this.sidebar().getByRole('textbox', { name, exact: true }), text: value });+ }+async setJsonBody(json: string) {await this.replaceEditorText({ testId: 'json-editor', text: json });}+ async createConnection({ name, fields }: { name: string; fields: Record<string, string> }): Promise<string> {+ await this.sidebar().getByRole('combobox', { name: 'Connection' }).click();+ await this.page.getByRole('button', { name: 'Create Connection' }).click();+ const dialog = this.page.getByRole('dialog', { name: /^Connect to / });+ await dialog.getByLabel('Connection Name').fill(name);+ for (const [label, value] of Object.entries(fields)) {+ await dialog.getByLabel(label).fill(value);+ }+ const created = this.page.waitForResponse(+ (response) => response.request().method() === 'POST' && new URL(response.url()).pathname === '/api/v1/app-connections',+ );+ await dialog.getByRole('button', { name: 'Save' }).click();+ const response = await created;+ expect(response.ok(), `Creating the connection failed with ${response.status()}`).toBe(true);+ const connection: { id: string } = await response.json();+ return connection.id;+ }+async testStep() {await this.sidebar().getByTestId('test-step-button').click();const succeeded = this.sidebar().getByText('Tested Successfully');@@ -67,10 +92,12 @@ export class BuilderPage extends BasePage {await expect(succeeded, 'The step test failed').toBeVisible();}+ async expandStepOutput(key: string) {+ await this.stepOutput().getByRole('button', { name: new RegExp(`^${key}\\b`) }).click();+ }+async expectStepOutput({ key, value }: { key: string; value: string }) {- await expect(this.sidebar().getByRole('tabpanel', { name: 'Friendly View' })).toContainText(- new RegExp(`${key}\\s*${value}`),- );+ await expect(this.stepOutput()).toContainText(new RegExp(`${key}:?\\s*${value}`));}async testFlow() {@@ -99,12 +126,20 @@ export class BuilderPage extends BasePage {.toEqual({ status: 200, body: expected });}+ private stepOutput() {+ return this.sidebar().getByRole('tabpanel', { name: 'Friendly View' });+ }+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.replaceText({ field: this.sidebar().getByTestId(testId).getByRole('textbox'), text });+ }++ private async replaceText({ field, text }: { field: Locator; text: string }) {+ await field.click();await this.page.keyboard.press('ControlOrMeta+a');await this.page.keyboard.insertText(text);await this.waitForSaveOfLastEdit();diff --git a/packages/tests-e2e/pages/runs.page.ts b/packages/tests-e2e/pages/runs.page.tsindex af2d1169541..41561a83d37 100644--- a/packages/tests-e2e/pages/runs.page.ts+++ b/packages/tests-e2e/pages/runs.page.ts@@ -4,11 +4,17 @@ import { BasePage } from './base';export class RunsPage extends BasePage {url = `/runs`;- async expectLatestRun({ flowId, flowName, status }: { flowId: string; flowName: string; status: string }) {+ async expectLatestRun({ flowId, flowName, status, timeout = 60000 }: { flowId: string; flowName: string; status: string; timeout?: number }) {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 });+ }).toPass({ timeout });+ }++ async openLatestRun({ flowId, flowName, status }: { flowId: string; flowName: string; status: string }) {+ await this.expectLatestRun({ flowId, flowName, status });+ await this.page.getByRole('row').filter({ hasText: flowName }).first().click();+ await this.page.waitForURL(/\/runs\/[^/?#]+/);}}diff --git a/packages/tests-e2e/playwright.config.ts b/packages/tests-e2e/playwright.config.tsindex eead96ea1e5..c0dbde71fd2 100644--- a/packages/tests-e2e/playwright.config.ts+++ b/packages/tests-e2e/playwright.config.ts@@ -24,10 +24,13 @@ const editionConfigs = {const editionConfig = editionConfigs[AP_EDITION as keyof typeof editionConfigs];+const QUARANTINE = /@quarantine/;+const config: PlaywrightTestConfig = {testDir: './scenarios',testMatch: '**/*.spec.ts',testIgnore: editionConfig.testIgnore,+ grepInvert: process.env.CI ? QUARANTINE : undefined,/* Run tests in files in parallel */fullyParallel: true,/* Fail the build on CI if you accidentally left test.only in the source code. */diff --git a/packages/tests-e2e/scenarios/flows/connection-step.spec.ts b/packages/tests-e2e/scenarios/flows/connection-step.spec.tsnew file mode 100644index 00000000000..00cd5e79d53--- /dev/null+++ b/packages/tests-e2e/scenarios/flows/connection-step.spec.ts@@ -0,0 +1,38 @@+import { randomUUID } from 'node:crypto';+import { test } from '../../fixtures';+import { e2eFlows } from '../../fixtures/flows';++test.describe('Connection step', () => {+ test('a piece step sends the API key of its connection', async ({ automationsPage, builderPage, runsPage, flowCleanup, connectionCleanup }) => {+ test.setTimeout(240000);+ const apiKey = `e2e-${randomUUID()}`;++ const echo = await test.step('Publish a webhook flow for the step to call', () =>+ e2eFlows.publishWebhookEchoFlow({ automationsPage, builderPage, flowCleanup }),+ );++ await test.step('Add an Activepieces Platform step to a new flow', async () => {+ flowCleanup.track(await automationsPage.createFlow());+ await builderPage.nameNewFlow(e2eFlows.uniqueName('connection'));+ await builderPage.selectTrigger({ piece: 'Webhook', trigger: 'Catch Webhook' });+ await builderPage.addStep({ after: 'trigger', piece: 'Activepieces Platform', action: 'Custom API Call' });+ });++ await test.step('Call the webhook flow through a new connection', async () => {+ const connectionId = await builderPage.createConnection({+ name: e2eFlows.uniqueName('connection'),+ fields: { 'Base URL': echo.webhookUrl, 'API Key': apiKey },+ });+ connectionCleanup.track(connectionId);+ await builderPage.setTextInput({ name: 'URL', value: '/' });+ await builderPage.testStep();+ });++ await test.step('Find the API key in the request the webhook flow received', async () => {+ await runsPage.openLatestRun({ flowId: echo.flowId, flowName: echo.flowName, status: 'Succeeded' });+ await builderPage.openStep('trigger');+ await builderPage.expandStepOutput('headers');+ await builderPage.expectStepOutput({ key: 'authorization', value: `Bearer ${apiKey}` });+ });+ });+});diff --git a/packages/tests-e2e/scenarios/flows/flow-journey.spec.ts b/packages/tests-e2e/scenarios/flows/flow-journey.spec.tsindex bdef2e1714f..e26ed25504e 100644--- a/packages/tests-e2e/scenarios/flows/flow-journey.spec.ts+++ b/packages/tests-e2e/scenarios/flows/flow-journey.spec.ts@@ -5,7 +5,7 @@ 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 flowName = e2eFlows.uniqueName('journey');const sampleValue = randomInt(1, 1000000);const liveValue = randomInt(1, 1000000);diff --git a/packages/tests-e2e/scenarios/flows/schedule-trigger.spec.ts b/packages/tests-e2e/scenarios/flows/schedule-trigger.spec.tsnew file mode 100644index 00000000000..41a37dc5059--- /dev/null+++ b/packages/tests-e2e/scenarios/flows/schedule-trigger.spec.ts@@ -0,0 +1,25 @@+import { test } from '../../fixtures';+import { e2eFlows } from '../../fixtures/flows';++test.describe('Schedule trigger', () => {+ test('a published flow on a one-minute schedule runs by itself', async ({ automationsPage, builderPage, runsPage, flowCleanup }) => {+ test.setTimeout(240000);+ const flowName = e2eFlows.uniqueName('schedule');++ const flowId = await test.step('Create a flow that runs every minute', async () => {+ const id = await automationsPage.createFlow();+ flowCleanup.track(id);+ await builderPage.nameNewFlow(flowName);+ await builderPage.selectTrigger({ piece: 'Schedule', trigger: 'Every X Minutes' });+ return id;+ });++ await test.step('Publish the flow', async () => {+ await builderPage.publish();+ });++ await test.step('See a scheduled run succeed in the run history', async () => {+ await runsPage.expectLatestRun({ flowId, flowName, status: 'Succeeded', timeout: 150000 });+ });+ });+});diff --git a/packages/web/src/app/builder/piece-properties/properties-utils.tsx b/packages/web/src/app/builder/piece-properties/properties-utils.tsxindex 6dbdd7bfec6..bf9f2289724 100644--- a/packages/web/src/app/builder/piece-properties/properties-utils.tsx+++ b/packages/web/src/app/builder/piece-properties/properties-utils.tsx@@ -134,6 +134,7 @@ export const selectGenericFormComponentForProperty = ({initialValue={value}disabled={disabled}onChange={onChange}+ ariaLabel={t('Value')}/>): undefined@@ -340,13 +341,15 @@ export const selectGenericFormComponentForProperty = ({ariaLabel={property.displayName}></FormFieldMentionInput>) : (- <SecretInput- ref={field.ref}- value={field.value}- onChange={field.onChange}- disabled={disabled}- type="text"- ></SecretInput>+ <FormControl>+ <SecretInput+ ref={field.ref}+ value={field.value}+ onChange={field.onChange}+ disabled={disabled}+ type="text"+ ></SecretInput>+ </FormControl>)}</AutoFormFieldWrapper>);@@ -405,18 +408,22 @@ export const selectGenericFormComponentForProperty = ({}></FormFieldMentionInput>) : (- <SecretInput- ref={field.ref}- value={field.value}- onChange={field.onChange}- disabled={disabled}- placeholder={- 'placeholder' in property ? property.placeholder : undefined- }- type={- property.type === PropertyType.SECRET_TEXT ? 'password' : 'text'- }- ></SecretInput>+ <FormControl>+ <SecretInput+ ref={field.ref}+ value={field.value}+ onChange={field.onChange}+ disabled={disabled}+ placeholder={+ 'placeholder' in property ? property.placeholder : undefined+ }+ type={+ property.type === PropertyType.SECRET_TEXT+ ? 'password'+ : 'text'+ }+ ></SecretInput>+ </FormControl>)}</AutoFormFieldWrapper>);diff --git a/packages/web/src/app/builder/step-settings/code-settings/index.tsx b/packages/web/src/app/builder/step-settings/code-settings/index.tsxindex 15d9e24ba5e..639108c0fa6 100644--- a/packages/web/src/app/builder/step-settings/code-settings/index.tsx+++ b/packages/web/src/app/builder/step-settings/code-settings/index.tsx@@ -57,6 +57,7 @@ const CodeSettings = React.memo(({ readonly }: CodeSettingsProps) => {initialValue={value}disabled={disabled}onChange={onChange}+ ariaLabel={t('Value')}/>)}/>diff --git a/packages/web/src/app/connections/connection-select.tsx b/packages/web/src/app/connections/connection-select.tsxindex e68a38b6382..235b005c543 100644--- a/packages/web/src/app/connections/connection-select.tsx+++ b/packages/web/src/app/connections/connection-select.tsx@@ -194,7 +194,10 @@ export function ConnectionSelect({</div>)}- <SelectTrigger className="flex gap-2 items-center">+ <SelectTrigger+ className="flex gap-2 items-center"+ aria-label={t('Connection')}+ ><SelectValueclassName="truncate grow shrink"placeholder={t('Select a connection')}diff --git a/packages/web/src/app/connections/secret-input.tsx b/packages/web/src/app/connections/secret-input.tsxindex ebcacb9e3b6..0fed379b5fd 100644--- a/packages/web/src/app/connections/secret-input.tsx+++ b/packages/web/src/app/connections/secret-input.tsx@@ -246,6 +246,7 @@ const SecretInput = React.forwardRef<HTMLInputElement, SecretInputProps>(/>)}<Input+ {...otherProps}ref={ref}name={name}onBlur={onBlur}@@ -253,7 +254,6 @@ const SecretInput = React.forwardRef<HTMLInputElement, SecretInputProps>(className="flex-1"value={value || ''}onChange={handleNormalInputChange}- type={otherProps.type}/></div>);diff --git a/packages/web/src/components/custom/dictionary-input.tsx b/packages/web/src/components/custom/dictionary-input.tsxindex 610c127cc62..b3b0002d32a 100644--- a/packages/web/src/components/custom/dictionary-input.tsx+++ b/packages/web/src/components/custom/dictionary-input.tsx@@ -94,6 +94,7 @@ export const DictionaryInput = ({value={key}disabled={disabled}placeholder={keyPlaceholder}+ aria-label={t('Key')}className={cn('basis-[50%] max-w-[50%]', keyInputClassName)}onChange={(e) => onChangeValue(index, undefined, e.target.value)}/>@@ -109,6 +110,7 @@ export const DictionaryInput = ({value={value}disabled={disabled}placeholder={valuePlaceholder}+ aria-label={t('Value')}onChange={(e) =>onChangeValue(index, e.target.value, undefined)}diff --git a/packages/web/src/components/ui/select.tsx b/packages/web/src/components/ui/select.tsxindex bdcb39d4b58..66f86ec130d 100644--- a/packages/web/src/components/ui/select.tsx+++ b/packages/web/src/components/ui/select.tsx@@ -144,6 +144,7 @@ function SelectAction({return (<divdata-slot="select-action"+ role="button"className={cn('relative flex w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-sm outline-hidden hover:bg-gray-4 hover:text-gray-12',className,