mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
remove video tests (console error when plugin tries to pause video)
This commit is contained in:
parent
5ea70030be
commit
62db19826e
@ -58,27 +58,6 @@ describe('data conversion to csv', function(){
|
|||||||
expect(csv_data).toBe('"answer","correct","stimulus","key_press","trial_index"\r\n"different","false","[""<p>Climbing</p>"",""<p>Walking</p>""]","q","0"\r\n')
|
expect(csv_data).toBe('"answer","correct","stimulus","key_press","trial_index"\r\n"different","false","[""<p>Climbing</p>"",""<p>Walking</p>""]","q","0"\r\n')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('video-button-response stimulus array is correctly converted', function(){
|
|
||||||
require(root + 'plugins/jspsych-video-button-response.js');
|
|
||||||
|
|
||||||
var trial = {
|
|
||||||
type: 'video-button-response',
|
|
||||||
stimulus: ['vid/video.mp4'],
|
|
||||||
choices: ['button']
|
|
||||||
}
|
|
||||||
|
|
||||||
var timeline = [trial];
|
|
||||||
|
|
||||||
jsPsych.init({timeline: timeline});
|
|
||||||
|
|
||||||
expect(jsPsych.getDisplayElement().innerHTML).toMatch('video.mp4');
|
|
||||||
utils.clickTarget(document.querySelector('#jspsych-video-button-response-button-0'));
|
|
||||||
expect(jsPsych.getDisplayElement().innerHTML).toBe('');
|
|
||||||
|
|
||||||
var csv_data = jsPsych.data.get().ignore(['rt','internal_node_id','time_elapsed','trial_type']).csv();
|
|
||||||
expect(csv_data).toBe('"stimulus","button_pressed","trial_index"\r\n"[""vid/video.mp4""]","0","0"\r\n');
|
|
||||||
})
|
|
||||||
|
|
||||||
test('survey-multi-select response array is correctly converted', function(){
|
test('survey-multi-select response array is correctly converted', function(){
|
||||||
require(root + 'plugins/jspsych-survey-multi-select.js');
|
require(root + 'plugins/jspsych-survey-multi-select.js');
|
||||||
|
|
||||||
|
@ -59,27 +59,6 @@ describe('data conversion to json', function(){
|
|||||||
expect(json_data).toBe(JSON.stringify([{answer: 'different', correct: false, stimulus: ['<p>Climbing</p>','<p>Walking</p>'], key_press: 'q', trial_index: 0}]));
|
expect(json_data).toBe(JSON.stringify([{answer: 'different', correct: false, stimulus: ['<p>Climbing</p>','<p>Walking</p>'], key_press: 'q', trial_index: 0}]));
|
||||||
})
|
})
|
||||||
|
|
||||||
test('video-button-response stimulus array is correctly converted', function(){
|
|
||||||
require(root + 'plugins/jspsych-video-button-response.js');
|
|
||||||
|
|
||||||
var trial = {
|
|
||||||
type: 'video-button-response',
|
|
||||||
stimulus: ['vid/video.mp4'],
|
|
||||||
choices: ['button']
|
|
||||||
}
|
|
||||||
|
|
||||||
var timeline = [trial];
|
|
||||||
|
|
||||||
jsPsych.init({timeline: timeline});
|
|
||||||
|
|
||||||
expect(jsPsych.getDisplayElement().innerHTML).toMatch('video.mp4');
|
|
||||||
utils.clickTarget(document.querySelector('#jspsych-video-button-response-button-0'));
|
|
||||||
expect(jsPsych.getDisplayElement().innerHTML).toBe('');
|
|
||||||
|
|
||||||
var json_data = jsPsych.data.get().ignore(['rt','internal_node_id','time_elapsed','trial_type']).json();
|
|
||||||
expect(json_data).toBe(JSON.stringify([{stimulus: ['vid/video.mp4'], button_pressed: 0, trial_index: 0}]));
|
|
||||||
})
|
|
||||||
|
|
||||||
test('survey-multi-select response array is correctly converted', function(){
|
test('survey-multi-select response array is correctly converted', function(){
|
||||||
require(root + 'plugins/jspsych-survey-multi-select.js');
|
require(root + 'plugins/jspsych-survey-multi-select.js');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user