Program: 69473
Project: 69473
Buggy source:
/** 
 * An author create a course for a task with the some custom settings, all steps are selected, grading with score and passed automatically calculated, 2 tasks, 1 solution...</br> It had 2 participants. One of them goes through the workflow, selects a task, submits 2 documents, one with the embedded editor, one with the upload mechanism.</br> The author reviews the documents, uploads a correction and want a revision.</br> The assessed participant upload a revised document.</br> The author sees it and close the revisions process, use the assessment tool to set the score.</br> The participant checks if she successfully passed the task.
 * @param authorLoginPage
 * @param ryomouBrowser
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void taskWithIndividuScoreAndRevision(@InitialPage LoginPage authorLoginPage,@Drone @User WebDriver ryomouBrowser) throws IOException, URISyntaxException {
  screenshotTestRule.setBrowsers(browser,ryomouBrowser);
  Assume.assumeTrue(browser instanceof FirefoxDriver);
  UserVO author=new UserRestClient(deploymentUrl).createAuthor();
  UserVO kanu=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO ryomou=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  authorLoginPage.loginAs(author.getLogin(),author.getPassword());
  String courseTitle="String_Node_Str" + UUID.randomUUID();
  navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
  String gtaNodeTitle="String_Node_Str";
  CourseEditorPageFragment courseEditor=CoursePageFragment.getCourse(browser).edit();
  courseEditor.createNode("String_Node_Str").nodeTitle(gtaNodeTitle);
  GroupTaskConfigurationPage gtaConfig=new GroupTaskConfigurationPage(browser);
  gtaConfig.selectAssignment();
  URL task1Url=JunitTestHelper.class.getResource("String_Node_Str");
  File task1File=new File(task1Url.toURI());
  gtaConfig.uploadTask("String_Node_Str",task1File);
  URL task2Url=JunitTestHelper.class.getResource("String_Node_Str");
  File task2File=new File(task2Url.toURI());
  gtaConfig.uploadTask("String_Node_Str",task2File).saveTasks().selectSolution();
  URL solutionUrl=JunitTestHelper.class.getResource("String_Node_Str");
  File solutionFile=new File(solutionUrl.toURI());
  gtaConfig.uploadSolution("String_Node_Str",solutionFile);
  gtaConfig.selectAssessment().setAssessmentOptions(0.0f,6.0f,4.0f).saveAssessmentOptions();
  courseEditor.publish().quickPublish(Access.membersOnly);
  MembersPage membersPage=courseEditor.clickToolbarBack().members();
  membersPage.importMembers().setMembers(kanu,ryomou).next().next().next().finish();
  CoursePageFragment coursePage=membersPage.clickToolbarBack();
  coursePage.clickTree().selectWithTitle(gtaNodeTitle);
  LoginPage ryomouLoginPage=LoginPage.getLoginPage(ryomouBrowser,deploymentUrl);
  ryomouLoginPage.loginAs(ryomou).resume();
  NavigationPage ryomouNavBar=new NavigationPage(ryomouBrowser);
  ryomouNavBar.openMyCourses().select(courseTitle);
  CoursePageFragment ryomouTestCourse=new CoursePageFragment(ryomouBrowser);
  ryomouTestCourse.clickTree().selectWithTitle(gtaNodeTitle);
  GroupTaskPage ryomouTask=new GroupTaskPage(ryomouBrowser);
  ryomouTask.assertAssignmentAvailable().selectTask(1).assertTask("String_Node_Str").assertSubmissionAvailable();
  URL submit1Url=JunitTestHelper.class.getResource("String_Node_Str");
  File submit1File=new File(submit1Url.toURI());
  String submittedFilename="String_Node_Str";
  String submittedText="String_Node_Str";
  ryomouTask.submitFile(submit1File).submitText(submittedFilename,submittedText).submitDocuments();
  coursePage.clickTree().selectWithTitle(gtaNodeTitle);
  GroupTaskToCoachPage participantToCoach=new GroupTaskToCoachPage(browser);
  URL correctionUrl=JunitTestHelper.class.getResource("String_Node_Str");
  File correctionFile=new File(correctionUrl.toURI());
  participantToCoach.selectIdentityToCoach(ryomou).assertSubmittedDocument("String_Node_Str").assertSubmittedDocument("String_Node_Str").uploadCorrection(correctionFile).needRevision();
  URL revisionUrl=JunitTestHelper.class.getResource("String_Node_Str");
  File revisionFile=new File(revisionUrl.toURI());
  ryomouTestCourse.clickTree().selectWithTitle(gtaNodeTitle);
  ryomouTask.submitRevisedFile(revisionFile).submitRevision();
  coursePage.clickTree().selectWithTitle(gtaNodeTitle);
  participantToCoach.selectIdentityToCoach(ryomou).assertRevision("String_Node_Str").closeRevisions().openIndividualAssessment().individualAssessment(null,5.5f).assertPassed();
  ryomouTestCourse.clickTree().selectWithTitle(gtaNodeTitle);
  ryomouTask.assertPassed();
}

Fixed version (ground truth):
/** 
 * An author create a course for a task with the some custom settings, all steps are selected, grading with score and passed automatically calculated, 2 tasks, 1 solution...</br> It had 2 participants. One of them goes through the workflow, selects a task, submits 2 documents, one with the embedded editor, one with the upload mechanism.</br> The author reviews the documents, uploads a correction and want a revision.</br> The assessed participant upload a revised document.</br> The author sees it and close the revisions process, use the assessment tool to set the score.</br> The participant checks if she successfully passed the task.
 * @param authorLoginPage
 * @param ryomouBrowser
 * @throws IOException
 * @throws URISyntaxException
 */
