Skip to content

test: init e2e#34193

Merged
hyoban merged 17 commits intomainfrom
3-27-e2e
Mar 29, 2026
Merged

test: init e2e#34193
hyoban merged 17 commits intomainfrom
3-27-e2e

Conversation

@hyoban
Copy link
Copy Markdown
Member

@hyoban hyoban commented Mar 27, 2026

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

fixes #32473

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran make lint and make type-check (backend) and cd web && npx lint-staged (frontend) to appease the lint gods

@asukaminato0721 asukaminato0721 self-requested a review March 27, 2026 10:23
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.87%. Comparing base (a117187) to head (38dda33).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #34193      +/-   ##
==========================================
- Coverage   81.87%   81.87%   -0.01%     
==========================================
  Files        4495     4495              
  Lines      176440   176440              
  Branches    34946    34946              
==========================================
- Hits       144454   144453       -1     
+ Misses      29125    29124       -1     
- Partials     2861     2863       +2     
Flag Coverage Δ
api 80.56% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hyoban hyoban marked this pull request as ready for review March 29, 2026 03:03
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 29, 2026
@asukaminato0721 asukaminato0721 self-requested a review March 29, 2026 05:56
@asukaminato0721 asukaminato0721 requested a review from Copilot March 29, 2026 05:56
@asukaminato0721
Copy link
Copy Markdown
Contributor

@dosu how about this pr

@dosubot
Copy link
Copy Markdown

dosubot Bot commented Mar 29, 2026

This PR initializes Playwright as the e2e testing framework for Dify's frontend [1]. It addresses issue #32473 which identified the need for browser-based UI workflow testing [2].

Context:

  • Dify currently uses Vitest + React Testing Library for unit tests but lacked e2e coverage
  • The backend already has pytest + Testcontainers for integration tests
  • This PR fills that gap by adding Playwright for browser-based e2e testing

What to expect:

  • A new Playwright test directory (likely web/e2e/)
  • playwright.config.ts configuration
  • CI/CD integration with path-based filtering

The PR looks like a good foundational step toward the comprehensive testing strategy outlined in #32473. I wasn't able to access the specific file diffs, so I can't comment on implementation details, but the approach aligns well with the testing roadmap discussed in the issue.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor  Share on X

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Introduces a new repository-level e2e/ package to run full-stack end-to-end tests (source API + built web + Docker middleware) using Cucumber + Playwright, and wires it into CI.

Changes:

  • Added a standalone e2e/ workspace with Cucumber feature files, Playwright auth bootstrapping, and TS scripts to orchestrate middleware/API/web lifecycle.
  • Added a dedicated GitHub Actions workflow to run the E2E suite and integrated it into main-ci with path-based change detection.
  • Updated docker-compose.middleware.yaml to allow the plugin daemon container to reach the host API via host.docker.internal.

Reviewed changes

Copilot reviewed 26 out of 27 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
e2e/vite.config.ts Vite+ config for formatting/lint/type-check in the e2e package.
e2e/tsconfig.json TypeScript configuration for the e2e package.
e2e/test-env.ts Centralized env defaults and flags for E2E runtime.
e2e/support/web-server.ts Web server lifecycle (start/reuse/readiness/stop) for E2E runs.
e2e/support/process.ts Process + polling utilities (spawn with logs, URL probing, shutdown).
e2e/scripts/setup.ts Entry point for resetting state, starting middleware, and running API/web.
e2e/scripts/run-cucumber.ts Orchestrates E2E run: start services, run Cucumber, cleanup.
e2e/scripts/common.ts Shared helpers for running commands, dotenv parsing, and waits.
e2e/pnpm-lock.yaml Lockfile for the e2e workspace.
e2e/package.json e2e workspace manifest, scripts, and toolchain dependencies.
e2e/fixtures/auth.ts Playwright-based auth bootstrap + persisted storage state for scenarios.
e2e/features/support/world.ts Custom Cucumber world holding Playwright context/page + session metadata.
e2e/features/support/hooks.ts Suite hooks: shared browser, auth bootstrap, artifacts on failure.
e2e/features/step-definitions/smoke/install.steps.ts Step for asserting bootstrap mode is fresh install.
e2e/features/step-definitions/common/navigation.steps.ts Steps for basic navigation + UI assertions.
e2e/features/step-definitions/common/auth.steps.ts Step for asserting/attaching authenticated session info.
e2e/features/step-definitions/apps/create-app.steps.ts Steps to create a blank app and verify editor navigation.
e2e/features/smoke/install.feature Fresh-install smoke feature (tagged @fresh).
e2e/features/smoke/authenticated-entry.feature Authenticated entry smoke feature.
e2e/features/apps/create-app.feature Feature for creating a new app and reaching the editor.
e2e/cucumber.config.ts Cucumber config (formats, paths, tags, timeouts).
e2e/README.md Pointer to canonical e2e docs.
e2e/AGENTS.md Canonical documentation for running/debugging the e2e suite.
e2e/.gitignore Ignores generated auth state, reports, logs, and node_modules.
docker/docker-compose.middleware.yaml Adds extra_hosts mapping for host.docker.internal.
.github/workflows/web-e2e.yml New CI workflow to run the full-stack E2E suite and upload artifacts.
.github/workflows/main-ci.yml Adds change-detection + required-check wrapper job for web E2E.
Files not reviewed (1)
  • e2e/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/support/web-server.ts Outdated
Comment thread .github/workflows/web-e2e.yml Outdated
Comment thread e2e/support/process.ts Outdated
Comment thread e2e/fixtures/auth.ts Outdated
Comment thread e2e/package.json
Comment thread e2e/package.json
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 26 out of 27 changed files in this pull request and generated 4 comments.

Files not reviewed (1)
  • e2e/pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread e2e/pnpm-lock.yaml
Comment thread e2e/pnpm-lock.yaml
Comment thread e2e/AGENTS.md
Comment thread e2e/scripts/run-cucumber.ts Outdated
hyoban and others added 2 commits March 29, 2026 21:18
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@asukaminato0721 asukaminato0721 self-requested a review March 29, 2026 13:29
@hyoban hyoban enabled auto-merge March 29, 2026 13:30
@hyoban hyoban added this pull request to the merge queue Mar 29, 2026
Merged via the queue into main with commit 548cada Mar 29, 2026
31 checks passed
@hyoban hyoban deleted the 3-27-e2e branch March 29, 2026 13:53
@hyoban hyoban mentioned this pull request Mar 30, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Refactor/Chore] add e2e test

3 participants