itemengine-cypress-automation 1.0.256-updatingToOTKV2-5b0ef53.0 → 1.0.257
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +21 -21
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabSupportedFileTypes.js +6 -6
- package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +4 -4
- package/cypress/e2e/ILC/CkEditorEquationEditor/equationEditorBasicFile.js +86 -5
- package/cypress/e2e/ILC/CkEditorEquationEditor/selectModeEditorBasic.js +114 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +160 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/insertImageBasicFile.js +83 -0
- package/cypress/e2e/ILC/CkEditorInsertImage/upload.js +53 -0
- package/cypress/e2e/ILC/CkEditorLink/linkBasic.js +85 -0
- package/cypress/e2e/ILC/CkEditorLink/linkInfoSection.js +94 -0
- package/cypress/e2e/ILC/CkEditorLink/linkPreview.js +38 -0
- package/cypress/e2e/ILC/CkEditorLink/uploadSection.js +59 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +14 -279
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
- package/cypress/e2e/ILC/Graphing/acceptRepeatedPoints.js +75 -0
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsBasic.js +84 -0
- package/cypress/e2e/ILC/TextEntryMath/additionalSettingsForAnswerInputFields.js +286 -0
- package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +107 -0
- package/cypress/e2e/ILC/TextEntryMath/equationEditor.smoke.js +99 -0
- package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +336 -0
- package/cypress/pages/components/ariaLabelSectionComponent.js +1 -1
- package/cypress/pages/components/ckEditorAudioPlayerComponent.js +0 -11
- package/cypress/pages/components/ckEditorEquationEditorComponent.js +175 -7
- package/cypress/pages/components/ckEditorInsertImageComponent.js +272 -0
- package/cypress/pages/components/ckEditorLinkComponent.js +142 -0
- package/cypress/pages/components/customSettingsSeparatorsComponent.ts +97 -0
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +528 -0
- package/cypress/pages/components/gradingViewEnumerationComponent.js +11 -6
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/questionInstructionsComponent.js +10 -0
- package/cypress/pages/essayResponsePage.js +4 -121
- package/cypress/pages/graphingPage.js +24 -2
- package/cypress/pages/multipleSelectionPage.js +8 -0
- package/cypress/pages/textEntryMathPage.js +125 -18
- package/cypress/support/index.d.ts +7 -0
- package/cypress/tsconfig.json +11 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +6 -6
@@ -1,5 +1,5 @@
|
|
1
1
|
import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols ";
|
2
|
-
import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, commonComponents, createCustomCategoryFlyout, customizeSpecialCharacterComponent, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, studentViewSettingsLabelComponent } from "./components";
|
2
|
+
import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, commonComponents, createCustomCategoryFlyout, customizeSpecialCharacterComponent, additionalSettingsAccessibilitySectionComponent, autoScoredStudentViewSettings, studentViewSettingsLabelComponent, equationEditorSectionCommonComponent } from "./components";
|
3
3
|
import { equationEditorFlyout } from "./components/equationEditorFlyout";
|
4
4
|
import { dialogBoxBase } from "../pages/dialogBoxBase";
|
5
5
|
import { essayResponseCommonComponents } from "./components/essayResponseCommonComponents";
|
@@ -17,6 +17,7 @@ const selectors = {
|
|
17
17
|
...commonComponents,
|
18
18
|
...customizeSpecialCharacterComponent,
|
19
19
|
...dialogBoxBase,
|
20
|
+
...equationEditorSectionCommonComponent,
|
20
21
|
//Basic section
|
21
22
|
displayWordLimitLabel: () => cy.get('#Display-word-limit-dropdown-label'),
|
22
23
|
displayWordLimitDropdown: () => cy.get('#Display-word-limit-select'),
|
@@ -46,21 +47,6 @@ const selectors = {
|
|
46
47
|
},
|
47
48
|
specialCharactersPopupCategoryTitle: () => cy.get('.char-accordion-label'),
|
48
49
|
specialCharactersPopupCategoryAccordionIcon: () => cy.get('.special-math-content [class*="expandIconWrapper"]'),
|
49
|
-
|
50
|
-
//Equation Editor section
|
51
|
-
equationEditorSectionWrapper: () => cy.get('.essay-response-eqn-editor-wrapper'),
|
52
|
-
equationEditorSectionCategories: () => cy.get('[class*="DraggableItemsGrid"] .icon-button-custom-format'),
|
53
|
-
equationEditorSectionCategoryLabel: () => cy.get('.equation-editor-label-wrapper'),
|
54
|
-
equationEditorSection: () => cy.get('[class*="EquationEditorOptionsWrapper"]'),
|
55
|
-
equationEditorSectionTitle: () => cy.get('[class*="EssayResponseComponentstyles__SectionTitle"]'),
|
56
|
-
equationEditorSectionHelperText: () => cy.get('.equation-editor-description-text'),
|
57
|
-
equationEditorSectionCategoriesDragIcon: () => cy.get('.drag-icon-equation-editor-button'),
|
58
|
-
equationEditorSectionCategoriesEditIcon: () => cy.get('.edit-icon-button button'),
|
59
|
-
equationEditorSectionTickIcon: () => cy.get('.tick-icon-wrapper'),
|
60
|
-
selectACategoryErrorMessage: () => cy.get('[class*="ErrorBlock"]'),
|
61
|
-
equationEditorSectionCategoryIcon: () => cy.get('.equation-editor-icon'),
|
62
|
-
equationEditorSectionDeleteCustomCategoryIcon: () => cy.get('.delete-button-icon button'),
|
63
|
-
|
64
50
|
//Controls section
|
65
51
|
controlsOptionsTiles: (formattingOption = null) => {
|
66
52
|
if (formattingOption) {
|
@@ -153,6 +139,7 @@ const steps = {
|
|
153
139
|
...essayResponseCommonComponents.steps,
|
154
140
|
...customizeSpecialCharacterComponent.steps,
|
155
141
|
...dialogBoxBase.steps,
|
142
|
+
...equationEditorSectionCommonComponent.steps,
|
156
143
|
|
157
144
|
clickOnSpecialCharactersPopupCloseButton: () => {
|
158
145
|
essayResponsePage.specialCharactersPopupCloseButton()
|
@@ -281,16 +268,6 @@ const steps = {
|
|
281
268
|
});
|
282
269
|
},
|
283
270
|
|
284
|
-
/**
|
285
|
-
* @description deselect category in equation editor section in edit tab
|
286
|
-
* @param {string} categoryName Name of category
|
287
|
-
*/
|
288
|
-
deselectCategoryInEquationEditorSectionEditTab: (categoryName) => {
|
289
|
-
essayResponsePage.equationEditorSectionCategories()
|
290
|
-
.contains(`${categoryName}`)
|
291
|
-
.click();
|
292
|
-
},
|
293
|
-
|
294
271
|
/**
|
295
272
|
* @description delete category in equation editor section in edit tab
|
296
273
|
* @param {string} categoryName Name of category
|
@@ -805,92 +782,6 @@ const steps = {
|
|
805
782
|
});
|
806
783
|
},
|
807
784
|
|
808
|
-
verifyDefaultCategoriesDisplayedInEquationEditorSectionEditTab: () => {
|
809
|
-
essayResponsePage.equationEditorSectionCategories()
|
810
|
-
.each(($el, index) => {
|
811
|
-
cy.wrap($el)
|
812
|
-
.invoke('text')
|
813
|
-
.then((textContent) => {
|
814
|
-
const expectedValue = allCategories[index].displayName;
|
815
|
-
expect(textContent.toLowerCase()).to.equal(expectedValue.toLowerCase())
|
816
|
-
});
|
817
|
-
cy.wrap($el)
|
818
|
-
.parents('[id*="DraggableItem"]')
|
819
|
-
.within(() => {
|
820
|
-
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionCategoriesDragIcon(), 'visible');
|
821
|
-
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionCategoriesEditIcon(), 'visible');
|
822
|
-
});
|
823
|
-
});
|
824
|
-
},
|
825
|
-
|
826
|
-
/**
|
827
|
-
* @description Verify tooltips of categories in equation editor section edit tab
|
828
|
-
* @param {string[]} categoryNamesArray Array of names of categories
|
829
|
-
*/
|
830
|
-
verifyTooltipsOfCategoryTilesInEquationEditorSectionEditTab: (categoryNamesArray) => {
|
831
|
-
categoryNamesArray.forEach((categoryTooltipName) => {
|
832
|
-
essayResponsePage.equationEditorSectionCategories()
|
833
|
-
.contains(categoryTooltipName, { matchCase: false })
|
834
|
-
.trigger('mouseover')
|
835
|
-
commonComponents.tooltipText()
|
836
|
-
.and('be.visible')
|
837
|
-
.should('have.text', categoryTooltipName)
|
838
|
-
essayResponsePage.equationEditorSectionCategories()
|
839
|
-
.contains(categoryTooltipName, { matchCase: false })
|
840
|
-
.trigger('mouseout')
|
841
|
-
commonComponents.tooltipText()
|
842
|
-
.should('not.exist');
|
843
|
-
});
|
844
|
-
},
|
845
|
-
|
846
|
-
/**
|
847
|
-
* @description Verify selected category in equation editor section edit tab
|
848
|
-
* @param {string[]} categoryName Name of categories
|
849
|
-
*/
|
850
|
-
verifySelectedCategoryInEquationEditorSectionEditTab: (categoryName) => {
|
851
|
-
essayResponsePage.equationEditorSectionCategories()
|
852
|
-
.contains(categoryName, { matchCase: false })
|
853
|
-
.parents('.icon-button-custom-format')
|
854
|
-
.should('have.class', 'Mui-selected')
|
855
|
-
.within(() => {
|
856
|
-
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionTickIcon(), 'visible');
|
857
|
-
});
|
858
|
-
},
|
859
|
-
|
860
|
-
/**
|
861
|
-
* @description Verify deselected category in equation editor section edit tab
|
862
|
-
* @param {string[]} categoryName Name of category
|
863
|
-
*/
|
864
|
-
verifyDeselectedCategoryInEquationEditorSectionEditTab: (categoryName) => {
|
865
|
-
essayResponsePage.equationEditorSectionCategories()
|
866
|
-
.contains(categoryName, { matchCase: false })
|
867
|
-
.parents('.icon-button-custom-format')
|
868
|
-
.should('not.have.class', 'Mui-selected')
|
869
|
-
.within(() => {
|
870
|
-
utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionTickIcon(), 'hidden');
|
871
|
-
});
|
872
|
-
},
|
873
|
-
|
874
|
-
deselectACategoryInEquationEditorSectionEditTab: (categoryName) => {
|
875
|
-
essayResponsePage.equationEditorSectionCategories()
|
876
|
-
.contains(categoryName, { matchCase: false })
|
877
|
-
.click();
|
878
|
-
essayResponsePage.equationEditorSectionCategories()
|
879
|
-
.contains(categoryName, { matchCase: false })
|
880
|
-
.parents('.icon-button-custom-format')
|
881
|
-
.should('not.have.class', 'Mui-selected');
|
882
|
-
},
|
883
|
-
|
884
|
-
selectACategoryInEquationEditorSectionEditTab: (categoryName) => {
|
885
|
-
essayResponsePage.equationEditorSectionCategories()
|
886
|
-
.contains(categoryName, { matchCase: false })
|
887
|
-
.click();
|
888
|
-
essayResponsePage.equationEditorSectionCategories()
|
889
|
-
.contains(categoryName, { matchCase: false })
|
890
|
-
.parents('.icon-button-custom-format')
|
891
|
-
.should('have.class', 'Mui-selected');
|
892
|
-
},
|
893
|
-
|
894
785
|
selectControlsOption: (formattingOptionArray) => {
|
895
786
|
formattingOptionArray.forEach((formattingOption) => {
|
896
787
|
essayResponsePage.controlsOptionsTiles(formattingOption)
|
@@ -900,14 +791,6 @@ const steps = {
|
|
900
791
|
});
|
901
792
|
},
|
902
793
|
|
903
|
-
selectingCategories: (categoriesArray) => {
|
904
|
-
categoriesArray.forEach((categoryName) => {
|
905
|
-
essayResponsePage.equationEditorSectionCategories()
|
906
|
-
.contains(categoryName, { matchCase: false })
|
907
|
-
.click();
|
908
|
-
});
|
909
|
-
},
|
910
|
-
|
911
794
|
/**
|
912
795
|
* @description this function verifies value in input field of hyperlink dialog box URL input value
|
913
796
|
* @param {string} inputValue value in the input field
|
@@ -1195,7 +1078,7 @@ const tests = {
|
|
1195
1078
|
...additionalSettingsAccessibilitySectionComponent.tests,
|
1196
1079
|
...studentViewSettingsLabelComponent.tests,
|
1197
1080
|
...autoScoredStudentViewSettings.tests,
|
1198
|
-
|
1081
|
+
...equationEditorSectionCommonComponent.tests,
|
1199
1082
|
/**
|
1200
1083
|
* insert equation and verify input field content and word count
|
1201
1084
|
* @param {string} expectedOutput equation text
|
@@ -93,6 +93,8 @@ const selectors = {
|
|
93
93
|
}
|
94
94
|
},
|
95
95
|
graphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg'),
|
96
|
+
graphParabolaSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg [pointer-events="visiblePainted"][tabindex="0"][fill-rule="evenodd"]'),
|
97
|
+
graphCircleSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg ellipse[fill-opacity="0"]'),
|
96
98
|
xAxisGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(0),
|
97
99
|
yAxisGraphSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .ngie-jxgbox svg line[stroke-linecap="butt"]').eq(1),
|
98
100
|
graphTitleSpecifyCorrectAnswerSection: () => cy.get('.MuiAccordion-region .graph-footer .question-text-wrapper').eq(0),
|
@@ -126,7 +128,6 @@ const selectors = {
|
|
126
128
|
}
|
127
129
|
},
|
128
130
|
graphSineAndParabolaPreviewTab: () => cy.get('[class*="GraphingQuestion"] .ngie-jxgbox svg').eq(0).find('[pointer-events="visiblePainted"][tabindex="0"][fill-rule="evenodd"]'),
|
129
|
-
repeatedPointsSwitch: () => cy.get('.repeated-points-wrapper .MuiSwitch-input'),
|
130
131
|
graphLabelInputField: () => cy.get('.label-tool:visible'),
|
131
132
|
|
132
133
|
//Background
|
@@ -238,6 +239,10 @@ const selectors = {
|
|
238
239
|
correctIncorrectStatusMessageText: () => cy.get('[class*="Graphingstyles__CorrectIncorrectWrapper"]'),
|
239
240
|
incorrectIcon: () => cy.get('[data-icon="Incorrect"]'),
|
240
241
|
correctIcon: () => cy.get('[data-icon="CorrectAnswer"]'),
|
242
|
+
|
243
|
+
//Accept repeated points
|
244
|
+
acceptRepeatedPointsToggle: () => cy.get('.repeated-points-wrapper input'),
|
245
|
+
acceptRepeatedPointsLabel: () => cy.get('.repeated-points-wrapper .MuiFormControlLabel-label'),
|
241
246
|
}
|
242
247
|
|
243
248
|
const steps = {
|
@@ -1721,6 +1726,23 @@ const steps = {
|
|
1721
1726
|
graphingPage.steps.plotPointsOnGraphSpecifyCorrectAnswerSection([{ x: -4, xRange: 20, y: 0, yRange: 20 }, { x: 0, xRange: 20, y: 4, yRange: 20 }]);
|
1722
1727
|
graphingPage.saveQuestionButton()
|
1723
1728
|
.click();
|
1729
|
+
},
|
1730
|
+
|
1731
|
+
checkAcceptRepeatedPointsToggle: () => {
|
1732
|
+
graphingPage.acceptRepeatedPointsToggle()
|
1733
|
+
.click()
|
1734
|
+
.should('have.attr', 'aria-pressed', 'true');
|
1735
|
+
},
|
1736
|
+
|
1737
|
+
uncheckAcceptRepeatedPointsToggle: () => {
|
1738
|
+
graphingPage.acceptRepeatedPointsToggle()
|
1739
|
+
.click()
|
1740
|
+
.should('have.attr', 'aria-pressed', 'false');
|
1741
|
+
},
|
1742
|
+
|
1743
|
+
verifyAcceptRepeatedPointsToggleChecked: () => {
|
1744
|
+
graphingPage.acceptRepeatedPointsToggle()
|
1745
|
+
.should('have.attr', 'aria-pressed', 'true');
|
1724
1746
|
}
|
1725
1747
|
}
|
1726
1748
|
|
@@ -1744,7 +1766,7 @@ const tests = {
|
|
1744
1766
|
utilities.verifyElementVisibilityState(graphingPage.graphSpecifyCorrectAnswerSection(), 'visible');
|
1745
1767
|
utilities.verifyElementVisibilityState(graphingPage.graphToolOptionSpecifyCorrectAnswer(), 'visible');
|
1746
1768
|
utilities.verifyElementVisibilityState(graphingPage.graphControlOptionSpecifyCorrectAnswer(), 'visible');
|
1747
|
-
utilities.verifyElementVisibilityState(graphingPage.
|
1769
|
+
utilities.verifyElementVisibilityState(graphingPage.acceptRepeatedPointsToggle(), 'exist');
|
1748
1770
|
});
|
1749
1771
|
},
|
1750
1772
|
|
@@ -4,6 +4,8 @@ import { autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnsw
|
|
4
4
|
import { ckEditorAudioPlayerComponent } from "../pages/components/ckEditorAudioPlayerComponent"
|
5
5
|
import { ckEditorEquationEditorComponent } from "../pages/components/ckEditorEquationEditorComponent"
|
6
6
|
import { ckEditorInsertTableComponent } from "../pages/components/ckEditorInsertTableComponent"
|
7
|
+
import { ckEditorInsertImageComponent } from "./components/ckEditorInsertImageComponent";
|
8
|
+
import { ckEditorLinkComponent } from "../pages/components/ckEditorLinkComponent"
|
7
9
|
const css = Cypress.env('css');
|
8
10
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
9
11
|
|
@@ -26,6 +28,8 @@ const selectors = {
|
|
26
28
|
...ckEditorAudioPlayerComponent,
|
27
29
|
...ckEditorEquationEditorComponent,
|
28
30
|
...ckEditorInsertTableComponent,
|
31
|
+
...ckEditorInsertImageComponent,
|
32
|
+
...ckEditorLinkComponent,
|
29
33
|
//Specify correct answer section
|
30
34
|
optionWrapperSpecifyCorrectAnswerSection: () => cy.get('.mcq-option-wrapper'),
|
31
35
|
optionsText: () => cy.get('.mcq-label'),
|
@@ -92,6 +96,8 @@ const steps = {
|
|
92
96
|
...ckEditorAudioPlayerComponent.steps,
|
93
97
|
...ckEditorEquationEditorComponent.steps,
|
94
98
|
...ckEditorInsertTableComponent.steps,
|
99
|
+
...ckEditorInsertImageComponent.steps,
|
100
|
+
...ckEditorLinkComponent.steps,
|
95
101
|
/**
|
96
102
|
* Verifies the contents of an option wrapper in the 'Specify correct answer' section for multiple selection questions.
|
97
103
|
* @param {number} optionIndex - The index of the option wrapper to be verified.
|
@@ -855,6 +861,8 @@ const tests = {
|
|
855
861
|
...ckEditorAudioPlayerComponent.tests,
|
856
862
|
...ckEditorEquationEditorComponent.tests,
|
857
863
|
...ckEditorInsertTableComponent.tests,
|
864
|
+
...ckEditorInsertImageComponent.tests,
|
865
|
+
...ckEditorLinkComponent.tests,
|
858
866
|
/**
|
859
867
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
860
868
|
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { decimalSeparator, evaluationMethods } from "../fixtures/evaluationMethodsAndCustomSettings"
|
2
2
|
import utilities from "../support/helpers/utilities"
|
3
|
-
import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar, colorPopupComponent } from "./components"
|
3
|
+
import { questionInstructionsComponent, questionInputFieldComponent, createQuestionBasePage, commonComponents, additionalSettingsPanel, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, autoScoredScoringPreviewTab, equationEditorFlyout, autoScoredStudentViewSettings, correctIncorrectAnswerLabelComponent, ckEditorToolbar, colorPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, additionalSettingsAccessibilitySectionComponent, equationEditorSectionCommonComponent } from "./components"
|
4
|
+
import { customSettingsSeparatorComponent } from "./components/customSettingsSeparatorsComponent";
|
5
|
+
|
4
6
|
const css = Cypress.env('css');
|
5
7
|
|
6
8
|
const selectors = {
|
@@ -11,7 +13,11 @@ const selectors = {
|
|
11
13
|
...autoScoredSpecifyCorrectAnswerSection,
|
12
14
|
...commonComponents,
|
13
15
|
...autoScoredScoringPreviewTab,
|
14
|
-
|
16
|
+
...customSettingsSeparatorComponent,
|
17
|
+
...additionalSettingsPanel,
|
18
|
+
...gradingViewEnumerationComponent,
|
19
|
+
...ariaLabelSectionComponent,
|
20
|
+
...equationEditorSectionCommonComponent,
|
15
21
|
addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
|
16
22
|
responseToken: () => cy.get('.cke_button__addresponse'),
|
17
23
|
penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label="Penalty points for each incorrect text container"]'),
|
@@ -98,7 +104,9 @@ const selectors = {
|
|
98
104
|
return cy.get('[class*="EquationEditorCategoriesSelectionstyles"] .icon-button-custom-format')
|
99
105
|
}
|
100
106
|
},
|
101
|
-
|
107
|
+
visibilityTypeLabel: () => cy.get('.additional-settings-container .options-label'),
|
108
|
+
inlineToggleButton: () => cy.get('[data-ngie-testid="inline-toggle-button"]'),
|
109
|
+
modalToggleButton: () => cy.get('[data-ngie-testid="modal-toggle-button"]'),
|
102
110
|
//Preview tab
|
103
111
|
responseFieldPreviewTab: () => cy.get('.preview-question-text-wrapper .equation-input-without-andornment .mq-root-block'),
|
104
112
|
responseFieldWrapperPreviewTab: () => cy.get('.cloze-response-wrapper'),
|
@@ -110,13 +118,26 @@ const selectors = {
|
|
110
118
|
correctAnswersLabel: () => cy.get('.cloze-with-text-correct-answer-label'),
|
111
119
|
correctIncorrectStatusMessageText: () => cy.get('[class*="AnswerLabelText"]'),
|
112
120
|
correctAnswersContainer: () => cy.get('[class*="__AnswerLabelWrapper"]'),
|
113
|
-
|
121
|
+
responseAreaNewNumeration: () => cy.get('.cloze-math-input-adornment'),
|
122
|
+
correctAnswerSectionWithoutEnumerationWrapper: () => cy.get('.cloze-math-question-preview-wrapper'),
|
123
|
+
answerInputFieldPreviewTab: () => cy.get('.equation-input-component'),
|
124
|
+
ariaLabelInputField: () => cy.get('[aria-label*="Enter ARIA label"]'),
|
125
|
+
inputFieldNumeration: () => cy.get('[class*="ClozeMathstyle__Numeration"]'),
|
126
|
+
ariaLabelSectionLabel: () => cy.get('[class*="ClozeMathstyle__AriaLabelText"]'),
|
127
|
+
textToNotBeRenderAsLaTexLabel: () => cy.get('[class*="TextNotRenderedAsLaTexstyles__Label"]'),
|
128
|
+
helperTextLabel: () => cy.get('[class*="TextNotRenderedAsLaTexstyles__HelperText"]'),
|
129
|
+
latexInputField: () => cy.get('[class*="TextNotRenderedAsLaTexstyles__TextWrapper"] input'),
|
130
|
+
latexInputFieldText: () => cy.get('[class*="TextNotRenderedAsLaTexstyles__TextWrapper"] [role*="button"]'),
|
114
131
|
//Formula Template
|
115
132
|
layoutAccordion: () => cy.get('.custom-settings-option-wrapper .ngie-accordion-summary:visible').eq(0),
|
116
133
|
inputFieldLayoutAccordion: () => cy.get('.equation-input-component[aria-label*="Math template"]:visible'),
|
117
134
|
addResponseContainerButton: () => cy.get('[type="button"][class*="ResponseContainerButton"]'),
|
118
135
|
responseFieldFormulaTemplatePreviewTab: () => cy.get('.add_response_element .mq-root-block'),
|
119
136
|
|
137
|
+
//Equation Editor section
|
138
|
+
dragHandleIcon: () => cy.get('[class*="MathPopupstyles__DragHandleIconWrapper"]'),
|
139
|
+
cancelButton: () => cy.get('.cancel-btn'),
|
140
|
+
equationEditorInputField: () => cy.get('[class*="EquationEditorstyles__PreviewWrappe"]'),
|
120
141
|
}
|
121
142
|
|
122
143
|
const steps = {
|
@@ -133,7 +154,10 @@ const steps = {
|
|
133
154
|
...correctIncorrectAnswerLabelComponent.steps,
|
134
155
|
...ckEditorToolbar.steps,
|
135
156
|
...colorPopupComponent.steps,
|
136
|
-
|
157
|
+
...customSettingsSeparatorComponent.steps,
|
158
|
+
...gradingViewEnumerationComponent.steps,
|
159
|
+
...ariaLabelSectionComponent.steps,
|
160
|
+
...equationEditorSectionCommonComponent.steps,
|
137
161
|
verifyAddStructureTabIsSelected: () => {
|
138
162
|
textEntryMathPage.addStructureTab()
|
139
163
|
.should('have.attr', 'aria-selected', 'true');
|
@@ -530,18 +554,6 @@ const steps = {
|
|
530
554
|
});
|
531
555
|
},
|
532
556
|
|
533
|
-
/**
|
534
|
-
* select decimal separator menu option
|
535
|
-
* @param {number} optionIndex index of decimal separator menu option
|
536
|
-
*/
|
537
|
-
selectDecimalSeparatorOption: (optionIndex) => {
|
538
|
-
textEntryMathPage.decimalSeparatorWrapper()
|
539
|
-
.within(() => {
|
540
|
-
utilities.getNthElement(textEntryMathPage.separatorsOptionsMenuOptions(), optionIndex)
|
541
|
-
.click();
|
542
|
-
});
|
543
|
-
},
|
544
|
-
|
545
557
|
/**
|
546
558
|
* Verify contents on thousands separators
|
547
559
|
* @param {string[]} thousandsSeparatorsOptionArray Array of options in thousands separator
|
@@ -915,6 +927,97 @@ const steps = {
|
|
915
927
|
.click();
|
916
928
|
},
|
917
929
|
|
930
|
+
verifyResponseAreaNumerationNotExists: () => {
|
931
|
+
utilities.verifyElementVisibilityState(textEntryMathPage.responseAreaNewNumeration(), 'notExist');
|
932
|
+
},
|
933
|
+
|
934
|
+
/**
|
935
|
+
* This function verifies the input field enumeration
|
936
|
+
* @param {Array<string>} enumerationArray - The array of expected enumerations.
|
937
|
+
*/
|
938
|
+
verifyAnswerInputFieldEnumeration: (enumerationArray) => {
|
939
|
+
enumerationArray.forEach((option, index) => {
|
940
|
+
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.responseAreaNewNumeration(), index), `${option}`);
|
941
|
+
});
|
942
|
+
},
|
943
|
+
|
944
|
+
/**
|
945
|
+
* Verifies the enumeration of correct answer responses against the provided array.
|
946
|
+
* @param {Array<string>} enumerationArray - The array of expected correct answer enumerations.
|
947
|
+
* @example - verifyCorrectAnswerResponsesEnumeration(['A', 'B', 'C']);
|
948
|
+
*/
|
949
|
+
verifyCorrectAnswerResponsesEnumeration: (enumerationArray) => {
|
950
|
+
utilities.verifyElementCount(textEntryMathPage.correctAnswersContainerResponse(), enumerationArray.length);
|
951
|
+
enumerationArray.forEach((option, index) => {
|
952
|
+
utilities.verifyTextContent(utilities.getNthElement(textEntryMathPage.correctAnswersContainerResponseNumeration(), index), `${option}`);
|
953
|
+
});
|
954
|
+
},
|
955
|
+
|
956
|
+
/**
|
957
|
+
* Verifies the aria label of input field specify correct answer section.
|
958
|
+
* @param {number} inputFieldIndex - The index of input filed.
|
959
|
+
* @param {string} ariaLabel - The area label of input field.
|
960
|
+
*/
|
961
|
+
verifyAnswerInputFieldAriaLabelSpecifyCorrectAnswerSection: (inputFieldIndex, ariaLabel) => {
|
962
|
+
textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(inputFieldIndex);
|
963
|
+
textEntryMathPage.responseAccordionAnswerInputField()
|
964
|
+
.eq(inputFieldIndex)
|
965
|
+
.should('have.attr', 'aria-label', ariaLabel)
|
966
|
+
},
|
967
|
+
|
968
|
+
/**
|
969
|
+
* Verifies the aria label of input field in preview tab section.
|
970
|
+
* @param {number} inputFieldIndex - The index of input filed.
|
971
|
+
* @param {string} ariaLabel - The area label of input field.
|
972
|
+
*/
|
973
|
+
verifyAnswerInputFieldAriaLabelPreviewTab: (inputFieldIndex, ariaLabel) => {
|
974
|
+
textEntryMathPage.answerInputFieldPreviewTab()
|
975
|
+
.eq(inputFieldIndex)
|
976
|
+
.should('have.attr', 'aria-label', ariaLabel)
|
977
|
+
},
|
978
|
+
|
979
|
+
/**
|
980
|
+
* Enters text in the ARIA label input field.
|
981
|
+
* @param {number} inputFieldIndex - The index of the input field to enter text into.
|
982
|
+
* @param {string} text - The text to enter into the input field.
|
983
|
+
*/
|
984
|
+
enterTextInAriaLabelInputField: (inputFieldIndex, text) => {
|
985
|
+
textEntryMathPage.ariaLabelInputField()
|
986
|
+
.eq(inputFieldIndex)
|
987
|
+
.type(text)
|
988
|
+
.should('have.text', text)
|
989
|
+
.blur();
|
990
|
+
},
|
991
|
+
|
992
|
+
/**
|
993
|
+
* Verifies the ARIA label text input fields.
|
994
|
+
* @param {number} inputFieldIndex - The index of the input field to verify.
|
995
|
+
*/
|
996
|
+
verifyAriaLabelTextInputFields: (inputFieldIndex) => {
|
997
|
+
utilities.verifyInnerText(utilities.getNthElement(ariaLabelSectionComponent.inputFieldNumeration(), inputFieldIndex), `${inputFieldIndex + 1}`)
|
998
|
+
utilities.verifyInputFieldValue(utilities.getNthElement(ariaLabelSectionComponent.ariaLabelInputField(), inputFieldIndex), '');
|
999
|
+
},
|
1000
|
+
|
1001
|
+
verifyByDefaultInlineToggleButtonIsSelected: () => {
|
1002
|
+
textEntryMathPage.inlineToggleButton()
|
1003
|
+
.should('have.class', 'ngie-toggle-button-selected')
|
1004
|
+
},
|
1005
|
+
|
1006
|
+
clickOnModalButton: () => {
|
1007
|
+
textEntryMathPage.modalToggleButton()
|
1008
|
+
.click();
|
1009
|
+
},
|
1010
|
+
|
1011
|
+
/**
|
1012
|
+
* insert value in latex input field.
|
1013
|
+
* @param {string} unit - input field value
|
1014
|
+
*/
|
1015
|
+
insertLatexInputFieldValue: (unit) => {
|
1016
|
+
textEntryMathPage.latexInputField()
|
1017
|
+
.click()
|
1018
|
+
.type(`${unit}, {enter}`)
|
1019
|
+
.blur();
|
1020
|
+
},
|
918
1021
|
/**
|
919
1022
|
* @description type in the equation editor input field preview tab
|
920
1023
|
* @param {string} text - text to be entered in the input field
|
@@ -935,7 +1038,11 @@ const tests = {
|
|
935
1038
|
...scoringSectionBaseEditTab.tests,
|
936
1039
|
...autoScoredScoringSectionMultiResponseType.tests,
|
937
1040
|
...autoScoredScoringPreviewTab.tests,
|
938
|
-
|
1041
|
+
...additionalSettingsPanel.tests,
|
1042
|
+
...gradingViewEnumerationComponent.tests,
|
1043
|
+
...ariaLabelSectionComponent.tests,
|
1044
|
+
...additionalSettingsAccessibilitySectionComponent.tests,
|
1045
|
+
...equationEditorSectionCommonComponent.tests,
|
939
1046
|
/**
|
940
1047
|
* Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
|
941
1048
|
* @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
|
package/package.json
CHANGED
@@ -75,7 +75,7 @@ function setCommandLineEnvArgs() {
|
|
75
75
|
* @method runSorryCypressLocal
|
76
76
|
*/
|
77
77
|
export function runSorryCypressLocal() {
|
78
|
-
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.
|
78
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
79
79
|
const user = OS.userInfo().username;
|
80
80
|
startTime = Math.round(Date.now() / 1000000);
|
81
81
|
ciBuildId = setCiBuildId(user, startTime);
|
@@ -89,7 +89,7 @@ export function runSorryCypressLocal() {
|
|
89
89
|
* @method runSorryCypressSpinnaker
|
90
90
|
*/
|
91
91
|
export function runSorryCypressSpinnaker() {
|
92
|
-
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.
|
92
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
93
93
|
startTime = process.env.START_TIME;
|
94
94
|
ciBuildId = setCiBuildId("spinnaker", startTime);
|
95
95
|
const envArgs = setCommandLineEnvArgs()
|
@@ -102,7 +102,7 @@ export function runSorryCypressSpinnaker() {
|
|
102
102
|
* @method runSorryCypressLocalSmoke
|
103
103
|
*/
|
104
104
|
export function runSorryCypressLocalSmoke() {
|
105
|
-
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.
|
105
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
106
106
|
const user = OS.userInfo().username;
|
107
107
|
startTime = Math.round(Date.now() / 1000000);
|
108
108
|
ciBuildId = setCiBuildId(user, startTime);
|
@@ -116,7 +116,7 @@ export function runSorryCypressLocalSmoke() {
|
|
116
116
|
* @method runSorryCypressSpinnakerSmoke
|
117
117
|
*/
|
118
118
|
export function runSorryCypressSpinnakerSmoke() {
|
119
|
-
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.
|
119
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
120
120
|
startTime = process.env.START_TIME;
|
121
121
|
ciBuildId = setCiBuildId("spinnaker", startTime);
|
122
122
|
const envArgs = setCommandLineEnvArgs()
|
@@ -135,7 +135,7 @@ export async function runSorryCypressSpinnakerMigration() {
|
|
135
135
|
process.env.referenceIds = referenceIds;
|
136
136
|
console.log(`Migration testing for: ${questionTypes}`);
|
137
137
|
console.log(`Item count: ${referenceIds}`);
|
138
|
-
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.
|
138
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
139
139
|
startTime = process.env.START_TIME;
|
140
140
|
ciBuildId = setCiBuildId("spinnaker", `migration${startTime}`);
|
141
141
|
const envArgs = setCommandLineEnvArgs()
|
@@ -154,7 +154,7 @@ export async function runSorryCypressLocalMigration() {
|
|
154
154
|
process.env.referenceIds = referenceIds;
|
155
155
|
console.log(`Migration testing for: ${questionTypes}`);
|
156
156
|
console.log(`Item count: ${referenceIds}`);
|
157
|
-
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.
|
157
|
+
process.env.CYPRESS_API_URL = "https://cypress-director.imaginelearning.engineering/";
|
158
158
|
startTime = process.env.START_TIME;
|
159
159
|
ciBuildId = setCiBuildId("spinnaker", `migration${startTime}`);
|
160
160
|
const envArgs = setCommandLineEnvArgs()
|