itemengine-cypress-automation 1.0.113 → 1.0.115

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.js +489 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/customizePlaybackControls.js +488 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/editAndPreviewTabScoringSection.js +92 -0
  5. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +229 -0
  6. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  7. package/cypress/e2e/ILC/AudioResponseNew/headerSection.js +67 -0
  8. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -1
  9. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +11 -11
  10. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +529 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +108 -190
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +83 -155
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +104 -315
  14. package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +121 -135
  15. package/cypress/e2e/ILC/EssayResponseMath/createItem.js +17 -0
  16. package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +203 -0
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +121 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +236 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsBasic.js +255 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +237 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +236 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  23. package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +43 -0
  24. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +187 -0
  25. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
  26. package/cypress/e2e/ILC/ShortTextResponseNew/checkAnswerFunctionalityForAllViews.smoke.js +99 -0
  27. package/cypress/e2e/ILC/ShortTextResponseNew/editTabScoringSection.js +97 -0
  28. package/cypress/e2e/ILC/ShortTextResponseNew/headerSection.js +74 -0
  29. package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +83 -0
  30. package/cypress/e2e/ILC/ShortTextResponseNew/previewContentsForAllViews.smoke.js +109 -0
  31. package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +66 -0
  32. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +326 -0
  33. package/cypress/e2e/ILC/TextEntryMath/checkAnswerFunctionalityForAllViews.smoke.js +163 -0
  34. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +8 -8
  35. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +3 -3
  36. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +154 -0
  37. package/cypress/pages/audioResponsePage.js +523 -66
  38. package/cypress/pages/components/autoScoredScoringPreviewTab.js +2 -0
  39. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +6 -5
  40. package/cypress/pages/components/equationEditorFlyout.js +11 -0
  41. package/cypress/pages/components/essayResponseCommonComponents.js +290 -19
  42. package/cypress/pages/components/figOverImageCanvasComponent.js +1 -1
  43. package/cypress/pages/components/maximumRecorderLengthComponent.js +32 -15
  44. package/cypress/pages/components/playbackControlsBaseComponent.js +9 -1
  45. package/cypress/pages/components/questionInputFieldComponent.js +0 -7
  46. package/cypress/pages/dragAndDropIntoCategoriesPage.js +3 -3
  47. package/cypress/pages/essayResponseBasicPage.js +1 -26
  48. package/cypress/pages/essayResponsePage.js +21 -284
  49. package/cypress/pages/shortTextResponsePage.js +142 -103
  50. package/cypress/pages/textEntryMathPage.js +58 -7
  51. package/package.json +1 -1
  52. package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,236 @@
