ADORSYS-GIS / ADORSYS-GIS/webank-UserApp

Implement an Advanced Testing Strategy

未关闭
#347 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
5
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

### Description

**Priority:** Medium
**Type:** Improvement
**Dependencies:** : Refactor Project Structure

**Description:**
The current testing approach focuses too much on implementation details and lacks integration and end-to-end (E2E) tests. We need to adopt a modern testing strategy that provides more confidence.

**Acceptance Criteria:**
- Refactor existing tests to use `@testing-library/user-event` instead of `fireEvent` for more realistic user interaction simulation.
- Set up Mock Service Worker (MSW) to mock API requests at the network level for integration tests.
- Write at least two integration tests for a feature that involves data fetching (e.g., the dashboard).
- Set up an E2E testing framework like Playwright or Cypress.
- Write one E2E test for a critical user flow, such as the login and KYC submission process.

**Technical Notes:**
- The testing pyramid (unit, integration, E2E) should be our guide.
- MSW allows you to write tests that are completely decoupled from your data-fetching library (TanStack Query).

---

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。