mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 11:10:54 +00:00
fix test cases
This commit is contained in:
parent
cb0d13e0f3
commit
fe53143d8a
@ -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([
|
||||
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user