itemengine-cypress-automation 1.0.47 → 1.0.50

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettings.js +1 -1139
  2. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsBasic.js +202 -0
  3. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsCustomSpecialCharachters.js +120 -0
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsMultilineResponse.js +189 -0
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsResponseAccordions.js +431 -0
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAdditionalSettingsStudentResponseAreaAndLayout.js +262 -0
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingScoring.js +1 -763
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingWithAlternateAnswer.js +613 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextAllOrNothingWithAlternateAnswerMatchFromAllResponsesTrue.js +172 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextConditionalCheckboxes.js +0 -154
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +1 -76
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextMatchFromAllResponses.js +162 -0
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsScoring.js +0 -999
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsWithAlternateAnswer.js +849 -0
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialDifferentWeightsWithAlternateAnswerMatchFromAllResponsesTrue.js +171 -0
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsScoring.js +0 -885
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsWithAlternateAnswer.js +738 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextPartialEqualWeightsWithAlternateAnswerMatchFromAllResponsesTrue.js +168 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextSupportedFileTypes.js +86 -0
  20. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +246 -0
  21. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/allOrNothingCorrectPointsEqualToAlternatePoints.js +246 -0
  22. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +246 -0
  23. package/cypress/e2e/ILC/ListOrdering/{listOrderingAllOrNothingScoring.js → ListOrderingScoringFiles/allOrNothingScoring.js} +3 -3
  24. package/cypress/e2e/ILC/ListOrdering/{listOrderingManuallyAndNonScoredScoring.js → ListOrderingScoringFiles/manuallyAndNonScoredScoring.js} +3 -3
  25. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +316 -0
  26. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +287 -0
  27. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +316 -0
  28. package/cypress/e2e/ILC/ListOrdering/{listOrderingPartialDifferentWeightsScoring.js → ListOrderingScoringFiles/partialDifferentWeightsScoring.js} +3 -3
  29. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +286 -0
  30. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialEqualWeightsCorrectPointsEqualToAlternatePoints.js +258 -0
  31. package/cypress/e2e/ILC/ListOrdering/ListOrderingScoringFiles/partialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +287 -0
  32. package/cypress/e2e/ILC/ListOrdering/{listOrderingPartialEqualWeightsScoring.js → ListOrderingScoringFiles/partialEqualWeightsScoring.js} +3 -3
  33. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +261 -0
  34. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/allOrNothingCorrectPointsEqualToAlternatePoints.js +261 -0
  35. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +261 -0
  36. package/cypress/e2e/ILC/ListSorting/{listSortingAllOrNothingScoring.js → ListSortingScoringFiles/allOrNothingScoring.js} +3 -3
  37. package/cypress/e2e/ILC/ListSorting/{listSortingManuallyAndNonScoredScoring.js → ListSortingScoringFiles/manuallyAndNonScoredScoring.js} +3 -3
  38. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +338 -0
  39. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +303 -0
  40. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +337 -0
  41. package/cypress/e2e/ILC/ListSorting/{listSortingPartialDifferentWeightsScoring.js → ListSortingScoringFiles/partialDifferentWeightsScoring.js} +3 -3
  42. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +307 -0
  43. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialEqualWeightsCorrectPointsEqualToAlternatePoints.js +272 -0
  44. package/cypress/e2e/ILC/ListSorting/ListSortingScoringFiles/partialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +307 -0
  45. package/cypress/e2e/ILC/ListSorting/{listSortingPartialEqualWeightsScoring.js → ListSortingScoringFiles/partialEqualWeightsScoring.js} +3 -3
  46. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  47. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  48. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  49. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  50. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  51. package/package.json +1 -1
  52. package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoringWithAlternateAnswer.js +0 -712
  53. package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoringWithAlternateAnswer.js +0 -895
  54. package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoringWithAlternateAnswer.js +0 -807
  55. package/cypress/e2e/ILC/ListSorting/listSortingAllOrNothingScoringWithAlternateAnswer.js +0 -759
  56. package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoringWithAlternateTab.js +0 -952
  57. package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoringWithAlternateAnswer.js +0 -860
