From 4594f5ccecb29ce9324ff9355d0b1528bcb5c18d Mon Sep 17 00:00:00 2001 From: Josh de Leeuw Date: Fri, 2 Feb 2024 16:57:27 -0500 Subject: [PATCH] fix failing test because I forgot to implement it --- packages/plugin-survey-number/src/index.spec.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/plugin-survey-number/src/index.spec.ts b/packages/plugin-survey-number/src/index.spec.ts index 1e29cff2..f484040f 100644 --- a/packages/plugin-survey-number/src/index.spec.ts +++ b/packages/plugin-survey-number/src/index.spec.ts @@ -9,11 +9,16 @@ describe("my plugin", () => { const { expectFinished, getHTML, getData, displayElement, jsPsych } = await startTimeline([ { type: jsPsychSurveyNumber, - parameter_name: 1, - parameter_name2: "img.png", + questions: [{ prompt: "How old are you?" }], }, ]); + expect(getHTML()).toMatch("How old are you?"); + + displayElement.querySelector("input").value = "25"; + + (displayElement.querySelector("#jspsych-survey-text-next") as HTMLInputElement).click(); + await expectFinished(); }); });