assertEquals("There is a \"visibility script\" on this page that is making a checkbox invisible right now. To make the checkbox visible, type the magic word into this text field. The magic word is <b>please</b>", l.getText());
}
@Test
public void linkClicked() throws Exception {
Survey m = new Survey(new XMLSurveyReader(new File("src\\test\\org\\jsurveylib\\model\\labelfiles\\linkclicked.xml")));
Label l = (Label) m.getCurrentPage().getSurveyElements().get(0);
l.addLinkListener(this);
assertNull(url);
l.linkClicked("blah");
assertEquals("blah", url);
assertEquals(0, m.getCurrentPageNumber());
l.linkClicked("page://1");
assertEquals("page://1", url);
assertEquals(1, m.getCurrentPageNumber());
assertFalse(m.isLastPageAndComplete()); //a mandatory question is not answered
l.linkClicked("page://0");
assertEquals("page://0", url);
assertEquals(0, m.getCurrentPageNumber());
m.getQuestionByID("pageJump").getLabel().linkClicked("page://1");
l.linkClicked("page://1");
assertEquals("page://1", url);
}