itemengine-cypress-automation 1.0.162-questionInsructionSelectorFix-15973d5.0 → 1.0.163-4AprilStagingFixes-01659c3.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingForAllViews.smoke.js +0 -24
- package/cypress/e2e/ILC/Matching/additionalSettings.js +339 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +0 -25
- package/cypress/e2e/ILC/Matching/clickAndDrop.js +634 -0
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +453 -0
- package/cypress/e2e/ILC/Matching/studentViewSettingsForGroupedLayout.js +260 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/matchingPage.js +444 -17
- package/package.json +1 -1
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosFourFunctionCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosFourFunctionCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGeometryToolEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGeometryToolPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGraphingCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosGraphingCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosMatrixCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosMatrixCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosScientificCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{Desmos → ThirdPartyDesmos}/desmosScientificCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/additionalSettings.js +0 -0
- /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/editTabBasic.js +0 -0
- /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/editTabScoring.js +0 -0
- /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/previewTabContent.smoke.js +0 -0
- /package/cypress/e2e/ILC/{DesmosGraphing → ThirdPartyDesmosGraphing}/studentViewSettings.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/3DGraphingCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/3DGraphingCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/casCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/casCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/geometryCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/geometryCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/graphingCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/graphingCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/probablityCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/probablityCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/scientificCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{GeoGebraTools → ThirdPartyGeoGebra}/scientificCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/additionalSettings.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/editTabScoringSection.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/headerSection.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/insertResourceLink.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/previewTabContent.smoke.js +0 -0
- /package/cypress/e2e/ILC/{GeogebraActivity → ThirdPartyGeogebraActivity}/questionInstructions.js +0 -0
@@ -0,0 +1,260 @@
|
|
1
|
+
import { matchingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
let groupTitles = ['Group A', 'Group B', 'Group C', 'Group D'];
|
5
|
+
let animals = [['Elephant', 'Bear', 'Panda', 'Zebra'],
|
6
|
+
['Peacock', 'Fish', 'Penguin', 'Tiger'],
|
7
|
+
['Parrot', 'Cat', 'Whale', 'Elephant'],
|
8
|
+
['Giraffe', 'Kangaroo', 'Ostrich', 'Eagle']
|
9
|
+
];
|
10
|
+
const promptArray = ['Wild', 'Aquatic', 'Pet'];
|
11
|
+
|
12
|
+
describe('Create Item page - Matching : Student view settings for grouped options layout', () => {
|
13
|
+
before(() => {
|
14
|
+
cy.loginAs('admin');
|
15
|
+
});
|
16
|
+
|
17
|
+
describe('Randomize options - Functionality : Edit tab', () => {
|
18
|
+
abortEarlySetup();
|
19
|
+
before(() => {
|
20
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
21
|
+
cy.barsPreLoaderWait();
|
22
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Matching');
|
23
|
+
matchingPage.steps.setGroupedOptions();
|
24
|
+
});
|
25
|
+
|
26
|
+
it('When the \'Randomize options\' functionality is disabled, then the group container as well as the options inside the group and question prompt should be displayed in the order in which the user has set them in the \'Options for drag & drop\' and \'Prompt\' section respectively', () => {
|
27
|
+
animals.forEach((options, index) => {
|
28
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(index, options);
|
29
|
+
});
|
30
|
+
promptArray.forEach((prompt, index) => {
|
31
|
+
matchingPage.steps.verifyPromptContainerSpecifyCorrectAnswerSection([{ index: index, optionText: prompt }])
|
32
|
+
});
|
33
|
+
});
|
34
|
+
|
35
|
+
it('When the user enables the \'Randomize options\' functionality, then the group container as well as the options inside the group and question prompt should be in the order in which the user has set them in the \'Options for drag & drop\' and \'Prompt\' section respectively', () => {
|
36
|
+
matchingPage.steps.checkRandomizeOptionsCheckbox();
|
37
|
+
animals.forEach((options, index) => {
|
38
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(index, options);
|
39
|
+
});
|
40
|
+
promptArray.forEach((prompt, index) => {
|
41
|
+
matchingPage.steps.verifyPromptContainerSpecifyCorrectAnswerSection([{ index: index, optionText: prompt }])
|
42
|
+
});
|
43
|
+
});
|
44
|
+
});
|
45
|
+
|
46
|
+
describe('Randomize options - Functionality : Preview tab', () => {
|
47
|
+
let optionsArray = [];
|
48
|
+
let groupTitleArray = [];
|
49
|
+
let promptTextArray = [];
|
50
|
+
abortEarlySetup();
|
51
|
+
before(() => {
|
52
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
53
|
+
cy.barsPreLoaderWait();
|
54
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Matching');
|
55
|
+
matchingPage.steps.setGroupedOptions();
|
56
|
+
matchingPage.steps.switchToPreviewTab();
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the \'Randomize options\' functionality is disabled, then the group container as well as the options inside the group and question prompt should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section and \'Prompt\' section respectively', () => {
|
60
|
+
groupTitles.forEach((groupTitle, groupIndex) => {
|
61
|
+
matchingPage.steps.verifyGroupedOptionsTitlePreviewTab(groupIndex, groupTitle);
|
62
|
+
})
|
63
|
+
animals.forEach((options, index) => {
|
64
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(index, options);
|
65
|
+
});
|
66
|
+
promptArray.forEach((prompt, index) => {
|
67
|
+
matchingPage.steps.verifyPromptContainerPreviewTab([{ index: index, optionText: prompt }])
|
68
|
+
});
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user enables the \'Randomize options\' functionality, then the group container as well as the options inside the group and question prompt should be displayed in a random order', () => {
|
72
|
+
matchingPage.steps.switchToEditTab();
|
73
|
+
matchingPage.steps.checkRandomizeOptionsCheckbox();
|
74
|
+
matchingPage.steps.switchToPreviewTab();
|
75
|
+
matchingPage.steps.verifyRandomizationOfGroupsInPreviewTab(groupTitles);
|
76
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[0], animals[0]);
|
77
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[1], animals[1]);
|
78
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[2], animals[2]);
|
79
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[3], animals[3]);
|
80
|
+
matchingPage.steps.verifyRandomizePromptOrder(promptArray);
|
81
|
+
promptTextArray = matchingPage.steps.getPromptArray();
|
82
|
+
optionsArray = matchingPage.steps.getOptionsArray();
|
83
|
+
groupTitleArray = matchingPage.steps.getGroupTitleArray();
|
84
|
+
});
|
85
|
+
|
86
|
+
it('When the user switches to \'Edit tab\' and does not modify any question properties, then the order of group containers as well as the options and question prompt inside the group should not change', () => {
|
87
|
+
matchingPage.steps.resetQuestionPreview();
|
88
|
+
groupTitleArray.forEach((groupTitle, groupIndex) => {
|
89
|
+
matchingPage.steps.verifyGroupedOptionsTitlePreviewTab(groupIndex, groupTitle);
|
90
|
+
});
|
91
|
+
for (let index = 0, groupIndex = 0; index < optionsArray.length, groupIndex < 4; index = index + 4, groupIndex++) {
|
92
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(groupIndex, [optionsArray[index], optionsArray[index + 1], optionsArray[index + 2], optionsArray[index + 3]]);
|
93
|
+
}
|
94
|
+
promptTextArray.forEach((prompt, index) => {
|
95
|
+
matchingPage.steps.verifyPromptContainerPreviewTab([{ index: index, optionText: prompt }]);
|
96
|
+
});
|
97
|
+
});
|
98
|
+
|
99
|
+
it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of group containers as well as the options inside the group and question prompt should change', () => {
|
100
|
+
matchingPage.steps.switchToEditTab();
|
101
|
+
matchingPage.steps.allotPoints(5);
|
102
|
+
matchingPage.steps.switchToPreviewTab();
|
103
|
+
matchingPage.steps.verifyRandomizationOfGroupsInPreviewTab(groupTitles);
|
104
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[0], animals[0]);
|
105
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[1], animals[1]);
|
106
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[2], animals[2]);
|
107
|
+
matchingPage.steps.verifyRandomizeOptionOrderInGroup(groupTitles[3], animals[3]);
|
108
|
+
matchingPage.steps.verifyRandomizePromptOrder(promptArray);
|
109
|
+
matchingPage.steps.verifyPromptAreRerandomized(promptTextArray);
|
110
|
+
matchingPage.steps.verifyOptionsAreRerandomized(optionsArray);
|
111
|
+
matchingPage.steps.verifyGroupsAreRerandomized(groupTitleArray);
|
112
|
+
});
|
113
|
+
|
114
|
+
it('When the user disables the \'Randomize options\' functionality, then the order of group containers as well as the options inside the group and question prompt should be displayed in the order in which the user has set them in the \'Options for drag & drop\' section and \'Prompt\' section respectively', () => {
|
115
|
+
matchingPage.steps.switchToEditTab();
|
116
|
+
matchingPage.steps.uncheckRandomizeOptionsCheckbox();
|
117
|
+
matchingPage.steps.switchToPreviewTab();
|
118
|
+
animals.forEach((options, index) => {
|
119
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(index, options);
|
120
|
+
});
|
121
|
+
promptArray.forEach((prompt, index) => {
|
122
|
+
matchingPage.steps.verifyPromptContainerPreviewTab([{ index: index, optionText: prompt }]);
|
123
|
+
});
|
124
|
+
});
|
125
|
+
});
|
126
|
+
|
127
|
+
describe('Allow multiple instances of same draggable option - Functionality : Edit tab', () => {
|
128
|
+
abortEarlySetup();
|
129
|
+
before(() => {
|
130
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
131
|
+
cy.barsPreLoaderWait();
|
132
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Matching');
|
133
|
+
matchingPage.steps.expandDraggableOptionsLayoutDropdown();
|
134
|
+
matchingPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
135
|
+
matchingPage.steps.addGroupTitle(groupTitles[0]);
|
136
|
+
matchingPage.steps.addMultipleOptionFields(1);
|
137
|
+
matchingPage.steps.enterTextInOptionInputField(animals[0]);
|
138
|
+
matchingPage.steps.addGroupWithTitleAndOptionsInDraggableOptionsSection(groupTitles[1], animals[1]);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the \'Allow multiple instances of same draggable option\' functionality is disabled, then on setting correct answer in the dropzone, the draggable options should get removed from the respective group of the options container', () => {
|
142
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }]);
|
143
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, ['Bear', 'Panda', 'Zebra']);
|
144
|
+
});
|
145
|
+
|
146
|
+
it('When the user enables the \'Allow multiple instances of same draggable option\' functionality, then on setting correct answer in the dropzone, the draggable options should persist in respective group of the options container', () => {
|
147
|
+
matchingPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
148
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Fish', dropzoneIndex: 1 }]);
|
149
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(1, 'Fish');
|
150
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, animals[0]);
|
151
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, animals[1]);
|
152
|
+
});
|
153
|
+
|
154
|
+
it('The user should be able to use the same draggable option for multiple dropzones', () => {
|
155
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Fish', dropzoneIndex: 2 }]);
|
156
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(1, 'Fish');
|
157
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(2, 'Fish');
|
158
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(0, animals[0]);
|
159
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, animals[1]);
|
160
|
+
});
|
161
|
+
|
162
|
+
it('When the user removes the draggable option and moves it into the options container, only one option should be displayed in the respective group', () => {
|
163
|
+
matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Fish');
|
164
|
+
matchingPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Fish');
|
165
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, animals[1]);
|
166
|
+
});
|
167
|
+
|
168
|
+
it('When the user disables the \'Allow multiple instances of same draggable option\' functionality, the duplicate answer set as correct answer should get removed from the dropzone and the draggable option should also not exist in the options container of the \'Specifycorrect answer\' section', () => {
|
169
|
+
cy.log('Pre step: Setting identical options as correct responses')
|
170
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Fish', dropzoneIndex: 1 }]);
|
171
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Fish', dropzoneIndex: 2 }]);
|
172
|
+
matchingPage.steps.uncheckAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
173
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(1, 'Fish');
|
174
|
+
matchingPage.steps.verifyDropzoneTextSpecifyCorrectAnswerSection(2, '');
|
175
|
+
matchingPage.steps.verifyGroupedContainerContentsInSpecifyCorrectAnswerSection(1, ['Peacock', 'Penguin', 'Tiger']);
|
176
|
+
});
|
177
|
+
});
|
178
|
+
|
179
|
+
describe('Allow multiple instances of same draggable option - Functionality: Preview tab', () => {
|
180
|
+
abortEarlySetup();
|
181
|
+
before(() => {
|
182
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
183
|
+
cy.barsPreLoaderWait();
|
184
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
|
185
|
+
matchingPage.steps.expandDraggableOptionsLayoutDropdown();
|
186
|
+
matchingPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
187
|
+
matchingPage.steps.addGroupTitle(groupTitles[0]);
|
188
|
+
matchingPage.steps.addMultipleOptionFields(1);
|
189
|
+
matchingPage.steps.enterTextInOptionInputField(animals[0]);
|
190
|
+
matchingPage.steps.addGroupWithTitleAndOptionsInDraggableOptionsSection(groupTitles[1], animals[1]);
|
191
|
+
matchingPage.steps.switchToPreviewTab();
|
192
|
+
});
|
193
|
+
|
194
|
+
it('When the \'Allow multiple instances of same draggable option\' functionality is disabled, then on attempting the question, the draggable options should get removed from the options container', () => {
|
195
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }]);
|
196
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(0, ['Bear', 'Panda', 'Zebra']);
|
197
|
+
});
|
198
|
+
|
199
|
+
it('When the \'Allow multiple instances of same draggable option\' functionality is enabled, then on attempting the question, the draggable options should persist in the options container', () => {
|
200
|
+
matchingPage.steps.switchToEditTab();
|
201
|
+
matchingPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
202
|
+
matchingPage.steps.switchToPreviewTab();
|
203
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }]);
|
204
|
+
matchingPage.steps.verifyDraggableOptionPreviewTab(0, 'Elephant');
|
205
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(0, animals[0]);
|
206
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(1, animals[1]);
|
207
|
+
});
|
208
|
+
|
209
|
+
it('The user should be able to use the same draggable option for multiple dropzones', () => {
|
210
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 1 }]);
|
211
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 2 }]);
|
212
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Bear']);
|
213
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(2, ['Bear']);
|
214
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(0, animals[0]);
|
215
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(1, animals[1]);
|
216
|
+
});
|
217
|
+
|
218
|
+
it('When the user removes the draggable option and moves it into the options container, only one option should be displayed in the respective group', () => {
|
219
|
+
matchingPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Bear');
|
220
|
+
matchingPage.steps.clickAndDropOptionInOptionsContainerInPreviewTab('Bear');
|
221
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(0, animals[0]);
|
222
|
+
});
|
223
|
+
|
224
|
+
it('When the user disables the \'Allow multiple instances of same draggable option\' functionality, then on attempting the question, the draggable options should get removed from the options container', () => {
|
225
|
+
matchingPage.steps.switchToEditTab();
|
226
|
+
matchingPage.steps.uncheckAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
227
|
+
matchingPage.steps.switchToPreviewTab();
|
228
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }]);
|
229
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Bear']);
|
230
|
+
matchingPage.steps.verifyGroupedContainerContentsInPreviewTab(0, ['Elephant', 'Panda', 'Zebra']);
|
231
|
+
});
|
232
|
+
});
|
233
|
+
|
234
|
+
describe('Allow multiple instances of same draggable option - Scoring', () => {
|
235
|
+
before(() => {
|
236
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
237
|
+
cy.barsPreLoaderWait();
|
238
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
|
239
|
+
matchingPage.steps.expandDraggableOptionsLayoutDropdown();
|
240
|
+
matchingPage.steps.selectOptionFromDraggableOptionsLayoutDropdown('Grouped');
|
241
|
+
matchingPage.steps.addGroupTitle(groupTitles[0]);
|
242
|
+
matchingPage.steps.addMultipleOptionFields(1);
|
243
|
+
matchingPage.steps.enterTextInOptionInputField(animals[0]);
|
244
|
+
matchingPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
245
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 0 }]);
|
246
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Bear', dropzoneIndex: 1 }]);
|
247
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 2 }]);
|
248
|
+
matchingPage.steps.allotPoints(5);
|
249
|
+
matchingPage.steps.switchToPreviewTab();
|
250
|
+
});
|
251
|
+
|
252
|
+
it('When the user has set same answer options in the \'Specify correct answer\' section, then the user should be awarded full points on attempting the question with reused options', () => {
|
253
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }]);
|
254
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 1 }]);
|
255
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 2 }]);
|
256
|
+
matchingPage.steps.verifyPreviewScore(5, 5);
|
257
|
+
matchingPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
258
|
+
});
|
259
|
+
});
|
260
|
+
});
|
@@ -469,7 +469,7 @@ const steps = {
|
|
469
469
|
},
|
470
470
|
|
471
471
|
verifyCorrectAnswerSectionNotExists: () => {
|
472
|
-
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.
|
472
|
+
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.correctAnswersSectionLabel(), 'notExist');
|
473
473
|
},
|
474
474
|
|
475
475
|
/**
|