itemengine-cypress-automation 1.0.198-drawingResponseEnumUpdate-1aa98cf.0 → 1.0.198

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. package/cypress/e2e/ILC/ImageHighlight/editTabScoring.js +355 -0
  2. package/cypress/e2e/ILC/ImageHighlight/headerSection.js +83 -0
  3. package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +205 -0
  4. package/cypress/e2e/ILC/ImageHighlight/specifyCorrectAnswerSection.js +92 -0
  5. package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +404 -0
  6. package/cypress/e2e/ILC/ImageHighlight/supportedFileTypes.js +42 -0
  7. package/cypress/e2e/ILC/ImageHighlight/toolSettings.js +73 -0
  8. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/editTabScoring.js +253 -0
  9. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsBasic.js +114 -0
  10. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +288 -0
  11. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialEqualWeightsBasic.js +164 -0
  12. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/previewContentsForAllViews.smoke.js +168 -0
  13. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/setPointsPopup.js +83 -0
  14. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/specifyCorrectAnswerSection.js +114 -0
  15. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/studentViewSettings.js +179 -0
  16. package/cypress/e2e/ILC/ListOrderingNew/horizontalOrientationAllOrNothingForAllViews.smoke.js +214 -0
  17. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +5 -21
  18. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +3 -37
  19. package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +1 -1
  20. package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
  21. package/cypress/pages/components/draggableOptionContainer.js +1 -1
  22. package/cypress/pages/components/enableOuterBorderComponent.js +16 -2
  23. package/cypress/pages/components/index.js +3 -1
  24. package/cypress/pages/components/scoringSectionBase.js +1 -1
  25. package/cypress/pages/components/setPointsPopupBase.js +7 -10
  26. package/cypress/pages/components/showAvailableOptionsToStudents.js +76 -0
  27. package/cypress/pages/components/showStudentMaximumNumberOfPossibleSelections.js +56 -0
  28. package/cypress/pages/imageHighlightPage.js +434 -4
  29. package/cypress/pages/listOrderingPage.js +287 -43
  30. package/cypress/pages/textSelectionPage.js +6 -71
  31. package/package.json +2 -2