1
+ import { fillInTheGapsOverImageDropdownPage } from "../../../../pages";
2
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
3
+
4
+ const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
5
+ const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
6
+ const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
7
+ const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
8
+ const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
9
+ const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
10
+
11
+ describe('Create item page - Fill in the gaps over image with dropdown: Partial different weights', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ describe('Question preview: Auto scored - Partial different weights - When \'Correct answer\' points are greater than \'Alternative answer\' points', () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ cy.log('Navigate to fill in the gaps over image - dropdown question type');
20
+ fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
21
+ cy.barsPreLoaderWait();
22
+ fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
23
+ fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
24
+ fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
25
+ fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
26
+ fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(80);
27
+ fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
28
+ fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
29
+ fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
30
+ fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown3);
31
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
32
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
33
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, correctAnswerArray[2]);
34
+ fillInTheGapsOverImageDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 6, 1: 4, 2: 5 });
35
+ fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(1);
36
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
37
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
38
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, alternateAnswerArray[2]);
39
+ fillInTheGapsOverImageDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 7, 1: 1, 2: 5 });
40
+ fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
41
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
42
+ });
43
+
44
+ it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
45
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
46
+ fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
47
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
48
+ });
49
+
50
+ it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
51
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
52
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
53
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(15, 15);
54
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
55
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
56
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
57
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
58
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
59
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
60
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
61
+ cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
62
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
63
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
64
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
65
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
66
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
67
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
68
+ });
69
+
70
+ it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
71
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
72
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
73
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(13, 15);
74
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
75
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
76
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
77
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
78
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
79
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
80
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
81
+ cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
82
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
83
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
84
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
85
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
86
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
87
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
88
+ });
89
+
90
+ it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded with points of the correct responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
91
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
92
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
93
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(10, 15);
94
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
95
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
96
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
97
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
98
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
99
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
100
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
101
+ cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
102
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
103
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
104
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
105
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
106
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
107
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
108
+ });
109
+
110
+ it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded with points of and on switching to \'Grading\' view, correct icon should be displayed besides the alternative answer responses, no icon should be displayed beside unattempted dropdown correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
111
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
112
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }]);
113
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(7, 15);
114
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
115
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
116
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
117
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
118
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
119
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
120
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
121
+ cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
122
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
123
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
124
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
125
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
126
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
127
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
128
+ });
129
+
130
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the alternative accordion as points from the alternative accordion are more than the correct accordion and on switching to \'Grading\' view, correct icon icon should be displayed besides dropdown with alternative answer responses, incorrect icon should be displayed beside responses from the correct accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
131
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
132
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
133
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(7, 15);
134
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
135
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
136
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
137
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
138
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
139
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
140
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
141
+ cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon icon should be displayed besides dropdown with alternative answer responses, incorrect icon should be displayed beside responses from the correct accordion, correct/incorrect status message and correct answer section should not be displayed')
142
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
143
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
144
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
145
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
146
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
147
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
148
+ });
149
+
150
+ it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with points of the correct accordion as points from the correct accordion are more than the alternative accordion and on switching to \'Grading\' view, correct icon icon should be displayed besides dropdown with correct accordion response, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
151
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
152
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }]);
153
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(6, 15);
154
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
155
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
156
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
157
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
158
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
159
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
160
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
161
+ cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon icon should be displayed besides dropdown with correct accordion response, incorrect icon should be displayed beside responses from the alternative accordion, correct/incorrect status message and correct answer section should not be displayed')
162
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
163
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
164
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
165
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
166
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
167
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
168
+ });
169
+
170
+ it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with points of the accordion with more points alloted to the response and on switching to \'Grading\' view, correct icon icon should be besides the common response, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
171
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
172
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
173
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
174
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
175
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
176
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
177
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
178
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
179
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
180
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
181
+ cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
182
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
183
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
184
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
185
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
186
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
187
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
188
+ });
189
+
190
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
191
+ fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
192
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
193
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 15);
194
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
195
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
196
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
197
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
198
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
199
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
200
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
201
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown correct/incorrect status message and correct answer section should not be displayed')
202
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
203
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
204
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
205
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
206
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
207
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
208
+ });
209
+
210
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the correct accordion overpowers the combined score of the alternative accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icon icons should be displayed for the correct accordion response, incorrect icon should be displayed for the alternative accordion responses, correct/incorrect answer status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
211
+ cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
212
+ fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
213
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, optionsForDropdown3[3]);
214
+ fillInTheGapsOverImageDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.2, 1: 2.2, 2: 1.6 });
215
+ fillInTheGapsOverImageDropdownPage.steps.expandCorrectAnswerAccordion();
216
+ fillInTheGapsOverImageDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 11.4, 1: 1.2, 2: 10.4 });
217
+ fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
218
+ fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
219
+ fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(10.4, 23);
220
+ fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
221
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
222
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
223
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
224
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
225
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
226
+ fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
227
+ cy.log('When user attempts the question correctly and clicks on the \'Check answer\' button, correct icon icons should be displayed beside the correct responses from the correct accordion, incorrect icons should be displayed beside the incorrectly answered dropdowns, correct/incorrect status message and correct answer section should not be displayed')
228
+ fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
229
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
230
+ fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
231
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
232
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
233
+ fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
234
+ });
235
+ });
236
+ });
@@ -189,7 +189,7 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
189
189
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
190
190
  });
191
191
 
192
- it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with alternative accordion answers', () => {
192
+ it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer status message should not be displayed and correct answer container should be displayed with alternative accordion answers', () => {
193
193
  cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
194
194
  fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
195
195
  fillInTheGapsOverImageDropdownPage.steps.allotPoints(23);
@@ -206,7 +206,7 @@ describe('Create item page - Fill in the gaps over image with dropdown: Partial
206
206
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
207
207
  fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
208
208
  fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
209
- cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on the \'Check answer\' button, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
209
+ cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on the \'Check answer\' button, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer status message, correct answer container should not be displayed')
210
210
  fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
211
211
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
212
212
  fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
