fix: improve transaction status trend inspection

This commit is contained in:
2026-08-22 17:25:23 +08:00
parent e7655262ac
commit f3f8a0bb99
4 changed files with 326 additions and 81 deletions

View File

@@ -4,7 +4,7 @@ import { describe, expect, it } from 'vitest';
import TransactionStatusChart from './TransactionStatusChart.svelte';
describe('TransactionStatusChart', () => {
it('renders canonical labels, exact accessible values, and a data-table alternative', () => {
it('renders canonical labels and exact accessible values without a duplicate data table', () => {
render(TransactionStatusChart, {
data: [
{ status: 'Verified', count: 60, sharePercent: '60' },
@@ -16,7 +16,7 @@ describe('TransactionStatusChart', () => {
expect(screen.getByRole('button', { name: /پرداخت‌شده، در انتظار تأیید، ۱۰ تراکنش، ۱۰٪/ })).toBeTruthy();
expect(screen.getByRole('button', { name: /تأیید نهایی، ۶۰ تراکنش، ۶۰٪/ })).toBeTruthy();
expect(screen.getByText('جدول داده‌های نمودار وضعیت')).toBeTruthy();
expect(screen.getByRole('table')).toBeTruthy();
expect(screen.queryByText('جدول داده‌های نمودار وضعیت')).toBeNull();
expect(screen.queryByRole('table')).toBeNull();
});
});