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,262 @@
1
+ import { specialOrMathCharacters } from "../../../fixtures/specialAndMathCharacters";
2
+ import { fillInTheGapsOverImageTextPage } from "../../../pages";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ const correctTabAnswerArray = ['Flower', 'Leaf'];
7
+ const incorrectAnswerArray = ['Root', 'Branch'];
8
+ const numbers = ['1', '2'];
9
+ const lowercase = ['a', 'b'];
10
+ const uppercase = ['A', 'B'];
11
+ const answerNumerationDropdownOptions = ['Numerical', 'Uppercase alphabet', 'Lowercase alphabet'];
12
+ let symbolsString = specialOrMathCharacters['specialCharacters'].characters.map((icon) => icon.symbol);
13
+ symbolsString = symbolsString.join('');
14
+
15
+ describe('Fill In the gaps over image - text - Additional settings', () => {
16
+ before(() => {
17
+ cy.loginAs('admin');
18
+ });
19
+
20
+ describe('Additional settings: Student response area and layout', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ cy.log('Navigate to fill in the gaps over image - text question type');
24
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
25
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
26
+ });
27
+
28
+ it('\'Student response area and layout\' label should be displayed', () => {
29
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.studentResponseAreaAndLayoutLabel(), 'Student response area and layout');
30
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.studentResponseAreaAndLayoutLabel(), 'visible');
31
+ });
32
+
33
+ it('CSS of \'Student response area and layout\' section', { tags: 'css' }, () => {
34
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.studentResponseAreaAndLayoutLabel(), {
35
+ 'color': css.color.labels,
36
+ 'font-size': css.fontSize.default,
37
+ 'font-weight': css.fontWeight.semibold
38
+ });
39
+ });
40
+
41
+ //Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
42
+ });
43
+
44
+ describe('Additional settings: \'Answer numeration\' (only while grading) - Contents and set correct answer section', () => {
45
+ abortEarlySetup();
46
+ before(() => {
47
+ cy.log('Navigate to fill in the gaps over image - text question type');
48
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
49
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
50
+ });
51
+
52
+ fillInTheGapsOverImageTextPage.tests.verifyAnswerNumerationContents();
53
+
54
+ it(`When the user selects ${answerNumerationDropdownOptions[0]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
55
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`)
56
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
57
+ });
58
+
59
+ it(`When the user selects ${answerNumerationDropdownOptions[1]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
60
+ fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
61
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
62
+ });
63
+
64
+ it(`When the user selects ${answerNumerationDropdownOptions[2]} option from the \'Answer numeration\' dropdown, then correct response numeration should not be displayed in the \'Set correct answer section\'`, () => {
65
+ fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
66
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
67
+ });
68
+ });
69
+
70
+ describe('Additional settings: \'Answer numeration\' (only while grading) - Preview tab', () => {
71
+ abortEarlySetup();
72
+ before(() => {
73
+ cy.log('Navigate to fill in the gaps over image - text question type');
74
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
75
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
76
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
77
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
78
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
79
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(0, correctTabAnswerArray[0]);
80
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldSetCorrectAnswerSection(1, correctTabAnswerArray[1]);
81
+ fillInTheGapsOverImageTextPage.steps.allotPoints(10);
82
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
83
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
84
+ });
85
+
86
+ it(`When the user attempts the question when ${answerNumerationDropdownOptions[0]} is selected and selects \'Show correct answer\' checkbox then the correct answer section should have ${answerNumerationDropdownOptions[0]} numeration`, () => {
87
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.answerNumerationDropdown(), `${answerNumerationDropdownOptions[0]}`);
88
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
89
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
90
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
91
+ fillInTheGapsOverImageTextPage.steps.checkShowCorrectAnswerCheckbox();
92
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabResponseFieldAndCorrectAnswerNumeration(numbers);
93
+ });
94
+
95
+ it(`When the user attempts the question when ${answerNumerationDropdownOptions[1]} is selected and selects \'Show correct answer\' checkbox then the correct answer section should have ${answerNumerationDropdownOptions[1]} numeration`, () => {
96
+ fillInTheGapsOverImageTextPage.steps.switchToEditTab();
97
+ fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[1]}`);
98
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
99
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
100
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
101
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabResponseFieldAndCorrectAnswerNumeration(uppercase);
102
+ });
103
+
104
+ it(`When the user attempts the question when ${answerNumerationDropdownOptions[2]} is selected and selects \'Show correct answer\' checkbox then the correct answer section should have ${answerNumerationDropdownOptions[2]} numeration`, () => {
105
+ fillInTheGapsOverImageTextPage.steps.switchToEditTab();
106
+ fillInTheGapsOverImageTextPage.steps.selectAnswerNumerationDropdownOption(`${answerNumerationDropdownOptions[2]}`);
107
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
108
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(0, incorrectAnswerArray[0]);
109
+ fillInTheGapsOverImageTextPage.steps.enterTextInResponseFieldPreviewTab(1, incorrectAnswerArray[1]);
110
+ fillInTheGapsOverImageTextPage.steps.verifyPreviewTabResponseFieldAndCorrectAnswerNumeration(lowercase);
111
+ });
112
+ });
113
+
114
+ describe('Additional settings: Display answer numeration to students - Contents and set correct answer section', () => {
115
+ abortEarlySetup();
116
+ before(() => {
117
+ cy.log('Navigate to fill in the gaps over image - text question type');
118
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
119
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
120
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
121
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
122
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
123
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
124
+ });
125
+
126
+ it('\'Display answer numeration to students\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
127
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsLabel(), 'Display answer numeration to students');
128
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsLabel(), 'visible');
129
+ fillInTheGapsOverImageTextPage.steps.verifyDisplayAnswerNumerationToStudentsCheckboxNotChecked();
130
+ });
131
+
132
+ it('CSS of \'Display answer numeration to students\' section - unchecked state', { tags: 'css' }, () => {
133
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsLabel(), {
134
+ 'color': css.color.labelText,
135
+ 'font-size': css.fontSize.normal,
136
+ 'font-weight': css.fontWeight.regular
137
+ });
138
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsCheckbox().parent().find('svg'), {
139
+ 'fill': css.color.uncheckedCheckbox
140
+ });
141
+ });
142
+
143
+ it('When \'Display answer numeration to students\' checkbox is unchecked, answer numeration should not be displayed in set correct answer section response fields', () => {
144
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
145
+ });
146
+
147
+ it('When the user checks the \'Display answer numeration to students\' checkbox, answer numeration should not be displayed in set correct answer section response fields', () => {
148
+ fillInTheGapsOverImageTextPage.steps.checkDisplayAnswerNumerationToStudentsCheckbox();
149
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
150
+ });
151
+
152
+ it('CSS of \'Display answer numeration to students\' section - checked state', { tags: 'css' }, () => {
153
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsCheckbox().parent().find('svg g g'), {
154
+ 'fill': css.color.activeButtons
155
+ });
156
+ });
157
+
158
+ it('Accessibility of \'Display answer numeration to students\' section - checked state', { tags: 'a11y' }, () => {
159
+ cy.checkAccessibility(fillInTheGapsOverImageTextPage.displayAnswerNumerationToStudentsCheckbox().parents('.additional-settings-container'));
160
+ });
161
+ });
162
+
163
+ //Failing due to https://redmine.zeuslearning.com/issues/548127
164
+ describe('Additional settings: Display answer numeration to students - Preview tab', () => {
165
+ abortEarlySetup();
166
+ before(() => {
167
+ cy.log('Navigate to fill in the gaps over image - text question type');
168
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
169
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
170
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
171
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
172
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
173
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
174
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
175
+ });
176
+
177
+ it('When \'Display answer numeration to students\' checkbox is unchecked, answer numeration should not be displayed in preview tab response fields', () => {
178
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.responseNumeration(), 'notExist');
179
+ });
180
+
181
+ it('When the user checks the \'Display answer numeration to students\' checkbox, answer numeration should not be displayed in preview tab response fields', () => {
182
+ fillInTheGapsOverImageTextPage.steps.switchToEditTab();
183
+ fillInTheGapsOverImageTextPage.steps.checkDisplayAnswerNumerationToStudentsCheckbox();
184
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
185
+ fillInTheGapsOverImageTextPage.steps.verifyResponseFieldNumeration(['1', '2']);
186
+ });
187
+ });
188
+
189
+ describe('Additional settings: Spell check - Contents and set correct answer section', () => {
190
+ abortEarlySetup();
191
+ before(() => {
192
+ cy.log('Navigate to fill in the gaps over image - text question type');
193
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
194
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
195
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
196
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
197
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
198
+ });
199
+
200
+ it('\'Spell check\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
201
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.spellCheckLabel(), 'Spell check');
202
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.spellCheckLabel(), 'visible');
203
+ fillInTheGapsOverImageTextPage.steps.verifySpellCheckCheckboxNotChecked();
204
+ });
205
+
206
+ it('CSS of \'Spell check\' section - unchecked state', { tags: 'css' }, () => {
207
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckLabel(), {
208
+ 'color': css.color.labelText,
209
+ 'font-size': css.fontSize.normal,
210
+ 'font-weight': css.fontWeight.regular
211
+ });
212
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parent().find('svg'), {
213
+ 'fill': css.color.uncheckedCheckbox
214
+ });
215
+ });
216
+
217
+ //Note: a11y covered in Additional settings accordion, verifyAdditonalSettingsAccordionProperties
218
+
219
+ //Spell check test cases for set correct answer section response fields
220
+ it('When the \'Spell check\' functionality is disabled, the response field should have \'spellcheck\' attribute set as \'false\' in \'Set correct answer\' section', () => {
221
+ fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldSetCorrectAnswerSectionDisabled(0);
222
+ });
223
+
224
+ it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in \'Set correct answer\' section', () => {
225
+ fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
226
+ fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldSetCorrectAnswerSectionEnabled(0);
227
+ });
228
+
229
+ it('CSS of \'Spell check\' section - checked state', { tags: 'css' }, () => {
230
+ utilities.verifyCSS(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parent().find('svg g g'), {
231
+ 'fill': css.color.activeButtons
232
+ });
233
+ });
234
+
235
+ it('Accessibility of \'Spell check\' section - checked state', { tags: 'a11y' }, () => {
236
+ cy.checkAccessibility(fillInTheGapsOverImageTextPage.spellCheckCheckbox().parents('.additional-settings-container'));
237
+ });
238
+ });
239
+
240
+ describe('Additional settings: Spell check - Preview tab', () => {
241
+ abortEarlySetup();
242
+ before(() => {
243
+ cy.log('Navigate to fill in the gaps over image - text question type');
244
+ fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image - text');
245
+ fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
246
+ fillInTheGapsOverImageTextPage.steps.clickOnImagePopupOkButton();
247
+ fillInTheGapsOverImageTextPage.steps.addResponseContainer();
248
+ fillInTheGapsOverImageTextPage.steps.expandAdditonalSettings();
249
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
250
+ });
251
+ it('When the \'Spell check\' functionality is disabled, the response field should have \'spellcheck\' attribute set as \'false\' in preview tab', () => {
252
+ fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled(0);
253
+ });
254
+
255
+ it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
256
+ fillInTheGapsOverImageTextPage.steps.switchToEditTab();
257
+ fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
258
+ fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
259
+ fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled(0);
260
+ });
261
+ });
262
+ });