Examples of goToPreviousPage()


Examples of org.jsurveylib.Survey.goToPreviousPage()

        assertEquals(0, survey.getCurrentPageNumberExcludingSkipped());
        survey.goToNextPage();
        assertEquals(2, survey.getCurrentPageNumber()); //we skipped a page
        assertEquals(1, survey.getCurrentPageNumberExcludingSkipped());
        assertTrue(survey.isLastPageAndComplete());
        survey.goToPreviousPage();
        assertEquals(0, survey.getCurrentPageNumber());
        assertEquals(0, survey.getCurrentPageNumberExcludingSkipped());
        assertFalse(survey.isLastPageAndComplete());

        //we have mandatory / invalid questions on a skipped page but we should still be allowed to finish
View Full Code Here

Examples of org.jsurveylib.Survey.goToPreviousPage()

        assertFalse(model.isNextPageAvailable());
        assertTrue(model.isPreviousPageAvailable());
        assertTrue(model.isLastPageAndComplete());

        model.goToPreviousPage();

        assertEquals(1, model.getCurrentPageNumber());
        assertTrue(model.isNextPageAvailable());
        assertTrue(model.isPreviousPageAvailable());
        assertFalse(model.isLastPageAndComplete());
View Full Code Here

Examples of org.jsurveylib.Survey.goToPreviousPage()

    public String[][] buttonClicked(String surveyProvider, String buttonName) {
        Survey survey = getSurvey(surveyProvider);

        if (PREVIOUS_BUTTON.equals(buttonName) && survey.isPreviousPageAvailable()) {
            survey.goToPreviousPage();
        } else if (NEXT_BUTTON.equals(buttonName) && survey.isNextPageAvailable()) {
            survey.goToNextPage();
        } else if (FINISH_BUTTON.equals(buttonName) && survey.isLastPageAndComplete()) {
            survey.finish();
        } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.