test(e2e): add download flow tests and fix status CSS classes
CI / Test (Python 3.11) (push) Has been cancelled
CI / Test (Python 3.12) (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Summary (push) Has been cancelled

- Add Playwright E2E tests covering real user download journeys:
  - Search anime → choose episodes → trigger download (with toast)
  - Real file download via static fixture and verify completion in UI
  - Click new release on homepage → switch to anime search tab
  - Search for series and display mocked results
- Fix bug in downloads_list.html: CSS classes used task.status (enum)
  which rendered as 'status-DownloadStatus.COMPLETED' instead of
  'status-completed'. Use task.status.value for correct CSS class names.
- Add static test fixture (20KB fake MP4) for reliable download tests
- All 16 E2E tests passing (12 existing + 4 new)
This commit is contained in:
Kimi Agent
2026-05-12 12:18:32 +00:00
parent 520be53901
commit 6521fe3416
3 changed files with 321 additions and 2 deletions
+2 -2
View File
@@ -1,10 +1,10 @@
{% if tasks %}
<div class="downloads-grid">
{% for task in tasks %}
<div class="download-item status-{{ task.status }}">
<div class="download-item status-{{ task.status.value }}">
<div class="download-info">
<span class="download-name" title="{{ task.filename }}">{{ task.filename }}</span>
<span class="badge badge-{{ task.status }}">{{ task.status | upper }}</span>
<span class="badge badge-{{ task.status.value }}">{{ task.status | upper }}</span>
</div>
<div class="progress-container">