itemengine-cypress-automation 1.0.340 → 1.0.341

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.
Files changed (41) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +84 -0
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/checkAddAlternativeButton.js +33 -0
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -4
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/draggableOptions.js +2 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +33 -0
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/headerSection.js +37 -6
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/checkScoringLabelBannerAndCorrectAnswerSection.js +96 -0
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/checkAddAlternative.js +37 -0
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +4 -6
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabBasicSection.js +47 -0
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +37 -9
  12. package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +12 -0
  13. package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +10 -0
  14. package/cypress/e2e/ILC/TextSelection/ScoringParagraph/allOrNothingAlternatePointsMoreThanCorrectPoints.js +80 -0
  15. package/cypress/e2e/ILC/TextSelection/ScoringParagraph/allOrNothingCorrectPointsMoreThanAlternatePoints.js +30 -0
  16. package/cypress/e2e/ILC/TextSelection/ScoringParagraph/checkScoringLabelBannerAndCorrectAnswerSection.js +110 -0
  17. package/cypress/e2e/ILC/TextSelection/checkAddAlternativeButton.js +46 -0
  18. package/cypress/e2e/ILC/TextSelection/editTabBasicSection.js +57 -0
  19. package/cypress/e2e/ILC/TextSelection/headerSection.js +38 -6
  20. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +1 -2
  21. package/cypress/fixtures/constants.js +5 -1
  22. package/cypress/fixtures/theme/ilc.json +2 -0
  23. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +5 -27
  24. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -67
  25. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +0 -66
  26. package/cypress/pages/components/hideExpressionListComponent.js +53 -0
  27. package/cypress/pages/components/index.js +1 -0
  28. package/cypress/pages/components/optionsWrapperComponent.js +1 -1
  29. package/cypress/pages/desmos3DGraphingPage.js +368 -0
  30. package/cypress/pages/desmosGeometryPage.js +308 -0
  31. package/cypress/pages/dragAndDropIntoCategoriesPage.js +26 -6
  32. package/cypress/pages/fillInTheGapsDragAndDropPage.js +1 -68
  33. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
  34. package/cypress/pages/imageHighlightPage.js +0 -66
  35. package/cypress/pages/index.js +3 -2
  36. package/cypress/pages/multipleSelectionGridPage.js +1 -68
  37. package/cypress/pages/multipleSelectionPage.js +0 -67
  38. package/cypress/pages/singleSelectionGridPage.js +1 -68
  39. package/cypress/pages/singleSelectionPage.js +0 -67
  40. package/cypress/pages/textSelectionPage.js +25 -6
  41. package/package.json +1 -1