@Test @RunAsClient public void taskWithIndividuScoreAndRevision(@InitialPage LoginPage authorLoginPage,@Drone @User WebDriver ryomouBrowser) throws IOException, URISyntaxException {
  Assume.assumeTrue(browser instanceof FirefoxDriver);
  UserVO author=new UserRestClient(deploymentUrl).createAuthor();
  UserVO kanu=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  UserVO ryomou=new UserRestClient(deploymentUrl).createRandomUser("String_Node_Str");
  authorLoginPage.loginAs(author.getLogin(),author.getPassword());
  String courseTitle="String_Node_Str" + UUID.randomUUID();
  navBar.openAuthoringEnvironment().createCourse(courseTitle).clickToolbarBack();
  String gtaNodeTitle="String_Node_Str";
  CourseEditorPageFragment courseEditor=CoursePageFragment.getCourse(browser).edit();
  courseEditor.createNode("String_Node_Str").nodeTitle(gtaNodeTitle);
  GroupTaskConfigurationPage gtaConfig=new GroupTaskConfigurationPage(browser);
  gtaConfig.selectAssignment();
  URL task1Url=JunitTestHelper.class.getResource("String_Node_Str");
  File task1File=new File(task1Url.toURI());
  gtaConfig.uploadTask("String_Node_Str",task1File);
  URL task2Url=JunitTestHelper.class.getResource("String_Node_Str");
  File task2File=new File(task2Url.toURI());
  gtaConfig.uploadTask("String_Node_Str",task2File).saveTasks().selectSolution();
  URL solutionUrl=JunitTestHelper.class.getResource("String_Node_Str");
  File solutionFile=new File(solutionUrl.toURI());
  gtaConfig.uploadSolution("String_Node_Str",solutionFile);
  gtaConfig.selectAssessment().setAssessmentOptions(0.0f,6.0f,4.0f).saveAssessmentOptions();
  courseEditor.publish().quickPublish(Access.membersOnly);
  MembersPage membersPage=courseEditor.clickToolbarBack().members();
  membersPage.importMembers().setMembers(kanu,ryomou).next().next().next().finish();
  CoursePageFragment coursePage=membersPage.clickToolbarBack();
  coursePage.clickTree().selectWithTitle(gtaNodeTitle);
  LoginPage ryomouLoginPage=LoginPage.getLoginPage(ryomouBrowser,deploymentUrl);
  ryomouLoginPage.loginAs(ryomou).resume();
  NavigationPage ryomouNavBar=new NavigationPage(ryomouBrowser);
  ryomouNavBar.openMyCourses().select(courseTitle);
  CoursePageFragment ryomouTestCourse=new CoursePageFragment(ryomouBrowser);
  ryomouTestCourse.clickTree().selectWithTitle(gtaNodeTitle);
  GroupTaskPage ryomouTask=new GroupTaskPage(ryomouBrowser);
  ryomouTask.assertAssignmentAvailable().selectTask(1).assertTask("String_Node_Str").assertSubmissionAvailable();
  URL submit1Url=JunitTestHelper.class.getResource("String_Node_Str");
  File submit1File=new File(submit1Url.toURI());
  String submittedFilename="String_Node_Str";
  String submittedText="String_Node_Str";
  ryomouTask.submitFile(submit1File).submitText(submittedFilename,submittedText).submitDocuments();
  coursePage.clickTree().selectWithTitle(gtaNodeTitle);
  GroupTaskToCoachPage participantToCoach=new GroupTaskToCoachPage(browser);
  URL correctionUrl=JunitTestHelper.class.getResource("String_Node_Str");
  File correctionFile=new File(correctionUrl.toURI());
  participantToCoach.selectIdentityToCoach(ryomou).assertSubmittedDocument("String_Node_Str").assertSubmittedDocument("String_Node_Str").uploadCorrection(correctionFile).needRevision();
  URL revisionUrl=JunitTestHelper.class.getResource("String_Node_Str");
  File revisionFile=new File(revisionUrl.toURI());
  ryomouTestCourse.clickTree().selectWithTitle(gtaNodeTitle);
  ryomouTask.submitRevisedFile(revisionFile).submitRevision();
  coursePage.clickTree().selectWithTitle(gtaNodeTitle);
  participantToCoach.selectIdentityToCoach(ryomou).assertRevision("String_Node_Str").closeRevisions().openIndividualAssessment().individualAssessment(null,5.5f).assertPassed();
  ryomouTestCourse.clickTree().selectWithTitle(gtaNodeTitle);
  ryomouTask.assertPassed();
}