Skip to content

Commit

Permalink
test removing student key
Browse files Browse the repository at this point in the history
  • Loading branch information
jtankw3 committed Oct 25, 2020
1 parent 3e0722a commit b1f72d5
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -100,10 +99,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -119,15 +116,13 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyConstSumOptionResponse(1, "", response);

______TS("edit response");
response = getResponse(questionId, Arrays.asList(23, 47, 30));
feedbackSubmitPage.submitConstSumOptionResponse(1, "", response);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyConstSumOptionResponse(1, "", response);
verifyPresentInDatastore(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -96,10 +95,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -120,7 +117,6 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyConstSumRecipientResponse(1, responses);

______TS("edit response");
Expand All @@ -130,7 +126,6 @@ private void testSubmitPage() {
feedbackSubmitPage.submitConstSumRecipientResponse(1, responses);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyConstSumRecipientResponse(1, responses);
verifyPresentInDatastore(response);
verifyPresentInDatastore(response2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -94,10 +93,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -120,7 +117,6 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyContributionResponse(1, responses);

______TS("edit response");
Expand All @@ -131,7 +127,6 @@ private void testSubmitPage() {
feedbackSubmitPage.submitContributionResponse(1, responses);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyContributionResponse(1, responses);
verifyPresentInDatastore(response);
verifyPresentInDatastore(response2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -101,10 +100,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -123,15 +120,13 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyMcqResponse(1, "", response);

______TS("edit response");
response = getResponse(questionId, true, "This is the edited response.");
feedbackSubmitPage.submitMcqResponse(1, "", response);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyMcqResponse(1, "", response);
verifyPresentInDatastore(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -102,10 +101,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -128,7 +125,6 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyMsqResponse(1, receiver.getName(), response);

______TS("edit response");
Expand All @@ -137,7 +133,6 @@ private void testSubmitPage() {
feedbackSubmitPage.submitMsqResponse(1, receiver.getName(), response);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyMsqResponse(1, receiver.getName(), response);
verifyPresentInDatastore(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -93,8 +92,7 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

Expand All @@ -113,15 +111,13 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyNumScaleResponse(1, receiver.getTeam(), response);

______TS("edit response");
response = getResponse(questionId, receiver, 10.0);
feedbackSubmitPage.submitNumScaleResponse(1, receiver.getTeam(), response);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyNumScaleResponse(1, receiver.getTeam(), response);
verifyPresentInDatastore(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -101,10 +100,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -122,15 +119,13 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyRankOptionResponse(1, receiver.getName(), response);

______TS("edit response");
response = getResponse(questionId, receiver, Arrays.asList(Const.POINTS_NOT_SUBMITTED, 1, 3, 2));
feedbackSubmitPage.submitRankOptionResponse(1, receiver.getName(), response);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyRankOptionResponse(1, receiver.getName(), response);
verifyPresentInDatastore(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -97,10 +96,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -121,7 +118,6 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyRankRecipientResponse(1, responses);

______TS("edit response");
Expand All @@ -131,7 +127,6 @@ private void testSubmitPage() {
feedbackSubmitPage.submitRankRecipientResponse(1, responses);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyRankRecipientResponse(1, responses);
verifyAbsentInDatastore(response);
verifyPresentInDatastore(response2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ private void testEditPage() {
.withCourseId(course.getId())
.withSessionName(feedbackSession.getFeedbackSessionName());
InstructorFeedbackEditPage feedbackEditPage = loginAdminToPage(url, InstructorFeedbackEditPage.class);
feedbackEditPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes loadedQuestion = testData.feedbackQuestions.get("qn1ForFirstSession").getCopy();
Expand Down Expand Up @@ -114,10 +113,8 @@ private void testSubmitPage() {
AppUrl url = createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(feedbackSession.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(feedbackSession.getFeedbackSessionName());
FeedbackSubmitPage feedbackSubmitPage = loginAdminToPage(url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();

______TS("verify loaded question");
FeedbackQuestionAttributes question = testData.feedbackQuestions.get("qn1ForFirstSession");
Expand All @@ -134,15 +131,13 @@ private void testSubmitPage() {

______TS("check previous response");
feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyRubricResponse(1, receiver.getName(), response);

______TS("edit response");
response = getResponse(questionId, receiver, Arrays.asList(0, 0));
feedbackSubmitPage.submitRubricResponse(1, receiver.getName(), response);

feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class);
feedbackSubmitPage.waitForPageToLoad();
feedbackSubmitPage.verifyRubricResponse(1, receiver.getName(), response);
verifyPresentInDatastore(response);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ private AppUrl getStudentSubmitPageUrl(StudentAttributes student, FeedbackSessio
return createUrl(Const.WebPageURIs.SESSION_SUBMISSION_PAGE)
.withUserId(student.googleId)
.withCourseId(student.course)
.withSessionName(session.getFeedbackSessionName())
.withRegistrationKey(getKeyForStudent(student));
.withSessionName(session.getFeedbackSessionName());
}

private List<String> getOtherStudents(StudentAttributes currentStudent) {
Expand Down
Loading

0 comments on commit b1f72d5

Please sign in to comment.