From 79192e29b688fcb503a3b0e816201b2bf9f44a34 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Tue, 25 Feb 2025 13:12:55 -0800 Subject: [PATCH] fix jest testing --- tests/javascripts/totalMessagesChart.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/javascripts/totalMessagesChart.test.js b/tests/javascripts/totalMessagesChart.test.js index 87c671430..5138f9a43 100644 --- a/tests/javascripts/totalMessagesChart.test.js +++ b/tests/javascripts/totalMessagesChart.test.js @@ -22,7 +22,7 @@ Object.defineProperty(HTMLElement.prototype, 'clientWidth', { beforeEach(() => { // Set up the DOM with the D3 script included document.body.innerHTML = ` -
+

Total Messages

@@ -76,8 +76,8 @@ test('Populates the accessible table correctly', () => { expect(headers[1].textContent).toBe('Remaining'); const firstRowCells = rows[1].getElementsByTagName('td'); - expect(firstRowCells[0].textContent).toBe('100'); - expect(firstRowCells[1].textContent).toBe('249,900'); + expect(firstRowCells[0].textContent).toBe('28,081'); + expect(firstRowCells[1].textContent).toBe('71,919'); }); // Test to check if the chart title is correctly set @@ -114,7 +114,7 @@ test('Chart resizes correctly on window resize', done => { // Testing the tooltip test('Tooltip displays on hover', () => { document.body.innerHTML = ` -
+

Total Messages