itemengine-cypress-automation 1.0.159 → 1.0.160

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingForAllViews.smoke.js +0 -24
  2. package/cypress/e2e/ILC/Matching/additionalSettings.js +339 -0
  3. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +0 -25
  4. package/cypress/e2e/ILC/Matching/clickAndDrop.js +634 -0
  5. package/cypress/e2e/ILC/Matching/studentViewSettings.js +453 -0
  6. package/cypress/e2e/ILC/Matching/studentViewSettingsForGroupedLayout.js +260 -0
  7. package/cypress/pages/matchingPage.js +444 -17
  8. package/package.json +1 -1
  9. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosFourFunctionCalculatorEditTabBasicSection.js +0 -0
  10. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosFourFunctionCalculatorPreviewContents.smoke.js +0 -0
  11. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGeometryToolEditTabBasicSection.js +0 -0
  12. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGeometryToolPreviewContents.smoke.js +0 -0
  13. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGraphingCalculatorEditTabBasicSection.js +0 -0
  14. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGraphingCalculatorPreviewContents.smoke.js +0 -0
  15. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosMatrixCalculatorEditTabBasicSection.js +0 -0
  16. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosMatrixCalculatorPreviewContents.smoke.js +0 -0
  17. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosScientificCalculatorEditTabBasicSection.js +0 -0
  18. /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosScientificCalculatorPreviewContents.smoke.js +0 -0
  19. /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/additionalSettings.js +0 -0
  20. /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/editTabBasic.js +0 -0
  21. /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/editTabScoring.js +0 -0
  22. /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -0
  23. /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/previewTabContent.smoke.js +0 -0
  24. /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/studentViewSettings.js +0 -0
  25. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/3DGraphingCalculatorEditTabBasicSection.js +0 -0
  26. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/3DGraphingCalculatorPreviewTabContents.smoke.js +0 -0
  27. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/casCalculatorEditTabBasicSection.js +0 -0
  28. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/casCalculatorPreviewTabContents.smoke.js +0 -0
  29. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/geometryCalculatorEditTabBasicSection.js +0 -0
  30. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/geometryCalculatorPreviewTabContents.smoke.js +0 -0
  31. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/graphingCalculatorEditTabBasicSection.js +0 -0
  32. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/graphingCalculatorPreviewTabContents.smoke.js +0 -0
  33. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/probablityCalculatorEditTabBasicSection.js +0 -0
  34. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/probablityCalculatorPreviewTabContents.smoke.js +0 -0
  35. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/scientificCalculatorEditTabBasicSection.js +0 -0
  36. /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/scientificCalculatorPreviewTabContents.smoke.js +0 -0
  37. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/additionalSettings.js +0 -0
  38. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/editTabScoringSection.js +0 -0
  39. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -0
  40. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/headerSection.js +0 -0
  41. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/insertResourceLink.js +0 -0
  42. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/previewTabContent.smoke.js +0 -0
  43. /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/questionInstructions.js +0 -0
@@ -63,8 +63,6 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
63
63
  fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(10);
64
64
  fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(40);
65
65
  fillInTheGapsOverImageDragAndDropPage.steps.insertResponseArea(80);
66
- fillInTheGapsOverImageDragAndDropPage.steps.expandMaxCapacityPerDropzoneDropdown();
67
- fillInTheGapsOverImageDragAndDropPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
68
66
  fillInTheGapsOverImageDragAndDropPage.steps.addInputToOptionsInputField(['Petals', 'Leaves', 'Roots', 'Stem']);
69
67
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
70
68
  fillInTheGapsOverImageDragAndDropPage.steps.allotPoints(20);
@@ -184,28 +182,6 @@ describe('Create item page - Fill in the gaps over image - drag and drop: All or
184
182
  fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
185
183
  });
186
184
 
