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 { 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? { 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); });