itemengine-cypress-automation 1.0.161 → 1.0.162-questionInsructionSelectorFix-15973d5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingForAllViews.smoke.js +24 -0
- package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +25 -0
- package/cypress/pages/matchingPage.js +17 -444
- package/package.json +2 -2
- package/cypress/e2e/ILC/Matching/additionalSettings.js +0 -339
- package/cypress/e2e/ILC/Matching/clickAndDrop.js +0 -634
- package/cypress/e2e/ILC/Matching/studentViewSettings.js +0 -453
- package/cypress/e2e/ILC/Matching/studentViewSettingsForGroupedLayout.js +0 -260
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosFourFunctionCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosFourFunctionCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosGeometryToolEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosGeometryToolPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosGraphingCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosGraphingCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosMatrixCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosMatrixCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosScientificCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmos → Desmos}/desmosScientificCalculatorPreviewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmosGraphing → DesmosGraphing}/additionalSettings.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmosGraphing → DesmosGraphing}/editTabBasic.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmosGraphing → DesmosGraphing}/editTabScoring.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmosGraphing → DesmosGraphing}/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmosGraphing → DesmosGraphing}/previewTabContent.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyDesmosGraphing → DesmosGraphing}/studentViewSettings.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/3DGraphingCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/3DGraphingCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/casCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/casCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/geometryCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/geometryCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/graphingCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/graphingCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/probablityCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/probablityCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/scientificCalculatorEditTabBasicSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeoGebra → GeoGebraTools}/scientificCalculatorPreviewTabContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/additionalSettings.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/editTabScoringSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/gradingViewAndCorrectAnswerViewContents.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/headerSection.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/insertResourceLink.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/previewTabContent.smoke.js +0 -0
- /package/cypress/e2e/ILC/{ThirdPartyGeogebraActivity → GeogebraActivity}/questionInstructions.js +0 -0
@@ -1,7 +1,6 @@
|
|
1
1
|
import constants from "../fixtures/constants";
|
2
2
|
import utilities from "../support/helpers/utilities";
|
3
|
-
import { createQuestionBasePage, questionInstructionsComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, draggableOptionContainer, draggableOptionsSectionComponent, correctIncorrectAnswerLabelComponent, maximumCapacityPerDropzoneComponent, optionsWrapperComponent, ckEditorToolbar, equationEditorFlyout, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents,
|
4
|
-
import { dialogBoxBase } from "./dialogBoxBase";
|
3
|
+
import { createQuestionBasePage, questionInstructionsComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, draggableOptionContainer, draggableOptionsSectionComponent, correctIncorrectAnswerLabelComponent, maximumCapacityPerDropzoneComponent, optionsWrapperComponent, ckEditorToolbar, equationEditorFlyout, autoScoredStudentViewSettings, autoScoredSpecifyCorrectAnswerSection, commonComponents, autoScoredScoringSectionMultiResponseType } from "./components";
|
5
4
|
const css = Cypress.env('css');
|
6
5
|
const options = ['option 1', 'option 2', 'option 3'];
|
7
6
|
const fourOptions = ['option 1', 'option 2', 'option 3', 'option 4'];
|
@@ -15,20 +14,10 @@ const selectors = {
|
|
15
14
|
...autoScoredScoringSectionMultiResponseType,
|
16
15
|
...autoScoredSpecifyCorrectAnswerSection,
|
17
16
|
...draggableOptionContainer,
|
18
|
-
...allowMultipleInstancesOfSameDraggableOptionComponent,
|
19
|
-
...randomizeOptionsComponent,
|
20
|
-
...gradingViewEnumerationComponent,
|
21
|
-
...ariaLabelSectionComponent,
|
22
|
-
...scoringSectionBaseEditTab,
|
23
|
-
...additionalSettingsPanel,
|
24
|
-
...maximumCapacityPerDropzoneComponent,
|
25
|
-
|
26
17
|
//Edit tab
|
27
18
|
promptInputField: () => cy.get('.edit-mcq-stems-wrapper [role="textbox"]'),
|
28
|
-
promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper
|
19
|
+
promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper .edit-mcq-option-wrapper'),
|
29
20
|
optionInputField: () => cy.get('.edit-mcq-options-wrapper [data-rbd-draggable-id*="option-draggable"] [role="textbox"]'),
|
30
|
-
optionWrapper: () => cy.get('.response-options-wrapper [data-rbd-draggable-id*="option-draggable"]'),
|
31
|
-
optionNumeration: () => cy.get('.response-options-wrapper [class*="SingleOptionstyle__AdornmentDiv"]'),
|
32
21
|
promptNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]'),
|
33
22
|
promptLabel: () => cy.get('.match-list-stem-label'),
|
34
23
|
promptHeaderLabel: () => cy.get('.prompt-header-container [class*="InlineTextFieldWithDebouncestyles__PropertyLabel"]'),
|
@@ -49,10 +38,6 @@ const selectors = {
|
|
49
38
|
optionsLabel: () => cy.get('.cloze-with-drag-and-drop-options-label'),
|
50
39
|
optionWrapper: () => cy.get('.response-options-wrapper [data-rbd-draggable-id*="option-draggable"]'),
|
51
40
|
optionNumeration: () => cy.get('.response-options-wrapper [class*="SingleOptionstyle__AdornmentDiv"]'),
|
52
|
-
droppedDraggableOptionInDropzoneSpecifyCorrectAnswerSection: () => cy.get('[class*="MultipleDroppedItemstyles__ItemWrapper"]'),
|
53
|
-
optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.draggable-wrapper'),
|
54
|
-
promptSpecifyCorrectAnswerSection: () => cy.get('.stem-container [data-testid="question-instruction-element"]'),
|
55
|
-
draggableOptionInDropzoneInSpecifyCorrectAnswer: () => cy.get('.item-content-wrapper'),
|
56
41
|
|
57
42
|
//Penalty points
|
58
43
|
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
|
@@ -60,27 +45,21 @@ const selectors = {
|
|
60
45
|
partialEqualWeightsPerResponseScore: () => cy.get('[class*="PointsPerResponseValue"]'),
|
61
46
|
partialDifferentWeightsPointsLabel: () => cy.get('.cloze-with-dropdown-partial-points-per-response-label'),
|
62
47
|
|
63
|
-
//
|
64
|
-
|
65
|
-
|
66
|
-
|
48
|
+
//Specify correct answer section
|
49
|
+
dropzoneSpecifyCorrectAnswerSection: () => cy.get('.authoring-droppable-hotspot-wrapper'),
|
50
|
+
promptSpecifyCorrectAnswerSection: () => cy.get('.stem-container [data-testid="question-instruction-element"]:visible'),
|
51
|
+
dropzoneSpecifyCorrectAnswerSection: () => cy.get('.authoring-droppable-hotspot-wrapper'),
|
52
|
+
optionContainerOptionsSpecifyCorrectAnswerSection: () => cy.get('.draggable-selected-item'),
|
67
53
|
|
68
54
|
//Preview tab
|
69
55
|
promptContainerPreviewTab: () => cy.get('.stem-container:visible'),
|
70
56
|
dropzonePreviewTab: () => cy.get('.cloze-with-drag-and-drop-preview [class*="MultipleDroppableHotspotstyle__DroppableHotspotWrapper"]'),
|
71
|
-
dropzoneNumerationPreviewTab: () => cy.get('[class*="MultipleDroppableHotspotstyle__NumerationDiv"]'),
|
72
57
|
dropzoneOptionPreviewTab: () => cy.get('[class*="MultipleDroppedItemstyles__FlexWrapper"]'),
|
73
58
|
dropzoneNumeration: () => cy.get('[class*="NumerationDiv"]'),
|
74
59
|
correctAnswersNumeration: () => cy.get('.answer-numeration-number-box'),
|
75
|
-
correctAnswerResponseWrapper: () => cy.get('[class*="ClozeWithDragAndDropstyles__AnswerCell"]'),
|
76
60
|
correctAnswersOptions: () => cy.get('.match-list-drag-and-drop .question-text-wrapper'),
|
77
61
|
correctAnswersOptionContainer: () => cy.get('.draggable-selected-option'),
|
78
|
-
questionBorderPreviewTab: () => cy.get('[class*="ClozeWithDragAndDropstyles__WrapperDiv"]'),
|
79
|
-
correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.answer-status-response-preview-wrapper .item-wrapper'),
|
80
|
-
correctAnswerTextWithoutEnumeration: () => cy.get('.answer-status-response-preview-wrapper .item-wrapper'),
|
81
62
|
correctIncorrectAnswerLabel: () => cy.get('[class*="AnswerStatusText"]'),
|
82
|
-
previewResponseWrapper: () => cy.get('[class*="ClozeWithDragAndDropstyles__PreviewResponseContainer"]:visible'),
|
83
|
-
droppedDraggableOptionInDropzonePreviewTab: () => cy.get('[class*="MultipleDroppedItemstyles__ItemWrapper"]'),
|
84
63
|
dropzoneColumnAndPromptHeaderWrapperPreviewTab: () => cy.get('.edit-question-preview-wrapper [class*="ClozeWithDragAndDropstyles__ResponseHeaderWrapper"]')
|
85
64
|
}
|
86
65
|
|
@@ -96,9 +75,6 @@ const steps = {
|
|
96
75
|
...equationEditorFlyout.steps,
|
97
76
|
...autoScoredStudentViewSettings.steps,
|
98
77
|
...autoScoredSpecifyCorrectAnswerSection.steps,
|
99
|
-
...draggableOptionContainer.steps,
|
100
|
-
...randomizeOptionsComponent.steps,
|
101
|
-
...draggableOptionsSectionComponent.steps,
|
102
78
|
...autoScoredScoringSectionMultiResponseType.steps,
|
103
79
|
...draggableOptionsSectionComponent.steps,
|
104
80
|
...draggableOptionContainer.steps,
|
@@ -106,13 +82,6 @@ const steps = {
|
|
106
82
|
...draggableOptionsSectionComponent.steps,
|
107
83
|
...draggableOptionContainer.steps,
|
108
84
|
...autoScoredScoringSectionMultiResponseType.steps,
|
109
|
-
...allowMultipleInstancesOfSameDraggableOptionComponent.steps,
|
110
|
-
...randomizeOptionsComponent.steps,
|
111
|
-
...additionalSettingsPanel.steps,
|
112
|
-
...gradingViewEnumerationComponent.steps,
|
113
|
-
...ariaLabelSectionComponent.steps,
|
114
|
-
...maximumCapacityPerDropzoneComponent.steps,
|
115
|
-
|
116
85
|
//Edit tab
|
117
86
|
addPrompt: () => {
|
118
87
|
matchingPage.addPromptButton()
|
@@ -177,7 +146,7 @@ const steps = {
|
|
177
146
|
matchingPage.promptInputField()
|
178
147
|
.eq(index)
|
179
148
|
.clear()
|
180
|
-
.type(promptText, { delay:
|
149
|
+
.type(promptText, { delay: 500 })
|
181
150
|
.should('have.text', promptText);
|
182
151
|
});
|
183
152
|
},
|
@@ -238,9 +207,9 @@ const steps = {
|
|
238
207
|
},
|
239
208
|
|
240
209
|
/**
|
241
|
-
|
242
|
-
|
243
|
-
|
210
|
+
* @param {number} index of option
|
211
|
+
* @description this function verifies error message of option input field
|
212
|
+
*/
|
244
213
|
verifyPromptInputFieldErrorMessage: (index) => {
|
245
214
|
matchingPage.promptInputFieldWrapper()
|
246
215
|
.eq(index)
|
@@ -259,7 +228,7 @@ const steps = {
|
|
259
228
|
matchingPage.optionInputField()
|
260
229
|
.eq(index)
|
261
230
|
.clear()
|
262
|
-
.type(options, { delay:
|
231
|
+
.type(options, { delay: 500 })
|
263
232
|
.blur();
|
264
233
|
});
|
265
234
|
},
|
@@ -464,41 +433,6 @@ const steps = {
|
|
464
433
|
.click();
|
465
434
|
},
|
466
435
|
|
467
|
-
/**
|
468
|
-
* @param {number} dropzoneIndex index of the dropzone in specify correct answer section
|
469
|
-
* @param {string[]} responseArray array of options set as correct responses in a category cell
|
470
|
-
*/
|
471
|
-
verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection: (dropzoneIndex, response) => {
|
472
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
473
|
-
.find('.item-content-container')
|
474
|
-
.eq(dropzoneIndex)
|
475
|
-
.should('have.text', response);
|
476
|
-
},
|
477
|
-
|
478
|
-
/**
|
479
|
-
* @description Verifies the text content of a specific preview tab dropzone element.
|
480
|
-
* @param {number} count - The index of the preview tab dropzone element to verify (zero-based).
|
481
|
-
* @param {string} text - The expected text content to match against the inner text of the specified dropzone element.
|
482
|
-
*/
|
483
|
-
verifyDropzoneTextSpecifyCorrectAnswerSection: (count, text) => {
|
484
|
-
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropzoneSpecifyCorrectAnswerSection(), count), text);
|
485
|
-
},
|
486
|
-
|
487
|
-
/**
|
488
|
-
* @param {string} optionName denotes the text content of the draggable option
|
489
|
-
* @param {number} dropzoneIndex - The index of the dropzone.
|
490
|
-
* @description click on a draggable option present in the category cell of specify correct answer section
|
491
|
-
*/
|
492
|
-
clickOnDraggableOptionInDropzoneOfSpecifyCorrectAnswerSection: (optionName, dropzoneIndex) => {
|
493
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
494
|
-
.eq(dropzoneIndex)
|
495
|
-
.within(() => {
|
496
|
-
matchingPage.draggableOptionInDropzoneInSpecifyCorrectAnswer()
|
497
|
-
.contains(optionName)
|
498
|
-
.click();
|
499
|
-
});
|
500
|
-
},
|
501
|
-
|
502
436
|
/**
|
503
437
|
* @param {string} groupTitle group title
|
504
438
|
* @param {string[]} optionArray array of options for a particular group
|
@@ -544,58 +478,16 @@ const steps = {
|
|
544
478
|
});
|
545
479
|
},
|
546
480
|
|
547
|
-
/**
|
548
|
-
* Verifies the text of a dropzone in the Specify Correct Answer section.
|
549
|
-
* @param {number} count - The index of the dropzone.
|
550
|
-
* @param {string} text - The expected text of the dropzone.
|
551
|
-
*/
|
552
481
|
verifyDropzoneTextSpecifyCorrectAnswerSection: (count, text) => {
|
553
482
|
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropzoneSpecifyCorrectAnswerSection(), count), text);
|
554
483
|
},
|
555
484
|
|
556
|
-
/**
|
557
|
-
* Verifies the options in the Option Container section of the Specify Correct Answer section.
|
558
|
-
* @param {Object[]} optionsArray - An array of objects containing the index and option text.
|
559
|
-
* @param {number} optionsArray.index - The index of the option.
|
560
|
-
* @param {string} optionsArray.optionText - The expected text of the option.
|
561
|
-
*/
|
562
485
|
verifyOptionContainerOptionSpecifyCorrectAnswerSection: (optionsArray) => {
|
563
486
|
optionsArray.forEach(({ index, optionText }) => {
|
564
487
|
utilities.verifyInnerText(utilities.getNthElement(matchingPage.optionContainerOptionsSpecifyCorrectAnswerSection(), index), optionText);
|
565
488
|
});
|
566
489
|
},
|
567
490
|
|
568
|
-
/**
|
569
|
-
* @description Click on dropzone in specify correct answer section
|
570
|
-
* @param {number} dropzoneIndex
|
571
|
-
*/
|
572
|
-
clickOnDropzoneOfSpecifyCorrectAnswerSection: (dropzoneIndex) => {
|
573
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
574
|
-
.eq(dropzoneIndex)
|
575
|
-
.click({ force: true });
|
576
|
-
},
|
577
|
-
|
578
|
-
/**
|
579
|
-
* @param {number} categoryIndex optionIndex of the dropzone in set correct answer section
|
580
|
-
* @param {string[]} responseArray array of options set as correct responses in a dropzone
|
581
|
-
*/
|
582
|
-
verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection: (dropzoneIndex, responseArray) => {
|
583
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
584
|
-
.eq(dropzoneIndex)
|
585
|
-
.within(() => {
|
586
|
-
responseArray.forEach((response, count) => {
|
587
|
-
utilities.verifyTextContent(utilities.getNthElement(matchingPage.droppedDraggableOptionInDropzoneSpecifyCorrectAnswerSection(), count), response);
|
588
|
-
});
|
589
|
-
});
|
590
|
-
},
|
591
|
-
|
592
|
-
|
593
|
-
/**
|
594
|
-
* Verifies the prompt container in the 'Specify correct answer' section.
|
595
|
-
* @param {Object[]} optionsArray - An array of objects containing index and optionText.
|
596
|
-
* @param {number} optionsArray[].index - The index of the prompt container.
|
597
|
-
* @param {string} optionsArray[].optionText - The expected text of the prompt container.
|
598
|
-
*/
|
599
491
|
verifyPromptContainerSpecifyCorrectAnswerSection: (optionsArray) => {
|
600
492
|
optionsArray.forEach(({ index, optionText }) => {
|
601
493
|
utilities.verifyInnerText(utilities.getNthElement(matchingPage.promptSpecifyCorrectAnswerSection(), index), optionText);
|
@@ -628,14 +520,6 @@ const steps = {
|
|
628
520
|
});
|
629
521
|
},
|
630
522
|
|
631
|
-
clickAndDropOptionInOptionsContainerInPreviewTab: (optionText) => {
|
632
|
-
matchingPage.dropzonePreviewTab()
|
633
|
-
.contains(optionText)
|
634
|
-
.click();
|
635
|
-
draggableOptionContainer.optionsContainerPreviewTab()
|
636
|
-
.click({ force: true });
|
637
|
-
},
|
638
|
-
|
639
523
|
/**
|
640
524
|
* Sets options in dropzone in the Preview Tab based on the provided optionsObject.
|
641
525
|
* @param {Object[]} responses - An array of objects containing the responseIndex, responseText and dropzone index
|
@@ -678,18 +562,6 @@ const steps = {
|
|
678
562
|
.contains(text);
|
679
563
|
},
|
680
564
|
|
681
|
-
/**
|
682
|
-
* Verifies the correct answer response without enumeration at a specific index.
|
683
|
-
* @param {number} index - The index of the correct answer response to verify.
|
684
|
-
* @param {string} correctAnswer - The correct answer response to verify.
|
685
|
-
*/
|
686
|
-
verifyCorrectAnswerResponsesWithoutEnumeration: (index, correctAnswer) => {
|
687
|
-
matchingPage.correctAnswerResponseWrapperWithoutEnumeration()
|
688
|
-
.eq(index)
|
689
|
-
.find('.question-text-wrapper')
|
690
|
-
.should('have.text', correctAnswer);
|
691
|
-
},
|
692
|
-
|
693
565
|
/**
|
694
566
|
* @description Verifies that the equation text in the Preview tab is correct.
|
695
567
|
* @param {number} optionIndex - The index of the option in the Preview tab.
|
@@ -799,18 +671,6 @@ const steps = {
|
|
799
671
|
.contains(constants.CKEditorInputFieldEnteredEquationText);
|
800
672
|
},
|
801
673
|
|
802
|
-
/**
|
803
|
-
* Verifies the prompt container in the 'Specify correct answer' section.
|
804
|
-
* @param {Object[]} optionsArray - An array of objects containing index and optionText.
|
805
|
-
* @param {number} optionsArray[].index - The index of the prompt container.
|
806
|
-
* @param {string} optionsArray[].optionText - The expected text of the prompt container.
|
807
|
-
*/
|
808
|
-
verifyPromptContainerPreviewTab: (optionsArray) => {
|
809
|
-
optionsArray.forEach(({ index, optionText }) => {
|
810
|
-
utilities.verifyInnerText(utilities.getNthElement(matchingPage.promptContainerPreviewTab(), index), optionText);
|
811
|
-
});
|
812
|
-
},
|
813
|
-
|
814
674
|
verifyDropzoneNumeration: () => {
|
815
675
|
matchingPage.dropzonePreviewTab()
|
816
676
|
.each(($element, index) => {
|
@@ -908,10 +768,10 @@ const steps = {
|
|
908
768
|
},
|
909
769
|
|
910
770
|
/**
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
771
|
+
* @param {string} groupTitle group title
|
772
|
+
* @param {string[]} optionArray array of options for a particular group
|
773
|
+
* @description add a group with title and options in the response options section
|
774
|
+
*/
|
915
775
|
addGroupWithTitleAndOptionsInDraggableOptionsSection: (groupTitle, optionArray) => {
|
916
776
|
const numOptionsToAdd = Math.max(0, optionArray.length - 2);
|
917
777
|
draggableOptionsSectionComponent.steps.addGroup();
|
@@ -919,286 +779,7 @@ const steps = {
|
|
919
779
|
for (let i = 0; i < numOptionsToAdd; i++) {
|
920
780
|
optionsWrapperComponent.steps.addOption();
|
921
781
|
}
|
922
|
-
|
923
|
-
},
|
924
|
-
|
925
|
-
/**
|
926
|
-
* @param {number} dropzoneIndex index of the dropzone in preview tab
|
927
|
-
* @param {string[]} responseArray array of options set as correct responses in a category cell
|
928
|
-
*/
|
929
|
-
verifyDraggableOptionInDropzoneOfPreviewTab: (dropzoneIndex, responseArray) => {
|
930
|
-
matchingPage.dropzonePreviewTab()
|
931
|
-
.eq(dropzoneIndex)
|
932
|
-
.within(() => {
|
933
|
-
responseArray.forEach((response, count) => {
|
934
|
-
utilities.verifyInnerText(utilities.getNthElement(cy.get('.item-content-container'), count), response);
|
935
|
-
});
|
936
|
-
});
|
937
|
-
},
|
938
|
-
|
939
|
-
verifyEnableOuterBorderForQuestionCheckboxCheckedState: () => {
|
940
|
-
matchingPage.enableOuterBorderForQuestionCheckbox()
|
941
|
-
.should('be.checked');
|
942
|
-
},
|
943
|
-
|
944
|
-
verifyEnableOuterBorderForQuestionCheckboxUncheckedState: () => {
|
945
|
-
matchingPage.enableOuterBorderForQuestionCheckbox()
|
946
|
-
.should('not.be.checked');
|
947
|
-
},
|
948
|
-
|
949
|
-
checkEnableOuterBorderForQuestionCheckbox: () => {
|
950
|
-
matchingPage.enableOuterBorderForQuestionCheckbox()
|
951
|
-
.click()
|
952
|
-
.should('be.checked');
|
953
|
-
},
|
954
|
-
|
955
|
-
uncheckEnableOuterBorderForQuestionCheckbox: () => {
|
956
|
-
matchingPage.enableOuterBorderForQuestionCheckbox()
|
957
|
-
.click()
|
958
|
-
.should('not.be.checked');
|
959
|
-
},
|
960
|
-
|
961
|
-
verifyQuestionBorderNotExist: () => {
|
962
|
-
matchingPage.questionBorderPreviewTab()
|
963
|
-
.should('have.css', 'border')
|
964
|
-
.and('match', /0px none/);
|
965
|
-
},
|
966
|
-
|
967
|
-
/**
|
968
|
-
* @description Verifies the text content of a specific preview tab dropzone element.
|
969
|
-
* @param {number} count - The index of the preview tab dropzone element to verify (zero-based).
|
970
|
-
* @param {string} text - The expected text content to match against the inner text of the specified dropzone element.
|
971
|
-
*/
|
972
|
-
verifyDropzoneTextPreviewTab: (count, text) => {
|
973
|
-
utilities.verifyInnerText(utilities.getNthElement(matchingPage.dropzonePreviewTab(), count), text);
|
974
|
-
},
|
975
|
-
|
976
|
-
verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection: () => {
|
977
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
978
|
-
.should('not.have.class', 'isActiveForDrop');
|
979
|
-
},
|
980
|
-
|
981
|
-
verifyActiveStateOfAllDropzoneInSpecifyCorrectAnswerSection: () => {
|
982
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
983
|
-
.should('have.class', 'isActiveForDrop');
|
984
|
-
},
|
985
|
-
|
986
|
-
/**
|
987
|
-
* Verifies the dropzone enumeration in the preview tab.
|
988
|
-
* @param {string[]} enumerationArray - An array of enumeration values to verify.
|
989
|
-
* @returns {void}
|
990
|
-
*/
|
991
|
-
verifyDropzoneEnumeration: (enumerationArray) => {
|
992
|
-
utilities.verifyElementCount(matchingPage.dropzonePreviewTab(), enumerationArray.length);
|
993
|
-
enumerationArray.forEach((option, index) => {
|
994
|
-
matchingPage.dropzonePreviewTab()
|
995
|
-
.eq(index)
|
996
|
-
.within(() => {
|
997
|
-
utilities.verifyTextContent(matchingPage.dropzoneNumerationPreviewTab(), `${option}`);
|
998
|
-
});
|
999
|
-
});
|
1000
|
-
},
|
1001
|
-
|
1002
|
-
/**
|
1003
|
-
* Verifies the prompt container content in the preview tab.
|
1004
|
-
* @param {Object[]} optionsArray - Array of objects containing index and optionText.
|
1005
|
-
* @param {number} optionsArray[].index - The index of the prompt container element.
|
1006
|
-
* @param {string} optionsArray[].optionText - The expected text to verify against the prompt container element.
|
1007
|
-
*/
|
1008
|
-
verifyPromptContainerPreviewTab: (optionsArray) => {
|
1009
|
-
optionsArray.forEach(({ index, optionText }) => {
|
1010
|
-
utilities.verifyInnerText(utilities.getNthElement(matchingPage.promptContainerPreviewTab(), index), optionText);
|
1011
|
-
});
|
1012
|
-
},
|
1013
|
-
|
1014
|
-
/**
|
1015
|
-
* Verifies the correct answer dropzone enumeration.
|
1016
|
-
* @param {string[]} enumerationArray - An array of enumeration values to verify.
|
1017
|
-
* @returns {void}
|
1018
|
-
*/
|
1019
|
-
verifyCorrectAnswerDropzoneEnumeration: (enumerationArray) => {
|
1020
|
-
utilities.verifyElementCount(matchingPage.correctAnswerResponseWrapper(), enumerationArray.length);
|
1021
|
-
enumerationArray.forEach((option, index) => {
|
1022
|
-
matchingPage.correctAnswerResponseWrapper()
|
1023
|
-
.eq(index)
|
1024
|
-
.within(() => {
|
1025
|
-
utilities.verifyInnerText(matchingPage.correctAnswersNumeration(), `${option}`);
|
1026
|
-
});
|
1027
|
-
});
|
1028
|
-
},
|
1029
|
-
|
1030
|
-
verifyDropzoneNumerationNotExistsPreviewTab: () => {
|
1031
|
-
utilities.verifyElementVisibilityState(matchingPage.dropzoneNumerationPreviewTab(), 'notExist');
|
1032
|
-
},
|
1033
|
-
|
1034
|
-
/**
|
1035
|
-
* Verifies the ARIA label of a dropzone in the 'Specify correct answer' section.
|
1036
|
-
* @param {number} inputFieldIndex - The index of the input field.
|
1037
|
-
* @param {string} ariaLabel - The expected ARIA label of the dropzone.
|
1038
|
-
*/
|
1039
|
-
verifyDropzoneAriaLabelSpecifyCorrectAnswerSection: (inputFieldIndex, ariaLabel) => {
|
1040
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
1041
|
-
.eq(inputFieldIndex)
|
1042
|
-
.should('have.attr', 'aria-label', ariaLabel);
|
1043
|
-
},
|
1044
|
-
|
1045
|
-
/**
|
1046
|
-
* Verifies the ARIA label of a dropzone in the preview tab.
|
1047
|
-
* @param {number} inputFieldIndex - The index of the input field.
|
1048
|
-
* @param {string} ariaLabel - The expected ARIA label of the dropzone.
|
1049
|
-
*/
|
1050
|
-
verifyDropzoneAriaLabelPreviewTab: (inputFieldIndex, ariaLabel) => {
|
1051
|
-
matchingPage.dropzonePreviewTab()
|
1052
|
-
.eq(inputFieldIndex)
|
1053
|
-
.should('have.attr', 'aria-label', ariaLabel);
|
1054
|
-
},
|
1055
|
-
|
1056
|
-
/**
|
1057
|
-
* @param {number} responseAreaIndex Index of the dropzone in specify correct answer section
|
1058
|
-
* @description Verify drag handle is not visible in filled category cell in specify correct answer section
|
1059
|
-
*/
|
1060
|
-
verifyDragHandleNotVisibleInFilledDropzoneOfSpecifyCorrectAnswerSection: (responseAreaIndex) => {
|
1061
|
-
matchingPage.dropzoneSpecifyCorrectAnswerSection()
|
1062
|
-
.eq(responseAreaIndex)
|
1063
|
-
.within(() => {
|
1064
|
-
utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOptionDragIcon(), 'notExist')
|
1065
|
-
});
|
1066
|
-
},
|
1067
|
-
|
1068
|
-
verifyInactiveStateOfAllDropzoneInPreviewTab: () => {
|
1069
|
-
matchingPage.dropzonePreviewTab()
|
1070
|
-
.should('not.have.class', 'isActiveForDrop');
|
1071
|
-
},
|
1072
|
-
|
1073
|
-
verifyActiveStateOfAllDropzoneInPreviewTab: () => {
|
1074
|
-
matchingPage.dropzonePreviewTab()
|
1075
|
-
.should('have.class', 'isActiveForDrop');
|
1076
|
-
},
|
1077
|
-
|
1078
|
-
/**
|
1079
|
-
* Verifies the inactive state of unselected draggable options in the preview tab.
|
1080
|
-
* @param {number[]} optionIndexArray - An array containing the indices of unselected draggable options.
|
1081
|
-
*/
|
1082
|
-
verifyInactiveStateOfUnselectedDraggableOptionsInPreviewTab: (optionIndexArray) => {
|
1083
|
-
draggableOptionContainer.optionsContainerPreviewTab()
|
1084
|
-
.within(() => {
|
1085
|
-
optionIndexArray.forEach((optionIndex) => {
|
1086
|
-
draggableOptionContainer.draggableOption()
|
1087
|
-
.eq(optionIndex)
|
1088
|
-
.should('not.have.class', 'isSelected');
|
1089
|
-
});
|
1090
|
-
});
|
1091
|
-
},
|
1092
|
-
|
1093
|
-
/**
|
1094
|
-
* @param {number} dropzoneIndex index of the dropzone in preview tab
|
1095
|
-
* @param {string[]} responseArray array of options set as correct responses in a category cell
|
1096
|
-
*/
|
1097
|
-
verifyDraggableOptionInDropzoneOfPreviewTab: (dropzoneIndex, responseArray) => {
|
1098
|
-
matchingPage.dropzonePreviewTab()
|
1099
|
-
.eq(dropzoneIndex)
|
1100
|
-
.within(() => {
|
1101
|
-
responseArray.forEach((response, count) => {
|
1102
|
-
utilities.verifyInnerText(utilities.getNthElement(cy.get('.item-content-container'), count), response);
|
1103
|
-
});
|
1104
|
-
});
|
1105
|
-
},
|
1106
|
-
|
1107
|
-
/**
|
1108
|
-
* @param {number} responseAreaIndex Index of the dropzone in preview tab
|
1109
|
-
* @description Verify drag handle is not visible in filled category cell in preview tab
|
1110
|
-
*/
|
1111
|
-
verifyDragHandleNotVisibleInFilledDropzoneOfPreviewTab: (responseAreaIndex) => {
|
1112
|
-
matchingPage.dropzonePreviewTab()
|
1113
|
-
.eq(responseAreaIndex)
|
1114
|
-
.within(() => {
|
1115
|
-
utilities.verifyElementVisibilityState(draggableOptionContainer.draggableOptionDragIcon(), 'notExist')
|
1116
|
-
});
|
1117
|
-
},
|
1118
|
-
|
1119
|
-
/**
|
1120
|
-
* @param {string} optionName denotes the text content of the draggable option
|
1121
|
-
* @param {number} dropzoneIndex - The index of the dropzone.
|
1122
|
-
* @description click on a draggable option present in the category cell of preview tab
|
1123
|
-
*/
|
1124
|
-
clickOnDraggableOptionInDropzoneOfPreviewTab: (optionName, dropzoneIndex) => {
|
1125
|
-
matchingPage.dropzonePreviewTab()
|
1126
|
-
.eq(dropzoneIndex)
|
1127
|
-
.find('.item-content-wrapper')
|
1128
|
-
.contains(optionName)
|
1129
|
-
.click();
|
1130
|
-
},
|
1131
|
-
|
1132
|
-
/**
|
1133
|
-
* Clicks on a draggable option present in the category cell of the preview tab and drops it into the options container.
|
1134
|
-
* @param {string} optionName - The text content of the draggable option.
|
1135
|
-
* @param {number} dropzoneIndex - The index of the dropzone.
|
1136
|
-
*/
|
1137
|
-
clickAndDropDraggableOptionFromDropzoneToOptionsContainerPreviewTab: (optionName, dropzoneIndex) => {
|
1138
|
-
matchingPage.dropzonePreviewTab()
|
1139
|
-
.eq(dropzoneIndex)
|
1140
|
-
.find('.item-content-wrapper')
|
1141
|
-
.contains(optionName)
|
1142
|
-
.click({ force: true });
|
1143
|
-
matchingPage.optionsContainerPreviewTab()
|
1144
|
-
.click();
|
1145
|
-
},
|
1146
|
-
|
1147
|
-
/**
|
1148
|
-
* @description Click on dropzone in preview tab
|
1149
|
-
* @param {number} dropzoneIndex
|
1150
|
-
*/
|
1151
|
-
clickOnDropzoneOfPreviewTab: (dropzoneIndex) => {
|
1152
|
-
matchingPage.dropzonePreviewTab()
|
1153
|
-
.eq(dropzoneIndex)
|
1154
|
-
.click({ force: true });
|
1155
|
-
},
|
1156
|
-
|
1157
|
-
/**
|
1158
|
-
* Verifies that the options are randomized in the preview tab.
|
1159
|
-
* @param {string[]} promptArray - Array of options set in the correct answer section.
|
1160
|
-
*/
|
1161
|
-
verifyRandomizePromptOrder: (promptArray) => {
|
1162
|
-
let currentOptions = [...promptArray];
|
1163
|
-
matchingPage.previewResponseWrapper().within(() => {
|
1164
|
-
for (let index = 0; index < currentOptions.length; index++) {
|
1165
|
-
matchingPage.promptContainerPreviewTab()
|
1166
|
-
.eq(index)
|
1167
|
-
.then(($element) => {
|
1168
|
-
expect($element.text()).to.be.oneOf(currentOptions);
|
1169
|
-
currentOptions = currentOptions.filter((value) => value !== $element.text());
|
1170
|
-
});
|
1171
|
-
}
|
1172
|
-
});
|
1173
|
-
matchingPage.steps.verifyPromptAreRerandomized(promptArray);
|
1174
|
-
},
|
1175
|
-
|
1176
|
-
/**
|
1177
|
-
* Verifies that options in the preview tab have been re-randomized compared to the previous order.
|
1178
|
-
* @param {string[]} previousOrderOfPrompt - An array representing the previous order of options.
|
1179
|
-
*/
|
1180
|
-
verifyPromptAreRerandomized: (previousOrderOfPrompt) => {
|
1181
|
-
matchingPage.previewResponseWrapper().within(() => {
|
1182
|
-
matchingPage.promptContainerPreviewTab()
|
1183
|
-
.should('not.have.text', '')
|
1184
|
-
.and('not.have.text', previousOrderOfPrompt.join(''));
|
1185
|
-
});
|
1186
|
-
},
|
1187
|
-
|
1188
|
-
getPromptArray: () => {
|
1189
|
-
const promptArray = []
|
1190
|
-
commonComponents.previewTabQuestionWrapper()
|
1191
|
-
.within(() => {
|
1192
|
-
matchingPage.promptContainerPreviewTab()
|
1193
|
-
.each(($el) => {
|
1194
|
-
cy.wrap($el)
|
1195
|
-
.invoke('text')
|
1196
|
-
.then((text) => {
|
1197
|
-
promptArray.push(text);
|
1198
|
-
});
|
1199
|
-
});
|
1200
|
-
});
|
1201
|
-
return promptArray;
|
782
|
+
steps.enterTextInOptionInputField(optionArray);
|
1202
783
|
},
|
1203
784
|
|
1204
785
|
/**
|
@@ -1302,20 +883,12 @@ const tests = {
|
|
1302
883
|
...autoScoredScoringPreviewTab.tests,
|
1303
884
|
...scoringSectionBaseEditTab.tests,
|
1304
885
|
...autoScoredScoringSectionMultiResponseType.tests,
|
1305
|
-
...additionalSettingsPanel.tests,
|
1306
|
-
...gradingViewEnumerationComponent.tests,
|
1307
|
-
...additionalSettingsAccessibilitySectionComponent.tests,
|
1308
|
-
...ariaLabelSectionComponent.tests,
|
1309
886
|
...optionsWrapperComponent.tests,
|
1310
887
|
...draggableOptionContainer.tests,
|
1311
888
|
...autoScoredSpecifyCorrectAnswerSection.tests,
|
1312
889
|
...createQuestionBasePage.tests,
|
1313
890
|
...commonComponents.tests,
|
1314
891
|
...draggableOptionsSectionComponent.tests,
|
1315
|
-
...studentViewSettingsLabelComponent.tests,
|
1316
|
-
...randomizeOptionsComponent.tests,
|
1317
|
-
...allowMultipleInstancesOfSameDraggableOptionComponent.tests,
|
1318
|
-
...autoScoredStudentViewSettings.tests,
|
1319
892
|
...questionInstructionsComponent.tests,
|
1320
893
|
|
1321
894
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "itemengine-cypress-automation",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.162-questionInsructionSelectorFix-15973d5.0",
|
4
4
|
"description": "",
|
5
5
|
"main": "index.js",
|
6
6
|
"scripts": {
|
@@ -35,4 +35,4 @@
|
|
35
35
|
"node-fetch": "^3.3.2",
|
36
36
|
"react-uuid": "^2.0.0"
|
37
37
|
}
|
38
|
-
}
|
38
|
+
}
|