ui phase 7

This commit is contained in:
hamid
2026-07-19 11:56:59 +03:30
parent a438edeeaa
commit edc38543fd
39 changed files with 1538 additions and 208 deletions
@@ -56,10 +56,13 @@ describe('<PayoutHistoryRow/> component', () => {
expect(screen.getByText('IR••••4821')).toBeInTheDocument();
});
it('surfaces a failed payout reason as a read-only banner with no retry control', () => {
it('surfaces a mapped failure label as the headline and the raw code as a secondary LTR caption', () => {
renderRow(makeItem('failed'));
expect(screen.getByText('failure_title')).toBeInTheDocument();
expect(screen.getByText(/invalid_sheba/)).toBeInTheDocument();
// The headline is the mapped Persian/English label (never the raw vendor string).
expect(screen.getByText('failure_code_invalid_sheba')).toBeInTheDocument();
// The raw code still appears, demoted to a secondary dir="ltr" caption.
expect(screen.getByText('invalid_sheba')).toHaveAttribute('dir', 'ltr');
// No retry affordance for the nurse — only the "view detail" link exists.
expect(screen.queryByText('retry')).not.toBeInTheDocument();
});