ui phase 7
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user