@@ -0,0 +1,308 @@
1
+ import utilities from "../support/helpers/utilities";
2
+ import { commonComponents, createQuestionBasePage, questionInstructionsComponent, additionalSettingsPanel, scoringSectionBaseEditTab, additionalSettingsAccessibilitySectionComponent, studentViewSettingsLabelComponent, hideExpressionListComponent } from "./components";
3
+ import { desmosToolComponent } from "./components/desmosToolComponent";
4
+ const css = Cypress.env('css');
5
+
6
+ const selectors = {
7
+ ...desmosToolComponent,
8
+ ...scoringSectionBaseEditTab,
9
+ ...commonComponents,
10
+ ...additionalSettingsPanel,
11
+ ...questionInstructionsComponent,
12
+ desmosGraphingTool: () => cy.get('[id*="desmos-graph-tool"]'),
13
+ desmosGraphingToolExpressionPanel: () => cy.get('[id*="desmos-graph-tool"] .dcg-exppanel-container.dcg-add-shadow'),
14
+ studentViewSettingsLabel: () => cy.get('[class*="StudentViewWrapper"]'),
15
+ hideExpressionListLabel: () => cy.get('[data-ngie-testid="hide-expression-list-checkbox"] .MuiFormControlLabel-label'),
16
+ hideExpressionListCheckbox: () => cy.get('[data-ngie-testid="hide-expression-list-checkbox"] input'),
17
+ showHideListButton: () => cy.get('.dcg-show-expressions-tab[role="button"]'),
18
+ desmosGraphingWidthLabel: () => cy.get('[class*="LabelInputWrapper"]').eq(0),
19
+ desmosGraphingWidthInputField: () => cy.get('[class*="DimensionInputWrapper"] input').eq(0),
20
+ desmosGraphingHeightLabel: () => cy.get('[class*="LabelInputWrapper"]').eq(1),
21
+ desmosGraphingHeightInputField: () => cy.get('[class*="DimensionInputWrapper"] input').eq(1),
22
+ desmosGraphingExpressionPreviewTab: () => cy.get('.edit-question-preview-wrapper .dcg-expressionlist .dcg-main .dcg-mathquill-wrapper'),
23
+ desmosGraphingOutput: () => cy.get('.dcg-evaluation-container .dcg-typeset-math .dcg-mq-mathspeak').eq(1),
24
+ buttonAspectRatio: () => cy.get('[class*="LockIconWrapper"] button'),
25
+ buttonResetDimensions: () => cy.get('[class*="ResetIconWrapper"] button'),
26
+ specifyPredefinedExpressionLabel: () => cy.get('.label-wrapper'),
27
+ addExpressionButton: () => cy.get('.dcg-add-expression-btn:visible'),
28
+ expressionListNewFolderOption: () => cy.get('.dcg-action-newfolder'),
29
+ folderInExpressionList: () => cy.get('.dcg-expressionfolder'),
30
+ accessibilityLabel: () => cy.get('[class*="Accessibilitystyles__AccessibilityLabelWrapper"]'),
31
+ flagNonAccessibleCheckbox: () => cy.get('[data-ngie-testid="response-option-checkbox"] input'),
32
+ flagNonAccessibleLabel: () => cy.get('[data-ngie-testid="response-option-checkbox"] .MuiFormControlLabel-label'),
33
+ insertResourceLinkLabel: () => cy.get('.label-wrapper'),
34
+ insertResourceLinkInputField: () => cy.get('.additional-option-placeholder-input .MuiOutlinedInput-input'),
35
+ httpsLabel: () => cy.get('.start-adornment'),
36
+ errorMessage: () => cy.get('.error-text-message'),
37
+ resourceLinkPreviewTitle: () => cy.get('[class*="DesmosGraphingstyles__ResourceLinkPreviewLabel"]'),
38
+ desmosComponent: () => cy.get('[class*="DesmosGraphingstyles__DesmosComponentWrapper"]'),
39
+ }
40
+
41
+ const steps = {
42
+ ...desmosToolComponent.steps,
43
+ ...createQuestionBasePage.steps,
44
+ ...scoringSectionBaseEditTab.steps,
45
+ ...additionalSettingsPanel.steps,
46
+ ...questionInstructionsComponent.steps,
47
+ ...commonComponents.steps,
48
+ verifyHideExpressionListCheckboxUnchecked: () => {
49
+ desmosGeometryPage.hideExpressionListCheckbox()
50
+ .should('not.be.checked');
51
+ },
52
+
53
+ checkHideExpressionListCheckbox: () => {
54
+ desmosGeometryPage.hideExpressionListCheckbox()
55
+ .click()
56
+ .should('be.checked');
57
+ },
58
+
59
+ uncheckHideExpressionListCheckbox: () => {
60
+ desmosGeometryPage.hideExpressionListCheckbox()
61
+ .click()
62
+ .should('not.be.checked');
63
+ },
64
+
65
+ verifyExpressionListPanelVisible: () => {
66
+ utilities.verifyElementVisibilityState(desmosGeometryPage.desmosGraphingToolExpressionPanel(), 'visible');
67
+ },
68
+
69
+ verifyPreviewTabExpressionListPanelVisible: () => {
70
+ commonComponents.previewTabQuestionWrapper()
71
+ .within(() => {
72
+ utilities.verifyElementVisibilityState(desmosGeometryPage.desmosGraphingToolExpressionPanel(), 'visible');
73
+ });
74
+ },
75
+
76
+ verifyPreviewTabExpressionListPanelHidden: () => {
77
+ commonComponents.previewTabQuestionWrapper()
78
+ .within(() => {
79
+ desmosGeometryPage.desmosGraphingToolExpressionPanel()
80
+ .should('not.exist');
81
+ });
82
+ },
83
+
84
+ showHideList: () => {
85
+ desmosGeometryPage.showHideListButton()
86
+ .click();
87
+ },
88
+
89
+ verifyDesmosGraphingWidthInputField: (width) => {
90
+ desmosGeometryPage.desmosGraphingWidthInputField()
91
+ .should('have.value', width);
92
+ },
93
+
94
+ verifyDesmosGraphingHeightInputField: (height) => {
95
+ desmosGeometryPage.desmosGraphingHeightInputField()
96
+ .should('have.value', height);
97
+ },
98
+
99
+ /**
100
+ * @param {number} width value to enter in width input field
101
+ * @description this function enters value in width input field
102
+ */
103
+ enterInputInDesmosGraphingWidthInputField: (width) => {
104
+ desmosGeometryPage.desmosGraphingWidthInputField()
105
+ .clear()
106
+ .type(width)
107
+ .should('have.value', width);
108
+ },
109
+
110
+ /**
111
+ * @param {number} height value to enter in height input field
112
+ * @description this function enters value in height input field
113
+ */
114
+ enterInputInDesmosGraphingHeightInputField: (height) => {
115
+ desmosGeometryPage.desmosGraphingHeightInputField()
116
+ .clear()
117
+ .type(height)
118
+ .should('have.value', height);
119
+ },
120
+
121
+ /**
122
+ * @description this function locks aspect ratio
123
+ */
124
+ lockAspectRatio: () => {
125
+ desmosGeometryPage.buttonAspectRatio()
126
+ .click();
127
+ steps.verifyButtonAspectRatioLocked();
128
+ },
129
+
130
+ /**
131
+ * @description this function unlocks aspect ratio
132
+ */
133
+ unlockAspectRatio: () => {
134
+ desmosGeometryPage.buttonAspectRatio()
135
+ .click();
136
+ steps.verifyButtonAspectRatioUnlocked();
137
+ },
138
+
139
+ /**
140
+ * @description this function verifies aspect ratio is locked
141
+ */
142
+ verifyButtonAspectRatioLocked: () => {
143
+ desmosGeometryPage.buttonAspectRatio()
144
+ .should('have.attr', 'aria-label', 'Locked aspect ratio')
145
+ },
146
+
147
+ /**
148
+ * @description this function verifies aspect ratio is unlocked
149
+ */
150
+ verifyButtonAspectRatioUnlocked: () => {
151
+ desmosGeometryPage.buttonAspectRatio()
152
+ .should('have.attr', 'aria-label', 'Unlocked aspect ratio')
153
+ },
154
+
155
+ /**
156
+ * @description this function verifies the reset dimensions button is disabled
157
+ */
158
+ verifyButtonResetDimensionsDisabled: () => {
159
+ desmosGeometryPage.buttonResetDimensions()
160
+ .should('be.disabled');
161
+ },
162
+
163
+ /**
164
+ * @description this function verifies the reset dimensions button is enabled
165
+ */
166
+ verifyButtonResetDimensionsEnabled: () => {
167
+ desmosGeometryPage.buttonResetDimensions()
168
+ .should('be.enabled');
169
+ },
170
+
171
+ /**
172
+ * @description this function resets dimensions
173
+ */
174
+ resetDimensions: () => {
175
+ desmosGeometryPage.buttonResetDimensions()
176
+ .click();
177
+ },
178
+
179
+ verifyDesmosGraphingDimensions: (width, height) => {
180
+ desmosGeometryPage.desmosGraphingTool()
181
+ .should('have.css', 'width', width)
182
+ .and('have.css', 'height', height);
183
+ },
184
+
185
+ verifyPreviewTabDesmosGraphingDimensions: (width, height) => {
186
+ commonComponents.previewTabQuestionWrapper()
187
+ .within(() => {
188
+ desmosGeometryPage.desmosGraphingTool()
189
+ .should('have.css', 'width', `${width}px`)
190
+ .and('have.css', 'height', `${height}px`);
191
+ });
192
+ },
193
+
194
+ addExpression: () => {
195
+ desmosGeometryPage.addExpressionButton()
196
+ .click();
197
+ },
198
+
199
+ selectNewFolderOptionFromExpressionList: () => {
200
+ desmosGeometryPage.expressionListNewFolderOption()
201
+ .click();
202
+ },
203
+
204
+ addFolderInPreviewTabExpressionList: () => {
205
+ commonComponents.previewTabQuestionWrapper()
206
+ .within(() => {
207
+ steps.addExpression();
208
+ steps.selectNewFolderOptionFromExpressionList();
209
+ });
210
+ },
211
+
212
+ verifyDesmosGraphingOutput: (output) => {
213
+ utilities.verifyInnerText(desmosGeometryPage.desmosGraphingOutput(), output);
214
+ },
215
+
216
+ verifyPreviewTabDesmosGraphingOutput: (output) => {
217
+ commonComponents.previewTabQuestionWrapper()
218
+ .within(() => {
219
+ utilities.verifyInnerText(desmosGeometryPage.desmosGraphingOutput(), output);
220
+ });
221
+ },
222
+
223
+ verifyFolderInExpressionListVisible: () => {
224
+ utilities.verifyElementVisibilityState(desmosGeometryPage.folderInExpressionList(), 'notExist');
225
+ },
226
+
227
+ verifyFlagThisItemNonAccessibleCheckboxIsUnchecked: () => {
228
+ desmosGeometryPage.flagNonAccessibleCheckbox()
229
+ .should('not.be.checked');
230
+ },
231
+
232
+ checkFlagThisItemNonAccessibleCheckbox: () => {
233
+ desmosGeometryPage.flagNonAccessibleCheckbox()
234
+ .click()
235
+ .should('be.checked');
236
+ },
237
+
238
+ verifyInputInPreviewTabTextAreaField: (inputText) => {
239
+ commonComponents.previewTabQuestionWrapper()
240
+ .within(() => {
241
+ utilities.verifyInnerText(desmosToolComponent.previewTabDesmosTextArea(), inputText);
242
+ });
243
+ },
244
+ verifyInsertResourceLinkPlaceholderText: () => {
245
+ desmosGeometryPage.insertResourceLinkInputField()
246
+ .should('have.attr', 'placeholder', 'www.desmos.com/');
247
+ },
248
+ /**
249
+ * @description add desmos 3D Link to insert resource link input field
250
+ * @param {string} inputURL
251
+ */
252
+ addInputToInsertResourceLinkInputField: (inputURL) => {
253
+ desmosGeometryPage.insertResourceLinkInputField()
254
+ .focus()
255
+ .clear()
256
+ .type(`${inputURL}`);
257
+ utilities.hoverAwayFromElement();
258
+ },
259
+ verifyInsertResourceLinkPlaceholderTextNotDisplayed: () => {
260
+ desmosGeometryPage.insertResourceLinkInputField()
261
+ .should('not.have.attr', 'placeholder');
262
+ },
263
+ clearInputToInsertResourceLinkInputField: () => {
264
+ desmosGeometryPage.insertResourceLinkInputField()
265
+ .clear();
266
+ cy.get('body')
267
+ .click();
268
+ },
269
+ }
270
+
271
+ const tests = {
272
+ ...createQuestionBasePage.tests,
273
+ ...questionInstructionsComponent.tests,
274
+ ...scoringSectionBaseEditTab.tests,
275
+ ...additionalSettingsPanel.tests,
276
+ ...commonComponents.tests,
277
+ ...additionalSettingsAccessibilitySectionComponent.tests,
278
+ ...studentViewSettingsLabelComponent.tests,
279
+ ...hideExpressionListComponent.tests,
280
+
281
+ verifyGraphingQuestionSpecifyPredefinedExpressionContent: () => {
282
+ it('When user selects a scoring type the contents of the Specify predefined expression should be displayed', () => {
283
+ utilities.verifyElementVisibilityState(desmosGeometryPage.desmosGraphingTool(), 'exist');
284
+ utilities.verifyElementVisibilityState(desmosGeometryPage.previewTabDesmosToolGraph(), 'exist');
285
+ utilities.verifyElementVisibilityState(desmosToolComponent.previewTabDesmosToolKeypadButton(), 'exist');
286
+ });
287
+ },
288
+
289
+ verifyErrorMessageCSSAndA11y: () => {
290
+ it('CSS of error message', { tags: 'css' }, () => {
291
+ utilities.verifyCSS(desmosGeometryPage.errorMessage(), {
292
+ 'color': css.color.desmosErrorText,
293
+ 'font-size': css.fontSize.small,
294
+ 'font-weight': css.fontWeight.regular
295
+ });
296
+ });
297
+
298
+ it('Accessibility of error message', { tags: 'a11y' }, () => {
299
+ cy.checkAccessibility(commonComponents.nextGenCreateItemWrapper());
300
+ });
301
+ }
302
+ }
303
+
304
+ export const desmosGeometryPage = {
305
+ ...selectors,
306
+ steps,
307
+ tests
308
+ }
@@ -2297,7 +2297,28 @@ const steps = {
2297
2297
  optionsTextArray.forEach((option, optionIndex) => {
2298
2298
  utilities.verifyTextContent(utilities.getNthElement(dragAndDropIntoCategoriesPage.optionsInputFieldInQuestionPreviewTab(), optionIndex), option);
2299
2299
  });
2300
- }
2300
+ },
2301
+
2302
+ verifyAnswerStatusBannerNotExist: () => {
2303
+ dragAndDropIntoCategoriesPage.correctIncorrectStatusMessageText()
2304
+ .should('not.exist');
2305
+ },
2306
+
2307
+ verifyAnswerStatusBannerExist: () => {
2308
+ dragAndDropIntoCategoriesPage.correctIncorrectStatusMessageText()
2309
+ .should('be.visible');
2310
+ },
2311
+
2312
+ verifyCorrectAnswerSectionExist: () => {
2313
+ dragAndDropIntoCategoriesPage.correctAnswersLabel()
2314
+ .should('be.visible');
2315
+ },
2316
+
2317
+ verifyCorrectAnswerSectionNotExist: () => {
2318
+ dragAndDropIntoCategoriesPage.correctAnswersLabel()
2319
+ .should('not.exist');
2320
+ },
2321
+
2301
2322
  }
