itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.574-IEI-7080-e6d1871.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
- package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +86 -0
- package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +60 -9
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +14 -12
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +12 -3
- package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +65 -2
- package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +15 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -168
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +284 -17
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +397 -25
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +320 -20
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +0 -130
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +97 -10
- package/cypress/e2e/ILC/dataApi/saveItems.js +1 -1
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +7 -7
- package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +6 -6
- package/cypress/pages/components/additionalSettingsPanel.js +9 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +1 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +15 -2
- package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
- package/cypress/pages/components/imageCanvasComponent.js +0 -3
- package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
- package/cypress/pages/components/showAlternativeAnswersComponent.js +41 -65
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
- package/cypress/pages/imageHighlightPage.js +184 -7
- package/cypress/pages/itemPreviewPage.js +1 -0
- package/cypress/pages/multipleSelectionPage.js +32 -0
- package/cypress/pages/singleSelectionPage.js +17 -0
- package/cypress/support/helpers/utilities.js +16 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +47 -53
- package/service.yaml +2 -2
|
@@ -142,4 +142,185 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
|
142
142
|
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(2, 20);
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
|
+
|
|
146
|
+
describe('Question preview: Auto scored - Partial equal weights: Rounding', () => {
|
|
147
|
+
abortEarlySetup();
|
|
148
|
+
before(() => {
|
|
149
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
150
|
+
cy.barsPreLoaderWait();
|
|
151
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
152
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
153
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
|
154
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
|
155
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
156
|
+
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
157
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(15);
|
|
158
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
|
159
|
+
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
163
|
+
fillInTheGapsOverImageTextPage.steps.expandRoundingDropdown();
|
|
164
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
|
165
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(11);
|
|
166
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
167
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
168
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 11);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
172
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
173
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(8.97);
|
|
174
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
175
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
176
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(2, 8.97);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
180
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
181
|
+
fillInTheGapsOverImageTextPage.steps.expandRoundingDropdown();
|
|
182
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
|
183
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
|
184
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
185
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
|
186
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 10);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
190
|
+
cy.log('Points allocation based on the test case requirements.');
|
|
191
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
192
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(4.5);
|
|
193
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
194
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
|
195
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(1, 4.5);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
199
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
200
|
+
fillInTheGapsOverImageTextPage.steps.expandRoundingDropdown();
|
|
201
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
|
202
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
|
203
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
204
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
|
205
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 10);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
209
|
+
cy.log('Points allocation based on the test case requirements.');
|
|
210
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
211
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(4.5);
|
|
212
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
213
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
214
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(1, 4.5);
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
218
|
+
cy.log('Points allocation based on the test case requirements.');
|
|
219
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
220
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(11);
|
|
221
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
222
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
223
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(4, 11);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
|
|
227
|
+
cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
|
|
228
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
229
|
+
fillInTheGapsOverImageTextPage.steps.expandPenaltyScoringDropdown();
|
|
230
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
|
231
|
+
fillInTheGapsOverImageTextPage.steps.allotPenaltyPoints(4);
|
|
232
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
233
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
234
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(0, 11);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
|
238
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
239
|
+
fillInTheGapsOverImageTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
|
240
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
241
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
242
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(-4, 11);
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
describe('Question preview: Auto scored - Partial equal weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
|
247
|
+
abortEarlySetup();
|
|
248
|
+
before(() => {
|
|
249
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
250
|
+
cy.barsPreLoaderWait();
|
|
251
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
252
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
253
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
|
254
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
|
255
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
256
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
|
257
|
+
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
258
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(27);
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
//Penalty points for the entire question
|
|
262
|
+
it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
|
263
|
+
fillInTheGapsOverImageTextPage.steps.expandPenaltyScoringDropdown();
|
|
264
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
|
265
|
+
fillInTheGapsOverImageTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
|
266
|
+
fillInTheGapsOverImageTextPage.steps.allotPenaltyPoints(2);
|
|
267
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
268
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
269
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(-2, 27);
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
|
273
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
274
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
275
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
276
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(7, 27);
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
|
|
280
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
281
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
282
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
283
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'apple' }]);
|
|
284
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(7, 27);
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
|
288
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
289
|
+
fillInTheGapsOverImageTextPage.steps.expandMinimumScoringDropdown();
|
|
290
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
|
291
|
+
fillInTheGapsOverImageTextPage.steps.allotMinimumPoints(3);
|
|
292
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
293
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
294
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 27);
|
|
295
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
|
296
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
297
|
+
fillInTheGapsOverImageTextPage.steps.expandMinimumScoringDropdown();
|
|
298
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
//Penalty points for each incorrect cell - Specify total penalty points
|
|
302
|
+
it('When the user sets penalty scoring to \'Penalty points for each incorrect text container\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points of incorrect response', () => {
|
|
303
|
+
fillInTheGapsOverImageTextPage.steps.expandPenaltyScoringDropdown();
|
|
304
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect text container');
|
|
305
|
+
fillInTheGapsOverImageTextPage.steps.allotTotalPenaltyPoints(4);
|
|
306
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
307
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
308
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(-4, 27);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
|
312
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
313
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
314
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
315
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(6.3333, 27);
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points for each incorrect response should get deducted from the awarded points', () => {
|
|
319
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
320
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
321
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
322
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'apple' }]);
|
|
323
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(6.3333, 27);
|
|
324
|
+
});
|
|
325
|
+
});
|
|
145
326
|
});
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
|
5
|
+
let itemReferenceID = "";
|
|
5
6
|
|
|
6
7
|
describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
7
8
|
before(() => {
|
|
@@ -15,6 +16,15 @@ describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
fillInTheGapsOverImageTextPage.tests.verifyAdditionalSettingsAccordionProperties();
|
|
19
|
+
|
|
20
|
+
it('When the user expands the Additional settings accordion make some changes and collapse and re-expand it, the changes should persist', () => {
|
|
21
|
+
fillInTheGapsOverImageTextPage.steps.checkCustomizePlaceholderTextCheckbox();
|
|
22
|
+
fillInTheGapsOverImageTextPage.steps.selectEnumerationType('without enumeration');
|
|
23
|
+
fillInTheGapsOverImageTextPage.steps.collapsedAdditionalSettings();
|
|
24
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
25
|
+
fillInTheGapsOverImageTextPage.steps.verifyWithoutEnumerationRadioButtonCheckedState();
|
|
26
|
+
fillInTheGapsOverImageTextPage.steps.verifyCustomizePlaceholderTextCheckboxChecked();
|
|
27
|
+
});
|
|
18
28
|
});
|
|
19
29
|
|
|
20
30
|
describe('Additional settings: Font size - Contents in edit tab', () => {
|
|
@@ -73,7 +83,7 @@ describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
|
73
83
|
});
|
|
74
84
|
});
|
|
75
85
|
});
|
|
76
|
-
|
|
86
|
+
|
|
77
87
|
describe('Additional settings: Accessibility section', () => {
|
|
78
88
|
abortEarlySetup();
|
|
79
89
|
before(() => {
|
|
@@ -95,4 +105,29 @@ describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
|
95
105
|
|
|
96
106
|
fillInTheGapsOverImageTextPage.tests.verifyDetailsSection();
|
|
97
107
|
});
|
|
108
|
+
|
|
109
|
+
describe('Additional settings: Details section Grading view', () => {
|
|
110
|
+
abortEarlySetup();
|
|
111
|
+
before(() => {
|
|
112
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
113
|
+
cy.barsPreLoaderWait();
|
|
114
|
+
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Navigating to fill in the gaps over image with text');
|
|
115
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
116
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInTeacherGuidelinesInputField('Teacher scoring guidelines');
|
|
117
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInSampleAnswerInputField('Sample answer');
|
|
118
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAcknowledgementsInputField('Acknowledgements');
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it('When the user navigates to the grading view, the Details section information should be displayed correctly', () => {
|
|
122
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
123
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
124
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
125
|
+
cy.wrap(itemPreviewPage.steps.getItemReferenceID()).then((referenceId) => {
|
|
126
|
+
itemReferenceID = referenceId;
|
|
127
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
128
|
+
fillInTheGapsOverImageTextPage.steps.verifyTeacherGuidelinesLabelInGradingView('Teacher Guidelines');
|
|
129
|
+
fillInTheGapsOverImageTextPage.steps.verifyTeacherGuidelinesDescriptionInGradingView('Teacher scoring guidelines');
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
});
|
|
98
133
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage, dialogBoxBase } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const enumerationOptions = {
|
|
@@ -9,6 +9,9 @@ const enumerationOptions = {
|
|
|
9
9
|
'Roman numeral (lowercase)': ['i', 'ii'],
|
|
10
10
|
};
|
|
11
11
|
const css = Cypress.env('css');
|
|
12
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
13
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
14
|
+
let itemReferenceID = "";
|
|
12
15
|
|
|
13
16
|
describe('Fill In the gaps over image with text - Additional settings : Placeholder text, Grading view, ARIA label for text containers', () => {
|
|
14
17
|
before(() => {
|
|
@@ -110,7 +113,7 @@ describe('Fill In the gaps over image with text - Additional settings : Placehol
|
|
|
110
113
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
111
114
|
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
|
112
115
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
|
113
|
-
|
|
116
|
+
//fillInTheGapsOverImageTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
|
114
117
|
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
115
118
|
});
|
|
116
119
|
|
|
@@ -154,12 +157,11 @@ describe('Fill In the gaps over image with text - Additional settings : Placehol
|
|
|
154
157
|
'font-weight': css.fontWeight.regular
|
|
155
158
|
});
|
|
156
159
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.correctAnswerResponseWrapperWithoutEnumeration().parents('.response-input-field'), {
|
|
157
|
-
'border': `1px solid ${css.color.
|
|
160
|
+
'border': `1px solid ${css.color.primaryBtnBg}`
|
|
158
161
|
});
|
|
159
162
|
})
|
|
160
163
|
});
|
|
161
164
|
|
|
162
|
-
|
|
163
165
|
it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
|
|
164
166
|
cy.checkAccessibility(fillInTheGapsOverImageTextPage.correctAnswerSectionWithoutEnumerationWrapper().parents('[class*="question-preview-wrapper"]'));
|
|
165
167
|
});
|
|
@@ -248,4 +250,70 @@ describe('Fill In the gaps over image with text - Additional settings : Placehol
|
|
|
248
250
|
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(1, 'Add answer for response 2');
|
|
249
251
|
});
|
|
250
252
|
});
|
|
253
|
+
|
|
254
|
+
views.forEach((view) => {
|
|
255
|
+
describe(`${view}: Additional Settings: Grading view style with numeration`, () => {
|
|
256
|
+
abortEarlySetup();
|
|
257
|
+
before(() => {
|
|
258
|
+
switch (view) {
|
|
259
|
+
case 'Question preview':
|
|
260
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
261
|
+
cy.barsPreLoaderWait();
|
|
262
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
263
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
264
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(2);
|
|
265
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
|
266
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
|
267
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
|
268
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
269
|
+
fillInTheGapsOverImageTextPage.steps.selectIdentifierToggleButton('Alphabet (uppercase)');
|
|
270
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
271
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
272
|
+
break;
|
|
273
|
+
case 'Item preview':
|
|
274
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
275
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
276
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
277
|
+
break;
|
|
278
|
+
case 'Grading view':
|
|
279
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
280
|
+
break;
|
|
281
|
+
};
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
beforeEach(() => {
|
|
285
|
+
switch (view) {
|
|
286
|
+
case 'Question preview':
|
|
287
|
+
break;
|
|
288
|
+
case 'Item preview':
|
|
289
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
290
|
+
break;
|
|
291
|
+
case 'Grading view':
|
|
292
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
if (view === 'Question preview') {
|
|
298
|
+
after(() => {
|
|
299
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
300
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
301
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
if (view === 'Grading view') {
|
|
306
|
+
it(`When the user selected with numeration radio button, then the numeration should be displayed in the answer input fields in the ${view}`, () => {
|
|
307
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldEnumeration(['A', 'B']);
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
|
312
|
+
it(`When the user selected with numeration radio button, then the numeration should be displayed in the answer input fields as well as correct answer options in the correct answer section in the ${view}`, () => {
|
|
313
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldEnumeration(['A', 'B']);
|
|
314
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesEnumeration(['A', 'B']);
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
});
|
|
251
319
|
});
|
|
@@ -72,6 +72,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
72
72
|
|
|
73
73
|
fillInTheGapsOverImageTextPage.tests.verifyInsertTextTooltip();
|
|
74
74
|
|
|
75
|
+
it('When user insert text container, then it should be displayed', () => {
|
|
76
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(50);
|
|
77
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
78
|
+
fillInTheGapsOverImageTextPage.steps.undoAction();
|
|
79
|
+
});
|
|
80
|
+
|
|
75
81
|
fillInTheGapsOverImageTextPage.tests.verifyUndoRedoClearAllButtons();
|
|
76
82
|
});
|
|
77
83
|
|
|
@@ -217,7 +223,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
217
223
|
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
218
224
|
});
|
|
219
225
|
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseArea(), 0), {
|
|
220
|
-
'border': `1px
|
|
226
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
221
227
|
});
|
|
222
228
|
});
|
|
223
229
|
|
|
@@ -410,4 +416,16 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
410
416
|
|
|
411
417
|
fillInTheGapsOverImageTextPage.tests.verifyImageNotExistPreviewTab();
|
|
412
418
|
});
|
|
419
|
+
|
|
420
|
+
describe('Print layout settings accordion', () => {
|
|
421
|
+
abortEarlySetup();
|
|
422
|
+
before(() => {
|
|
423
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
424
|
+
cy.barsPreLoaderWait();
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
fillInTheGapsOverImageTextPage.tests.verifyPrintLayoutSettingsAccordionProperties();
|
|
428
|
+
|
|
429
|
+
fillInTheGapsOverImageTextPage.tests.verifyPrintLayoutSettingsAccordionContents();
|
|
430
|
+
});
|
|
413
431
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
5
8
|
|
|
6
9
|
describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
7
10
|
before(() => {
|
|
@@ -67,4 +70,56 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
|
67
70
|
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
|
|
68
71
|
});
|
|
69
72
|
});
|
|
73
|
+
|
|
74
|
+
views.forEach((view) => {
|
|
75
|
+
describe(`${view}: Accepted student input`, () => {
|
|
76
|
+
abortEarlySetup();
|
|
77
|
+
before(() => {
|
|
78
|
+
switch (view) {
|
|
79
|
+
case 'Question preview':
|
|
80
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
81
|
+
cy.barsPreLoaderWait();
|
|
82
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
83
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
84
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
85
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(50);
|
|
86
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
|
87
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(1, 'Integer');
|
|
88
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
89
|
+
break;
|
|
90
|
+
case 'Item preview':
|
|
91
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
92
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
93
|
+
break;
|
|
94
|
+
case 'Student view':
|
|
95
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
96
|
+
break;
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
beforeEach(() => {
|
|
100
|
+
switch (view) {
|
|
101
|
+
case 'Question preview':
|
|
102
|
+
break;
|
|
103
|
+
case 'Item preview':
|
|
104
|
+
break;
|
|
105
|
+
case 'Student view':
|
|
106
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
if (view === 'Question preview') {
|
|
111
|
+
after(() => {
|
|
112
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
113
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
114
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
115
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
it(`When the user try to insert text in the response field where the accepted student input type set to number , then it should show a warning message in ${view}`, () => {
|
|
120
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
121
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), 'Only number can be typed.');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
70
125
|
});
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
|
3
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
4
8
|
|
|
5
9
|
describe('Create item page - Fill in the gaps over image with text: Set limit section', () => {
|
|
6
10
|
before(() => {
|
|
@@ -49,7 +53,7 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
|
49
53
|
|
|
50
54
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
51
55
|
// fillInTheGapsOverImageTextPage.tests.verifyMaximumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
52
|
-
|
|
56
|
+
|
|
53
57
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
54
58
|
// fillInTheGapsOverImageTextPage.tests.verifyMinimumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
55
59
|
});
|
|
@@ -79,11 +83,61 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
|
79
83
|
it('User should able to enter characters in the response field', () => {
|
|
80
84
|
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Flower');
|
|
81
85
|
});
|
|
82
|
-
|
|
86
|
+
|
|
83
87
|
//Uncomment below code oncee https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
84
88
|
// fillInTheGapsOverImageTextPage.tests.verifyMaximumCharacterLimitWarningConditionsPreviewTab();
|
|
85
89
|
|
|
86
90
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
87
91
|
// fillInTheGapsOverImageTextPage.tests.verifyMinimumCharacterLimitWarningConditionsPreviewTab();
|
|
88
92
|
});
|
|
93
|
+
|
|
94
|
+
views.forEach((view) => {
|
|
95
|
+
describe(`${view}: Student view settings`, () => {
|
|
96
|
+
abortEarlySetup();
|
|
97
|
+
before(() => {
|
|
98
|
+
switch (view) {
|
|
99
|
+
case 'Question preview':
|
|
100
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
101
|
+
cy.barsPreLoaderWait();
|
|
102
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
103
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
104
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
105
|
+
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(30)
|
|
106
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
107
|
+
break;
|
|
108
|
+
case 'Item preview':
|
|
109
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
110
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
111
|
+
break;
|
|
112
|
+
case 'Student view':
|
|
113
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
114
|
+
break;
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
beforeEach(() => {
|
|
119
|
+
switch (view) {
|
|
120
|
+
case 'Question preview':
|
|
121
|
+
break;
|
|
122
|
+
case 'Item preview':
|
|
123
|
+
break;
|
|
124
|
+
case 'Student view':
|
|
125
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
if (view === 'Question preview') {
|
|
130
|
+
after(() => {
|
|
131
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
132
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
133
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
134
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
it(`When the user sets the maximum character limit for the response field, it should be reflected in the ${view}`, () => {
|
|
139
|
+
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 30);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
89
143
|
});
|
|
@@ -82,21 +82,21 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
82
82
|
|
|
83
83
|
it('CSS of special characters section', { tags: 'css' }, () => {
|
|
84
84
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersLabel(), {
|
|
85
|
-
'color': css.color.
|
|
85
|
+
'color': css.color.codeBlockText,
|
|
86
86
|
'font-size': css.fontSize.default,
|
|
87
87
|
'font-weight': css.fontWeight.semibold
|
|
88
88
|
});
|
|
89
89
|
//checked state of enable special characters checkbox
|
|
90
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
90
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckboxWrapper().find('svg g g').eq(0), {
|
|
91
91
|
'fill': css.color.activeButtons
|
|
92
92
|
});
|
|
93
93
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.groupByLanguageLabel(), {
|
|
94
|
-
'color': css.color.
|
|
94
|
+
'color': css.color.labelText,
|
|
95
95
|
'font-size': css.fontSize.normal,
|
|
96
96
|
'font-weight': css.fontWeight.regular
|
|
97
97
|
});
|
|
98
98
|
//selected state of radio button
|
|
99
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
99
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersRadioButtonWrapper().find('svg'), {
|
|
100
100
|
'fill': css.color.activeButtons
|
|
101
101
|
});
|
|
102
102
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersLabel(), {
|
|
@@ -109,7 +109,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
109
109
|
'font-size': css.fontSize.default,
|
|
110
110
|
'font-weight': css.fontWeight.regular
|
|
111
111
|
});
|
|
112
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
112
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersInputFieldWrapper().find('fieldset'), {
|
|
113
113
|
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
|
114
114
|
});
|
|
115
115
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), {
|
|
@@ -150,13 +150,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
150
150
|
});
|
|
151
151
|
//Category tiles in de-selected state
|
|
152
152
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileIcon().eq(0).find('svg'), {
|
|
153
|
-
'fill': css.color.
|
|
154
|
-
});
|
|
155
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
|
156
|
-
'fill': css.color.secondaryBtn
|
|
153
|
+
'fill': css.color.optionColor
|
|
157
154
|
});
|
|
158
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).
|
|
159
|
-
'fill': css.color.
|
|
155
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).find('svg'), {
|
|
156
|
+
'fill': css.color.optionColor
|
|
160
157
|
});
|
|
161
158
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileCategoryName().eq(0), {
|
|
162
159
|
'color': css.color.secondaryBtn,
|
|
@@ -172,18 +169,18 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
172
169
|
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
|
173
170
|
'color': css.color.flyoutTitle,
|
|
174
171
|
'font-size': css.fontSize.heading,
|
|
175
|
-
'font-weight': css.fontWeight.
|
|
172
|
+
'font-weight': css.fontWeight.semibold
|
|
176
173
|
});
|
|
177
174
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryLabel().eq(0), {
|
|
178
175
|
'color': css.color.accordionLabel,
|
|
179
|
-
'font-size': css.fontSize.
|
|
180
|
-
'font-weight': css.fontWeight.
|
|
176
|
+
'font-size': css.fontSize.default,
|
|
177
|
+
'font-weight': css.fontWeight.bold
|
|
181
178
|
});
|
|
182
179
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryAccordionExpandIcon().last().find('svg'), {
|
|
183
180
|
'fill': css.color.activeButtons
|
|
184
181
|
});
|
|
185
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg'), {
|
|
186
|
-
'fill': css.color.
|
|
182
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg path'), {
|
|
183
|
+
'fill': css.color.activeButtons
|
|
187
184
|
});
|
|
188
185
|
});
|
|
189
186
|
|
|
@@ -191,10 +188,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
191
188
|
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
|
192
189
|
cy.log('Closing preview popup');
|
|
193
190
|
dialogBoxBase.steps.closeWarningPopup();
|
|
194
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel()
|
|
191
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel());
|
|
195
192
|
cy.log('Selecting show only custom special characters radio button');
|
|
196
193
|
fillInTheGapsOverImageTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
|
197
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.
|
|
194
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.customSpecialCharactersInputFieldWrapper());
|
|
198
195
|
});
|
|
199
196
|
});
|
|
200
197
|
|