Source:
<code>public void testInputValidation() { ______TS("empty question text"); feedbackEditPage.clickAddQuestionButton(); feedbackEditPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_QUESTION_TEXTINVALID); ______TS("empty sub question test"); int questionNum = -1; int subQuestionIndex = 1; feedbackEditPage.fillRubricSubQuestionBox("", questionNum, subQuestionIndex); feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricSubQuestionBoxFocused(questionNum, subQuestionIndex)); feedbackEditPage.fillRubricSubQuestionBox("sub question text", questionNum, subQuestionIndex); feedbackEditPage.clickAddRubricRowLink(questionNum); subQuestionIndex += 1; feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricSubQuestionBoxFocused(questionNum, subQuestionIndex)); feedbackEditPage.clickRemoveRubricRowLinkAndConfirm(questionNum, subQuestionIndex); ______TS("empty weight test"); feedbackEditPage.fillQuestionTextBoxForNewQuestion("empty weight test"); feedbackEditPage.fillQuestionDescriptionForNewQuestion("more details"); feedbackEditPage.clickAssignWeightsCheckboxForNewQuestion(); feedbackEditPage.fillRubricWeightBoxForNewQuestion("", 3); feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricWeightBoxFocused(questionNum, 3)); feedbackEditPage.fillRubricWeightBoxForNewQuestion("0", 3); feedbackEditPage.clickAddRubricColLink(questionNum); feedbackEditPage.fillRubricWeightBoxForNewQuestion("", 4); feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricWeightBoxFocused(questionNum, 4)); feedbackEditPage.clickRemoveRubricColLinkAndConfirm(questionNum, 4); <START> feedbackEditPage.clickAssignWeightsCheckboxForNewQuestion(); <END> feedbackEditPage.clickDiscardChangesLinkForNewQuestion(); feedbackEditPage.waitForConfirmationModalAndClickOk(); }</code><technical_language>Test if unchecked weight checkbox able submit weight is empty</technical_language>

Target:
public void testInputValidation() { ______TS("empty question text"); feedbackEditPage.clickAddQuestionButton(); feedbackEditPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_QUESTION_TEXTINVALID); ______TS("empty sub question test"); int questionNum = -1; int subQuestionIndex = 1; feedbackEditPage.fillRubricSubQuestionBox("", questionNum, subQuestionIndex); feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricSubQuestionBoxFocused(questionNum, subQuestionIndex)); feedbackEditPage.fillRubricSubQuestionBox("sub question text", questionNum, subQuestionIndex); feedbackEditPage.clickAddRubricRowLink(questionNum); subQuestionIndex += 1; feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricSubQuestionBoxFocused(questionNum, subQuestionIndex)); feedbackEditPage.clickRemoveRubricRowLinkAndConfirm(questionNum, subQuestionIndex); ______TS("Front-end validation for empty weight"); feedbackEditPage.fillQuestionTextBoxForNewQuestion("empty weight test"); feedbackEditPage.fillQuestionDescriptionForNewQuestion("more details"); feedbackEditPage.clickAssignWeightsCheckboxForNewQuestion(); feedbackEditPage.fillRubricWeightBoxForNewQuestion("", 3); feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricWeightBoxFocused(questionNum, 3)); feedbackEditPage.fillRubricWeightBoxForNewQuestion("0", 3); feedbackEditPage.clickAddRubricColLink(questionNum); feedbackEditPage.fillRubricWeightBoxForNewQuestion("", 4); feedbackEditPage.clickAddQuestionButton(); assertTrue(feedbackEditPage.isRubricWeightBoxFocused(questionNum, 4)); feedbackEditPage.clickAssignWeightsCheckboxForNewQuestion(); feedbackEditPage.clickAddQuestionButton(); feedbackEditPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_QUESTION_ADDED); feedbackEditPage.clickDeleteQuestionLink(1); feedbackEditPage.waitForConfirmationModalAndClickOk(); feedbackEditPage.waitForTextsForAllStatusMessagesToUserEquals(Const.StatusMessages.FEEDBACK_QUESTION_DELETED); assertNull(BackDoor.getFeedbackQuestion(courseId, feedbackSessionName, 1)); }