Skip to content

test: add API seeding infrastructure and app creation E2E scenarios#35276

Merged
lyzno1 merged 10 commits intomainfrom
test/e2e-app-management-p1
Apr 17, 2026
Merged

test: add API seeding infrastructure and app creation E2E scenarios#35276
lyzno1 merged 10 commits intomainfrom
test/e2e-app-management-p1

Conversation

@Jingyi-Dify
Copy link
Copy Markdown
Contributor

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

  • Introduces e2e/support/api.ts with createTestApp / deleteTestApp
    helpers that call the console API directly using the stored Playwright
    session, enabling fast and isolated test-data setup without UI flows
    • Extends DifyWorld with per-scenario state for app name tracking,
      seeded app ID cleanup, and download capture
    • Wires automatic cleanup into the After hook so every seeded app is
      deleted after each scenario, regardless of pass/fail
    • Adds E2E scenarios for the three previously uncovered app creation
      modes: Agent, Chatflow (Advanced Chat), and Text Generator (Completion)

Test plan

  • pnpm -C e2e check passes (type-check + lint)
  • CI E2E run covers @apps @core tag scenarios
  • Seeded apps are removed from the workspace after each test run

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 && make type-check (backend) and cd web && pnpm exec vp staged (frontend) to appease the lint gods

@Jingyi-Dify Jingyi-Dify requested review from iamjoel and lyzno1 April 16, 2026 00:29
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Apr 16, 2026
@Jingyi-Dify Jingyi-Dify changed the title test(e2e): add API seeding infrastructure and app creation E2E scenarios test: add API seeding infrastructure and app creation E2E scenarios Apr 16, 2026
@Jingyi-Dify Jingyi-Dify force-pushed the test/e2e-app-management-p1 branch 2 times, most recently from 0749abd to cd8b989 Compare April 17, 2026 01:08
@lyzno1 lyzno1 self-assigned this Apr 17, 2026
Jingyi-Dify and others added 10 commits April 16, 2026 23:10
- delete: use getByTitle to avoid strict mode violation from closing AlertDialog span
- duplicate: remove getByRole('dialog').toBeVisible() - HeadlessUI Dialog wrapper has
  zero height (fixed-position children), Playwright sees it as hidden; click button directly
- switch: same HeadlessUI dialog visibility fix; click 'Start switch' button directly
- export: use chat app in Given step - new workflow apps have no draft, causing
  fetchWorkflowDraft to return 404 and silently abort the export

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Jingyi-Dify Jingyi-Dify force-pushed the test/e2e-app-management-p1 branch from 180a639 to d0c06a0 Compare April 17, 2026 06:11
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 17, 2026
@lyzno1 lyzno1 added this pull request to the merge queue Apr 17, 2026
Merged via the queue into main with commit f5e9b02 Apr 17, 2026
27 checks passed
@lyzno1 lyzno1 deleted the test/e2e-app-management-p1 branch April 17, 2026 06:38
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 needs-revision size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants