Package teammates.testing.lib

Examples of teammates.testing.lib.BrowserInstance


  }

  @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);
  }
View Full Code Here


    }
  }
 
  @Override
  public void run() {
    BrowserInstance bi = BrowserInstancePool.request();
    bi.studentLogin(student.email, student.password);

    bi.clickEvaluationTab();
    bi.justWait();
   
    bi.studentClickEvaluationViewResults(scn.course.courseId, scn.evaluation.name);
    bi.justWait();
   
   
    //comments order is random
    for(int i = 0; i < scn.students.size(); i++) {
      Student teammate = scn.students.get(i);
      if(teammate.teamName.equals(student.teamName) && !teammate.name.equals(student.name)){
        assertTrue(bi.studentGetFeedbackFromOthers(teammate.email, student.email));
      }
    }
   
   
    bi.logout();
    System.out.println("---------- studentViewEvaluationResults: " + student.name + " under test ----------" );
   
    BrowserInstancePool.release(bi);
  }
View Full Code Here

  public void run() {
    studentSubmitEvaluation();
  }
 
  private void studentSubmitEvaluation() {
    BrowserInstance bi = BrowserInstancePool.request();
    bi.waitAWhile(3000);
    bi.studentLogin(student.email, student.password);
   
    bi.clickEvaluationTab();
    bi.waitForElementPresent(bi.studentGetPendingEvaluationName(scn.course.courseId, scn.evaluation.name));
    bi.studentClickDoEvaluation(scn.course.courseId, scn.evaluation.name);
    bi.justWait();

    // Fill in information
    for (int i = 0; i < student.team.students.size(); i++) {
      bi.setSubmissionPoint(i, "30");
      bi.setSubmissionJustification(i, String.format("Justification from %s to %s.", student.email, student.team.students.get(i).email));
      bi.setSubmissionComments(i, String.format("Comments from %s to %s.", student.email, student.team.students.get(i).email));
    }

    // Submit the evaluation
    bi.wdClick(bi.studentSubmitEvaluationButton);

    // Check to see evaluation status is "Submitted"
    assertEquals("SUBMITTED", bi.studentGetEvaluationStatus(scn.course.courseId, scn.evaluation.name));

    bi.logout();
    System.out.println("---------- StudentSubmitEvaluation: " + student.name + " under test ----------" );
       
    // Remember to release this instance once done
    BrowserInstancePool.release(bi);
  }
View Full Code Here

    }
  }
 
  @Override
  public void run() {
    BrowserInstance bi = BrowserInstancePool.request();
    bi.studentLogin(student.email, student.password);

    bi.clickEvaluationTab();
    bi.justWait();
   
    bi.studentClickEvaluationViewResults(scn.course.courseId, scn.evaluation.name);
    bi.justWait();
   
   
    //comments order is random
    for(int i = 0; i < scn.students.size(); i++) {
      Student teammate = scn.students.get(i);
      if(teammate.teamName.equals(student.teamName) && !teammate.name.equals(student.name)){
        assertTrue(bi.studentGetFeedbackFromOthers(teammate.email, student.email));
      }
    }
   
   
    bi.logout();
    System.out.println("---------- studentViewEvaluationResults: " + student.name + " under test ----------" );
   
    BrowserInstancePool.release(bi);
  }
View Full Code Here

  public void run() {
    studentSubmitEvaluation();
  }
 
  private void studentSubmitEvaluation() {
    BrowserInstance bi = BrowserInstancePool.request();
    bi.waitAWhile(3000);
    bi.studentLogin(student.email, student.password);
   
    bi.clickEvaluationTab();
    bi.waitForElementPresent(bi.studentGetPendingEvaluationName(scn.course.courseId, scn.evaluation.name));
    bi.studentClickDoEvaluation(scn.course.courseId, scn.evaluation.name);
    bi.justWait();

    // Fill in information
    for (int i = 0; i < student.team.students.size(); i++) {
      bi.setSubmissionPoint(i, "30");
      bi.setSubmissionJustification(i, String.format("Justification from %s to %s.", student.email, student.team.students.get(i).email));
      bi.setSubmissionComments(i, String.format("Comments from %s to %s.", student.email, student.team.students.get(i).email));
    }

    // Submit the evaluation
    bi.wdClick(bi.studentSubmitEvaluationButton);

    // Check to see evaluation status is "Submitted"
    assertEquals("SUBMITTED", bi.studentGetEvaluationStatus(scn.course.courseId, scn.evaluation.name));

    bi.logout();
    System.out.println("---------- StudentSubmitEvaluation: " + student.name + " under test ----------" );
       
    // Remember to release this instance once done
    BrowserInstancePool.release(bi);
  }
View Full Code Here

  }

  @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);
  }
View Full Code Here

TOP

Related Classes of teammates.testing.lib.BrowserInstance

Copyright © 2018 www.massapicom. 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.