2302
2323
 
2303
2324
  const tests = {
@@ -2348,19 +2369,18 @@ const tests = {
2348
2369
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
2349
2370
  });
2350
2371
 
2351
- it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
2372
+ it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, error message should not be thrown on the '${accordionName}' accordion`, () => {
2352
2373
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Bat');
2353
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible')
2354
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please set a correct answer.');
2374
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist')
2355
2375
  if (accordionName == 'Correct') {
2356
2376
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
2357
2377
  .within(() => {
2358
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
2378
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
2359
2379
  });
2360
2380
  } else {
2361
2381
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
2362
2382
  .within(() => {
2363
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
2383
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
2364
2384
  });
2365
2385
  };
2366
2386
  });
@@ -3,7 +3,6 @@ import utilities from "../support/helpers/utilities";
3
3
  const css = Cypress.env('css');
4
4
  import { createQuestionBasePage, optionsWrapperComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, fillInTheGapsDragAndDropCommonComponents, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, autoScoredStudentViewSettings, ckEditorToolbar, equationEditorFlyout, draggableOptionContainer, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, draggableOptionsSectionComponent, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, responseAreaSettingsPopupComponent, gradingViewEnumerationComponent, ariaLabelSectionComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, draggableOptionsStyleAndLayoutComponent } from "./components"
5
5
  import { createItemPage } from "./createItemPage";
6
- import { dialogBoxBase } from "./dialogBoxBase";
7
6
 
8
7
  //TODO update option container selectors when https://redmine.zeuslearning.com/issues/563159 is resolved
9
8
  const selectors = {
@@ -92,7 +91,7 @@ const steps = {
92
91
  ...styleAndLayoutCustomizationAccordionComponent.steps,
93
92
  ...figCommonStyleAndLayoutComponent.steps,
94
93
  ...draggableOptionsStyleAndLayoutComponent.steps,
95
- ...createItemPage.steps,
94
+ ...createItemPage.steps,
96
95
  /**
97
96
  * Sets options in dropzone in the Preview Tab based on the provided optionsObject.
98
97
  * @param {Object} optionsObject - An object where keys are option texts and values are dropzone indices.
@@ -1041,72 +1040,6 @@ const tests = {
1041
1040
  ...styleAndLayoutCustomizationAccordionComponent.tests,
1042
1041
  ...figCommonStyleAndLayoutComponent.tests,
1043
1042
  ...draggableOptionsStyleAndLayoutComponent.tests,
1044
- //TODO need to remove once Save as you go is available for all questions
1045
- /**
1046
- * @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
1047
- * in the 'Specify correct answer' section for alternative answers in auto-scored questions.
1048
- * @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
1049
- * @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
1050
- */
1051
- verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
1052
- it('\'+ Add alternative answer\' button should be present', () => {
1053
- utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
1054
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
1055
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1056
- .verifyPseudoClassBeforeProperty('content', '""');
1057
- });
1058
-
1059
- it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
1060
- utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
1061
- 'color': css.color.activeButtons,
1062
- 'font-size': css.fontSize.default,
1063
- 'font-weight': css.fontWeight.regular
1064
- });
1065
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1066
- .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
1067
- });
1068
-
1069
- it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
1070
- utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
1071
- autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
1072
- });
1073
-
1074
- it('CSS of warning popup', { tags: 'css' }, () => {
1075
- utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
1076
- 'color': css.color.flyoutTitle,
1077
- 'font-size': css.fontSize.heading,
1078
- 'font-weight': css.fontWeight.semibold
1079
- });
1080
- utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
1081
- 'color': css.color.labels,
1082
- 'font-size': css.fontSize.default,
1083
- 'font-weight': css.fontWeight.regular
1084
- });
1085
- utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
1086
- 'fill': css.color.closeIcon
1087
- });
1088
- });
1089
-
1090
- it('Accessibility of warning popup', { tags: 'a11y' }, () => {
1091
- cy.checkAccessibility(dialogBoxBase.dialogBox());
1092
- dialogBoxBase.steps.closeWarningPopup();
1093
- });
1094
- },
1095
-
1096
- //TODO need to remove once Save as you go is available for all questions
1097
- verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
1098
- it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
1099
- autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1100
- .click();
1101
- dialogBoxBase.steps.closeWarningPopup();
1102
- //TODO: Need to add error message according to question types
1103
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
1104
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1105
- .eq(1)
1106
- .should('have.attr', 'aria-expanded', 'true');
1107
- });
1108
- },
1109
-
1110
1043
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
1111
1044
  it('When user selects a scoring type then in the \'Correct\' accordion, all the contents should be displayed', () => {
1112
1045
  utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), 3);
@@ -1279,18 +1279,18 @@ const tests = {
1279
1279
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0 });
1280
1280
  });
1281
1281
 
1282
- it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, \'Error: Please set a correct answer.\' error message should be thrown along with an error icon on the \'${accordionName}\' accordion`, () => {
1282
+ it(`When the user has removed all the options from the dropzone in the ${accordionName} accordion, 'Error: Please set a correct answer.' error message should be thrown along with an error icon on the '${accordionName}' accordion`, () => {
1283
1283
  fillInTheGapsOverImageDragAndDropPage.steps.clickAndDropOptionInOptionsContainerInSpecifyCorrectAnswerSection('Petals');
1284
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1284
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
1285
1285
  if (accordionName == 'Correct') {
1286
1286
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1287
1287
  .within(() => {
1288
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1288
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1289
1289
  });
1290
1290
  } else {
1291
1291
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1292
1292
  .within(() => {
1293
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'visible');
1293
+ utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.specifyCorrectAnswerErrorIcon(), 'notExist');
1294
1294
  });
1295
1295
  };
1296
1296
  });
