function testGetUnfilledRequiredItems() {
  var q = new vsaq.Questionnaire(root);
  q.setTemplate(QUESTIONNAIRE);
  // should be 4: box, radio, line, yesno
  assertEquals(4, q.rootBlock_.getUnansweredCount());
  q.setValues({'yesno_id': 'yes'});
  assertEquals(3, q.rootBlock_.getUnansweredCount());
  q.setValues({'yesno_id': 'yes', 'line_id': 'blah'});
  var unfilled = q.getUnfilledRequiredItems();
  assertEquals(unfilled.length, 1);
  assertEquals(unfilled[0].id, 'box_id');
  q.setValues({'yesno_id': 'no', 'box_id': 'box'});
  unfilled = q.getUnfilledRequiredItems();
  assertEquals(unfilled.length, 0);
}
/**
 * Test unfilled required items handling.
 */
Test unfilled required items handling.
Test unfilled required items handling .
function testGetUnfilledRequiredItems() {
  var q = new vsaq.Questionnaire(root);
  q.setTemplate(QUESTIONNAIRE);
  assertEquals(4, q.rootBlock_.getUnansweredCount());
  q.setValues({'yesno_id': 'yes'});
  assertEquals(3, q.rootBlock_.getUnansweredCount());
  q.setValues({'yesno_id': 'yes', 'line_id': 'blah'});
  var unfilled = q.getUnfilledRequiredItems();
  assertEquals(unfilled.length, 1);
  assertEquals(unfilled[0].id, 'box_id');
  q.setValues({'yesno_id': 'no', 'box_id': 'box'});
  unfilled = q.getUnfilledRequiredItems();
  assertEquals(unfilled.length, 0);
}
function testGetUnfilledRequiredItems ( ) { var q = new vsaq . Questionnaire ( root ) ; q . setTemplate ( QUESTIONNAIRE ) ; assertEquals ( 4 , q . rootBlock_ . getUnansweredCount ( ) ) ; q . setValues ( { 'yesno_id' : 'yes' } ) ; assertEquals ( 3 , q . rootBlock_ . getUnansweredCount ( ) ) ; q . setValues ( { 'yesno_id' : 'yes' , 'line_id' : 'blah' } ) ; var unfilled = q . getUnfilledRequiredItems ( ) ; assertEquals ( unfilled . length , 1 ) ; assertEquals ( unfilled [ 0 ] . id , 'box_id' ) ; q . setValues ( { 'yesno_id' : 'no' , 'box_id' : 'box' } ) ; unfilled = q . getUnfilledRequiredItems ( ) ; assertEquals ( unfilled . length , 0 ) ; }
Test unfilled required items handling.
Test unfilled required items handling .
// should be 4: box, radio, line, yesno