@@ -0,0 +1,171 @@
1
+ import { fillInTheGapsOverImageTextPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const correctTabAnswerArray = ['Flower', 'Leaf', 'Stem'];
4
+ const alternateTabAnswerArray = ['Petals', 'Leaves', 'Stem'];
5
+ const incorrectAnswerArray = ['Roots', 'Branch', 'Seed'];
6
+
7
+ describe('Create item page - Fill in the gaps over image - text: Partial different weights scoring', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Question preview: Auto scored - Partial different weights with alternate answer (Match from all responses - true)', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ cy.log('Navigate to fill in the gaps over image - text question type');
16
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
17
+ cy.barsPreLoaderWait();
18
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
19
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
20
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
21
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
22
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
23
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
24
+ fillInTheGapsOverImageTextPage.steps.selectPartialDifferentWeightsCheckbox();
25
+ fillInTheGapsOverImageTextPage.steps.addPartialDifferentWeightsPoints([10, 4]);
26
+ fillInTheGapsOverImageTextPage.steps.addAlternateTab(1);
27
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, alternateTabAnswerArray[0]);
28
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, alternateTabAnswerArray[1]);
29
+ fillInTheGapsOverImageTextPage.steps.checkMatchFromAllResponsesCheckbox();
30
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
31
+ fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
32
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
33
+ });
34
+
35
+ it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct responses from the correct tab', () => {
36
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
37
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
38
+ fillInTheGapsOverImageTextPage.steps.uncheckShowCorrectAnswerCheckbox();
39
+ });
40
+
41
+ it('When the user attempts the question with responses from the correct tab, then the user should be awarded with points specified for correct tab and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response fields, correct/incorrect answer label and its border should not be displayed below the question preview and correct answer container should not be displayed', () => {
42
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
43
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, correctTabAnswerArray[1]);
44
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(14, 14);
45
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
46
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
47
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
48
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
49
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
50
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
51
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
52
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields correct/incorrect answer label and its border should not be displayed below the question preview and correct answer container should not be displayed')
53
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
54
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
55
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
56
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
57
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
58
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
59
+ });
60
+
61
+ it('When the user attempts the question with responses from the alternate tab, then the user should be awarded with points specified for alternate tab (less than overall points) and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response fields, correct/incorrect answer label and its border should not be displayed below the question preview and correct answer container should not be displayed', () => {
62
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
63
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, alternateTabAnswerArray[0]);
64
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, alternateTabAnswerArray[1]);
65
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(14, 14);
66
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
67
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
68
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
69
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
70
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
71
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
72
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
73
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields, label \'Correct answer\' and correct answer border should be displayed below the question preview and correct answer container should not be displayed')
74
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
75
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
76
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
77
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
78
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
79
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
80
+ });
81
+
82
+ it('When the user attempts the question with partially correct responses exclusively from the correct tab, the user should be awarded points as per the correctly attempted response and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should be displayed with the correct responses from the correct tab for the responses marked incorrect', () => {
83
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
84
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
85
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
86
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(10, 14);
87
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
88
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
89
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
90
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
91
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
92
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[1]], ['2']);
93
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
94
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
95
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should not be displayed')
96
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
97
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
98
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
99
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
100
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
101
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
102
+ });
103
+
104
+ it('When the user attempts the question with partially correct responses exclusively from the alternate tab, the user should be awarded points as per the correctly attempted response, and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should be displayed with the correct responses from the alternate tab for the responses marked incorrect', () => {
105
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
106
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, alternateTabAnswerArray[0]);
107
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
108
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(10, 14);
109
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
110
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
111
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
112
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
113
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
114
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([alternateTabAnswerArray[1]], ['2']);
115
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
116
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
117
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides correct response field, red cross-mark icon should be displayed besides the incorrect response field, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should not be displayed')
118
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
119
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
120
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(2);
121
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
122
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
123
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
124
+ });
125
+
126
+ it('When the user attempts the question with a combination of correct responses from correct tab and alternate tab, then the user should be awarded with full points and on selecting \'Show correct answer\' checkbox, green check-mark icon should be displayed besides response fields, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should not be displayed', () => {
127
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
128
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[0]);
129
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, alternateTabAnswerArray[1]);
130
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(14, 14);
131
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
132
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
133
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
134
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
135
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
136
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
137
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
138
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should not be displayed')
139
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
140
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(0);
141
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectOptionCheckmarkIcon(1);
142
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
143
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
144
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
145
+ });
146
+
147
+ it('When the user attempts the question incorrectly, then the user should be awarded with 0 points and on selecting \'Show correct answer\' checkbox, red cross-mark icon should be displayed beside response fields, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should be displayed with the correct responses from the correct tab for the responses marked incorrect', () => {
148
+ fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
149
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, correctTabAnswerArray[1]);
150
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, alternateTabAnswerArray[0]);
151
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabScoreText(0, 14);
152
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
153
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
154
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
155
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
156
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
157
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount([correctTabAnswerArray[0], correctTabAnswerArray[1]], ['1', '2']);
158
+ fillInTheGapsOverImageTextPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
159
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
160
+ cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides response fields, correct/incorrect answer label and its border should not be displayed below the question preview and the correct answer container should not be displayed')
161
+ fillInTheGapsOverImageTextPage.steps.checkAnswer();
162
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(0);
163
+ fillInTheGapsOverImageTextPage.steps.verifyIncorrectOptionCrossmarkIcon(1);
164
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectBorderNotExists();
165
+ fillInTheGapsOverImageTextPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
166
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabCorrectAnswerContainerNotExist();
167
+ });
168
+
169
+ fillInTheGapsOverImageTextPage.tests.verifyMinimumScoreAwardedIfAttemptedFunctionalityForIncorrectAnswer(1, 14);
170
+ });
171
+ });