}
@Override
public void run() {
BrowserInstance bi = BrowserInstancePool.request();
bi.waitAWhile(3000);
bi.studentLogin(student.email, student.password);
bi.clickEvaluationTab();
bi.justWait();
// Try open and cancel
bi.studentClickEditEvaluation(scn.course.courseId, scn.evaluation.name);
bi.waitAndClick(bi.editEvaluationBackButton);
// Try open and edit
bi.studentClickEditEvaluation(scn.course.courseId, scn.evaluation.name);
// edit contents
for (int i = 0; i < student.team.students.size(); i++) {
bi.setSubmissionPoint(i, "80");
bi.setSubmissionJustification(i, String.format("Student Edit:: Justification from %s to %s.", student.email, student.team.students.get(i).email));
bi.setSubmissionComments(i, String.format("Student Edit:: Comments from %s to %s.", student.email, student.team.students.get(i).email));
}
bi.waitAndClick(bi.studentSubmitEvaluationButton);
bi.waitForElementText(bi.statusMessage, "The evaluation has been submitted.");
// check feedbacks updated:
bi.studentClickEditEvaluation(scn.course.courseId, scn.evaluation.name);
for (int i = 0; i < student.team.students.size(); i++) {
assertEquals(bi.getDropdownSelectedValue(bi.getSubmissionPoint(i)), "80");
assertEquals(bi.getElementValue(bi.getSubmissionJustification(i)), String.format("Student Edit:: Justification from %s to %s.", student.email, student.team.students.get(i).email));
assertEquals(bi.getElementValue(bi.getSubmissionComments(i)), String.format("Student Edit:: Comments from %s to %s.", student.email, student.team.students.get(i).email));
}
bi.waitAndClick(bi.studentEvaluationCancelButton);// [cancel]
bi.logout();
BrowserInstancePool.release(bi);
}