Skip to content

Commit

Permalink
fix test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jadeddelta committed Nov 4, 2024
1 parent cb0d13e commit fe53143
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/plugin-html-button-response/src/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import htmlButtonResponse from ".";

jest.useFakeTimers();

beforeEach(() => {
document.body.innerHTML = "";
});

describe("html-button-response", () => {
it("displays html stimulus and buttons", async () => {
const { getHTML } = await startTimeline([
Expand Down Expand Up @@ -151,7 +155,8 @@ describe("html-button-response", () => {
},
]);

const btns = document.querySelectorAll(".jspsych-html-button-response-button button");
const btns = document.querySelectorAll("div#jspsych-html-button-response-btngroup button");
expect(btns.length).toBeGreaterThan(0);

for (let i = 0; i < btns.length; i++) {
expect(btns[i].getAttribute("disabled")).toBe("disabled");
Expand Down

0 comments on commit fe53143

Please sign in to comment.