fix issues from review

This commit is contained in:
Josh de Leeuw 2017-07-26 12:04:54 -04:00
parent e537037af7
commit 0c73c39995
3 changed files with 9 additions and 6 deletions

View File

@ -1,4 +1,4 @@
f<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<title>My experiment</title>

View File

@ -10,11 +10,10 @@
var trial = {
type: 'instructions',
pages: function() {
return ['Welcome to the experiment. Click next to begin.',
pages: ['Welcome to the experiment. Click next to begin.',
'This is the second page of instructions.',
'This is the final page.'
]},
],
show_clickable_nav: true
}

View File

@ -16,14 +16,18 @@ describe('survey-multi-select plugin', function(){
test('quoted values for options work', function(){
var trial = {
type: 'survey-multi-select',
questions: ['foo'],
options: [['Hello "boo"', "yes, 'bar'"]]
questions: [{
prompt: 'foo',
options: ['Hello "boo"', "yes, 'bar'"]
}]
}
jsPsych.init({
timeline: [trial]
});
console.log(jsPsych.getDisplayElement().innerHTML);
expect(jsPsych.getDisplayElement().querySelector('#jspsych-survey-multi-select-option-0-0 input').value).toBe('Hello "boo"');
expect(jsPsych.getDisplayElement().querySelector('#jspsych-survey-multi-select-option-0-1 input').value).toBe("yes, 'bar'");