@@ -0,0 +1,43 @@
1
+ import { shortTextResponsePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+
4
+ describe('Create Item page - Short text response - drag and drop: Additional settings', () => {
5
+ before(() => {
6
+ cy.loginAs('admin');
7
+ });
8
+
9
+ describe('Additional Settings accordion', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ cy.log('Navigating to short text response - question type');
13
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
14
+ cy.barsPreLoaderWait();
15
+ });
16
+
17
+ shortTextResponsePage.tests.verifyAdditonalSettingsAccordionProperties();
18
+ });
19
+
20
+ describe('Additional settings: Font size contents', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ cy.log('Navigating to Highlight question type');
24
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
25
+ cy.barsPreLoaderWait();
26
+ shortTextResponsePage.steps.expandAdditonalSettings();
27
+ });
28
+
29
+ shortTextResponsePage.tests.verifyFontSizeSectionContents();
30
+ });
31
+
32
+ describe('Additional Settings: Details section', () => {
33
+ abortEarlySetup();
34
+ before(() => {
35
+ cy.log('Navigating to fill in the gaps over image - drag and drop question type');
36
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
37
+ cy.barsPreLoaderWait();
38
+ shortTextResponsePage.steps.expandAdditonalSettings();
39
+ });
40
+
41
+ shortTextResponsePage.tests.verifyDetailsSection();
42
+ });
43
+ });
@@ -0,0 +1,187 @@
1
+ import { shortTextResponsePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import { dialogBoxBase, gradingViewPage, itemPreviewPage, studentViewPage } from "../../../pages";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const grepTags = Cypress.env('grepTags');
6
+ let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
7
+ const views = utilities.getViews(correctAnswerViews);
8
+ const css = Cypress.env('css');
9
+ var itemReferenceID = "";
10
+
11
+ describe('Create item page - Short text response: All or nothing', () => {
12
+ before(() => {
13
+ cy.loginAs('admin');
14
+ });
15
+
16
+ if (!grepTags || !grepTags.includes('smoke')) {
17
+ describe('Question preview modes: Student view and Grading view', () => {
18
+ abortEarlySetup();
19
+ before(() => {
20
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
21
+ cy.barsPreLoaderWait();
22
+ shortTextResponsePage.steps.switchToPreviewTab();
23
+ });
24
+
25
+ shortTextResponsePage.tests.verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet();
26
+
27
+ it('When the user sets correct answer and allots points in specify correct answer section, then the alloted points should be displayed in the preview tab', () => {
28
+ shortTextResponsePage.steps.switchToEditTab();
29
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
30
+ shortTextResponsePage.steps.allotPoints(20);
31
+ shortTextResponsePage.steps.switchToPreviewTab();
32
+ shortTextResponsePage.steps.verifyPreviewScore(0, 20);
33
+ });
34
+
35
+ it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, previously added response should not persist', () => {
36
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Buildings');
37
+ shortTextResponsePage.steps.resetQuestionPreview();
38
+ shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('');
39
+ });
40
+ });
41
+ }
42
+
43
+ views.forEach((view) => {
44
+ describe(`Short text response: all or nothing scoring - ${view}`, { tags: 'smoke' }, () => {
45
+ abortEarlySetup();
46
+ before(() => {
47
+ switch (view) {
48
+ case 'Question preview':
49
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
50
+ cy.barsPreLoaderWait();
51
+ shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.')
52
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
53
+ shortTextResponsePage.steps.allotPoints(20);
54
+ shortTextResponsePage.steps.switchToPreviewTab();
55
+ break;
56
+ case 'Item preview':
57
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
58
+ itemPreviewPage.steps.switchToPreviewTab();
59
+ break;
60
+ case 'Grading view':
61
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
62
+ break;
63
+ }
64
+ });
65
+
66
+ beforeEach(() => {
67
+ switch (view) {
68
+ case 'Question preview':
69
+ shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
70
+ shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExists();
71
+ shortTextResponsePage.steps.resetQuestionPreview();
72
+ break;
73
+ case 'Item preview':
74
+ itemPreviewPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
75
+ shortTextResponsePage.steps.verifyCorrectIncorrectBorderNotExists();
76
+ itemPreviewPage.steps.resetQuestionPreview();
77
+ break;
78
+ case 'Grading view':
79
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
80
+ break;
81
+ }
82
+ });
83
+
84
+ if (view === 'Question preview') {
85
+ after(() => {
86
+ shortTextResponsePage.steps.clickOnSaveQuestionButton();
87
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
88
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
89
+ });
90
+ };
91
+
92
+ it('When the user selects \'Grading\' view without attempting the question, incorrect border should be displayed and correct answer should be displayed below response field', () => {
93
+ if (view === 'Grading view') {
94
+ studentViewPage.steps.submitResponse();
95
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
96
+ studentViewPage.steps.clickOnGoToGradingViewButton();
97
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
98
+ }
99
+ if (view === 'Question preview' || view === 'Item preview') {
100
+ shortTextResponsePage.steps.switchToGradingView();
101
+ shortTextResponsePage.steps.verifyPreviewScore(0, 20);
102
+ }
103
+ shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
104
+ shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
105
+ });
106
+
107
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides incorrect response, incorrect answer border around response field and correct answer should be displayed in the question preview', () => {
108
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Text');
109
+ if (view === 'Grading view') {
110
+ studentViewPage.steps.submitResponse();
111
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
112
+ studentViewPage.steps.clickOnGoToGradingViewButton()
113
+ gradingViewPage.steps.verifyGradingViewScore(0, 20);
114
+ shortTextResponsePage.steps.verifyCorrectAnswerResponseInCorrectAnswerWrapper('Buildings');
115
+ }
116
+ if (view === 'Question preview' || view === 'Item preview') {
117
+ shortTextResponsePage.steps.switchToGradingView();
118
+ shortTextResponsePage.steps.verifyPreviewScore(0, 20);
119
+ }
120
+ shortTextResponsePage.steps.verifyIncorrectAttemptBorder();
121
+ shortTextResponsePage.steps.verifyIncorrectIcon();
122
+ });
123
+
124
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icon should be displayed beside the correct response, correct answer border around response field should be displayed the question preview', () => {
125
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Buildings');
126
+ if (view === 'Grading view') {
127
+ studentViewPage.steps.submitResponse();
128
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
129
+ studentViewPage.steps.clickOnGoToGradingViewButton();
130
+ gradingViewPage.steps.verifyGradingViewScore(20, 20);
131
+ }
132
+ if (view === 'Question preview' || view === 'Item preview') {
133
+ shortTextResponsePage.steps.verifyPreviewScore(20, 20);
134
+ shortTextResponsePage.steps.switchToGradingView();
135
+ }
136
+ shortTextResponsePage.steps.verifyCorrectAttemptBorder();
137
+ shortTextResponsePage.steps.verifyCorrectIcon();
138
+ });
139
+ });
140
+ });
141
+
142
+ if (!grepTags || !grepTags.includes('smoke')) {
143
+ describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
144
+ abortEarlySetup();
145
+ before(() => {
146
+ shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
147
+ cy.barsPreLoaderWait();
148
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Buildings');
149
+ shortTextResponsePage.steps.allotPoints(20);
150
+ });
151
+
152
+ it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
153
+ shortTextResponsePage.steps.expandMinimumScoringDropdown();
154
+ shortTextResponsePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score');
155
+ shortTextResponsePage.steps.allotMinimumPoints(2);
156
+ shortTextResponsePage.steps.switchToPreviewTab();
157
+ shortTextResponsePage.steps.switchToGradingView();
158
+ shortTextResponsePage.steps.verifyPreviewScore(2, 20);
159
+ shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
160
+ });
161
+
162
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
163
+ shortTextResponsePage.steps.resetQuestionPreview();
164
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('answer');
165
+ shortTextResponsePage.steps.verifyPreviewScore(2, 20);
166
+ shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
167
+ });
168
+
169
+ it('When the user selects \'Award minimum score only if attempted\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with 0 points', () => {
170
+ shortTextResponsePage.steps.switchToEditTab();
171
+ shortTextResponsePage.steps.expandMinimumScoringDropdown();
172
+ shortTextResponsePage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
173
+ shortTextResponsePage.steps.allotMinimumPoints(2);
174
+ shortTextResponsePage.steps.switchToPreviewTab();
175
+ shortTextResponsePage.steps.switchToGradingView();
176
+ shortTextResponsePage.steps.verifyPreviewScore(0, 20);
177
+ shortTextResponsePage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
178
+ });
179
+
180
+ it('When the user has selected \'Award minimum score\' from the minimum scoring dropdown, attempts the question incorrectly and switches to grading view, the user should be awarded with minimum points', () => {
181
+ shortTextResponsePage.steps.resetQuestionPreview();
182
+ shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('text');
183
+ shortTextResponsePage.steps.verifyPreviewScore(2, 20);
184
+ });
185
+ });
186
+ };
187
+ });