@@ -1,7 +1,6 @@
1
1
  import utilities from "../support/helpers/utilities";
2
2
  import { additionalSettingsAccessibilitySectionComponent, additionalSettingsPanel, autoScoredScoringPreviewTab, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, autoScoredStudentViewSettings, backgroundImageUploadComponent, commonComponents, createQuestionBasePage, enableOuterBorderComponent, gradingViewEnumerationComponent, imageActionsComponent, imageCanvasComponent, questionInstructionsComponent, scoringSectionBaseEditTab, showAvailableOptionsToStudents, showStudentMaximumNumberOfPossibleSelections, singleMultipleSelectionModeComponent, colorPopupComponent } from "./components";
3
3
  import { createItemPage } from "./createItemPage";
4
- import { dialogBoxBase } from "./dialogBoxBase";
5
4
  const css = Cypress.env('css');
6
5
  let imageWidth = 768;
7
6
  let imageHeight = 432;
@@ -1555,71 +1554,6 @@ const tests = {
1555
1554
  ...additionalSettingsPanel.tests,
1556
1555
  ...gradingViewEnumerationComponent.tests,
1557
1556
  ...additionalSettingsAccessibilitySectionComponent.tests,
1558
- //TODO need to remove once Save as you go is available for all questions
1559
- /**
1560
- * @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
1561
- * in the 'Specify correct answer' section for alternative answers in auto-scored questions.
1562
- * @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
1563
- * @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
1564
- */
1565
- verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
1566
- it('\'+ Add alternative answer\' button should be present', () => {
1567
- utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
1568
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
1569
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1570
- .verifyPseudoClassBeforeProperty('content', '""');
1571
- });
1572
-
1573
- it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
1574
- utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
1575
- 'color': css.color.activeButtons,
1576
- 'font-size': css.fontSize.default,
1577
- 'font-weight': css.fontWeight.regular
1578
- });
1579
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
1580
- .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
1581
- });
1582
-
1583
- it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
1584
- utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
1585
- autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
1586
- });
1587
-
1588
- it('CSS of warning popup', { tags: 'css' }, () => {
1589
- utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
1590
- 'color': css.color.flyoutTitle,
1591
- 'font-size': css.fontSize.heading,
1592
- 'font-weight': css.fontWeight.semibold
1593
- });
1594
- utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
1595
- 'color': css.color.labels,
1596
- 'font-size': css.fontSize.default,
1597
- 'font-weight': css.fontWeight.regular
1598
- });
1599
- utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
1600
- 'fill': css.color.closeIcon
1601
- });
1602
- });
1603
-
1604
- it('Accessibility of warning popup', { tags: 'a11y' }, () => {
1605
- cy.checkAccessibility(dialogBoxBase.dialogBox());
1606
- dialogBoxBase.steps.closeWarningPopup();
1607
- });
1608
- },
1609
-
1610
- //TODO need to remove once Save as you go is available for all questions
1611
- verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
1612
- it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
1613
- autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
1614
- .click();
1615
- dialogBoxBase.steps.closeWarningPopup();
1616
- //TODO: Need to add error message according to question types
1617
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
1618
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
1619
- .eq(1)
1620
- .should('have.attr', 'aria-expanded', 'true');
1621
- });
1622
- },
1623
1557
 
