-
-
Notifications
You must be signed in to change notification settings - Fork 180
Open
Description
Summary
Two E2E test suites are currently skipped due to D1 migration timing/propagation issues in CI:
tests/e2e/29-email-plugin-settings.spec.tstests/e2e/44-otp-login-admin.spec.ts
These tests pass locally but fail in CI even after migrations execute successfully.
Background
These tests were skipped in PR #581 to unblock the merge of the component-based plugin settings architecture feature. The tests verify:
-
Email Plugin Settings (
29-email-plugin-settings.spec.ts)- Navigation to email plugin settings from plugins page
- Display of email settings form with all fields (API key, from email, from name, etc.)
- Save settings functionality
- Required field validation
- Test email section display
-
OTP Login Admin (
44-otp-login-admin.spec.ts)- OTP Login plugin settings page loading
- Test email form display
- Email preview section display
- Code settings form display
- Quick links to related settings
- Email configuration status
- Features list display
- Save settings button
- Send test code functionality
Root Cause Investigation
The CI workflow:
- Creates a fresh D1 database for each PR
- Runs migrations (020_add_email_plugin.sql, 026_add_otp_login.sql)
- Deploys to Cloudflare Workers preview
- Runs E2E tests
Migrations execute successfully (confirmed by ✅ markers in CI logs), but the Email plugin card is not visible when tests run. This suggests a timing/propagation delay between:
- D1 migration completion
- Data being available to the Worker
Potential Solutions to Investigate
- Add delay after migrations - Wait for D1 propagation before running tests
- Verify data availability - Add a health check endpoint that confirms plugin data exists
- D1 eventual consistency - Research if D1 has eventual consistency behavior and workarounds
- Worker restart - Check if Worker needs restart/redeploy after migrations
- Database binding timing - Investigate if database bindings need time to propagate
Acceptance Criteria
- Identify root cause of D1 propagation delay
- Implement fix in CI workflow or application code
- Re-enable skipped tests by removing
test.describe.skip - Verify tests pass consistently in CI (run multiple times)
Related
- PR feat: component-based plugin settings architecture #581 - Original PR where tests were skipped
- Migrations:
020_add_email_plugin.sql,026_add_otp_login.sql
🤖 Generated with Claude Code
Metadata
Metadata
Assignees
Labels
No labels