itemengine-cypress-automation 1.0.167-repoUpdate10April-1465c8c.0 → 1.0.169-uploadResponseMigration-83ab996.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +11 -22
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +7 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +6 -11
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +36 -2
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +34 -22
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +24 -8
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +25 -5
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +114 -68
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +111 -67
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +123 -71
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +63 -41
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +25 -21
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +85 -50
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +115 -68
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +98 -54
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +120 -72
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +26 -14
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +0 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/gridQuestionCommonComponent.js +2 -629
- package/cypress/pages/components/index.js +0 -3
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +4 -6
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +3 -60
- package/cypress/pages/components/toolSettingsComponent.js +12 -80
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +8 -0
- package/cypress/pages/feedbackScalePage.js +449 -591
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +1 -3
- package/cypress/pages/graphingPage.js +145 -9
- package/cypress/pages/gridFillPage.js +120 -135
- package/cypress/pages/highlightPage.js +394 -0
- package/cypress/pages/index.js +2 -5
- package/cypress/pages/matchingPage.js +20 -78
- package/cypress/pages/multipleSelectionGridPage.js +1 -88
- package/cypress/pages/singleSelectionGridPage.js +0 -86
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +38 -1
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/migrationScript.js +4 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +34 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +0 -83
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +0 -200
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +0 -56
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -95
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +0 -71
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +0 -72
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +0 -71
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +0 -432
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +0 -134
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +0 -161
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +0 -308
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +0 -216
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +0 -336
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +0 -570
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +0 -214
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +0 -356
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +0 -299
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -355
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +0 -309
- package/cypress/e2e/ILC/Matching/toolSettings.js +0 -72
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +0 -1033
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +0 -28
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +0 -236
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +0 -239
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +0 -178
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +0 -407
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +0 -273
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +0 -278
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +0 -228
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +0 -120
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +0 -659
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +0 -149
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +0 -151
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +0 -171
- package/cypress/e2e/ILC/NumberLine/headerSection.js +0 -76
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -54
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +0 -200
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +0 -67
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +0 -135
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +0 -73
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +0 -372
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +0 -1014
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -235
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +0 -457
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -342
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +0 -155
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +0 -275
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -314
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -290
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +0 -142
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +0 -137
- package/cypress/pages/brainingCampManipulativePage.js +0 -122
- package/cypress/pages/components/defaultToolDropdown.js +0 -77
- package/cypress/pages/components/resetPopupComponent.js +0 -74
- package/cypress/pages/components/toolsAndControlsComponent.js +0 -69
- package/cypress/pages/feedbackScalePage copy.js +0 -716
- package/cypress/pages/numberLinePage.js +0 -723
- package/cypress/pages/textSelectionPage.js +0 -582
@@ -24,6 +24,7 @@ const selectors = {
|
|
24
24
|
...autoScoredAdditionalSettings,
|
25
25
|
|
26
26
|
questionLabel: () => cy.get('[class*="Highlightstyles__QuestionComponentWrapper"] .title-casing'),
|
27
|
+
questionInputField: () => cy.get('[class*="Highlightstyles__QuestionComponentWrapper"] [title="Question"]'),
|
27
28
|
optionSpan: () => cy.get('span'),
|
28
29
|
option: () => cy.get('.highlighted'),
|
29
30
|
//text selection dropdown
|
@@ -34,8 +35,10 @@ const selectors = {
|
|
34
35
|
//highlight options section
|
35
36
|
highlightOptionsLabel: () => cy.get('.highlightOptions-label-wrapper'),
|
36
37
|
highlightOptionsHighlightCounter: () => cy.get('[class*="Highlightstyles__CountWrapper"]'),
|
38
|
+
highlightOptionsTextFieldWrapper: () => cy.get('[class*="Highlightstyles__HighLightWrapper"]'),
|
37
39
|
highlightOptionsSectionTextWrapper: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] [data-testid="question-instruction-element"]'),
|
38
40
|
highlightOptionsParagraphs: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] p'),
|
41
|
+
highlightOptionsSpans: () => cy.get('[class*="Highlightstyles__HighLightWrapper"] span'),
|
39
42
|
colorLibraryButton: () => cy.get('.color-library-wrapper button').eq(0),
|
40
43
|
colorLibraryColorOptionButton: () => cy.get('.color-library-content'),
|
41
44
|
colorLibrarySelectedColorIcon: () => cy.get('[class*="ColorLibrarystyle__BtnSelectionWrapper"]'),
|
@@ -82,6 +85,40 @@ const steps = {
|
|
82
85
|
...autoScoredScoringSection.steps,
|
83
86
|
...commonComponents.steps,
|
84
87
|
|
88
|
+
addInputToQuestionInputField: (text) => {
|
89
|
+
highlightPage.questionInputField()
|
90
|
+
.type(text);
|
91
|
+
},
|
92
|
+
|
93
|
+
clearQuestionInputField: () => {
|
94
|
+
highlightPage.questionInputField()
|
95
|
+
.clear();
|
96
|
+
},
|
97
|
+
|
98
|
+
focusInQuestionInputField: () => {
|
99
|
+
highlightPage.questionInputField()
|
100
|
+
.focus();
|
101
|
+
},
|
102
|
+
|
103
|
+
focusOutOfQuestionInputField: () => {
|
104
|
+
highlightPage.questionInputField()
|
105
|
+
.blur();
|
106
|
+
},
|
107
|
+
|
108
|
+
verifyErroredStateOfQuestionInputField: () => {
|
109
|
+
utilities.verifyCSS(highlightPage.questionInputField(), {
|
110
|
+
'border-color': css.color.errorFieldBorder,
|
111
|
+
'background-color': css.color.errorFieldBg
|
112
|
+
});
|
113
|
+
},
|
114
|
+
|
115
|
+
verifyErroredStateOfHighlightOptionsSection: () => {
|
116
|
+
utilities.verifyCSS(highlightPage.highlightOptionsTextFieldWrapper(), {
|
117
|
+
'border-color': css.color.errorFieldBorder,
|
118
|
+
'background-color': css.color.errorFieldBg
|
119
|
+
});
|
120
|
+
},
|
121
|
+
|
85
122
|
/**
|
86
123
|
* @param {number} highlightCounterValue Value of highlight counter
|
87
124
|
* @description Verify highlight counter text and value
|
@@ -222,11 +259,133 @@ const steps = {
|
|
222
259
|
utilities.verifyInnerText(highlightPage.buttonAccept(), 'Confirm');
|
223
260
|
},
|
224
261
|
|
262
|
+
/**
|
263
|
+
* @param {string} textSelectionType Type of text selection for which reset confirmation popup is displayed
|
264
|
+
* @description Switch text selection type in text selection dropdown
|
265
|
+
*/
|
266
|
+
switchTextSelectionTypeInTextSelectionDropdown: (textSelectionType) => {
|
267
|
+
highlightPage.steps.expandTextSelectionDropdown();
|
268
|
+
highlightPage.steps.selectDropdownOptionInTextSelectionDropdown(textSelectionType);
|
269
|
+
utilities.verifyInnerText(highlightPage.dialogBoxContent(), `Applying ${textSelectionType} text selection will reset any existing highlight options, including valid responses and alternate response values.`);
|
270
|
+
highlightPage.steps.clickOnAcceptButtonInDialogBox();
|
271
|
+
utilities.verifyInnerText(highlightPage.textSelectionDropdown(), textSelectionType);
|
272
|
+
},
|
273
|
+
|
225
274
|
clearSelectedOptionsInHighlightOptionsSection: () => {
|
226
275
|
highlightPage.steps.clickOnClearHighlightButtonInHighlightOptionsSection();
|
227
276
|
highlightPage.steps.clickOnAcceptButtonInDialogBox();
|
228
277
|
},
|
229
278
|
|
279
|
+
/**
|
280
|
+
* @param {string} optionText Text of the option in highlight options section
|
281
|
+
* @description Verify that option is in selected state in highlight options section
|
282
|
+
*/
|
283
|
+
verifyOptionIsSelectedInHighlightOptionsSection: (optionText) => {
|
284
|
+
highlightPage.highlightOptionsSpans()
|
285
|
+
.contains(optionText)
|
286
|
+
.should('have.class', 'highlighted')
|
287
|
+
.and('have.attr', 'aria-checked', 'true');
|
288
|
+
},
|
289
|
+
|
290
|
+
/**
|
291
|
+
* @param {string} optionText Text of the option in set correct answer section
|
292
|
+
* @description Verify that option is not in selected state in set correct answer section
|
293
|
+
*/
|
294
|
+
verifyOptionIsNotSelectedInSetCorrectAnswerSection: (optionText) => {
|
295
|
+
highlightPage.setCorrectAnswerOption()
|
296
|
+
.contains(optionText)
|
297
|
+
.should('not.have.class', 'correct_answer')
|
298
|
+
.and('have.attr', 'aria-checked', 'false');
|
299
|
+
},
|
300
|
+
|
301
|
+
/**
|
302
|
+
* @param {string} optionText Text of the option in set correct answer section
|
303
|
+
* @description Verify that option is in selected state in set correct answer section
|
304
|
+
*/
|
305
|
+
verifyOptionIsSelectedInSetCorrectAnswerSection: (optionText) => {
|
306
|
+
highlightPage.setCorrectAnswerOption()
|
307
|
+
.contains(optionText)
|
308
|
+
.should('have.class', 'correct_answer')
|
309
|
+
.and('have.attr', 'aria-checked', 'true');
|
310
|
+
},
|
311
|
+
|
312
|
+
/**
|
313
|
+
* @param {string} optionText Text of the option in highlight options section
|
314
|
+
* @description Verify that option is not in selected state in highlight options section
|
315
|
+
*/
|
316
|
+
verifyOptionIsNotSelectedInHighlightOptionsSection: (optionText) => {
|
317
|
+
highlightPage.highlightOptionsSpans()
|
318
|
+
.contains(optionText)
|
319
|
+
.should('not.have.class', 'highlighted')
|
320
|
+
.and('have.attr', 'aria-checked', 'false');
|
321
|
+
},
|
322
|
+
|
323
|
+
/**
|
324
|
+
* @param {string} optionText Text of the option in preview tab
|
325
|
+
* @description Verify that option is in selected state in preview tab
|
326
|
+
*/
|
327
|
+
verifyOptionIsSelectedInPreviewTab: (optionText) => {
|
328
|
+
highlightPage.previewTabOption()
|
329
|
+
.contains(optionText)
|
330
|
+
.should('have.class', 'correct_answer')
|
331
|
+
.and('have.attr', 'aria-checked', 'true');
|
332
|
+
},
|
333
|
+
|
334
|
+
/**
|
335
|
+
* @param {string} optionText Text of the option in preview tab
|
336
|
+
* @description Verify that option is not in selected state in preview tab
|
337
|
+
*/
|
338
|
+
verifyOptionIsNotSelectedInPreviewTab: (optionText) => {
|
339
|
+
highlightPage.previewTabOption()
|
340
|
+
.contains(optionText)
|
341
|
+
.should('not.have.class', 'correct_answer')
|
342
|
+
.and('have.attr', 'aria-checked', 'false');
|
343
|
+
},
|
344
|
+
|
345
|
+
verifyNoOptionIsSelectedInPreviewTab: () => {
|
346
|
+
highlightPage.previewTabOption()
|
347
|
+
.should('not.have.class', 'correct_answer')
|
348
|
+
.and('have.attr', 'aria-checked', 'false');
|
349
|
+
},
|
350
|
+
|
351
|
+
/**
|
352
|
+
* @param {string} optionText Text of the option in highlight options section
|
353
|
+
* @description Verify that option does not exist in highlight options section
|
354
|
+
*/
|
355
|
+
verifyOptionDoesNotExistInHighlightOptionsSection: (optionText) => {
|
356
|
+
utilities.verifyElementVisibilityState(highlightPage.highlightOptionsSpans().contains(optionText), 'notExist');
|
357
|
+
},
|
358
|
+
|
359
|
+
/**
|
360
|
+
* @param {string} optionText Text of the option in highlight options section
|
361
|
+
* @description Click on option in highlight options section
|
362
|
+
*/
|
363
|
+
clickOnOptionInHighlightOptionsSection: (optionText) => {
|
364
|
+
highlightPage.highlightOptionsSpans()
|
365
|
+
.contains(optionText)
|
366
|
+
.click();
|
367
|
+
},
|
368
|
+
|
369
|
+
/**
|
370
|
+
* @param {string} optionText Text of the option in set correct answer section
|
371
|
+
* @description Click on option in set correct answer section
|
372
|
+
*/
|
373
|
+
clickOnOptionInSetCorrectAnswerSection: (optionText) => {
|
374
|
+
highlightPage.setCorrectAnswerOption()
|
375
|
+
.contains(optionText)
|
376
|
+
.click();
|
377
|
+
},
|
378
|
+
|
379
|
+
/**
|
380
|
+
* @param {string} optionText Text of the option in preview tab
|
381
|
+
* @description Click on option in preview tab
|
382
|
+
*/
|
383
|
+
clickOnOptionInPreviewTab: (optionText) => {
|
384
|
+
highlightPage.previewTabOption()
|
385
|
+
.contains(optionText)
|
386
|
+
.click();
|
387
|
+
},
|
388
|
+
|
230
389
|
/**
|
231
390
|
* @param {string} textSelectionType Type of text selection
|
232
391
|
* @param {*} optionText Text of the option in highlight options section
|
@@ -258,6 +417,179 @@ const steps = {
|
|
258
417
|
}
|
259
418
|
},
|
260
419
|
|
420
|
+
/**
|
421
|
+
* @param {*} optionText Text of the option in set correct answer section
|
422
|
+
* @description Select an option in set correct answer section
|
423
|
+
*/
|
424
|
+
selectOptionInSetCorrectAnswerSection: (optionText) => {
|
425
|
+
highlightPage.steps.clickOnOptionInSetCorrectAnswerSection(optionText);
|
426
|
+
highlightPage.steps.verifyOptionIsSelectedInSetCorrectAnswerSection(optionText);
|
427
|
+
},
|
428
|
+
|
429
|
+
/**
|
430
|
+
* @param {*} optionText Text of the option in set correct answer section
|
431
|
+
* @description Deselect an option in set correct answer section
|
432
|
+
*/
|
433
|
+
deselectOptionInSetCorrectAnswerSection: (optionText) => {
|
434
|
+
highlightPage.steps.clickOnOptionInSetCorrectAnswerSection(optionText);
|
435
|
+
highlightPage.steps.verifyOptionIsNotSelectedInSetCorrectAnswerSection(optionText);
|
436
|
+
},
|
437
|
+
|
438
|
+
/**
|
439
|
+
* @param {*} optionText Text of the option in preview tab
|
440
|
+
* @description Select an option in preview tab
|
441
|
+
*/
|
442
|
+
selectOptionInPreviewTab: (optionText) => {
|
443
|
+
highlightPage.steps.clickOnOptionInPreviewTab(optionText);
|
444
|
+
highlightPage.steps.verifyOptionIsSelectedInPreviewTab(optionText);
|
445
|
+
},
|
446
|
+
|
447
|
+
/**
|
448
|
+
* @param {*} optionText Text of the option in preview tab
|
449
|
+
* @description Deselect an option in preview tab
|
450
|
+
*/
|
451
|
+
deselectOptionInPreviewTab: (optionText) => {
|
452
|
+
highlightPage.steps.clickOnOptionInPreviewTab(optionText);
|
453
|
+
highlightPage.steps.verifyOptionIsNotSelectedInPreviewTab(optionText);
|
454
|
+
},
|
455
|
+
|
456
|
+
/**
|
457
|
+
* @param {string[]} optionArray Array of text of options in highlight options section
|
458
|
+
* @description Verify the options displayed in highlight options section
|
459
|
+
*/
|
460
|
+
verifyOptionsInHighlightOptionsSection: (optionArray) => {
|
461
|
+
optionArray.forEach((optionText, optionIndex) => {
|
462
|
+
utilities.verifyInnerText(highlightPage.highlightOptionsSpans().eq(optionIndex), optionText)
|
463
|
+
});
|
464
|
+
utilities.verifyElementCount(highlightPage.highlightOptionsSpans(), optionArray.length);
|
465
|
+
},
|
466
|
+
|
467
|
+
/**
|
468
|
+
* @param {string[]} optionArray Array of text of options in highlight options section
|
469
|
+
* @description Verify the options displayed in highlight options section
|
470
|
+
*/
|
471
|
+
verifyOptionsInSetCorrectAnswerSection: (optionArray) => {
|
472
|
+
optionArray.forEach((optionText, optionIndex) => {
|
473
|
+
utilities.verifyInnerText(highlightPage.setCorrectAnswerOption().eq(optionIndex), optionText)
|
474
|
+
});
|
475
|
+
utilities.verifyElementCount(highlightPage.setCorrectAnswerOption(), optionArray.length);
|
476
|
+
},
|
477
|
+
|
478
|
+
/**
|
479
|
+
* @param {string[]} optionArray Array of text of options in preview tab
|
480
|
+
* @description Verify the options displayed in preview tab
|
481
|
+
*/
|
482
|
+
verifyOptionInPreviewTab: (optionArray) => {
|
483
|
+
optionArray.forEach((optionText, optionIndex) => {
|
484
|
+
utilities.verifyInnerText(highlightPage.previewTabOption().eq(optionIndex), optionText)
|
485
|
+
});
|
486
|
+
utilities.verifyElementCount(highlightPage.previewTabOption(), optionArray.length);
|
487
|
+
},
|
488
|
+
|
489
|
+
|
490
|
+
/**
|
491
|
+
* @param {string} optionText Text of the option in highlight options section
|
492
|
+
* @description Hover on deselected option in highlight options section
|
493
|
+
*/
|
494
|
+
hoverOnDeselectedOptionInHighlightOptionsSection: (optionText) => {
|
495
|
+
highlightPage.highlightOptionsSpans()
|
496
|
+
.contains(optionText)
|
497
|
+
.realHover();
|
498
|
+
},
|
499
|
+
|
500
|
+
/**
|
501
|
+
* @param {string} optionText Text of the option in highlight options section
|
502
|
+
* @description Verify hover state of the deselected option in highlight options section
|
503
|
+
*/
|
504
|
+
verifyHoverStateOfDeselectedOptionInHighlightOptionsSection: (optionText) => {
|
505
|
+
highlightPage.steps.hoverOnDeselectedOptionInHighlightOptionsSection(optionText);
|
506
|
+
utilities.verifyCSS(highlightPage.highlightOptionsSpans().contains(optionText), {
|
507
|
+
'color': css.color.text,
|
508
|
+
'font-size': css.fontSize.default,
|
509
|
+
'font-weight': css.fontWeight.regular,
|
510
|
+
'background-color': colorLibrary[0].hoverBackground,
|
511
|
+
'border': `1px solid ${colorLibrary[0].hoverBorder}`
|
512
|
+
});
|
513
|
+
},
|
514
|
+
|
515
|
+
/**
|
516
|
+
* @param {string} optionText Text of the option in set correct answer section
|
517
|
+
* @description Hover on deselected option in set correct answer section
|
518
|
+
*/
|
519
|
+
hoverOnDeselectedOptionInSetCorrectAnswerSection: (optionText) => {
|
520
|
+
highlightPage.setCorrectAnswerOption()
|
521
|
+
.contains(optionText)
|
522
|
+
.realHover();
|
523
|
+
},
|
524
|
+
|
525
|
+
/**
|
526
|
+
* @param {string} optionText Text of the option in preview tab
|
527
|
+
* @description Hover on deselected option in preview tab
|
528
|
+
*/
|
529
|
+
hoverOnDeselectedOptionInPreviewTab: (optionText) => {
|
530
|
+
highlightPage.previewTabOption()
|
531
|
+
.contains(optionText)
|
532
|
+
.realHover();
|
533
|
+
},
|
534
|
+
|
535
|
+
/**
|
536
|
+
* @param {string} optionText Text of the option in set correct answer section
|
537
|
+
* @description Verify hover state of the deselected option in set correct answer section
|
538
|
+
*/
|
539
|
+
verifyHoverStateOfDeselectedOptionInSetCorrectAnswerSection: (optionText) => {
|
540
|
+
highlightPage.steps.hoverOnDeselectedOptionInSetCorrectAnswerSection(optionText);
|
541
|
+
utilities.verifyCSS(highlightPage.setCorrectAnswerOption().contains(optionText), {
|
542
|
+
'color': css.color.text,
|
543
|
+
'font-size': css.fontSize.default,
|
544
|
+
'font-weight': css.fontWeight.regular,
|
545
|
+
'background-color': colorLibrary[0].hoverBackground,
|
546
|
+
'border': `1px solid ${colorLibrary[0].hoverBorder}`
|
547
|
+
});
|
548
|
+
},
|
549
|
+
|
550
|
+
/**
|
551
|
+
* @param {string} optionText Text of the option in preview tab
|
552
|
+
* @description Verify hover state of the deselected option in preview tab
|
553
|
+
*/
|
554
|
+
verifyHoverStateOfOptionInPreviewTab: (optionText) => {
|
555
|
+
highlightPage.steps.hoverOnDeselectedOptionInPreviewTab(optionText);
|
556
|
+
utilities.verifyCSS(highlightPage.previewTabOption().contains(optionText), {
|
557
|
+
'color': css.color.text,
|
558
|
+
'font-size': css.fontSize.default,
|
559
|
+
'font-weight': css.fontWeight.regular,
|
560
|
+
'background-color': colorLibrary[0].hoverBackground,
|
561
|
+
'border': `1px solid ${colorLibrary[0].hoverBorder}`
|
562
|
+
});
|
563
|
+
},
|
564
|
+
|
565
|
+
/**
|
566
|
+
* @param {string} optionText Text of the option in preview tab
|
567
|
+
* @description Verify check-mark icon is displayed for option
|
568
|
+
*/
|
569
|
+
verifyCorrectAnswerCheckmarkIconForOption: (optionText) => {
|
570
|
+
highlightPage.previewTabOption()
|
571
|
+
.contains(optionText)
|
572
|
+
.should('have.class', 'correct_answer')
|
573
|
+
.within(() => {
|
574
|
+
autoScoredPreviewBase.correctIcon()
|
575
|
+
.should('be.visible');
|
576
|
+
});
|
577
|
+
},
|
578
|
+
|
579
|
+
/**
|
580
|
+
* @param {string} optionText Text of the option in preview tab
|
581
|
+
* @description Verify cross-mark icon is displayed for option
|
582
|
+
*/
|
583
|
+
verifyIncorrectAnswerCrossmarkIconForOption: (optionText) => {
|
584
|
+
highlightPage.previewTabOption()
|
585
|
+
.contains(optionText)
|
586
|
+
.should('have.class', 'correct_answer')
|
587
|
+
.within(() => {
|
588
|
+
autoScoredPreviewBase.incorrectIcon()
|
589
|
+
.should('be.visible');
|
590
|
+
});
|
591
|
+
},
|
592
|
+
|
261
593
|
/**
|
262
594
|
* @param {number[]} pointsArray Array of partial different points for options
|
263
595
|
* @description Add points to options in set points popup
|
@@ -374,6 +706,62 @@ const steps = {
|
|
374
706
|
});
|
375
707
|
},
|
376
708
|
|
709
|
+
verifyImageAndAltTextInQuestionInputField: () => {
|
710
|
+
highlightPage.questionInputField()
|
711
|
+
.find('img')
|
712
|
+
.should('have.attr', 'src', constants.foxImageLink)
|
713
|
+
.and('have.attr', 'alt', constants.foxImageAltText);
|
714
|
+
},
|
715
|
+
|
716
|
+
verifyEquationInQuestionInputField: () => {
|
717
|
+
highlightPage.questionInputField()
|
718
|
+
.find('[data-widget="ngie_equation"]')
|
719
|
+
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
720
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
721
|
+
},
|
722
|
+
|
723
|
+
verifyLinkInQuestionInputField: () => {
|
724
|
+
highlightPage.questionInputField()
|
725
|
+
.find('a')
|
726
|
+
.should('have.text', 'lorem')
|
727
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
728
|
+
},
|
729
|
+
|
730
|
+
verifyBoldTextInQuestionInputField: () => {
|
731
|
+
highlightPage.questionInputField()
|
732
|
+
.find('strong')
|
733
|
+
.should('exist')
|
734
|
+
.should('have.text', 'This is Bold text input.');
|
735
|
+
},
|
736
|
+
|
737
|
+
verifyImageAndAltTextInHighlightOptionsSection: () => {
|
738
|
+
highlightPage.highlightOptionsTextFieldWrapper()
|
739
|
+
.find('img')
|
740
|
+
.should('have.attr', 'src', constants.foxImageLink)
|
741
|
+
.and('have.attr', 'alt', constants.foxImageAltText);
|
742
|
+
},
|
743
|
+
|
744
|
+
verifyEquationInHighlightOptionsSection: () => {
|
745
|
+
highlightPage.highlightOptionsTextFieldWrapper()
|
746
|
+
.find('span[role="math"]')
|
747
|
+
.should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
|
748
|
+
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
749
|
+
},
|
750
|
+
|
751
|
+
verifyLinkInHighlightOptionsSection: () => {
|
752
|
+
highlightPage.highlightOptionsTextFieldWrapper()
|
753
|
+
.find('a')
|
754
|
+
.should('have.text', 'lorem')
|
755
|
+
.and('have.attr', 'href', `${Cypress.config().baseUrl}`);
|
756
|
+
},
|
757
|
+
|
758
|
+
verifyBoldTextInHighlightOptionsSection: () => {
|
759
|
+
highlightPage.highlightOptionsTextFieldWrapper()
|
760
|
+
.find('strong')
|
761
|
+
.should('exist')
|
762
|
+
.should('have.text', 'This is Bold text input.lorem');
|
763
|
+
},
|
764
|
+
|
377
765
|
verifyImageAndAltTextInSetCorrectAnswerSection: () => {
|
378
766
|
highlightPage.setCorrectAnswerTextWrapper()
|
379
767
|
.find('img')
|
@@ -430,6 +818,12 @@ const steps = {
|
|
430
818
|
.should('have.text', 'This is Bold text input.lorem');
|
431
819
|
},
|
432
820
|
|
821
|
+
verifyHighlightOptionsFieldErrorMessage: () => {
|
822
|
+
highlightPage.highlightOptionsTextFieldWrapper()
|
823
|
+
.next()
|
824
|
+
.should('have.text', 'Error: Minimum one highlight option is required.');
|
825
|
+
},
|
826
|
+
|
433
827
|
//TODO- Update after https://redmine.zeuslearning.com/issues/548968 is resolved
|
434
828
|
verifySetCorrectAnswerErrorMessage: () => {
|
435
829
|
highlightPage.setCorrectAnswerLabel()
|
package/cypress/pages/index.js
CHANGED
@@ -39,12 +39,9 @@ export * from './textEntryMathPage';
|
|
39
39
|
export * from './fillInTheGapsOverImageDragAndDropPage';
|
40
40
|
export * from './textEntryMathWithImagePage';
|
41
41
|
export * from './graphingPage';
|
42
|
-
export * from './simpleCalculatorPage'
|
42
|
+
export * from './simpleCalculatorPage'
|
43
43
|
export * from './contentBlocksPage';
|
44
44
|
export * from './geoGebraActivityPage';
|
45
45
|
export * from './gridFillPage';
|
46
46
|
export * from './geoGebraToolsPage';
|
47
|
-
export * from './matchingPage';
|
48
|
-
export * from './brainingCampManipulativePage';
|
49
|
-
export * from './numberLinePage';
|
50
|
-
export * from './textSelectionPage';
|
47
|
+
export * from './matchingPage';
|