@@ -0,0 +1,253 @@
1
+ import { ckEditorToolbar, equationEditorFlyout, setPointsPopupBase } from "../../../../pages/components";
2
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ import utilities from "../../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ const options = ['sprout', 'plant', 'flower', 'seed'];
7
+
8
+ describe('Create item page - List ordering: Scoring section for "Horizontal orientation"', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Scoring section contents', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
17
+ cy.barsPreLoaderWait();
18
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
19
+ });
20
+
21
+ listOrderingPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
22
+
23
+ listOrderingPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
24
+ });
25
+
26
+ describe('Auto scored: All or nothing scoring - Scoring section', () => {
27
+ abortEarlySetup();
28
+ before(() => {
29
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
30
+ cy.barsPreLoaderWait();
31
+ listOrderingPage.steps.allotPoints(10);
32
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
33
+ });
34
+
35
+ it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown and penalty scoring dropdown should be displayed in the scoring section', () => {
36
+ listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
37
+ listOrderingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
38
+ });
39
+ });
40
+
41
+ describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
42
+ abortEarlySetup();
43
+ before(() => {
44
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
45
+ cy.barsPreLoaderWait();
46
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
47
+ listOrderingPage.steps.addInputToOptionsInputField(options);
48
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
49
+ });
50
+
51
+ listOrderingPage.tests.verifyContentsOfSpecifyCorrectAnswerSectionHorizontalOrientation();
52
+
53
+ listOrderingPage.tests.verifyPointsLabelAndInputField();
54
+ });
55
+
56
+ describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
57
+ abortEarlySetup();
58
+ before(() => {
59
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
60
+ cy.barsPreLoaderWait();
61
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
62
+ listOrderingPage.steps.addInputToOptionsInputField(options);
63
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
64
+ });
65
+
66
+ it('User should be able to select \'Partial - equal weights\' scoring type', () => {
67
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
68
+ });
69
+
70
+ it('When the user has switched to \'Partial - equal weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' label and dropdown should be displayed in the \'Scoring\' section, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
71
+ listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
72
+ listOrderingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
73
+ listOrderingPage.steps.verifyRoundingLabelAndDropdownDefaultState();
74
+ utilities.verifyElementVisibilityState(listOrderingPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
75
+ });
76
+ });
77
+
78
+ describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
79
+ abortEarlySetup();
80
+ before(() => {
81
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
82
+ cy.barsPreLoaderWait();
83
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
84
+ listOrderingPage.steps.addInputToOptionsInputField(options);
85
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
86
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
87
+ });
88
+
89
+ listOrderingPage.tests.verifyContentsOfSpecifyCorrectAnswerSectionHorizontalOrientation();
90
+
91
+ it('\'Points per response\' label should be displayed below the points input field in the \'Specify correct answer\' section', () => {
92
+ utilities.verifyInnerText(listOrderingPage.pointsPerResponseLabel(), 'Points per response:\n-');
93
+ });
94
+
95
+ it('When the user gives a score input to \'Points\' input field, then the score should be equally divided amongst the options and the \'Points per response\' label should also update accordingly', () => {
96
+ listOrderingPage.steps.allotPoints(6);
97
+ listOrderingPage.steps.verifyPointsPerResponseScore('1.5');
98
+ });
99
+
100
+ it('When the user adds a new option, then points per response should get updated accordingly', () => {
101
+ listOrderingPage.steps.addOption();
102
+ listOrderingPage.steps.verifyPointsPerResponseScore('1.2');
103
+ });
104
+
105
+ it('When the user deletes an option, then points per response should get updated accordingly', () => {
106
+ listOrderingPage.steps.deleteOption(4);
107
+ listOrderingPage.steps.verifyPointsPerResponseScore('1.5');
108
+ });
109
+
110
+ it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
111
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('All or nothing');
112
+ utilities.verifyElementVisibilityState(listOrderingPage.pointsPerResponseLabel(), 'notExist');
113
+ listOrderingPage.steps.verifyPointsFieldValue(6);
114
+ });
115
+
116
+ it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
117
+ listOrderingPage.steps.allotPoints(12);
118
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
119
+ listOrderingPage.steps.verifyPointsPerResponseScore('3');
120
+ });
121
+
122
+ it('CSS of \'Points per response\' label and its displayed score', { tags: 'css' }, () => {
123
+ utilities.verifyCSS(listOrderingPage.pointsPerResponseLabel(), {
124
+ 'color': css.color.labels,
125
+ 'font-size': css.fontSize.normal,
126
+ 'font-weight': css.fontWeight.semibold
127
+ });
128
+ });
129
+ });
130
+
131
+ describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
132
+ abortEarlySetup();
133
+ before(() => {
134
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
135
+ cy.barsPreLoaderWait();
136
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
137
+ listOrderingPage.steps.addInputToOptionsInputField(options);
138
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
139
+ });
140
+
141
+ it('User should be able to select \'Partial - different weights\' scoring', () => {
142
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
143
+ });
144
+
145
+ it('When the user has switched to \'Partial - different weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' labels and dropdowns, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
146
+ listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
147
+ listOrderingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
148
+ listOrderingPage.steps.verifyRoundingLabelAndDropdownDefaultState();
149
+ utilities.verifyElementVisibilityState(listOrderingPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
150
+ });
151
+ });
152
+
153
+ describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
154
+ abortEarlySetup();
155
+ before(() => {
156
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
157
+ cy.barsPreLoaderWait();
158
+ cy.log('Add image to option input field')
159
+ listOrderingPage.steps.focusInOptionsInputField(0);
160
+ ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar();
161
+ ckEditorToolbar.steps.addImageToInputField();
162
+ listOrderingPage.steps.enterTextInOptionInputField(0, 'Fox');
163
+ cy.log('Add bold text to option input field')
164
+ listOrderingPage.steps.focusInOptionsInputField(1);
165
+ ckEditorToolbar.steps.selectBoldOptionFromCKEditorToolbar();
166
+ listOrderingPage.steps.enterTextInOptionInputField(1, 'This is a bold option');
167
+ cy.log('Add equation to option input field')
168
+ listOrderingPage.steps.enterTextInOptionInputField(2, 'Solve the following');
169
+ listOrderingPage.steps.focusInOptionsInputField(2);
170
+ ckEditorToolbar.steps.selectEquationEditorOptionFromCKEditorToolbar();
171
+ equationEditorFlyout.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
172
+ listOrderingPage.steps.enterTextInOptionInputField(3, 'alpha');
173
+ listOrderingPage.steps.expandAdditionalSettings();
174
+ });
175
+
176
+ it('When user selects "Option orientation" as "Horizontal" and scoring type as "Partial different weights", then Set points button should be displayed in the specify correct answer section', () => {
177
+ listOrderingPage.steps.selectOptionOrientation('Horizontal')
178
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
179
+ utilities.verifyElementVisibilityState(listOrderingPage.setPointsButton(), 'visible');
180
+ });
181
+
182
+ it('CSS of "Set points" button', { tags: 'css' }, () => {
183
+ utilities.verifyCSS(listOrderingPage.setPointsButton().find('[class*="MuiButton"]'), {
184
+ 'color': css.color.activeButtons,
185
+ 'font-size': css.fontSize.default,
186
+ 'font-weight': css.fontWeight.regular
187
+ });
188
+ });
189
+
190
+ it('Accessibility of "Set points" button', { tags: 'a11y' }, () => {
191
+ cy.checkAccessibility(listOrderingPage.setPointsButton());
192
+ });
193
+
194
+ it('When user selects "Set points" button a popup should be displayed with a "Set points" title and "Cancel" and "Ok" button', () => {
195
+ listOrderingPage.steps.clickOnSetPointsButton();
196
+ utilities.verifyInnerText(setPointsPopupBase.dialogBoxTitle(), 'Set points');
197
+ utilities.verifyInnerText(setPointsPopupBase.setPointsPopupCancelButton(), 'Cancel');
198
+ utilities.verifyInnerText(setPointsPopupBase.setPointsPopupSaveButton(), 'Ok');
199
+ });
200
+
201
+ it('CSS of Set points popup', { tags: 'css' }, () => {
202
+ utilities.verifyCSS(setPointsPopupBase.dialogBoxTitle(), {
203
+ 'color': css.color.flyoutTitle,
204
+ 'font-size': css.fontSize.heading,
205
+ 'font-weight': css.fontWeight.semibold
206
+ });
207
+ utilities.verifyCSS(setPointsPopupBase.setPointsPopupSaveButton(), {
208
+ 'color': css.color.primaryBtn,
209
+ 'font-size': css.fontSize.default,
210
+ 'font-weight': css.fontWeight.semibold,
211
+ 'background-color': css.color.primaryBtnBg
212
+ });
213
+ utilities.verifyCSS(setPointsPopupBase.setPointsPopupCancelButton(), {
214
+ 'color': css.color.secondaryBtn,
215
+ 'font-size': css.fontSize.default,
216
+ 'font-weight': css.fontWeight.semibold,
217
+ 'background-color': css.color.transparent
218
+ });
219
+ });
220
+
221
+ it('All options should be displayed in the set points popup', () => {
222
+ listOrderingPage.steps.verifyImageOptionInSetPointsPopup(0);
223
+ listOrderingPage.steps.verifyEquationOptionInSetPointsPopup(2);
224
+ listOrderingPage.steps.verifyBoldTextOptionInSetPointsPopup(1);
225
+ listOrderingPage.steps.verifyTextContentOfOptionInSetPointsPopup(3, 'alpha')
226
+ utilities.verifyElementCount(listOrderingPage.optionWrapperSetPointsPopup(), 4);
227
+ });
228
+
229
+ it('"Points" label and empty input fields should be displayed for all the options', () => {
230
+ utilities.verifyInnerText(listOrderingPage.pointsLabelSetPointsPopup(), 'Points');
231
+ utilities.verifyElementVisibilityState(listOrderingPage.pointsInputField(), 'exist');
232
+ utilities.verifyInputFieldValue(listOrderingPage.pointsInputField(), '');
233
+ utilities.verifyElementCount(listOrderingPage.pointsInputField(), 4);
234
+ });
235
+
236
+ it('The user should be able to set points in the Set points popup points input field', () => {
237
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([2.3, 3.4, 4.5, 2.5]);
238
+ setPointsPopupBase.steps.saveSetPointsPopup();
239
+ });
240
+
241
+ it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the \'All or nothing scoring\' points input field', () => {
242
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('All or nothing');
243
+ listOrderingPage.steps.verifyPointsFieldValue(12.7);
244
+ });
245
+
246
+ it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
247
+ listOrderingPage.steps.allotPoints(9);
248
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
249
+ listOrderingPage.steps.clickOnSetPointsButton();
250
+ setPointsPopupBase.steps.verifyPointsAllotedInSetPointsPopup([2.25, 2.25, 2.25, 2.25]);
251
+ });
252
+ });
253
+ });
@@ -0,0 +1,114 @@
1
+ import { setPointsPopupBase } from "../../../../pages/components";
2
+ import { listOrderingPage } from "../../../../pages/listOrderingPage";
3
+ import abortEarlySetup from "../../../../support/helpers/abortEarly";
4
+ const options = ['sprout', 'plant', 'flower', 'seed'];
5
+ const correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
6
+
7
+ describe('Create Item page - List ordering: Preview tab scoring', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Question Preview: AutoScored - Partial different weights scoring for "Horizontal" option orientation', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ listOrderingPage.steps.navigateToCreateQuestion('list ordering');
16
+ cy.barsPreLoaderWait();
17
+ listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
18
+ listOrderingPage.steps.addInputToOptionsInputField(options);
19
+ listOrderingPage.steps.selectOptionOrientation('Horizontal');
20
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('seed', 0);
21
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInSpecifyCorrectAnswerSection('sprout', 1);
22
+ listOrderingPage.steps.verifyHorizontalOptionsOrderInSpecifyCorrectAnswerSection(correctAnswerArray);
23
+ listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
24
+ listOrderingPage.steps.clickOnSetPointsButton();
25
+ setPointsPopupBase.steps.allotPointsToSetPointsPopupPointsInputField([4.2, 1.8, 2.3, 3.7]);
26
+ setPointsPopupBase.steps.saveSetPointsPopup();
27
+ listOrderingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
28
+ listOrderingPage.steps.switchToPreviewTab();
29
+ });
30
+
31
+ it('When the user switches to the \'Grading view\' without attempting the question, then correct/incorrect icons should be displayed for the default list order, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
32
+ listOrderingPage.steps.verifyPreviewScore(0, 12);
33
+ listOrderingPage.steps.switchToGradingView();
34
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('flower');
35
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
36
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
37
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('sprout');
38
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
39
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
40
+ listOrderingPage.steps.verifyCorrectOptionIconsCorrectAnswerSection();
41
+ });
42
+
43
+ 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, correct/incorrect status message should not be displayed and correct answers section should be displayed with correct answers from the correct accordion', () => {
44
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('sprout', 3);
45
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('flower', 0);
46
+ listOrderingPage.steps.verifyHorizontalOptionsOrderInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
47
+ listOrderingPage.steps.verifyPreviewScore(0, 12);
48
+ listOrderingPage.steps.switchToGradingView();
49
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('flower');
50
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
51
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
52
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('sprout');
53
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
54
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
55
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
56
+ cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, correct/incorrect status message and correct answer section should not be displayed')
57
+ listOrderingPage.steps.checkAnswer();
58
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('flower');
59
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
60
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
61
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('sprout');
62
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
63
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
64
+ });
65
+
66
+ it('When the user attempts the question partially correct, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message should not be displayed and correct answer section with all correct answers should be displayed', () => {
67
+ listOrderingPage.steps.resetQuestionPreview();
68
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('flower', 3);
69
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('plant', 0);
70
+ listOrderingPage.steps.verifyHorizontalOptionsOrderInPreviewTab(['plant', 'sprout', 'seed', 'flower']);
71
+ listOrderingPage.steps.switchToGradingView();
72
+ listOrderingPage.steps.verifyPreviewScore(5.5, 12);
73
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
74
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('sprout');
75
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
76
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
77
+ listOrderingPage.steps.verifyOptionsInCorrectAnswerSection(correctAnswerArray);
78
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
79
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
80
+ cy.log('When user attempts the question partially correct and clicks on \'Check Answer\' button, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, correct/incorrect status message and correct answer section should not be displayed')
81
+ listOrderingPage.steps.checkAnswer();
82
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('plant');
83
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('sprout');
84
+ listOrderingPage.steps.verifyIncorrectOptionIconHorizontalOrientation('seed');
85
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
86
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
87
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
88
+ });
89
+
90
+ it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed', () => {
91
+ listOrderingPage.steps.resetQuestionPreview();
92
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('seed', 0);
93
+ listOrderingPage.steps.clickAndReorderHorizontalOptionInPreviewTab('sprout', 1);
94
+ listOrderingPage.steps.verifyHorizontalOptionsOrderInPreviewTab(correctAnswerArray);
95
+ listOrderingPage.steps.verifyPreviewScore(12, 12);
96
+ listOrderingPage.steps.switchToGradingView()
97
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('sprout');
98
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('seed');
99
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('plant');
100
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
101
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
102
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
103
+ listOrderingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
104
+ cy.log('When user attempts the question correctly and clicks on the \'Check Answer\' button, then correct icons should be displayed beside all the correct responses, correct/incorrect status message and correct answer section should not be displayed')
105
+ listOrderingPage.steps.checkAnswer();
106
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('sprout');
107
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('seed');
108
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('plant');
109
+ listOrderingPage.steps.verifyCorrectOptionIconHorizontalOrientation('flower');
110
+ listOrderingPage.steps.verifyCorrectAnswerSectionNotExists();
111
+ listOrderingPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
112
+ });
113
+ });
114
+ });