Comfy-Org / Comfy-Org/ComfyUI_frontend

Migrate SubscriptionAddPaymentPreviewWorkspace tests to real Vue I18n

Open
#17,153 0 comments 0 reactions 1 assignee Claimed by @wei-hai View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
697
Avg merge
1d 3h
Merged PRs (30d)
495

Description

## Summary

Migrate `src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.test.ts` from its mocked `vue-i18n` setup to the repository's real Vue I18n plugin.

## Rationale

The current `vi.mock('vue-i18n')`, `$t` mock, and `i18n-t` stub return translation keys. Tests that assert visible text therefore do not validate that the English locale contains the expected translation entries. This affects existing assertions and the parked-checkout recovery strings.

## Affected area

- `src/platform/workspace/components/SubscriptionAddPaymentPreviewWorkspace.test.ts`
- The repository Vue I18n test setup and relevant locale resources, if required

## Required changes

- Remove the file-local mocked Vue I18n setup.
- Render the component with the repository's real Vue I18n plugin.
- Update affected test assertions to validate rendered English translations.
- Keep component behavior and test coverage unchanged unless an assertion requires adjustment for the real plugin.

## Acceptance criteria

- The test file does not mock `vue-i18n`, `$t`, or `i18n-t`.
- Tests render through the real Vue I18n plugin.
- Translation assertions validate actual locale output, including the parked-checkout recovery prompt.
- The affected test suite passes.

## Context

Requested by @wei-hai.

- Related pull request: https://github.com/Comfy-Org/ComfyUI_frontend/pull/17121
- Related review comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/17121#discussion_r3946997850

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.