[PR #29616] test: enhance workflow-log component tests with comprehensive coverage #32483

Closed
opened 2026-02-21 20:51:29 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/29616

State: closed
Merged: Yes


Summary

Refactor and enhance test coverage for web/app/components/app/workflow-log/ components by splitting into focused test files.

Changes

Split monolithic index.spec.tsx into focused test files:

File Purpose Key Tests
detail.spec.tsx DetailPanel component URL generation, replay button, close action
filter.spec.tsx Filter component Status/period/keyword filtering, clear actions
list.spec.tsx WorkflowAppLogList Sorting, drawer, replay, status display, unread indicator
trigger-by-display.spec.tsx TriggerByDisplay All trigger types, plugin metadata, theme switching
index.spec.tsx Logs container SWR integration, filter/pagination

Coverage Results

 app/components/app/workflow-log               |     100 |    97.02 |   94.73 |     100 |
  detail.tsx                                   |     100 |      100 |     100 |     100 |
  filter.tsx                                   |     100 |     87.5 |   85.71 |     100 |
  index.tsx                                    |     100 |      100 |     100 |     100 |
  list.tsx                                     |     100 |    95.91 |     100 |     100 |
  trigger-by-display.tsx                       |     100 |      100 |     100 |     100 |

Test Suites: 5 passed, 5 total
Tests:       138 passed, 138 total

Test Plan

  • All 138 tests passing
  • 100% statement coverage
  • 97% branch coverage
  • ESLint and TypeScript checks pass
**Original Pull Request:** https://github.com/langgenius/dify/pull/29616 **State:** closed **Merged:** Yes --- ## Summary Refactor and enhance test coverage for `web/app/components/app/workflow-log/` components by splitting into focused test files. ## Changes Split monolithic `index.spec.tsx` into focused test files: | File | Purpose | Key Tests | |------|---------|-----------| | `detail.spec.tsx` | DetailPanel component | URL generation, replay button, close action | | `filter.spec.tsx` | Filter component | Status/period/keyword filtering, clear actions | | `list.spec.tsx` | WorkflowAppLogList | Sorting, drawer, replay, status display, unread indicator | | `trigger-by-display.spec.tsx` | TriggerByDisplay | All trigger types, plugin metadata, theme switching | | `index.spec.tsx` | Logs container | SWR integration, filter/pagination | ## Coverage Results ``` app/components/app/workflow-log | 100 | 97.02 | 94.73 | 100 | detail.tsx | 100 | 100 | 100 | 100 | filter.tsx | 100 | 87.5 | 85.71 | 100 | index.tsx | 100 | 100 | 100 | 100 | list.tsx | 100 | 95.91 | 100 | 100 | trigger-by-display.tsx | 100 | 100 | 100 | 100 | Test Suites: 5 passed, 5 total Tests: 138 passed, 138 total ``` ## Test Plan - [x] All 138 tests passing - [x] 100% statement coverage - [x] 97% branch coverage - [x] ESLint and TypeScript checks pass
yindo added the pull-request label 2026-02-21 20:51:29 -05:00
yindo closed this issue 2026-02-21 20:51:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#32483