mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18:11 +00:00
fix issues from review
This commit is contained in:
parent
e537037af7
commit
0c73c39995
@ -1,4 +1,4 @@
|
||||
f<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>My experiment</title>
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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'");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user