mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-10 19:20:55 +00:00
Merge pull request #3213 from jspsych/add-response-ends-trial-vs-circle
Fix display clearing bug in visual search circle plugin version 1.2.0
(rebased-with-history from commit daea41bd16
)
This commit is contained in:
commit
d431e03c4b
5
.changeset/clever-coats-invent.md
Normal file
5
.changeset/clever-coats-invent.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@jspsych/plugin-visual-search-circle": patch
|
||||
---
|
||||
|
||||
Fix display clearing problem introduced with version 1.2.0
|
@ -28,6 +28,8 @@ describe("visual-search-circle", () => {
|
||||
await pressKey("a");
|
||||
await expectFinished();
|
||||
|
||||
expect(displayElement.querySelectorAll("img").length).toBe(0);
|
||||
|
||||
expect(getData().values()[0].correct).toBe(true);
|
||||
});
|
||||
|
||||
@ -58,6 +60,8 @@ describe("visual-search-circle", () => {
|
||||
jest.runAllTimers();
|
||||
await expectFinished();
|
||||
|
||||
expect(displayElement.querySelectorAll("img").length).toBe(0);
|
||||
|
||||
expect(getData().values()[0].correct).toBe(true);
|
||||
});
|
||||
});
|
||||
|
@ -166,6 +166,8 @@ class VisualSearchCirclePlugin implements JsPsychPlugin<Info> {
|
||||
};
|
||||
|
||||
const end_trial = () => {
|
||||
display_element.innerHTML = "";
|
||||
|
||||
this.jsPsych.pluginAPI.clearAllTimeouts();
|
||||
this.jsPsych.pluginAPI.cancelAllKeyboardResponses();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user