itemengine-cypress-automation 1.0.173 → 1.0.174
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +0 -18
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +10 -7
- package/cypress/e2e/ILC/FeedbackScaleNew/additionalSettings.js +111 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/colorPopup.js +206 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +262 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +51 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +17 -17
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettings.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +1 -0
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +6 -7
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +3 -3
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +0 -1
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +3 -4
- package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +2 -2
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +12 -12
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +91 -90
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +93 -92
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +97 -95
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +62 -62
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +118 -117
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +124 -120
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +128 -125
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +97 -96
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +222 -196
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +34 -34
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +20 -20
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +29 -29
- package/cypress/e2e/ILC/NumberLine/headerSection.js +3 -2
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +40 -37
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +7 -4
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +14 -12
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +24 -23
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +2 -2
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +4 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +8 -15
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +1 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +332 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/manuallyAndNonScored.js +149 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -1
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -1
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +11 -11
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +3 -3
- package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +337 -0
- package/cypress/e2e/ILC/TextSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +206 -0
- package/cypress/e2e/ILC/TextSelection/{previewContentsForAllViews.js → previewContentsForAllViews.smoke.js} +3 -3
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +87 -87
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +5 -5
- package/cypress/pages/audioResponsePage.js +1 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +2 -1
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -4
- package/cypress/pages/components/colorPopupComponent.js +11 -0
- package/cypress/pages/components/createCustomCategoryFlyout.js +13 -9
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/equationEditorFlyout.js +0 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -1
- package/cypress/pages/components/imageCanvasComponent.js +1 -1
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/optionsWrapperComponent.js +2 -1
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +19 -7
- package/cypress/pages/components/setPointsPopupBase.js +17 -4
- package/cypress/pages/components/studentViewSettingsLabelComponent.js +2 -2
- package/cypress/pages/drawingResponsePage.js +2 -3
- package/cypress/pages/feedbackScalePage.js +143 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +12 -12
- package/cypress/pages/graphingPage.js +6 -6
- package/cypress/pages/gridFillPage.js +64 -7
- package/cypress/pages/matchingPage.js +3 -3
- package/cypress/pages/numberLinePage.js +342 -215
- package/cypress/pages/readingRulerPage.js +1 -1
- package/cypress/pages/textEntryMathPage.js +9 -0
- package/cypress/pages/textEntryMathWithImagePage.js +11 -11
- package/cypress/pages/textSelectionPage.js +125 -57
- package/package.json +1 -1
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToCorrectPoints.js +0 -355
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/pages/feedbackScalePage copy.js +0 -716
@@ -0,0 +1,332 @@
|
|
1
|
+
import { textSelectionPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
const grepTags = Cypress.env('grepTags');
|
4
|
+
|
5
|
+
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.']
|
6
|
+
const sentenceTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water.', 'As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology.'];
|
7
|
+
const wordTextArray = ['animals', 'species', 'existence', 'birth'];
|
8
|
+
const customTextSelectionArray = ['All animals have a unique', 'purpose for their existence', 'Mammals are ones which', 'Amphibians are those which can live'];
|
9
|
+
|
10
|
+
describe('Create Item page - Text selection - Basic scoring for all text selection types', () => {
|
11
|
+
before(() => {
|
12
|
+
cy.loginAs('admin');
|
13
|
+
});
|
14
|
+
|
15
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
16
|
+
describe('Question Preview: Custom text selection type with All or nothing scoring', () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
cy.log('Navigate to question, add input to stems and options, set correct answer and allot points and switch to preview tab');
|
20
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
textSelectionPage.steps.addQuestionInstructions();
|
23
|
+
textSelectionPage.steps.clearQuestionInputField();
|
24
|
+
paragraphTextArray.forEach((paragraphText) => {
|
25
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
26
|
+
});
|
27
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
28
|
+
customTextSelectionArray.forEach((text) => {
|
29
|
+
textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', text);
|
30
|
+
});
|
31
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(customTextSelectionArray[0]);
|
32
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(customTextSelectionArray[1]);
|
33
|
+
textSelectionPage.steps.allotPoints(20);
|
34
|
+
textSelectionPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
35
|
+
textSelectionPage.steps.switchToPreviewTab();
|
36
|
+
});
|
37
|
+
|
38
|
+
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect answer should not be displayed in the preview tab and correct answer section should be displayed with correct answers', () => {
|
39
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
40
|
+
textSelectionPage.steps.switchToGradingView();
|
41
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[0]);
|
42
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[1]);
|
43
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[0]);
|
44
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[1]);
|
45
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
46
|
+
});
|
47
|
+
|
48
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
49
|
+
textSelectionPage.steps.resetQuestionPreview();
|
50
|
+
textSelectionPage.steps.selectOptionInPreviewTab(customTextSelectionArray[2]);
|
51
|
+
textSelectionPage.steps.selectOptionInPreviewTab(customTextSelectionArray[3]);
|
52
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
53
|
+
textSelectionPage.steps.switchToGradingView();
|
54
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[0]);
|
55
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[1]);
|
56
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(customTextSelectionArray[2]);
|
57
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(customTextSelectionArray[3]);
|
58
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
59
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[0]);
|
60
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[1]);
|
61
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
62
|
+
cy.log('When user clicks on Check answer button after attempting the question incorrectly, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
63
|
+
textSelectionPage.steps.checkAnswer();
|
64
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[0]);
|
65
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[1]);
|
66
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(customTextSelectionArray[2]);
|
67
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(customTextSelectionArray[3]);
|
68
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
69
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
70
|
+
});
|
71
|
+
|
72
|
+
it('When the user attempts the question partially correct with some correct and some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer response, incorrect icon should be displayed besides the incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
73
|
+
textSelectionPage.steps.resetQuestionPreview();
|
74
|
+
textSelectionPage.steps.selectOptionInPreviewTab(customTextSelectionArray[0]);
|
75
|
+
textSelectionPage.steps.selectOptionInPreviewTab(customTextSelectionArray[2]);
|
76
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
77
|
+
textSelectionPage.steps.switchToGradingView();
|
78
|
+
textSelectionPage.steps.verifyCorrectIconForOption(customTextSelectionArray[0]);
|
79
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[1]);
|
80
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(customTextSelectionArray[2]);
|
81
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(customTextSelectionArray[3]);
|
82
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
83
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[0]);
|
84
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(customTextSelectionArray[1]);
|
85
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
86
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with some correct and some incorrect options, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
87
|
+
textSelectionPage.steps.checkAnswer();
|
88
|
+
textSelectionPage.steps.verifyCorrectIconForOption(customTextSelectionArray[0]);
|
89
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(customTextSelectionArray[1]);
|
90
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(customTextSelectionArray[2]);
|
91
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(customTextSelectionArray[3]);
|
92
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
93
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user attempts the question correctly then the user should be awarded full points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
97
|
+
textSelectionPage.steps.resetQuestionPreview();
|
98
|
+
textSelectionPage.steps.selectOptionInPreviewTab(customTextSelectionArray[0]);
|
99
|
+
textSelectionPage.steps.selectOptionInPreviewTab(customTextSelectionArray[1]);
|
100
|
+
textSelectionPage.steps.verifyPreviewScore(20, 20);
|
101
|
+
textSelectionPage.steps.switchToGradingView();
|
102
|
+
textSelectionPage.steps.verifyCorrectIconForOption(customTextSelectionArray[0]);
|
103
|
+
textSelectionPage.steps.verifyCorrectIconForOption(customTextSelectionArray[1]);
|
104
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(customTextSelectionArray[2]);
|
105
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(customTextSelectionArray[3]);
|
106
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
107
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
108
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
109
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
110
|
+
textSelectionPage.steps.checkAnswer();
|
111
|
+
textSelectionPage.steps.verifyCorrectIconForOption(customTextSelectionArray[0]);
|
112
|
+
textSelectionPage.steps.verifyCorrectIconForOption(customTextSelectionArray[1]);
|
113
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(customTextSelectionArray[2]);
|
114
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(customTextSelectionArray[3]);
|
115
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
116
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
117
|
+
});
|
118
|
+
});
|
119
|
+
}
|
120
|
+
|
121
|
+
if (!grepTags || !grepTags.includes('smoke')) {
|
122
|
+
describe('Question Preview: Word text selection type with All or nothing scoring', () => {
|
123
|
+
abortEarlySetup();
|
124
|
+
before(() => {
|
125
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
126
|
+
cy.barsPreLoaderWait();
|
127
|
+
textSelectionPage.steps.addQuestionInstructions();
|
128
|
+
textSelectionPage.steps.clearQuestionInputField();
|
129
|
+
paragraphTextArray.forEach((paragraphText) => {
|
130
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
131
|
+
});
|
132
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
133
|
+
textSelectionPage.steps.switchTextSelectionMode('Word');
|
134
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(wordTextArray[0]);
|
135
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(wordTextArray[1]);
|
136
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(wordTextArray[2]);
|
137
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(wordTextArray[3]);
|
138
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[0]);
|
139
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(wordTextArray[1]);
|
140
|
+
textSelectionPage.steps.allotPoints(20);
|
141
|
+
textSelectionPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
142
|
+
textSelectionPage.steps.switchToPreviewTab();
|
143
|
+
});
|
144
|
+
|
145
|
+
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect answer should not be displayed in the preview tab and correct answer section should be displayed with correct answers', () => {
|
146
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
147
|
+
textSelectionPage.steps.switchToGradingView();
|
148
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
149
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
150
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
151
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
152
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
153
|
+
});
|
154
|
+
|
155
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
156
|
+
textSelectionPage.steps.resetQuestionPreview();
|
157
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
158
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[3]);
|
159
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
160
|
+
textSelectionPage.steps.switchToGradingView();
|
161
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
162
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
163
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
|
164
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
|
165
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
166
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
167
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
168
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
169
|
+
cy.log('When user clicks on Check answer button after attempting the question incorrectly, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
170
|
+
textSelectionPage.steps.checkAnswer();
|
171
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[0]);
|
172
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
173
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
|
174
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[3]);
|
175
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
176
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
177
|
+
});
|
178
|
+
|
179
|
+
it('When the user attempts the question partially correct with some correct and some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer response, incorrect icon should be displayed besides the incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
180
|
+
textSelectionPage.steps.resetQuestionPreview();
|
181
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
182
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[2]);
|
183
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
184
|
+
textSelectionPage.steps.switchToGradingView();
|
185
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
186
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
187
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
|
188
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
|
189
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
190
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[0]);
|
191
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(wordTextArray[1]);
|
192
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
193
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with some correct and some incorrect options, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
194
|
+
textSelectionPage.steps.checkAnswer();
|
195
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
196
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(wordTextArray[1]);
|
197
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(wordTextArray[2]);
|
198
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
|
199
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
200
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
201
|
+
});
|
202
|
+
|
203
|
+
it('When the user attempts the question correctly then the user should be awarded full points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
204
|
+
textSelectionPage.steps.resetQuestionPreview();
|
205
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[0]);
|
206
|
+
textSelectionPage.steps.selectOptionInPreviewTab(wordTextArray[1]);
|
207
|
+
textSelectionPage.steps.verifyPreviewScore(20, 20);
|
208
|
+
textSelectionPage.steps.switchToGradingView();
|
209
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
210
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
211
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
|
212
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
|
213
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
214
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
215
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
216
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
217
|
+
textSelectionPage.steps.checkAnswer();
|
218
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[0]);
|
219
|
+
textSelectionPage.steps.verifyCorrectIconForOption(wordTextArray[1]);
|
220
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[2]);
|
221
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(wordTextArray[3]);
|
222
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
223
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
224
|
+
});
|
225
|
+
});
|
226
|
+
}
|
227
|
+
|
228
|
+
describe('Question Preview: Sentence text selection type with All or nothing scoring', { tags: 'smoke' }, () => {
|
229
|
+
abortEarlySetup();
|
230
|
+
before(() => {
|
231
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
232
|
+
cy.barsPreLoaderWait();
|
233
|
+
textSelectionPage.steps.addQuestionInstructions();
|
234
|
+
textSelectionPage.steps.clearQuestionInputField();
|
235
|
+
paragraphTextArray.forEach((paragraphText) => {
|
236
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
237
|
+
});
|
238
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
239
|
+
textSelectionPage.steps.switchTextSelectionMode('Sentence');
|
240
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(sentenceTextArray[0]);
|
241
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(sentenceTextArray[1]);
|
242
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(sentenceTextArray[2]);
|
243
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(sentenceTextArray[3]);
|
244
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[0]);
|
245
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(sentenceTextArray[1]);
|
246
|
+
textSelectionPage.steps.allotPoints(20);
|
247
|
+
textSelectionPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
248
|
+
textSelectionPage.steps.switchToPreviewTab();
|
249
|
+
});
|
250
|
+
|
251
|
+
it('When the user selects \'Grading\' view without attempting the question, then correct/incorrect answer should not be displayed in the preview tab and correct answer section should be displayed with correct answers', () => {
|
252
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
253
|
+
textSelectionPage.steps.switchToGradingView();
|
254
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
|
255
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
|
256
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
|
257
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
|
258
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
259
|
+
});
|
260
|
+
|
261
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
262
|
+
textSelectionPage.steps.resetQuestionPreview();
|
263
|
+
textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
|
264
|
+
textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[3]);
|
265
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
266
|
+
textSelectionPage.steps.switchToGradingView();
|
267
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
|
268
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
|
269
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[2]);
|
270
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[3]);
|
271
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
272
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
|
273
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
|
274
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
275
|
+
cy.log('When user clicks on Check answer button after attempting the question incorrectly, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
276
|
+
textSelectionPage.steps.checkAnswer();
|
277
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[0]);
|
278
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
|
279
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[2]);
|
280
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[3]);
|
281
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
282
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
283
|
+
});
|
284
|
+
|
285
|
+
it('When the user attempts the question partially correct with some correct and some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer response, incorrect icon should be displayed besides the incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
286
|
+
textSelectionPage.steps.resetQuestionPreview();
|
287
|
+
textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[0]);
|
288
|
+
textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[2]);
|
289
|
+
textSelectionPage.steps.verifyPreviewScore(0, 20);
|
290
|
+
textSelectionPage.steps.switchToGradingView();
|
291
|
+
textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
|
292
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
|
293
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[2]);
|
294
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[3]);
|
295
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
296
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[0]);
|
297
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(sentenceTextArray[1]);
|
298
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
299
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with some correct and some incorrect options, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
300
|
+
textSelectionPage.steps.checkAnswer();
|
301
|
+
textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
|
302
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(sentenceTextArray[1]);
|
303
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(sentenceTextArray[2]);
|
304
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[3]);
|
305
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
306
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
307
|
+
});
|
308
|
+
|
309
|
+
it('When the user attempts the question correctly then the user should be awarded full points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
310
|
+
textSelectionPage.steps.resetQuestionPreview();
|
311
|
+
textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[0]);
|
312
|
+
textSelectionPage.steps.selectOptionInPreviewTab(sentenceTextArray[1]);
|
313
|
+
textSelectionPage.steps.verifyPreviewScore(20, 20);
|
314
|
+
textSelectionPage.steps.switchToGradingView();
|
315
|
+
textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
|
316
|
+
textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
|
317
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[2]);
|
318
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[3]);
|
319
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
320
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
321
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
322
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
323
|
+
textSelectionPage.steps.checkAnswer();
|
324
|
+
textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[0]);
|
325
|
+
textSelectionPage.steps.verifyCorrectIconForOption(sentenceTextArray[1]);
|
326
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[2]);
|
327
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(sentenceTextArray[3]);
|
328
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
329
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
330
|
+
});
|
331
|
+
});
|
332
|
+
});
|
@@ -0,0 +1,149 @@
|
|
1
|
+
import { textSelectionPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
|
6
|
+
|
7
|
+
describe('Create Item page - Text selection: Manually and non scored', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question Preview: Manually Scored', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select the correct statements.');
|
18
|
+
textSelectionPage.steps.clearQuestionInputField();
|
19
|
+
paragraphTextArray.forEach((paragraphText) => {
|
20
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
21
|
+
});
|
22
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
23
|
+
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
24
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
25
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
26
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
27
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
28
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
29
|
+
textSelectionPage.steps.expandScoringTypeDropdown();
|
30
|
+
textSelectionPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
31
|
+
textSelectionPage.steps.switchToPreviewTab();
|
32
|
+
});
|
33
|
+
|
34
|
+
it('In Preview tab, question instructions and question text should be displayed in the preview tab', () => {
|
35
|
+
utilities.verifyInnerText(textSelectionPage.questionInstructionsText(), 'Select the correct statements.');
|
36
|
+
utilities.verifyElementVisibilityState(textSelectionPage.questionInstructionsText(), 'visible');
|
37
|
+
paragraphTextArray.forEach((paragraphText, index) => {
|
38
|
+
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.questionTextPreviewTab(), index), `${paragraphText}`);
|
39
|
+
});
|
40
|
+
});
|
41
|
+
|
42
|
+
textSelectionPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
|
43
|
+
});
|
44
|
+
|
45
|
+
describe('Question Preview: Non Scored', () => {
|
46
|
+
abortEarlySetup();
|
47
|
+
before(() => {
|
48
|
+
textSelectionPage.steps.navigateToCreateQuestion('text selection');
|
49
|
+
cy.barsPreLoaderWait();
|
50
|
+
textSelectionPage.steps.addTextInQuestionInstructionsInputField('Select the correct statements.');
|
51
|
+
textSelectionPage.steps.clearQuestionInputField();
|
52
|
+
paragraphTextArray.forEach((paragraphText) => {
|
53
|
+
textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
|
54
|
+
});
|
55
|
+
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
56
|
+
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
57
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
58
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
59
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
60
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[3]);
|
61
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
62
|
+
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
63
|
+
textSelectionPage.steps.expandScoringTypeDropdown();
|
64
|
+
textSelectionPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
65
|
+
textSelectionPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
66
|
+
textSelectionPage.steps.switchToPreviewTab();
|
67
|
+
});
|
68
|
+
|
69
|
+
textSelectionPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
70
|
+
|
71
|
+
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and the correct answer section should be displayed with correct answers', () => {
|
72
|
+
textSelectionPage.steps.switchToGradingView();
|
73
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
74
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
75
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
|
76
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
77
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
78
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
79
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
80
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
84
|
+
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
85
|
+
textSelectionPage.steps.switchToGradingView();
|
86
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
87
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
88
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
89
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
90
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
91
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
92
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
93
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
94
|
+
cy.log('When user clicks on Check answer button after he attempts the question incorrectly incorrect icons should be displayed besides all incorrect responses, status message \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
95
|
+
textSelectionPage.steps.checkAnswer();
|
96
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
97
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
98
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
99
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
100
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
101
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
102
|
+
});
|
103
|
+
|
104
|
+
it('When the user attempts the question partially correct with correct and incorrect options, then on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers should be displayed', () => {
|
105
|
+
textSelectionPage.steps.resetQuestionPreview();
|
106
|
+
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
107
|
+
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
|
108
|
+
textSelectionPage.steps.switchToGradingView();
|
109
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
110
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
111
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
112
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
113
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
114
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
115
|
+
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
116
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
117
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with some correct, some incomplete, some incorrect options, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, status message \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
118
|
+
textSelectionPage.steps.checkAnswer();
|
119
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
120
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
121
|
+
textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
|
122
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
123
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
124
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
125
|
+
});
|
126
|
+
|
127
|
+
it('When user attempts the question correctly, on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
128
|
+
textSelectionPage.steps.resetQuestionPreview();
|
129
|
+
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[0]);
|
130
|
+
textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
|
131
|
+
textSelectionPage.steps.switchToGradingView();
|
132
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
133
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
|
134
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
135
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
136
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
138
|
+
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
139
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, status message \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
140
|
+
textSelectionPage.steps.checkAnswer();
|
141
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
|
142
|
+
textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
|
143
|
+
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
144
|
+
textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[3]);
|
145
|
+
textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
146
|
+
textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
|
147
|
+
});
|
148
|
+
});
|
149
|
+
});
|
@@ -30,7 +30,6 @@ describe('Create item page - Text selection: Partial different weights', () => {
|
|
30
30
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
31
31
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
32
32
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[2]);
|
33
|
-
utilities.verifyInnerText(textSelectionPage.correctAnswersLabel(), 'Correct answers');
|
34
33
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
35
34
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
36
35
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[2]);
|
@@ -28,7 +28,6 @@ describe('Create item page - Text selection: Partial equal weights', () => {
|
|
28
28
|
textSelectionPage.steps.switchToGradingView();
|
29
29
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
|
30
30
|
textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
|
31
|
-
utilities.verifyInnerText(textSelectionPage.correctAnswersLabel(), 'Correct answers');
|
32
31
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[0]);
|
33
32
|
textSelectionPage.steps.verifyCorrectIconForOptionCorrectAnswerSection(paragraphTextArray[1]);
|
34
33
|
textSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
@@ -32,10 +32,10 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
32
32
|
it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
|
33
33
|
textSelectionPage.steps.switchToEditTab();
|
34
34
|
textSelectionPage.steps.allotPoints(20);
|
35
|
-
textSelectionPage.steps.
|
36
|
-
textSelectionPage.steps.
|
37
|
-
textSelectionPage.steps.
|
38
|
-
textSelectionPage.steps.
|
35
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
36
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
37
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
38
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[3]);
|
39
39
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
40
40
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
41
41
|
textSelectionPage.steps.verifyOptionIsNotSelectedInSpecifyCorrectAnswerSection(paragraphTextArray[2]);
|
@@ -69,10 +69,10 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
69
69
|
});
|
70
70
|
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
71
71
|
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
72
|
-
textSelectionPage.steps.
|
73
|
-
textSelectionPage.steps.
|
74
|
-
textSelectionPage.steps.
|
75
|
-
textSelectionPage.steps.
|
72
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
73
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
74
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
75
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[3]);
|
76
76
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
77
77
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
78
78
|
textSelectionPage.steps.allotPoints(20);
|
@@ -242,9 +242,9 @@ describe('Create item page - Text selection: All or nothing ', () => {
|
|
242
242
|
});
|
243
243
|
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
244
244
|
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
245
|
-
textSelectionPage.steps.
|
246
|
-
textSelectionPage.steps.
|
247
|
-
textSelectionPage.steps.
|
245
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
246
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
247
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
248
248
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
249
249
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
250
250
|
textSelectionPage.steps.allotPoints(20);
|
@@ -41,9 +41,9 @@ describe('Create item page - Matching - Check answer functionality', () => {
|
|
41
41
|
});
|
42
42
|
textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
|
43
43
|
textSelectionPage.steps.switchTextSelectionMode('Paragraph');
|
44
|
-
textSelectionPage.steps.
|
45
|
-
textSelectionPage.steps.
|
46
|
-
textSelectionPage.steps.
|
44
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
|
45
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
|
46
|
+
textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[2]);
|
47
47
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
|
48
48
|
textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[1]);
|
49
49
|
textSelectionPage.steps.allotPoints(20);
|