itemengine-cypress-automation 1.0.105 → 1.0.106
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
- package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
- package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
- package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +45 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
- package/cypress/fixtures/specialAndMathCharacters.js +2 -0
- package/cypress/fixtures/theme/ilc.json +4 -2
- package/cypress/pages/audioResponsePage.js +326 -165
- package/cypress/pages/components/additionalSettingsPanel.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
- package/cypress/pages/components/colorPopupComponent.js +115 -26
- package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
- package/cypress/pages/components/editCategoryFlyout.js +164 -2
- package/cypress/pages/components/equationEditorFlyout.js +36 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
- package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
- package/cypress/pages/correctAnswerViewPage.js +12 -1
- package/cypress/pages/drawingResponsePage.js +26 -151
- package/cypress/pages/essayResponseMathPage.js +28 -16
- package/cypress/pages/essayResponsePage.js +187 -7
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
- package/cypress/pages/multipleSelectionPage.js +1 -1
- package/cypress/pages/readingRulerPage.js +219 -104
- package/cypress/pages/singleSelectionPage.js +1 -0
- package/cypress/pages/textEntryMathPage.js +17 -6
- package/cypress/pages/videoResponsePage.js +0 -8
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +1 -1
@@ -1,8 +1,8 @@
|
|
1
1
|
import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols ";
|
2
|
-
import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, commonComponents, createCustomCategoryFlyout } from "./components";
|
2
|
+
import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, commonComponents, createCustomCategoryFlyout, customizeSpecialCharacterComponent } from "./components";
|
3
3
|
import { equationEditorFlyout } from "./components/equationEditorFlyout";
|
4
|
+
import { dialogBoxBase } from "../pages/dialogBoxBase";
|
4
5
|
import { essayResponseCommonComponents } from "./components/essayResponseCommonComponents";
|
5
|
-
import { specialOrMathCharacters } from "../fixtures/specialAndMathCharacters";
|
6
6
|
import utilities from "../support/helpers/utilities";
|
7
7
|
const css = Cypress.env('css');
|
8
8
|
|
@@ -17,6 +17,8 @@ const selectors = {
|
|
17
17
|
...questionInstructionsComponent,
|
18
18
|
...essayResponseCommonComponents,
|
19
19
|
...commonComponents,
|
20
|
+
...customizeSpecialCharacterComponent,
|
21
|
+
...dialogBoxBase,
|
20
22
|
//Basic section
|
21
23
|
displayWordLimitLabel: () => cy.get('#Display-word-limit-dropdown-label'),
|
22
24
|
displayWordLimitDropdown: () => cy.get('#Display-word-limit-select'),
|
@@ -37,6 +39,14 @@ const selectors = {
|
|
37
39
|
displayWordCountCheckbox: () => cy.get('[data-ngie-testid="display-word-count-checkbox"] input'),
|
38
40
|
wordCountWrapper: () => cy.get('[class*="indexstyle__WordCharCountWrapper"]'),
|
39
41
|
|
42
|
+
//Special characters
|
43
|
+
specialCharactersPopupTitle: () => cy.get('#alert-dialog-title'),
|
44
|
+
specialCharactersPopupCloseButton: () => cy.get('[class*="close-button"]'),
|
45
|
+
specialCharactersPopupCharactersCategoryWrapper: () => cy.get('.special-character-accordion'),
|
46
|
+
specialCharactersPopupCharacterSymbol: () => cy.get('.characters-button'),
|
47
|
+
specialCharactersPopupCategoryTitle: () => cy.get('.char-accordion-label'),
|
48
|
+
specialCharactersPopupCategoryAccordionIcon: () => cy.get('.special-math-content [class*="expandIconWrapper"]'),
|
49
|
+
|
40
50
|
///Old
|
41
51
|
//Customize Formatting Options
|
42
52
|
customizeFormattingOptionsAccordion: () => cy.get('.customize-formatting-option-wrapper .ngie-accordion-summary'),
|
@@ -114,8 +124,8 @@ const hyperlinkDialogBox = {
|
|
114
124
|
hyperlinkDialogboxURLLabel: () => essayResponsePage.hyperlinkDialogBox().find('.cke_dialog_ui_labeled_label').eq(1),
|
115
125
|
hyperlinkDialogboxDisplayTextInputField: () => essayResponsePage.hyperlinkDialogBox().find('input[class*="cke_dialog_ui_input_text"]').eq(0),
|
116
126
|
hyperlinkDialogboxURLInputField: () => essayResponsePage.hyperlinkDialogBox().find('input[class*="cke_dialog_ui_input_text"]').eq(1),
|
117
|
-
hyperlinkDialogboxButtonOk: () =>
|
118
|
-
hyperlinkDialogboxButtonCancel: () =>
|
127
|
+
hyperlinkDialogboxButtonOk: () => cy.get('.action-button-wrapper [role="button"]').eq(1),
|
128
|
+
hyperlinkDialogboxButtonCancel: () => cy.get('.action-button-wrapper [role="button"]').eq(0),
|
119
129
|
previewInputFieldHyperlinkText: () => cy.get('div[title="Enter your response to the question here."] a'),
|
120
130
|
}
|
121
131
|
|
@@ -133,6 +143,92 @@ const steps = {
|
|
133
143
|
...scoringSectionBaseEditTab.steps,
|
134
144
|
...additionalSettingsPanel.steps,
|
135
145
|
...essayResponseCommonComponents.steps,
|
146
|
+
...customizeSpecialCharacterComponent.steps,
|
147
|
+
...dialogBoxBase.steps,
|
148
|
+
|
149
|
+
clickOnSpecialCharactersPopupCloseButton: () => {
|
150
|
+
essayResponsePage.specialCharactersPopupCloseButton()
|
151
|
+
.click();
|
152
|
+
},
|
153
|
+
|
154
|
+
/**
|
155
|
+
* @description verify special characters popup category accordion is expanded
|
156
|
+
* @param {number} index index of category
|
157
|
+
*/
|
158
|
+
verifySpecialCharactersPopupCategoryAccordionIsExpanded: (index) => {
|
159
|
+
essayResponsePage.specialCharactersPopupCategoryTitle()
|
160
|
+
.eq(index)
|
161
|
+
.within(($el) => {
|
162
|
+
cy.wrap($el)
|
163
|
+
.parents('.ngie-accordion-summary')
|
164
|
+
.should('have.attr', 'aria-expanded', 'true');
|
165
|
+
});
|
166
|
+
utilities.verifyElementVisibilityState(essayResponsePage.specialCharactersPopupCharactersCategoryWrapper().eq(index), 'exist');
|
167
|
+
},
|
168
|
+
|
169
|
+
/**
|
170
|
+
* @description Verify symbols displayed in for a category in special characters popup
|
171
|
+
* @param {number} categoryIndex Index of the category
|
172
|
+
* @param {string[]} categorySymbolsArray Array of the symbols of the category
|
173
|
+
*/
|
174
|
+
verifySpecialCharactersPopupCategorySymbols: (categoryIndex, categorySymbolsArray) => {
|
175
|
+
essayResponsePage.specialCharactersPopupCharactersCategoryWrapper()
|
176
|
+
.eq(categoryIndex)
|
177
|
+
.within(() => {
|
178
|
+
categorySymbolsArray[index].forEach((symbolARIALabel, index) => {
|
179
|
+
essayResponsePage.specialCharactersPopupCharacterSymbol()
|
180
|
+
.eq(index)
|
181
|
+
.find('svg')
|
182
|
+
.should('have.attr', 'aria-label', `${symbolARIALabel}`);
|
183
|
+
});
|
184
|
+
});
|
185
|
+
},
|
186
|
+
|
187
|
+
/**
|
188
|
+
* @description Click on a symbol in characters popup
|
189
|
+
* @param {string} ariaLabel Aria-label of the symbol
|
190
|
+
*/
|
191
|
+
clickOnCharacterPopupSymbol: (ariaLabel) => {
|
192
|
+
essayResponsePage.specialCharactersPopupCharacterSymbol()
|
193
|
+
.find(`svg[aria-label="${ariaLabel}"]`)
|
194
|
+
.click();
|
195
|
+
},
|
196
|
+
|
197
|
+
/**
|
198
|
+
* @description Verify the displayed categories and their accordions in special characters popup
|
199
|
+
* @param {object[]} categoryListArray Array of special characters categories
|
200
|
+
*/
|
201
|
+
verifySpecialCharactersPopupCategoryTitlesAndAccordions: (categoryListArray) => {
|
202
|
+
categoryListArray.forEach((category, index) => {
|
203
|
+
utilities.verifyInnerText(essayResponsePage.specialCharactersPopupCategoryTitle().eq(index), `${category.categoryName}`);
|
204
|
+
utilities.verifyElementVisibilityState(essayResponsePage.specialCharactersPopupCategoryTitle().eq(index), 'exist');
|
205
|
+
utilities.verifyElementVisibilityState(essayResponsePage.specialCharactersPopupCategoryAccordionIcon().eq(index), 'exist');
|
206
|
+
});
|
207
|
+
},
|
208
|
+
|
209
|
+
/**
|
210
|
+
* @description click on special characters popup category accordion
|
211
|
+
* @param {number} index index of category
|
212
|
+
*/
|
213
|
+
clickOnSpecialCharactersCategoryAccordion: (index) => {
|
214
|
+
essayResponsePage.specialCharactersPopupCategoryAccordionIcon()
|
215
|
+
.eq(index)
|
216
|
+
.click();
|
217
|
+
},
|
218
|
+
|
219
|
+
/**
|
220
|
+
* @description verify special characters popup category accordion is collapsed
|
221
|
+
* @param {number} index index of category
|
222
|
+
*/
|
223
|
+
verifySpecialCharactersPopupCategoryAccordionIsCollapsed: (index) => {
|
224
|
+
essayResponsePage.specialCharactersPopupCategoryTitle()
|
225
|
+
.eq(index)
|
226
|
+
.within(($el) => {
|
227
|
+
cy.wrap($el)
|
228
|
+
.parents('.ngie-accordion-summary')
|
229
|
+
.should('have.attr', 'aria-expanded', 'false');
|
230
|
+
});
|
231
|
+
},
|
136
232
|
|
137
233
|
checkDisplayWordCountCheckbox: () => {
|
138
234
|
essayResponsePage.displayWordCountCheckbox()
|
@@ -378,7 +474,7 @@ const steps = {
|
|
378
474
|
* @param {number} numberOfStandardCells number of standard cells in the added table
|
379
475
|
* @param {number} numberOfHeaderCells number of header cells in the added table
|
380
476
|
*/
|
381
|
-
verifyTableProperties: (numberOfRows, numberOfStandardCells, numberOfHeaderCells=null) => {
|
477
|
+
verifyTableProperties: (numberOfRows, numberOfStandardCells, numberOfHeaderCells = null) => {
|
382
478
|
essayResponsePage.previewInputFieldTable()
|
383
479
|
.within(() => {
|
384
480
|
utilities.verifyElementCount(essayResponsePage.tableRow(), numberOfRows);
|
@@ -807,6 +903,15 @@ const steps = {
|
|
807
903
|
});
|
808
904
|
},
|
809
905
|
|
906
|
+
/**
|
907
|
+
* This function verifies the formatting option is in selected state
|
908
|
+
* @param {string} formattingOption name of the formatting option
|
909
|
+
*/
|
910
|
+
verifyCustomizeFormattingOptionIsSelected: (formattingOption) => {
|
911
|
+
essayResponsePage.customizeFormattingOptionsTiles(formattingOption)
|
912
|
+
.should('have.attr', 'data-aria-pressed', 'true');
|
913
|
+
},
|
914
|
+
|
810
915
|
selectCustomizedFormattingOption: (formattingOptionArray) => {
|
811
916
|
formattingOptionArray.forEach((formattingOption) => {
|
812
917
|
essayResponsePage.customizeFormattingOptionsTiles(formattingOption)
|
@@ -869,6 +974,81 @@ const steps = {
|
|
869
974
|
};
|
870
975
|
essayResponsePage.responseField()
|
871
976
|
.verifyInnerHTML(formattedText);
|
977
|
+
},
|
978
|
+
|
979
|
+
/**
|
980
|
+
* @description this function verifies value in input field of hyperlink dialog box URL input value
|
981
|
+
* @param {string} inputValue value in the input field
|
982
|
+
*/
|
983
|
+
verifyHyperlinkDialogBoxURLInputValue: (inputValue) => {
|
984
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
985
|
+
.and('have.value', inputValue);
|
986
|
+
},
|
987
|
+
|
988
|
+
clearHyperlinkDialogBoxURLInputField: () => {
|
989
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
990
|
+
.clear();
|
991
|
+
},
|
992
|
+
|
993
|
+
/**
|
994
|
+
* @description this function enters input in the field of hyperlink dialog box URL input field
|
995
|
+
* @param {string} text enter text in the input field
|
996
|
+
*/
|
997
|
+
enterTextInHyperlinkDialogBoxURLInputField: (text) => {
|
998
|
+
essayResponsePage.hyperlinkDialogboxURLInputField()
|
999
|
+
.type(text);
|
1000
|
+
},
|
1001
|
+
|
1002
|
+
/**
|
1003
|
+
* @description this function verifies value in input field of hyperlink dialog box display text
|
1004
|
+
* @param {string} inputValue value in the input field
|
1005
|
+
*/
|
1006
|
+
verifyHyperlinkDialogBoxDisplayTextInputValue: (inputValue) => {
|
1007
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
1008
|
+
.and('have.value', inputValue);
|
1009
|
+
},
|
1010
|
+
|
1011
|
+
clearHyperlinkDialogBoxDisplayTextInputField: () => {
|
1012
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
1013
|
+
.clear();
|
1014
|
+
},
|
1015
|
+
|
1016
|
+
/**
|
1017
|
+
* @description this function enters input in the field of hyperlink dialog box display text
|
1018
|
+
* @param {string} text enter text in the input field
|
1019
|
+
*/
|
1020
|
+
enterTextInHyperlinkDialogboxDisplayTextInputField: (text) => {
|
1021
|
+
essayResponsePage.hyperlinkDialogboxDisplayTextInputField()
|
1022
|
+
.type(text);
|
1023
|
+
},
|
1024
|
+
|
1025
|
+
clickOnHyperLinkDialogBoxCancelButton: () => {
|
1026
|
+
essayResponsePage.hyperlinkDialogboxButtonCancel()
|
1027
|
+
.click();
|
1028
|
+
},
|
1029
|
+
|
1030
|
+
clickOnHyperLinkDialogBoxOkButton: () => {
|
1031
|
+
essayResponsePage.hyperlinkDialogboxButtonOk()
|
1032
|
+
.click();
|
1033
|
+
},
|
1034
|
+
|
1035
|
+
/**
|
1036
|
+
* This function verifies the href attribute
|
1037
|
+
* @param {string} attr of the hyperlink input field
|
1038
|
+
*/
|
1039
|
+
verifyHyperlinkPreviewInputTextAttr: (attr) => {
|
1040
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
1041
|
+
.should('have.attr', 'href', attr);
|
1042
|
+
},
|
1043
|
+
|
1044
|
+
rightClickHyperlinkText: () => {
|
1045
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
1046
|
+
.rightclick();
|
1047
|
+
},
|
1048
|
+
|
1049
|
+
dblClickHyperlinkText: () => {
|
1050
|
+
essayResponsePage.previewInputFieldHyperlinkText()
|
1051
|
+
.dblclick();
|
872
1052
|
}
|
873
1053
|
}
|
874
1054
|
|
@@ -879,6 +1059,7 @@ const tests = {
|
|
879
1059
|
...scoringSectionBaseEditTab.tests,
|
880
1060
|
...autoScoredScoringPreviewTab.tests,
|
881
1061
|
...commonComponents.tests,
|
1062
|
+
...customizeSpecialCharacterComponent.tests,
|
882
1063
|
|
883
1064
|
/**
|
884
1065
|
* insert equation and verify input field content and word count
|
@@ -1067,8 +1248,7 @@ const tests = {
|
|
1067
1248
|
});
|
1068
1249
|
//The equation editor input Field equation is not checked.
|
1069
1250
|
});
|
1070
|
-
|
1071
|
-
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField(categoryName)
|
1251
|
+
equationEditorFlyout.tests.verifyCSSAnda11yOfEquationEditorInputField(categoryName);
|
1072
1252
|
if (categoryName === 'keypad') {
|
1073
1253
|
essayResponsePage.tests.insertEquationAndVerifyInputFieldContentsAndWordCount(`1234567890·,+−×÷`, wordCount);
|
1074
1254
|
} else {
|
@@ -54,7 +54,9 @@ const selectors = {
|
|
54
54
|
specifyPointsForEachIncorrectDropzoneRadioButton: () => cy.get('input[aria-label*="Specify points for each incorrect"]'),
|
55
55
|
textAreaImageCanvas: () => cy.get('.drag-and-drop-canvas textarea'),
|
56
56
|
textAreaPreviewTab: () => cy.get('.drag-and-drop-layout-wrapper textarea'),
|
57
|
-
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]')
|
57
|
+
penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
|
58
|
+
dropzonePointerInPreviewTab: () => cy.get('.preview-content-wrapper [class*="PointerWrapper"]'),
|
59
|
+
canvasInPreviewTab: () => cy.get('[class*="PreviewTabstyles__ContentWrapper"] [class*="Canvasstyle__DragAndDropCanvas"]'),
|
58
60
|
}
|
59
61
|
|
60
62
|
const steps = {
|
@@ -85,6 +87,7 @@ const steps = {
|
|
85
87
|
...opacityComponent.steps,
|
86
88
|
...imageActionsComponent.steps,
|
87
89
|
...colorPopupComponent.steps,
|
90
|
+
|
88
91
|
/**
|
89
92
|
* @description Verifies the text content of a specific preview tab dropzone element.
|
90
93
|
* @param {number} count - The index of the preview tab dropzone element to verify (zero-based).
|
@@ -499,18 +502,6 @@ const steps = {
|
|
499
502
|
});
|
500
503
|
},
|
501
504
|
|
502
|
-
/**
|
503
|
-
* @param {string} text text to be entered in the text area
|
504
|
-
* @description this function adds input to the text area
|
505
|
-
*/
|
506
|
-
enterTextInTextArea: (text) => {
|
507
|
-
fillInTheGapsOverImageDragAndDropPage.textAreaImageCanvas()
|
508
|
-
.type(text)
|
509
|
-
.blur();
|
510
|
-
fillInTheGapsOverImageDragAndDropPage.textAreaImageCanvas()
|
511
|
-
.should('have.text', text);
|
512
|
-
},
|
513
|
-
|
514
505
|
/**
|
515
506
|
* @param {string} text text to be verified in the preview tab text area
|
516
507
|
* @description this function verifies input in the text area
|
@@ -549,7 +540,77 @@ const steps = {
|
|
549
540
|
*/
|
550
541
|
verifyDropzoneCountInSpecifyCorrectAnswerSection: (count) => {
|
551
542
|
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperSpecifyCorrectAnswerSection(), count);
|
552
|
-
}
|
543
|
+
},
|
544
|
+
|
545
|
+
verifyDropzonePointerStyleInPreviewTab: (style, dropzoneIndex) => {
|
546
|
+
const getPosition = (option) => {
|
547
|
+
switch (option) {
|
548
|
+
case 'Bottom':
|
549
|
+
return { top: '-31.5px', left: '-37.5px' };
|
550
|
+
case 'Bottom right':
|
551
|
+
return { top: '-25px', left: '-40px' };
|
552
|
+
case 'Right':
|
553
|
+
return { top: '-21px', left: '-36.5px' };
|
554
|
+
case 'Top right':
|
555
|
+
return { top: '-19px', left: '-31px' };
|
556
|
+
case 'Top':
|
557
|
+
return { top: '-22.5px', left: '-25.5px' };
|
558
|
+
case 'Top left':
|
559
|
+
return { top: '-27px', left: '-24px' };
|
560
|
+
case 'Left':
|
561
|
+
return { bottom: '-20px', left: '-27px' };
|
562
|
+
case 'Bottom left':
|
563
|
+
return { bottom: '-18px', left: '-32px' };
|
564
|
+
}
|
565
|
+
}
|
566
|
+
const expectedPosition = getPosition(style);
|
567
|
+
if (style == 'Left' || style == 'Bottom left') {
|
568
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePointerInPreviewTab()
|
569
|
+
.eq(dropzoneIndex)
|
570
|
+
.should('have.css', 'bottom', expectedPosition.bottom)
|
571
|
+
.and('have.css', 'left', expectedPosition.left);
|
572
|
+
}
|
573
|
+
else if (style == 'None') {
|
574
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePointerInPreviewTab()
|
575
|
+
.eq(dropzoneIndex)
|
576
|
+
.should('not.have.css', 'bottom')
|
577
|
+
.and('not.have.css', 'left');
|
578
|
+
}
|
579
|
+
else {
|
580
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePointerInPreviewTab()
|
581
|
+
.eq(dropzoneIndex)
|
582
|
+
.should('have.css', 'top', expectedPosition.top)
|
583
|
+
.and('have.css', 'left', expectedPosition.left);
|
584
|
+
}
|
585
|
+
},
|
586
|
+
|
587
|
+
/**
|
588
|
+
* @param {*} width width of canvas
|
589
|
+
* @description this function verifies width of canvas
|
590
|
+
*/
|
591
|
+
verifyCanvasWidthInPreviewTab: (width) => {
|
592
|
+
fillInTheGapsOverImageDragAndDropPage.canvasInPreviewTab()
|
593
|
+
.should('have.attr', 'width', width);
|
594
|
+
},
|
595
|
+
|
596
|
+
/**
|
597
|
+
* @param {*} height height of canvas
|
598
|
+
* @description this function verifies height of canvas
|
599
|
+
*/
|
600
|
+
verifyCanvasHeightInPreviewTab: (height) => {
|
601
|
+
fillInTheGapsOverImageDragAndDropPage.canvasInPreviewTab()
|
602
|
+
.should('have.css', 'height', `${height}px`);
|
603
|
+
},
|
604
|
+
|
605
|
+
|
606
|
+
verifyDropzoneNotExistInPreviewTab: () => {
|
607
|
+
utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab(), 'notExist');
|
608
|
+
},
|
609
|
+
|
610
|
+
verifyDropzoneExistInPreviewTab: () => {
|
611
|
+
fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
|
612
|
+
.should('be.visible');
|
613
|
+
},
|
553
614
|
}
|
554
615
|
|
555
616
|
const tests = {
|
@@ -571,6 +632,9 @@ const tests = {
|
|
571
632
|
...additionalSettingsPanel.tests,
|
572
633
|
...colorPopupComponent.tests,
|
573
634
|
...opacityComponent.tests,
|
635
|
+
...backgroundImageUploadComponent.tests,
|
636
|
+
...figOverImageCanvasComponent.tests,
|
637
|
+
|
574
638
|
verifyContentsOfSpecifyCorrectAnswerSection: () => {
|
575
639
|
it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
|
576
640
|
utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), 3);
|