diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumOptionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumOptionQuestionE2ETest.java index d06ba97ebd2..0f518690107 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumOptionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumOptionQuestionE2ETest.java @@ -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(); @@ -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"); @@ -119,7 +116,6 @@ private void testSubmitPage() { ______TS("check previous response"); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyConstSumOptionResponse(1, "", response); ______TS("edit response"); @@ -127,7 +123,6 @@ private void testSubmitPage() { feedbackSubmitPage.submitConstSumOptionResponse(1, "", response); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyConstSumOptionResponse(1, "", response); verifyPresentInDatastore(response); } diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumRecipientQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumRecipientQuestionE2ETest.java index f5d66483b57..89ba03499ea 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumRecipientQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackConstSumRecipientQuestionE2ETest.java @@ -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(); @@ -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"); @@ -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"); @@ -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); diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackContributionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackContributionQuestionE2ETest.java index 59c2b4de1bb..7e1adc19dde 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackContributionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackContributionQuestionE2ETest.java @@ -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(); @@ -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"); @@ -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"); @@ -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); diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMcqQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMcqQuestionE2ETest.java index 7ab3e1ea2f2..24ad3abf9ef 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMcqQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMcqQuestionE2ETest.java @@ -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(); @@ -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"); @@ -123,7 +120,6 @@ private void testSubmitPage() { ______TS("check previous response"); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyMcqResponse(1, "", response); ______TS("edit response"); @@ -131,7 +127,6 @@ private void testSubmitPage() { feedbackSubmitPage.submitMcqResponse(1, "", response); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyMcqResponse(1, "", response); verifyPresentInDatastore(response); } diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMsqQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMsqQuestionE2ETest.java index 59ebfe7240f..8c6f9810f97 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMsqQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackMsqQuestionE2ETest.java @@ -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(); @@ -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"); @@ -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"); @@ -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); } diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackNumScaleQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackNumScaleQuestionE2ETest.java index 0a05da25a82..7e341a75870 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackNumScaleQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackNumScaleQuestionE2ETest.java @@ -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(); @@ -93,10 +92,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"); @@ -113,7 +110,6 @@ 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"); @@ -121,7 +117,6 @@ private void testSubmitPage() { feedbackSubmitPage.submitNumScaleResponse(1, receiver.getTeam(), response); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyNumScaleResponse(1, receiver.getTeam(), response); verifyPresentInDatastore(response); } diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankOptionQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankOptionQuestionE2ETest.java index bcadeb3bb42..e4be0a132bb 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankOptionQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankOptionQuestionE2ETest.java @@ -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(); @@ -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"); @@ -122,7 +119,6 @@ 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"); @@ -130,7 +126,6 @@ private void testSubmitPage() { feedbackSubmitPage.submitRankOptionResponse(1, receiver.getName(), response); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyRankOptionResponse(1, receiver.getName(), response); verifyPresentInDatastore(response); } diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankRecipientQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankRecipientQuestionE2ETest.java index 6a828e8f949..e224be7169e 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankRecipientQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRankRecipientQuestionE2ETest.java @@ -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(); @@ -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"); @@ -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"); @@ -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); diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRubricQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRubricQuestionE2ETest.java index 8a7f2f1b559..b577df8c9f7 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRubricQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackRubricQuestionE2ETest.java @@ -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(); @@ -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"); @@ -134,7 +131,6 @@ 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"); @@ -142,7 +138,6 @@ private void testSubmitPage() { feedbackSubmitPage.submitRubricResponse(1, receiver.getName(), response); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyRubricResponse(1, receiver.getName(), response); verifyPresentInDatastore(response); } diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackSubmitPageE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackSubmitPageE2ETest.java index 43002b8e7c7..92713783f4e 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackSubmitPageE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackSubmitPageE2ETest.java @@ -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 getOtherStudents(StudentAttributes currentStudent) { diff --git a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackTextQuestionE2ETest.java b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackTextQuestionE2ETest.java index 01df58412eb..91f818ed12c 100644 --- a/src/e2e/java/teammates/e2e/cases/e2e/FeedbackTextQuestionE2ETest.java +++ b/src/e2e/java/teammates/e2e/cases/e2e/FeedbackTextQuestionE2ETest.java @@ -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"); @@ -89,10 +88,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"); @@ -109,7 +106,6 @@ private void testSubmitPage() { ______TS("check previous response"); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyTextResponse(1, receiver.getName(), response); ______TS("edit response"); @@ -119,7 +115,6 @@ private void testSubmitPage() { feedbackSubmitPage.submitTextResponse(1, receiver.getName(), response); feedbackSubmitPage = AppPage.getNewPageInstance(browser, url, FeedbackSubmitPage.class); - feedbackSubmitPage.waitForPageToLoad(); feedbackSubmitPage.verifyTextResponse(1, receiver.getName(), response); verifyPresentInDatastore(response); } diff --git a/src/e2e/java/teammates/e2e/pageobjects/FeedbackSubmitPage.java b/src/e2e/java/teammates/e2e/pageobjects/FeedbackSubmitPage.java index 8da88a2cc28..5cf25e8c854 100644 --- a/src/e2e/java/teammates/e2e/pageobjects/FeedbackSubmitPage.java +++ b/src/e2e/java/teammates/e2e/pageobjects/FeedbackSubmitPage.java @@ -13,6 +13,7 @@ import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; +import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; @@ -57,6 +58,7 @@ protected boolean containsExpectedPageContents() { if (isElementPresent(By.className("modal-content"))) { waitForConfirmationModalAndClickOk(); } + reloadPageIfStuckLoading(); return getPageTitle().contains("Submit Feedback"); } @@ -69,7 +71,7 @@ public void verifyFeedbackSessionDetails(FeedbackSessionAttributes feedbackSessi } public void verifyNumQuestions(int expected) { - assertEquals(browser.driver.findElements(By.tagName("tm-question-submission-form")).size(), expected); + assertEquals(browser.driver.findElements(By.id("question-submission-form")).size(), expected); } public void verifyQuestionDetails(int qnNumber, FeedbackQuestionAttributes questionAttributes) { @@ -101,7 +103,7 @@ public void verifyRecipients(int qnNumber, List recipientNames, String r } public void verifyWarningMessageForPartialResponse(int[] unansweredQuestions) { - click(waitForElementPresence(By.id("btn-submit"))); + click(getSubmitButton()); StringBuilder expectedSb = new StringBuilder(); for (int unansweredQuestion : unansweredQuestions) { expectedSb.append(unansweredQuestion).append(", "); @@ -113,7 +115,7 @@ public void verifyWarningMessageForPartialResponse(int[] unansweredQuestions) { } public void verifyCannotSubmit() { - assertFalse(waitForElementPresence(By.id("btn-submit")).isEnabled()); + assertFalse(getSubmitButton().isEnabled()); } public void markWithConfirmationEmail() { @@ -589,7 +591,9 @@ private String getDateStringWithOffset(Instant instant, ZoneId timeZone) { } private WebElement getQuestionForm(int qnNumber) { - return browser.driver.findElements(By.tagName("tm-question-submission-form")).get(qnNumber - 1); + By questionFormId = By.id("question-submission-form"); + waitForElementPresence(questionFormId); + return browser.driver.findElements(questionFormId).get(qnNumber - 1); } private String getQuestionBrief(int qnNumber) { @@ -676,7 +680,19 @@ private String getRecipientString(FeedbackParticipantType recipientType) { } private void clickSubmitButton() { - clickAndConfirm(browser.driver.findElement(By.id("btn-submit"))); + clickAndConfirm(getSubmitButton()); + } + + private void reloadPageIfStuckLoading() { + try { + getSubmitButton(); + } catch (TimeoutException e) { + reloadPage(); + } + } + + private WebElement getSubmitButton() { + return waitForElementPresence(By.id("btn-submit")); } private String getQuestionDescription(int qnNumber) { diff --git a/src/e2e/java/teammates/e2e/pageobjects/InstructorFeedbackEditPage.java b/src/e2e/java/teammates/e2e/pageobjects/InstructorFeedbackEditPage.java index a44b475f9ff..a786e4c8d3a 100644 --- a/src/e2e/java/teammates/e2e/pageobjects/InstructorFeedbackEditPage.java +++ b/src/e2e/java/teammates/e2e/pageobjects/InstructorFeedbackEditPage.java @@ -548,7 +548,9 @@ public void addTextQuestion(FeedbackQuestionAttributes feedbackQuestion) { public void editTextQuestion(int questionNum, FeedbackTextQuestionDetails textQuestionDetails) { clickEditQuestionButton(questionNum); - fillTextBox(getRecommendedTextLengthField(questionNum), textQuestionDetails.getRecommendedLength().toString()); + WebElement recommendedTextLengthField = getRecommendedTextLengthField(questionNum); + waitForElementToBeClickable(recommendedTextLengthField); + fillTextBox(recommendedTextLengthField, textQuestionDetails.getRecommendedLength().toString()); clickSaveQuestionButton(questionNum); } diff --git a/src/web/app/components/question-submission-form/question-submission-form.component.html b/src/web/app/components/question-submission-form/question-submission-form.component.html index 4d946332a29..8eae05e84cb 100644 --- a/src/web/app/components/question-submission-form/question-submission-form.component.html +++ b/src/web/app/components/question-submission-form/question-submission-form.component.html @@ -1,4 +1,4 @@ -
+
Question {{ model.questionNumber }}: {{ model.questionBrief }}