use of org.olat.selenium.page.qti.QTI21Page in project openolat by klemens.
the class ImsQTI21Test method qti21TestFlow_timeLimits.
/**
* Test with time limit.
*
* @param authorLoginPage
* @throws IOException
* @throws URISyntaxException
*/
@Test
@RunAsClient
public void qti21TestFlow_timeLimits(@InitialPage LoginPage authorLoginPage) throws IOException, URISyntaxException {
UserVO author = new UserRestClient(deploymentUrl).createAuthor();
authorLoginPage.loginAs(author.getLogin(), author.getPassword());
// upload a test
String qtiTestTitle = "Timed QTI 2.1 " + UUID.randomUUID();
URL qtiTestUrl = JunitTestHelper.class.getResource("file_resources/qti21/test_time_limits.zip");
File qtiTestFile = new File(qtiTestUrl.toURI());
navBar.openAuthoringEnvironment().uploadResource(qtiTestTitle, qtiTestFile).clickToolbarRootCrumb();
QTI21Page qtiPage = QTI21Page.getQTI12Page(browser);
// check simple time limit
qtiPage.assertOnAssessmentItem("Single choice").answerSingleChoiceWithParagraph("Correct answer").saveAnswer().assertOnAssessmentItem("Last choice").answerSingleChoiceWithParagraph("True").saveAnswer().assertOnAssessmentTestTerminated(15);
}
Aggregations