From 655b63ce91d885223ac761d17a93fcfff785d40b Mon Sep 17 00:00:00 2001 From: Henry Burgess Date: Mon, 20 Oct 2025 13:14:23 -0500 Subject: [PATCH 1/3] INT-82 Fix mis-named `trial_number` variable --- src/view/screens/Loading/index.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/view/screens/Loading/index.tsx b/src/view/screens/Loading/index.tsx index 7644b70..c225b21 100644 --- a/src/view/screens/Loading/index.tsx +++ b/src/view/screens/Loading/index.tsx @@ -80,7 +80,7 @@ const Loading: FC = ( const startTime = performance.now(); // Collate data from 'playerChoice' trials consola.info(`Collating data...`); - const dataCollection = jsPsych.data + const collection: Dataframe[] = jsPsych.data .get() .filter({ display: "playerChoice", @@ -89,15 +89,15 @@ const Loading: FC = ( consola.debug( `'dataCollection' containing trials with 'display' = 'playerChoice':`, - dataCollection + collection ); // Format the responses to be sent to the server - const requestResponses = []; - for (const row of dataCollection) { - requestResponses.push({ + const requestData = []; + for (const row of collection) { + requestData.push({ ID: "NA", - Trial: row.trial, + Trial: row.trial_number, // INT-82: Rename from `trial` to `trial_number` ppt1: row.playerPoints_option1, par1: row.partnerPoints_option1, ppt2: row.playerPoints_option2, @@ -106,11 +106,11 @@ const Loading: FC = ( Phase: 1, }); } - consola.debug(`Request content 'requestResponses':`, requestResponses); + consola.debug(`Request data 'requestData':`, requestData); // Launch model computation consola.info(`Running model computation...`); - const response = await window.Compute.submit(requestResponses, false); // INT-80: Should be `false` in production + const response = await window.Compute.submit(requestData, false); // INT-80: Should be `false` in production // Parse and store the JSON content try { From 8d096ed5cb5451ae77ac8f56fd2f1ce163dbaf5f Mon Sep 17 00:00:00 2001 From: Henry Burgess Date: Wed, 29 Oct 2025 17:53:32 -0500 Subject: [PATCH 2/3] INT-82 Correct wording error --- src/view/screens/Questionnaires/Status/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/view/screens/Questionnaires/Status/index.tsx b/src/view/screens/Questionnaires/Status/index.tsx index 8249d0b..7a16d31 100644 --- a/src/view/screens/Questionnaires/Status/index.tsx +++ b/src/view/screens/Questionnaires/Status/index.tsx @@ -218,7 +218,7 @@ const Status: FC = ( justify={"center"} align={"center"} gap={"small"} - style={{ maxWidth: "70%", margin: "auto" }} + style={{ maxWidth: "72%", margin: "auto" }} animation={["fadeIn"]} > @@ -226,7 +226,7 @@ const Status: FC = ( - Across all social media accounts, how many followers do you have? + Across all social media accounts, how many followers do you have? = ( - Across all social media accounts, how many people are following you? + Across all social media accounts, how many people are you following? Date: Wed, 29 Oct 2025 18:01:06 -0500 Subject: [PATCH 3/3] INT-82 Update text for corrected wording --- test/view/screens/Status.test.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/test/view/screens/Status.test.tsx b/test/view/screens/Status.test.tsx index 4ed7504..d62d607 100644 --- a/test/view/screens/Status.test.tsx +++ b/test/view/screens/Status.test.tsx @@ -89,19 +89,5 @@ test("loads and displays Status screen page 2", async () => { continueButton.click(); }); - await waitFor(() => - screen.queryByText( - "Across all social media accounts, how many followers do you have?" - ) - ); - expect( - screen.queryByText( - "Across all social media accounts, how many followers do you have?" - ) - ).not.toBeNull(); - expect( - screen.queryByText( - "Across all social media accounts, how many people are following you?" - ) - ).not.toBeNull(); + expect(screen.queryAllByText(/Across all social media accounts,/i)).toHaveLength(2); });