itemengine-cypress-automation 1.0.564-IEI-6998-Add-coverage-for-image-hightlight-question-type-f372002.0 → 1.0.564-IEI-7011-195aab1.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/config-files/ilprod.json +2 -1
- package/cypress/config-files/ilqa.json +2 -1
- package/cypress/config-files/ilstage.json +2 -1
- package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +0 -86
- package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +9 -60
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +12 -14
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +3 -12
- package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -65
- package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +1 -15
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +353 -0
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +464 -1
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +379 -0
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +103 -0
- package/cypress/pages/components/index.js +1 -0
- package/cypress/pages/components/showAlternativeAnswersComponent.js +145 -0
- package/cypress/pages/imageHighlightPage.js +7 -184
- package/cypress/pages/itemPreviewPage.js +0 -1
- package/cypress/pages/multipleSelectionPage.js +35 -1
- package/cypress/pages/singleSelectionPage.js +22 -1
- package/cypress/support/helpers/utilities.js +0 -16
- package/package.json +1 -1
- package/service.yaml +9 -1
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"admin_password": "GzL1Ezjou4wVFL8o",
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
14
|
"migration_usernme": "ilc-prod-content-user",
|
|
15
|
-
"migration_password": "Oj2kTWQM7ZRmegmS"
|
|
15
|
+
"migration_password": "Oj2kTWQM7ZRmegmS",
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"admin_password": "GtOrLiig9surpeW1",
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
14
|
"migration_usernme": "demo-technical-tester",
|
|
15
|
-
"migration_password": "SXYeokWOoTuwEg2w"
|
|
15
|
+
"migration_password": "SXYeokWOoTuwEg2w",
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "true"
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
"scriptSrc": "https://assets-itemengine-staging.imaginelearning.com/content/itemengine-assets-staging/v2/author-loader-nocache.js",
|
|
11
11
|
"admin_username": "demouser-ilc",
|
|
12
12
|
"admin_password": "T6b9FK0pC6Tg8wDz",
|
|
13
|
-
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315"
|
|
13
|
+
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
14
15
|
}
|
|
15
16
|
}
|
|
@@ -198,90 +198,4 @@ describe('Create Item page - Image highlight : Additional settings', () => {
|
|
|
198
198
|
imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(1, 'Response 2 of 2');
|
|
199
199
|
});
|
|
200
200
|
});
|
|
201
|
-
|
|
202
|
-
describe('Additional settings: Enumeration placement and details section', () => {
|
|
203
|
-
abortEarlySetup();
|
|
204
|
-
before(() => {
|
|
205
|
-
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
206
|
-
cy.barsPreLoaderWait();
|
|
207
|
-
imageHighlightPage.steps.uploadFile('highlightImage.jpg');
|
|
208
|
-
imageHighlightPage.steps.addTextInQuestionInstructionsInputField('Select the appropriate highlight in the image below');
|
|
209
|
-
imageHighlightPage.steps.verifyImageUploadedInSpecifyPossibleOptionsSection();
|
|
210
|
-
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
|
211
|
-
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
|
212
|
-
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
|
213
|
-
imageHighlightPage.steps.allotPoints(10);
|
|
214
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
|
215
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
|
216
|
-
imageHighlightPage.steps.expandAdditionalSettings();
|
|
217
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
218
|
-
});
|
|
219
|
-
|
|
220
|
-
it('The enumeration placement label should be displayed in the additional settings accordion of edit tab and should contain text "Enumeration placement"', () => {
|
|
221
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
222
|
-
utilities.verifyInnerText(imageHighlightPage.enumerationPlacementLabel(), 'Enumeration placement');
|
|
223
|
-
utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementLabel(), 'visible');
|
|
224
|
-
});
|
|
225
|
-
|
|
226
|
-
it('Toggle buttons with options "Top", "Center" and "Bottom" should be present for enumeration placement and by default "Top" enumeration placement toggle button should be selected and other toggles should not be not selected', () => {
|
|
227
|
-
utilities.verifyElementVisibilityState(imageHighlightPage.enumerationToggleButtonContainer(), 'visible');
|
|
228
|
-
utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementTopToggleButton(), 'visible');
|
|
229
|
-
utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementCenterToggleButton(), 'visible');
|
|
230
|
-
utilities.verifyElementVisibilityState(imageHighlightPage.enumerationPlacementBottomToggleButton(), 'visible');
|
|
231
|
-
utilities.verifiedElementSelectedNotSelectedState(imageHighlightPage.enumerationPlacementTopToggleButton(), 'selected');
|
|
232
|
-
utilities.verifiedElementSelectedNotSelectedState(imageHighlightPage.enumerationPlacementCenterToggleButton(), 'notSelected');
|
|
233
|
-
utilities.verifiedElementSelectedNotSelectedState(imageHighlightPage.enumerationPlacementBottomToggleButton(), 'notSelected');
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
it('When toggle button for "Enumeration placement" is set to "Top" then the numeration placement should be updated to top for the highlight region in the preview tab', () => {
|
|
237
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
238
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
239
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
240
|
-
imageHighlightPage.steps.switchToGradingView();
|
|
241
|
-
imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Top', 0);
|
|
242
|
-
imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Top', 1);
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
it('When the user changes "Enumeration placement" to bottom then the numeration placement should be updated to bottom for the highlight region in the preview tab', () => {
|
|
246
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
247
|
-
imageHighlightPage.steps.selectBottomEnumerationPlacementToggle();
|
|
248
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
249
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
250
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
251
|
-
imageHighlightPage.steps.switchToGradingView();
|
|
252
|
-
imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Bottom', 0);
|
|
253
|
-
imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Bottom', 1);
|
|
254
|
-
});
|
|
255
|
-
|
|
256
|
-
it('When the user changes "Enumeration placement" to center then the numeration placement should be updated to center for the highlight region in the preview tab', () => {
|
|
257
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
258
|
-
imageHighlightPage.steps.selectCenterEnumerationPlacementToggle();
|
|
259
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
260
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
261
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
262
|
-
imageHighlightPage.steps.switchToGradingView();
|
|
263
|
-
imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Center', 0);
|
|
264
|
-
imageHighlightPage.steps.verifyNumerationPlacementForHighlightRegionInPreviewTab('Center', 1);
|
|
265
|
-
});
|
|
266
|
-
|
|
267
|
-
it('When the user has set "ARIA label", then it should be present for the highlight region in the preview tab', () => {
|
|
268
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
269
|
-
imageHighlightPage.steps.enterTextInAriaLabelInputField(0, 'Correct response 1');
|
|
270
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
271
|
-
imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(0, 'Correct response 1, Response 1 of 2');
|
|
272
|
-
imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(1, 'Response 2 of 2');
|
|
273
|
-
});
|
|
274
|
-
|
|
275
|
-
it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
|
|
276
|
-
cy.checkAccessibility(imageHighlightPage.highlightPreviewTab());
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
it('When the user clears the set value in the "ARIA label" input field, then the default aria labels should be present for the highlight region in the preview tab', () => {
|
|
280
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
281
|
-
imageHighlightPage.steps.clearTextInAriaLabelInputField(0);
|
|
282
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
283
|
-
imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(0, 'Response 1 of 2');
|
|
284
|
-
imageHighlightPage.steps.verifyHighlightRegionAriaLabelPreviewTab(1, 'Response 2 of 2');
|
|
285
|
-
});
|
|
286
|
-
});
|
|
287
201
|
});
|
|
@@ -122,18 +122,6 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
122
122
|
imageHighlightPage.steps.uncheckFillImageToCanvasCheckbox();
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
-
it('When user unchecks \'Fill image to canvas\' checkbox, then the original image dimensions should be restored', () => {
|
|
126
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
127
|
-
imageHighlightPage.steps.verifyImageUploadedPreviewTab();
|
|
128
|
-
imageHighlightPage.steps.verifyImageDimensionsPreviewTab(500, 500);
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
it('When user unchecks \'Fill image to canvas\' checkbox, saves the question then the original image dimensions should be restored in item preview', () => {
|
|
132
|
-
imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
|
|
133
|
-
imageHighlightPage.steps.verifyImageDimensionsPreviewTab(500, 500);
|
|
134
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
135
|
-
});
|
|
136
|
-
|
|
137
125
|
it('\'Lock aspect ratio\' and \'Reset dimensions\' buttons should be displayed and by default \'Lock aspect ratio\' button should be locked', () => {
|
|
138
126
|
utilities.verifyElementVisibilityState(imageHighlightPage.lockAspectRatioButton(), 'visible');
|
|
139
127
|
utilities.verifyElementVisibilityState(imageHighlightPage.resetDimensionsButton(), 'visible');
|
|
@@ -232,7 +220,7 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
232
220
|
});
|
|
233
221
|
});
|
|
234
222
|
|
|
235
|
-
describe('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
|
|
223
|
+
describe.skip('Canvas width, Canvas height, Image alternative text - Edit tab canvas section functionality', () => {
|
|
236
224
|
abortEarlySetup();
|
|
237
225
|
before(() => {
|
|
238
226
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
@@ -254,7 +242,6 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
254
242
|
|
|
255
243
|
it('When aspect ratio is unlocked and user changes the value in height input field, then width input field should remain unchanged and the dimensions should be updated in the image popup preview section', () => {
|
|
256
244
|
imageHighlightPage.steps.updateCanvasHeight(500);
|
|
257
|
-
cy.wait(500); //wait added to stabilize the test as sometimes it fails due to slow rendering of canvas preview section
|
|
258
245
|
imageHighlightPage.steps.verifyCanvasHeight(500);
|
|
259
246
|
imageHighlightPage.steps.verifyCanvasWidth(500);
|
|
260
247
|
imageHighlightPage.steps.verifyCanvasHeightSpecifyCorrectAnswer(500);
|
|
@@ -264,9 +251,8 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
264
251
|
it('When user locks the aspect ratio button and changes the value in the width input field, the height input field should be updated accordingly to maintain the updated aspect ratio', () => {
|
|
265
252
|
imageHighlightPage.steps.lockAspectRatio();
|
|
266
253
|
imageHighlightPage.steps.updateCanvasWidth(800);
|
|
267
|
-
|
|
268
|
-
imageHighlightPage.steps.
|
|
269
|
-
imageHighlightPage.steps.verifyCanvasHeightSpecifyCorrectAnswer(450);
|
|
254
|
+
imageHighlightPage.steps.verifyCanvasHeight(500);
|
|
255
|
+
imageHighlightPage.steps.verifyCanvasHeightSpecifyCorrectAnswer(500);
|
|
270
256
|
});
|
|
271
257
|
|
|
272
258
|
it('When user selects the \'Reset dimensions\' button the height and width should reset to the original values', () => {
|
|
@@ -308,47 +294,28 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
308
294
|
imageHighlightPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
|
|
309
295
|
});
|
|
310
296
|
|
|
311
|
-
it('When \'Top left\' image alignment is selected by default, saves the question then in item preview the canvas image should be aligned to top left', () => {
|
|
312
|
-
imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
|
|
313
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
314
|
-
imageHighlightPage.steps.verifyImageUploadedPreviewTab();
|
|
315
|
-
imageHighlightPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
|
|
316
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
317
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
318
|
-
});
|
|
319
|
-
|
|
320
297
|
it('When user selects \'Center\' image alignment in edit tab, then canvas image should be aligned to center in preview tab ', () => {
|
|
298
|
+
imageHighlightPage.steps.switchToEditTab();
|
|
321
299
|
imageHighlightPage.steps.selectCenterImageAlignment();
|
|
322
300
|
imageHighlightPage.steps.switchToPreviewTab();
|
|
323
301
|
imageHighlightPage.steps.verifyCanvasImageCenterAlignedInPreviewTab();
|
|
324
302
|
});
|
|
325
303
|
|
|
326
|
-
it('When \'Center\' image alignment is selected by default, saves the question then in item preview the canvas image should be aligned to center', () => {
|
|
327
|
-
imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
|
|
328
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
329
|
-
imageHighlightPage.steps.verifyImageUploadedPreviewTab();
|
|
330
|
-
imageHighlightPage.steps.verifyCanvasImageCenterAlignedInPreviewTab();
|
|
331
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
332
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
333
|
-
});
|
|
334
|
-
|
|
335
304
|
it('When user selects \'Top right\' image alignment, then canvas image should be aligned to top right in preview tab', () => {
|
|
305
|
+
imageHighlightPage.steps.switchToEditTab();
|
|
336
306
|
imageHighlightPage.steps.selectTopRightImageAlignment();
|
|
337
307
|
imageHighlightPage.steps.switchToPreviewTab();
|
|
338
308
|
imageHighlightPage.steps.verifyCanvasImageTopRightAlignedInPreviewTab();
|
|
339
309
|
});
|
|
340
310
|
|
|
341
|
-
it('When \'Top
|
|
342
|
-
imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
|
|
343
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
344
|
-
imageHighlightPage.steps.verifyImageUploadedPreviewTab();
|
|
345
|
-
imageHighlightPage.steps.verifyCanvasImageTopRightAlignedInPreviewTab();
|
|
311
|
+
it('When user selects \'Top left\' image alignment again, then image should be aligned to top left inside the canvas in preview tab', () => {
|
|
346
312
|
imageHighlightPage.steps.switchToEditTab();
|
|
347
|
-
imageHighlightPage.steps.
|
|
313
|
+
imageHighlightPage.steps.selectTopLeftImageAlignment();
|
|
314
|
+
imageHighlightPage.steps.switchToPreviewTab();
|
|
315
|
+
imageHighlightPage.steps.verifyCanvasImageTopLeftAlignedInPreviewTab();
|
|
348
316
|
});
|
|
349
317
|
|
|
350
318
|
it('When opacity is 100 percent by default, then canvas image should have 100 percent opacity in preview tab ', () => {
|
|
351
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
352
319
|
imageHighlightPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(100);
|
|
353
320
|
});
|
|
354
321
|
|
|
@@ -366,15 +333,6 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
366
333
|
imageHighlightPage.steps.verifyOpacityValueForCanvasImageInPreviewTab(40);
|
|
367
334
|
});
|
|
368
335
|
|
|
369
|
-
it('When user changes opacity input field value in edit tab, saves the question then opacity for canvas image should change accordingly in item preview tab ', () => {
|
|
370
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
371
|
-
imageHighlightPage.steps.enterInputToOpacityInputField(50);
|
|
372
|
-
imageHighlightPage.steps.saveQuestion();
|
|
373
|
-
imageHighlightPage.steps.switchToItemPreviewTab();
|
|
374
|
-
imageHighlightPage.steps.verifyOpacityValueForCanvasImageInItemPreviewTab(50);
|
|
375
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
376
|
-
});
|
|
377
|
-
|
|
378
336
|
it('When user checks \'Fill image to canvas\' checkbox in edit tab, then image should be adjusted to fit inside the canvas in preview tab', () => {
|
|
379
337
|
imageHighlightPage.steps.switchToEditTab();
|
|
380
338
|
imageHighlightPage.steps.checkFillImageToCanvasCheckbox();
|
|
@@ -382,15 +340,6 @@ describe('Create item page - Image highlight: Background image section', () => {
|
|
|
382
340
|
imageHighlightPage.steps.verifyImageFitsToCanvasInPreviewTab();
|
|
383
341
|
});
|
|
384
342
|
|
|
385
|
-
it('When user checks \'Fill image to canvas\' checkbox in edit tab, saves the question, then image should be adjusted to fit inside the canvas in item preview', () => {
|
|
386
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
387
|
-
imageHighlightPage.steps.checkFillImageToCanvasCheckbox();
|
|
388
|
-
imageHighlightPage.steps.saveQuestion();
|
|
389
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
390
|
-
imageHighlightPage.steps.verifyImageFitsToCanvasInPreviewTab();
|
|
391
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
392
|
-
});
|
|
393
|
-
|
|
394
343
|
it('When user unchecks \'Fill image to canvas\' checkbox, then image dimensions should set to default state in preview tab', () => {
|
|
395
344
|
imageHighlightPage.steps.switchToEditTab();
|
|
396
345
|
imageHighlightPage.steps.uncheckFillImageToCanvasCheckbox();
|
|
@@ -10,11 +10,10 @@ const branchesHighlightRegion = [[50, 30], [50, 42], [65, 42], [65, 30]];
|
|
|
10
10
|
const leafHighlightRegion = [[26, 26], [26, 36], [48, 36], [48, 26]];
|
|
11
11
|
const rootsHighlightRegion = [[45, 45], [45, 55], [57, 55], [57, 45]];
|
|
12
12
|
|
|
13
|
-
const defaultStateColor = '
|
|
14
|
-
const defaultStateColorSpecifyPossibleOptions = 'rgba(60, 120, 119, 0.7)';
|
|
13
|
+
const defaultStateColor = 'rgb(120, 60, 60)';
|
|
15
14
|
const activeStateColor = 'rgb(60, 120, 120)';
|
|
16
|
-
const defaultStateBorderColorWithOpacity = 'rgba(
|
|
17
|
-
const defaultStateBorderColorWithNoOpacity = 'rgba(
|
|
15
|
+
const defaultStateBorderColorWithOpacity = 'rgba(120, 61, 61, 0.5)';
|
|
16
|
+
const defaultStateBorderColorWithNoOpacity = 'rgba(120, 60, 60, 0)';
|
|
18
17
|
|
|
19
18
|
describe('Create Item page - Image highlight: Customize image highlight style', () => {
|
|
20
19
|
before(() => {
|
|
@@ -152,9 +151,9 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
152
151
|
imageHighlightPage.steps.clickOnFillColorIcon();
|
|
153
152
|
imageHighlightPage.steps.clickOnActiveStateColorEditButton();
|
|
154
153
|
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
155
|
-
imageHighlightPage.steps.verifySelectedColorBlock(
|
|
154
|
+
imageHighlightPage.steps.verifySelectedColorBlock(defaultStateColor);
|
|
156
155
|
imageHighlightPage.steps.clickOnOkButton();
|
|
157
|
-
imageHighlightPage.steps.verifyEditedFillColorInSpecifyCorrectAnswerSection(0,
|
|
156
|
+
imageHighlightPage.steps.verifyEditedFillColorInSpecifyCorrectAnswerSection(0, defaultStateColor);
|
|
158
157
|
imageHighlightPage.steps.verifyEditedFillColorInSpecifyCorrectAnswerSection(1, activeStateColor);
|
|
159
158
|
});
|
|
160
159
|
});
|
|
@@ -324,8 +323,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
324
323
|
|
|
325
324
|
// Change 'Stroke color' to 'Border color' in the following tests after https://redmine.zeuslearning.com/issues/580697 has been resolved.
|
|
326
325
|
|
|
327
|
-
|
|
328
|
-
describe.skip('Border color image highlight style : Edit tab content and functionality', () => {
|
|
326
|
+
describe('Border color image highlight style : Edit tab content and functionality', () => {
|
|
329
327
|
abortEarlySetup();
|
|
330
328
|
before(() => {
|
|
331
329
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
@@ -351,9 +349,9 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
351
349
|
utilities.verifyElementVisibilityState(imageHighlightPage.colorPopupWrapper(), 'visible');
|
|
352
350
|
});
|
|
353
351
|
|
|
354
|
-
it('The popup should contain \'
|
|
352
|
+
it('The popup should contain \'Border color\' label and two color boxes with label \'Default\' and \'Active\'. Both color boxes should have edit color button.Verify defualt color of both \'Default\' and \'Active\' color boxes', () => {
|
|
355
353
|
utilities.verifyElementVisibilityState(imageHighlightPage.colorPopupMenuLabel(), 'visible');
|
|
356
|
-
utilities.verifyInnerText(imageHighlightPage.colorPopupMenuLabel(), '
|
|
354
|
+
utilities.verifyInnerText(imageHighlightPage.colorPopupMenuLabel(), 'Border color');
|
|
357
355
|
utilities.verifyElementVisibilityState(imageHighlightPage.defaultStateColorLabel(), 'visible');
|
|
358
356
|
utilities.verifyInnerText(imageHighlightPage.defaultStateColorLabel(), 'Default');
|
|
359
357
|
utilities.verifyElementVisibilityState(imageHighlightPage.activeStateColorLabel(), 'visible');
|
|
@@ -481,7 +479,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
481
479
|
|
|
482
480
|
it('\'Border style\' icon should be displayed and as user hovers over it then a tooltip \'Border style\' should be displayed', () => {
|
|
483
481
|
utilities.verifyElementVisibilityState(imageHighlightPage.borderStyleButton(), 'visible');
|
|
484
|
-
imageHighlightPage.steps.verifyToolTipText(3, imageHighlightPage.borderStyleButton(), 'Border
|
|
482
|
+
imageHighlightPage.steps.verifyToolTipText(3, imageHighlightPage.borderStyleButton(), 'Border style');
|
|
485
483
|
});
|
|
486
484
|
|
|
487
485
|
it('When user clicks on the \'Border style\' icon then a popup should be displayed', () => {
|
|
@@ -624,7 +622,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
624
622
|
});
|
|
625
623
|
|
|
626
624
|
//Remove skip once https://redmine.zeuslearning.com/issues/579605 is resolved
|
|
627
|
-
describe('Fill color image highlight style : Preview tab and functionality', () => {
|
|
625
|
+
describe.skip('Fill color image highlight style : Preview tab and functionality', () => {
|
|
628
626
|
abortEarlySetup();
|
|
629
627
|
before(() => {
|
|
630
628
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
@@ -702,7 +700,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
702
700
|
});
|
|
703
701
|
|
|
704
702
|
//Remove skip once https://redmine.zeuslearning.com/issues/579605 is resolved
|
|
705
|
-
describe('Border color image highlight style : Preview tab functionality', () => {
|
|
703
|
+
describe.skip('Border color image highlight style : Preview tab functionality', () => {
|
|
706
704
|
abortEarlySetup();
|
|
707
705
|
before(() => {
|
|
708
706
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
@@ -780,7 +778,7 @@ describe('Create Item page - Image highlight: Customize image highlight style',
|
|
|
780
778
|
});
|
|
781
779
|
|
|
782
780
|
//Remove skip once https://redmine.zeuslearning.com/issues/579605 is resolved
|
|
783
|
-
describe('Border style image highlight style : Preview tab functionality', () => {
|
|
781
|
+
describe.skip('Border style image highlight style : Preview tab functionality', () => {
|
|
784
782
|
abortEarlySetup();
|
|
785
783
|
before(() => {
|
|
786
784
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
@@ -102,7 +102,8 @@ describe('Create Item page - Image Highlight : Image selection style', () => {
|
|
|
102
102
|
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
//Need to remove skip once https://redmine.zeuslearning.com/issues/579605
|
|
106
|
+
describe.skip('Image selection style: Preview tab functionality', () => {
|
|
106
107
|
abortEarlySetup();
|
|
107
108
|
before(() => {
|
|
108
109
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
@@ -138,17 +139,6 @@ describe('Create Item page - Image Highlight : Image selection style', () => {
|
|
|
138
139
|
imageHighlightPage.steps.switchToEditTab();
|
|
139
140
|
});
|
|
140
141
|
|
|
141
|
-
it('When user has selected \'Outline\' image selection style, saves the question and selects a highlighted region in \'Preview tab\' section then the region should be outlined and unselected highlighted regions should be in default state', () => {
|
|
142
|
-
imageHighlightPage.steps.saveAQuestionWithIncompleteAuthoring();
|
|
143
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
144
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
145
|
-
imageHighlightPage.steps.verifyOutlineHighlightRegionItemPreviewTabSection(0);
|
|
146
|
-
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
|
147
|
-
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
|
148
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
149
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
150
|
-
});
|
|
151
|
-
|
|
152
142
|
it('When user has selected \'Pattern\' image selection style and selects a highlighted region in \'Preview tab\' section then the region should be filled with pattern and unselected highlighted regions should be in default state', () => {
|
|
153
143
|
imageHighlightPage.steps.selectpatternToggleButton();
|
|
154
144
|
imageHighlightPage.steps.verifyToggleButtonSelected('Pattern');
|
|
@@ -158,5 +148,6 @@ describe('Create Item page - Image Highlight : Image selection style', () => {
|
|
|
158
148
|
imageHighlightPage.steps.verifyDefaultHighlightRegion(1);
|
|
159
149
|
imageHighlightPage.steps.verifyDefaultHighlightRegion(2);
|
|
160
150
|
});
|
|
151
|
+
|
|
161
152
|
});
|
|
162
153
|
});
|
|
@@ -196,75 +196,12 @@ describe('Create item page - Image highlight: Minimum scoring, Penalty scoring,
|
|
|
196
196
|
before(() => {
|
|
197
197
|
imageHighlightPage.steps.navigateToCreateQuestion('image highlight');
|
|
198
198
|
cy.barsPreLoaderWait();
|
|
199
|
-
imageHighlightPage.steps.
|
|
200
|
-
imageHighlightPage.steps.
|
|
201
|
-
imageHighlightPage.steps.verifyImageUploadedSpecifyCorrectAnswer();
|
|
202
|
-
imageHighlightPage.steps.allotPoints(4);
|
|
203
|
-
imageHighlightPage.steps.highlightRegionInImage(flowerHighlightRegion);
|
|
204
|
-
imageHighlightPage.steps.highlightRegionInImage(branchesHighlightRegion);
|
|
205
|
-
imageHighlightPage.steps.highlightRegionInImage(leafHighlightRegion);
|
|
206
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(0);
|
|
207
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(1);
|
|
208
|
-
imageHighlightPage.steps.highlightARegionInSpecifyCorrectAnswerSection(2);
|
|
209
|
-
imageHighlightPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
199
|
+
imageHighlightPage.steps.allotPoints(10);
|
|
200
|
+
imageHighlightPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
|
|
210
201
|
});
|
|
211
202
|
|
|
212
203
|
imageHighlightPage.tests.verifyRoundingDropdown();
|
|
213
204
|
|
|
214
205
|
imageHighlightPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
|
215
|
-
|
|
216
|
-
it("When the user selects rounding to 'Round down if <= 0.99' then the score '<=0.99' should be rounded down to nearest whole number", () => {
|
|
217
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
218
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
219
|
-
imageHighlightPage.steps.verifyPreviewScore(1,4);
|
|
220
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
221
|
-
imageHighlightPage.steps.verifyPreviewScore(2,4);
|
|
222
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
|
223
|
-
imageHighlightPage.steps.verifyPreviewScore(4,4);
|
|
224
|
-
imageHighlightPage.steps.switchToGradingView();
|
|
225
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
|
226
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
|
227
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
|
228
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
229
|
-
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
230
|
-
});
|
|
231
|
-
|
|
232
|
-
it("When the user selects rounding to 'Round down if <= 0.50' then the score '<=0.50' should be rounded down to nearest whole number", () => {
|
|
233
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
234
|
-
imageHighlightPage.steps.expandRoundingDropdown();
|
|
235
|
-
imageHighlightPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
|
236
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
237
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
238
|
-
imageHighlightPage.steps.verifyPreviewScore(1,4);
|
|
239
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
240
|
-
imageHighlightPage.steps.verifyPreviewScore(2.6667,4);
|
|
241
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
|
242
|
-
imageHighlightPage.steps.verifyPreviewScore(4,4);
|
|
243
|
-
imageHighlightPage.steps.switchToGradingView();
|
|
244
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
|
245
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
|
246
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
|
247
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
248
|
-
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
it('When the user selects rounding to \'Round down if <= 0.50; Round up if > 0.50\' then the score \'<=0.50\' should be rounded down to nearest whole number and the score \'>0.50\' should be rounded up to nearest whole number', () => {
|
|
252
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
253
|
-
imageHighlightPage.steps.expandRoundingDropdown();
|
|
254
|
-
imageHighlightPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
|
255
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
256
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
257
|
-
imageHighlightPage.steps.verifyPreviewScore(1,4);
|
|
258
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
259
|
-
imageHighlightPage.steps.verifyPreviewScore(3,4);
|
|
260
|
-
imageHighlightPage.steps.highlightARegionInPreviewTab(2);
|
|
261
|
-
imageHighlightPage.steps.verifyPreviewScore(4,4);
|
|
262
|
-
imageHighlightPage.steps.switchToGradingView();
|
|
263
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(0);
|
|
264
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(1);
|
|
265
|
-
imageHighlightPage.steps.verifyCorrectHighlightRegion(2);
|
|
266
|
-
imageHighlightPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
|
|
267
|
-
imageHighlightPage.steps.verifyCorrectAnswerSectionNotExists();
|
|
268
|
-
});
|
|
269
206
|
});
|
|
270
207
|
});
|
|
@@ -171,15 +171,7 @@ describe('Image highlight - Student view settings', () => {
|
|
|
171
171
|
imageHighlightPage.steps.switchToPreviewTab();
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
it('When \'Show the available options to students\' checkbox is unchecked, then in preview tab the options should be displayed in standard state without any highlighted background
|
|
175
|
-
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
|
176
|
-
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
|
177
|
-
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
it('When \'Show the available options to students\' checkbox is unchecked, then in preview tab the options should be displayed in standard state without any highlighted background in item preview', () => {
|
|
181
|
-
imageHighlightPage.steps.saveAQuestionAndVerifySnackbar();
|
|
182
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
174
|
+
it('When \'Show the available options to students\' checkbox is unchecked, then in preview tab the options should be displayed in standard state without any highlighted background', () => {
|
|
183
175
|
imageHighlightPage.steps.verifyHiddenHighlightRegion(0);
|
|
184
176
|
imageHighlightPage.steps.verifyHiddenHighlightRegion(1);
|
|
185
177
|
imageHighlightPage.steps.verifyHiddenHighlightRegion(2);
|
|
@@ -187,7 +179,6 @@ describe('Image highlight - Student view settings', () => {
|
|
|
187
179
|
|
|
188
180
|
it('When \'Show the available options to students\' checkbox is checked, then in preview tab the available options should be displayed with a highlighted background', () => {
|
|
189
181
|
imageHighlightPage.steps.switchToEditTab();
|
|
190
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
191
182
|
imageHighlightPage.steps.checkShowAvailableOptionsToStudentsCheckbox();
|
|
192
183
|
imageHighlightPage.steps.switchToPreviewTab();
|
|
193
184
|
imageHighlightPage.steps.verifyDefaultHighlightRegion(0);
|
|
@@ -196,8 +187,6 @@ describe('Image highlight - Student view settings', () => {
|
|
|
196
187
|
});
|
|
197
188
|
|
|
198
189
|
it('When user selects an option in preview tab, then that option should be selected', () => {
|
|
199
|
-
imageHighlightPage.steps.saveAQuestionAndVerifySnackbar();
|
|
200
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
201
190
|
imageHighlightPage.steps.highlightARegionInPreviewTab(0);
|
|
202
191
|
imageHighlightPage.steps.highlightARegionInPreviewTab(1);
|
|
203
192
|
imageHighlightPage.steps.verifySelectedHighlightRegionInPreviewTab(0);
|
|
@@ -210,9 +199,6 @@ describe('Image highlight - Student view settings', () => {
|
|
|
210
199
|
});
|
|
211
200
|
|
|
212
201
|
it('Accessibility of options with highlighted background', { tags: 'a11y' }, () => {
|
|
213
|
-
imageHighlightPage.steps.switchToEditTab();
|
|
214
|
-
imageHighlightPage.steps.clickOnEditQuestionButton();
|
|
215
|
-
imageHighlightPage.steps.switchToPreviewTab();
|
|
216
202
|
cy.checkAccessibility(imageHighlightPage.previewTabQuestionWrapper());
|
|
217
203
|
});
|
|
218
204
|
|