187
- it('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer, then the user should be awarded 0 points 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, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
188
- if (view === 'Grading view') {
189
- studentViewPage.steps.clearResponses();
190
- };
191
- fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Leaves': 1, 'Roots': 1, 'Stem': 2 });
192
- if (view === 'Grading view') {
193
- studentViewPage.steps.submitResponse();
194
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
195
- studentViewPage.steps.clickOnGoToGradingViewButton();
196
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
197
- };
198
- if (view === 'Question preview' || view === 'Item preview') {
199
- fillInTheGapsOverImageDragAndDropPage.steps.verifyPreviewScore(0, 20);
200
- fillInTheGapsOverImageDragAndDropPage.steps.switchToGradingView();
201
- };
202
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(0);
203
- fillInTheGapsOverImageDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
204
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectOptionIcon(2);
205
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
206
- fillInTheGapsOverImageDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
207
- });
208
-
209
185
  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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
210
186
  if (view === 'Grading view') {
211
187
  studentViewPage.steps.clearResponses();
@@ -0,0 +1,339 @@
1
+ import { matchingPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const enumerationOptions = {
7
+ 'Numerical': ['1', '2', '3'],
8
+ 'Alphabet (uppercase)': ['A', 'B', 'C'],
9
+ 'Alphabet (lowercase)': ['a', 'b', 'c'],
10
+ 'Roman numeral (uppercase)': ['I', 'II', 'III'],
11
+ 'Roman numeral (lowercase)': ['i', 'ii', 'iii'],
12
+ };
13
+ const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
14
+ const optionsArray = ['Cat', 'Elephant', 'Fish'];
15
+ const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
16
+
17
+ describe('Create Item page - matching : Additional settings', () => {
18
+ before(() => {
19
+ cy.loginAs('admin');
20
+ });
21
+
22
+ describe('Additional Settings accordion', () => {
23
+ abortEarlySetup();
24
+ before(() => {
25
+ matchingPage.steps.navigateToCreateQuestion('matching');
26
+ cy.barsPreLoaderWait();
27
+ });
28
+
29
+ matchingPage.tests.verifyAdditionalSettingsAccordionProperties();
30
+ });
31
+
32
+ describe('Additional settings: Font size contents', () => {
33
+ abortEarlySetup();
34
+ before(() => {
35
+ matchingPage.steps.navigateToCreateQuestion('matching');
36
+ cy.barsPreLoaderWait();
37
+ matchingPage.steps.expandAdditionalSettings();
38
+ });
39
+
40
+ matchingPage.tests.verifyFontSizeSectionContents();
41
+ });
42
+
43
+ describe('Additional settings: Font size - Specify correct answer section', () => {
44
+ abortEarlySetup();
45
+ before(() => {
46
+ matchingPage.steps.navigateToCreateQuestion('matching');
47
+ cy.barsPreLoaderWait();
48
+ matchingPage.steps.addTextInQuestionInstructionsInputField('question instruction');
49
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
50
+ matchingPage.steps.enterTextInOptionInputField(optionsArray);
51
+ matchingPage.steps.allotPoints(10);
52
+ matchingPage.steps.expandAdditionalSettings();
53
+ });
54
+
55
+ Object.keys(fontSizes).forEach((option) => {
56
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the specify correct answer section should change to ${fontSizes[option]} accordingly`, () => {
57
+ matchingPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
58
+ utilities.verifyInnerText(matchingPage.fontSizeDropdown(), `${option}`);
59
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.promptSpecifyCorrectAnswerSection(), 0), {
60
+ 'font-size': fontSizes[option]
61
+ });
62
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection(), 0), {
63
+ 'font-size': fontSizes[option]
64
+ });
65
+ });
66
+ });
67
+ });
68
+
69
+ describe('Additional settings: Font size - preview tab', () => {
70
+ abortEarlySetup();
71
+ before(() => {
72
+ matchingPage.steps.navigateToCreateQuestion('matching');
73
+ cy.barsPreLoaderWait();
74
+ matchingPage.steps.addTextInQuestionInstructionsInputField('question instruction');
75
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
76
+ matchingPage.steps.enterTextInOptionInputField(optionsArray);
77
+ matchingPage.steps.allotPoints(10);
78
+ matchingPage.steps.expandAdditionalSettings();
79
+ });
80
+
81
+ Object.keys(fontSizes).forEach((option) => {
82
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${fontSizes[option]} accordingly`, () => {
83
+ matchingPage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
84
+ utilities.verifyInnerText(matchingPage.fontSizeDropdown(), `${option}`);
85
+ matchingPage.steps.switchToPreviewTab();
86
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.promptContainerPreviewTab(), 0).find('.question-text-wrapper'), {
87
+ 'font-size': fontSizes[option]
88
+ });
89
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.correctAnswersOptionContainer(), 0), {
90
+ 'font-size': fontSizes[option]
91
+ });
92
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.dropzonePreviewTab(), 0), {
93
+ 'font-size': fontSizes[option]
94
+ });
95
+ matchingPage.steps.switchToGradingView();
96
+ utilities.verifyCSS(matchingPage.correctAnswersLabel(), {
97
+ 'font-size': fontSizes[option]
98
+ });
99
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.dropzoneNumerationPreviewTab(), 0), {
100
+ 'font-size': fontSizes[option]
101
+ });
102
+ utilities.verifyCSS(matchingPage.correctAnswersNumeration(), {
103
+ 'font-size': fontSizes[option]
104
+ });
105
+ utilities.verifyCSS(matchingPage.correctAnswerResponseWrapper(), {
106
+ 'font-size': fontSizes[option]
107
+ });
108
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Cat', dropzoneIndex: 0 }]);
109
+ utilities.verifyCSS(matchingPage.correctIncorrectStatusMessageText(), {
110
+ 'font-size': fontSizes[option]
111
+ });
112
+ utilities.verifyCSS(matchingPage.droppedDraggableOptionInDropzonePreviewTab(), {
113
+ 'font-size': fontSizes[option]
114
+ });
115
+ matchingPage.steps.switchToStudentView();
116
+ matchingPage.steps.switchToEditTab();
117
+ });
118
+ });
119
+ });
120
+
121
+ describe('Additional Settings: Grading view section - Contents in edit tab', () => {
122
+ abortEarlySetup();
123
+ before(() => {
124
+ matchingPage.steps.navigateToCreateQuestion('matching');
125
+ cy.barsPreLoaderWait();
126
+ matchingPage.steps.expandAdditionalSettings();
127
+ });
128
+
129
+ matchingPage.tests.verifyGradingViewEnumerationSectionContents('Dropzone');
130
+
131
+ it('When the user selects "Without enumeration" radio button, the identifiers section should disappear', () => {
132
+ matchingPage.steps.selectEnumerationType('without enumeration');
133
+ utilities.verifyElementVisibilityState(matchingPage.identifiersLabel(), 'notExist');
134
+ utilities.verifyElementVisibilityState(matchingPage.numericalToggleButton(), 'notExist');
135
+ });
136
+
137
+ it('When the user selects "With enumeration" radio button again, the identifiers section should appear again', () => {
138
+ matchingPage.steps.selectEnumerationType('with enumeration');
139
+ utilities.verifyElementVisibilityState(matchingPage.identifiersLabel(), 'visible');
140
+ utilities.verifyElementVisibilityState(matchingPage.numericalToggleButton(), 'visible');
141
+ })
142
+ });
143
+
144
+ describe('Additional settings: Grading view section - functionality in preview tab', () => {
145
+ abortEarlySetup();
146
+ before(() => {
147
+ matchingPage.steps.navigateToCreateQuestion('matching');
148
+ cy.barsPreLoaderWait();
149
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
150
+ matchingPage.steps.enterTextInOptionInputField(optionsArray);
151
+ matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
152
+ matchingPage.steps.checkAllowStudentToCheckAnswerCheckbox();
153
+ matchingPage.steps.expandAdditionalSettings();
154
+ });
155
+
156
+ Object.keys(enumerationOptions).forEach(option => {
157
+ it(`When "${option}" toggle button is selected in the dropzone identifiers section, then on switching to the preview tab dropzone numeration should not be displayed`, () => {
158
+ matchingPage.steps.selectIdentifierToggleButton(option);
159
+ matchingPage.steps.switchToPreviewTab();
160
+ matchingPage.steps.verifyDropzoneNumerationNotExistsPreviewTab();
161
+ });
162
+
163
+ it('When user clicks on \'Check answer\' button then the numeration should not be displayed in the dropzones', () => {
164
+ matchingPage.steps.checkAnswer();
165
+ matchingPage.steps.verifyDropzoneNumerationNotExistsPreviewTab();
166
+ });
167
+
168
+ it(`When the user switches to the "Grading view", then the "${option}" numeration should be displayed in the dropzones as well as correct answer options in the correct answer section`, () => {
169
+ matchingPage.steps.switchToGradingView();
170
+ matchingPage.steps.verifyDropzoneEnumeration(enumerationOptions[option]);
171
+ matchingPage.steps.verifyCorrectAnswerDropzoneEnumeration(enumerationOptions[option]);
172
+ });
173
+ });
174
+
175
+ it('CSS of correct answer section with numeration', { tags: 'css' }, () => {
176
+ utilities.verifyCSS(matchingPage.correctAnswersOptions(), {
177
+ 'color': css.color.text,
178
+ 'font-size': css.fontSize.default,
179
+ 'font-weight': css.fontWeight.regular
180
+ });
181
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.dropzoneNumerationPreviewTab(), 0), {
182
+ 'color': css.color.text,
183
+ 'font-size': css.fontSize.default,
184
+ 'font-weight': css.fontWeight.regular
185
+ });
186
+ utilities.verifyCSS(utilities.getNthElement(matchingPage.correctAnswersNumeration(), 0), {
187
+ 'color': css.color.text,
188
+ 'font-size': css.fontSize.default,
189
+ 'font-weight': css.fontWeight.regular
190
+ });
191
+ });
192
+
193
+ it('Accessibility of correct answer section with enumeration', { tags: 'a11y' }, () => {
194
+ cy.checkAccessibility(matchingPage.correctAnswer().parents('[class*="question-preview-wrapper"]'));
195
+ });
196
+
197
+ it('When the user selects \'without enumeration\' radio button, then in the "Grading view", numeration should not be displayed for dropzones and in the correct answer section, the entire question preview should be displayed with correct answers', () => {
198
+ matchingPage.steps.switchToEditTab();
199
+ matchingPage.steps.selectEnumerationType('without enumeration');
200
+ matchingPage.steps.switchToPreviewTab();
201
+ matchingPage.steps.switchToGradingView();
202
+ matchingPage.steps.verifyCorrectAnswerResponsesWithoutEnumeration(0, 'Elephant');
203
+ matchingPage.steps.verifyCorrectAnswerResponsesWithoutEnumeration(1, 'Fish');
204
+ matchingPage.steps.verifyCorrectAnswerResponsesWithoutEnumeration(2, 'Cat');
205
+ matchingPage.steps.verifyDropzoneNumerationNotExistsPreviewTab();
206
+ utilities.verifyElementVisibilityState(matchingPage.correctAnswersNumeration(), 'notExist');
207
+ });
208
+
209
+ it('CSS of correct answer section without enumeration', { tags: 'css' }, () => {
210
+ utilities.verifyCSS(matchingPage.correctAnswersOptions(), {
211
+ 'color': css.color.text,
212
+ 'font-size': css.fontSize.default,
213
+ 'font-weight': css.fontWeight.regular
214
+ });
215
+ utilities.verifyCSS(matchingPage.correctAnswerResponseWrapperWithoutEnumeration(), {
216
+ 'border': `1px solid ${css.color.correctAnswer}`
217
+ });
218
+ });
219
+
220
+ it('Accessibility of correct answer section without enumeration', { tags: 'a11y' }, () => {
221
+ cy.checkAccessibility(matchingPage.correctAnswerTextWithoutEnumeration().parents('[class*="question-preview-wrapper"]'));
222
+ });
223
+ });
224
+
225
+ describe('Setting tab: Accessibility section', () => {
226
+ abortEarlySetup();
227
+ before(() => {
228
+ matchingPage.steps.navigateToCreateQuestion('matching');
229
+ cy.barsPreLoaderWait();
230
+ matchingPage.steps.expandAdditionalSettings();
231
+ });
232
+
233
+ matchingPage.tests.verifyAdditionalSettingsAccessibilitySection();
234
+ });
235
+
236
+ describe('Additional settings: ARIA label for dropzones - Contents in edit tab', () => {
237
+ abortEarlySetup();
238
+ before(() => {
239
+ matchingPage.steps.navigateToCreateQuestion('matching');
240
+ cy.barsPreLoaderWait();
241
+ matchingPage.steps.expandAdditionalSettings();
242
+ });
243
+
244
+ it(`"ARIA label for dropzones label should be displayed`, () => {
245
+ utilities.verifyInnerText(matchingPage.ariaLabelSectionLabel(), `ARIA label for dropzones`);
246
+ utilities.verifyElementVisibilityState(matchingPage.ariaLabelSectionLabel(), 'visible');
247
+ });
248
+
249
+ it('Three input fields with numeration and "Enter aria label" placeholder should be displayed by default', () => {
250
+ utilities.verifyElementCount(matchingPage.ariaLabelInputField(), 3);
251
+ matchingPage.steps.verifyAriaLabelTextInputFields(0);
252
+ matchingPage.steps.verifyAriaLabelTextInputFields(1);
253
+ });
254
+
255
+ it(`CSS of ARIA label for dropzones section`, { tags: 'css' }, () => {
256
+ utilities.verifyCSS(matchingPage.ariaLabelSectionLabel(), {
257
+ 'color': css.color.labels,
258
+ 'font-size': css.fontSize.normal,
259
+ 'font-weight': css.fontWeight.semibold
260
+ });
261
+ utilities.verifyCSS(matchingPage.ariaLabelInputField(), {
262
+ 'color': css.color.text,
263
+ 'font-size': css.fontSize.default,
264
+ 'font-weight': css.fontWeight.regular
265
+ });
266
+ });
267
+
268
+ it('When the users adds a new dropzone, the count of the aria label text input fields should update accordingly', () => {
269
+ matchingPage.steps.addPrompt();
270
+ matchingPage.steps.addOption();
271
+ utilities.verifyElementCount(matchingPage.ariaLabelInputField(), 4);
272
+ matchingPage.steps.verifyAriaLabelTextInputFields(4);
273
+ });
274
+
275
+ it('When the user deletes any dropzone, the count of the aria label texts input fields should update accordingly', () => {
276
+ matchingPage.steps.deleteOption(1);
277
+ utilities.verifyElementCount(matchingPage.ariaLabelInputField(), 3);
278
+ matchingPage.steps.verifyAriaLabelTextInputFields(0);
279
+ matchingPage.steps.verifyAriaLabelTextInputFields(1);
280
+ matchingPage.steps.verifyAriaLabelTextInputFields(2);
281
+ });
282
+
283
+ it('When the user sets aria label, then in the dropzones of the specify correct answer section, the aria labels should get updated accordingly', () => {
284
+ matchingPage.steps.enterTextInAriaLabelInputField(0, 'Select correct option');
285
+ matchingPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(0, 'Select correct option');
286
+ matchingPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(1, 'Add answer for response 2');
287
+ matchingPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(2, 'Add answer for response 3');
288
+ });
289
+ });
290
+
291
+ describe('Additional settings: ARIA label for dropzones - functionality in preview tab', () => {
292
+ abortEarlySetup();
293
+ before(() => {
294
+ matchingPage.steps.navigateToCreateQuestion('matching');
295
+ cy.barsPreLoaderWait();
296
+ matchingPage.steps.expandAdditionalSettings();
297
+ matchingPage.steps.switchToPreviewTab();
298
+ });
299
+
300
+ it('When the user has not set \'ARIA label\' input field, then default aria labels should be present for the dropzones in the preview tab', () => {
301
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'Response Area');
302
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'Response Area');
303
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'Response Area');
304
+ });
305
+
306
+ it('When the user has set \'ARIA label\', then it should be present for the dropzones in the preview tab', () => {
307
+ matchingPage.steps.switchToEditTab();
308
+ matchingPage.steps.enterTextInAriaLabelInputField(0, 'Correct response 1');
309
+ matchingPage.steps.switchToPreviewTab();
310
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'Correct response 1');
311
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'Response Area');
312
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(2, 'Response Area');
313
+ });
314
+
315
+ it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
316
+ cy.checkAccessibility(matchingPage.dropzonePreviewTab().parents('[class*="question-preview-wrapper"]'));
317
+ });
318
+
319
+ it('When the user clears the set value in the \'ARIA label\' input field, then the default aria labels should be present for the dropzones in the preview tab', () => {
320
+ matchingPage.steps.switchToEditTab();
321
+ matchingPage.steps.clearTextInAriaLabelInputField(0);
322
+ matchingPage.steps.switchToPreviewTab();
323
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'Response Area');
324
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'Response Area');
325
+ matchingPage.steps.verifyDropzoneAriaLabelPreviewTab(2, 'Response Area');
326
+ });
327
+ });
328
+
329
+ describe('Additional Settings: Details section', () => {
330
+ abortEarlySetup();
331
+ before(() => {
332
+ matchingPage.steps.navigateToCreateQuestion('matching');
333
+ cy.barsPreLoaderWait();
334
+ matchingPage.steps.expandAdditionalSettings();
335
+ });
336
+
337
+ matchingPage.tests.verifyDetailsSection();
338
+ });
339
+ });
@@ -59,8 +59,6 @@ describe('Create item page - Matching: All or nothing ', () => {
59
59
  matchingPage.steps.addMultipleOptionFields(2);
60
60
  matchingPage.steps.enterTextInPromptInputField(promptTextArray);
61
61
  matchingPage.steps.enterTextInOptionInputField(optionsArray);
62
- matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
63
- matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
64
62
  matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
65
63
  matchingPage.steps.switchToPreviewTab();
66
64
  break;
@@ -178,29 +176,6 @@ describe('Create item page - Matching: All or nothing ', () => {
178
176
  matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
179
177
  });
180
178
 
181
- it('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer, then the user should be awarded 0 points 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, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
182
- if (view === 'Grading view') {
183
- studentViewPage.steps.clearResponses();
184
- };
185
- matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
186
- if (view === 'Grading view') {
187
- studentViewPage.steps.submitResponse();
188
- utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
189
- studentViewPage.steps.clickOnGoToGradingViewButton();
190
- gradingViewPage.steps.verifyGradingViewScore(0, 20);
191
- };
192
- if (view === 'Question preview' || view === 'Item preview') {
193
- matchingPage.steps.verifyPreviewScore(0, 20);
194
- matchingPage.steps.switchToGradingView();
195
- };
196
- matchingPage.steps.verifyCorrectOptionIcon(0);
197
- matchingPage.steps.verifyIncorrectOptionIcon(0, 1);
198
- matchingPage.steps.verifyCorrectOptionIcon(1);
199
- matchingPage.steps.verifyCorrectOptionIcon(2);
200
- matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
201
- matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
202
- });
203
-
204
179
  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 icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
205
180
  if (view === 'Grading view') {
206
181
  studentViewPage.steps.clearResponses();