Skip to content

Commit 135a112

Browse files
committed
fix failing formatting test
1 parent c3788f4 commit 135a112

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/test/model-summary-total.test.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ describe('Model Summary Total Row', () => {
8080
const cells = totalRow?.querySelectorAll('td');
8181
expect(cells).toHaveLength(6);
8282

83-
// Check the total values in the cells
83+
// Check the total values in the cells - use dynamic expectations to match locale formatting
8484
expect(cells?.[0]?.textContent).toBe('Total');
85-
expect(cells?.[1]?.textContent).toBe('1,500');
86-
expect(cells?.[2]?.textContent).toBe('1,200');
87-
expect(cells?.[3]?.textContent).toBe('300');
85+
expect(cells?.[1]?.textContent).toBe(expectedTotalRequests.toLocaleString());
86+
expect(cells?.[2]?.textContent).toBe(expectedCompliantRequests.toLocaleString());
87+
expect(cells?.[3]?.textContent).toBe(expectedExceedingRequests.toLocaleString());
8888
expect(cells?.[4]?.textContent).toBe('—');
8989
expect(cells?.[5]?.textContent).toBe('—');
9090
});

0 commit comments

Comments
 (0)