1624
1558
  /**
1625
1559
  * @param {string} scoringType scoring type 'All or nothing| Partial equal weights| Partial different weights'
@@ -30,6 +30,8 @@ export * from './correctAnswerViewPage';
30
30
  export * from './rulerPage';
31
31
  export * from './desmosToolPage';
32
32
  export * from './desmosGraphingPage';
33
+ export * from './desmos3DGraphingPage';
34
+ export * from './desmosGeometryPage';
33
35
  export * from './drawingResponsePage';
34
36
  export * from './protractorPage';
35
37
  export * from './textEntryMathPage';
@@ -50,5 +52,4 @@ export * from './chartsLinePage';
50
52
  export * from './numberLineLabelPage';
51
53
  export * from './chartsDotPlotPage';
52
54
  export * from './imageHighlightPage';
53
- export * from './compassPage';
54
- export * from './menuBarPage';
55
+ export * from './compassPage';
@@ -184,8 +184,7 @@ const steps = {
184
184
 
185
185
  verifyCorrectAnswerSectionNotExist: () => {
186
186
  multipleSelectionGridPage.correctAnswerSection()
187
- .should('not.exist');
188
- },
187
+ .should('not.exist');},
189
188
  /**
190
189
  * Verifies the contents of option fields within the options section.
191
190
  * @param {Array<string>} optionsTextArray - An array of strings representing the expected text content for each option field.
@@ -213,72 +212,6 @@ const tests = {
213
212
  ...additionalSettingsPanel.tests,
214
213
  ...additionalSettingsAccessibilitySectionComponent.tests,
215
214
  ...styleAndLayoutCustomizationAccordionComponent.tests,
216
- //TODO need to remove once Save as you go is available for all questions
217
- /**
218
- * @description Verifies the behavior of the 'Add alternative answer' button, warning popups, and validation error messages
219
- * in the 'Specify correct answer' section for alternative answers in auto-scored questions.
220
- * @param {string|null} questionType - The type of the question (e.g., 'list ordering'). Pass `null` if not applicable.
221
- * @example - verifyAutoScoredAddAlternativeAnswerButtonAndValidation();
222
- */
223
- verifyAutoScoredAddAlternativeAnswerButtonAndValidation: (questionType = null) => {
224
- it('\'+ Add alternative answer\' button should be present', () => {
225
- utilities.verifyInnerText(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'Add alternative answer');
226
- utilities.verifyElementVisibilityState(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton(), 'visible');
227
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
228
- .verifyPseudoClassBeforeProperty('content', '""');
229
- });
230
-
231
- it('CSS of \'Add Alternative answer\' button', { tags: 'css' }, () => {
232
- utilities.verifyCSS(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton().find('p'), {
233
- 'color': css.color.activeButtons,
234
- 'font-size': css.fontSize.default,
235
- 'font-weight': css.fontWeight.regular
236
- });
237
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton()
238
- .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
239
- });
240
-
241
- it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
242
- utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
243
- autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
244
- });
245
-
246
- it('CSS of warning popup', { tags: 'css' }, () => {
247
- utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
248
- 'color': css.color.flyoutTitle,
249
- 'font-size': css.fontSize.heading,
250
- 'font-weight': css.fontWeight.semibold
251
- });
252
- utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
253
- 'color': css.color.labels,
254
- 'font-size': css.fontSize.default,
255
- 'font-weight': css.fontWeight.regular
256
- });
257
- utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
258
- 'fill': css.color.closeIcon
259
- });
260
- });
261
-
262
- it('Accessibility of warning popup', { tags: 'a11y' }, () => {
263
- cy.checkAccessibility(dialogBoxBase.dialogBox());
264
- dialogBoxBase.steps.closeWarningPopup();
265
- });
266
- },
267
-
268
- //TODO need to remove once Save as you go is available for all questions
269
- verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
270
- it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
271
- autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
272
- .click();
273
- dialogBoxBase.steps.closeWarningPopup();
274
- //TODO: Need to add error message according to question types
275
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
276
- autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
277
- .eq(1)
278
- .should('have.attr', 'aria-expanded', 'true');
279
- });
280
- },
281
-
282
215
  /**
283
216
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
284
217
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.