itemengine-cypress-automation 1.0.93 → 1.0.95

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/cypress/e2e/ILC/Desmos/desmosFourFunctionCalculatorPreviewContents.smoke.js +1 -0
  2. package/cypress/e2e/ILC/Desmos/desmosGeometryToolPreviewContents.smoke.js +1 -0
  3. package/cypress/e2e/ILC/Desmos/desmosGraphingCalculatorPreviewContents.smoke.js +1 -0
  4. package/cypress/e2e/ILC/Desmos/desmosMatrixCalculatorPreviewContents.smoke.js +1 -0
  5. package/cypress/e2e/ILC/Desmos/desmosScientificCalculatorPreviewContents.smoke.js +1 -0
  6. package/cypress/e2e/ILC/DesmosGraphing/editTabBasic.js +1 -0
  7. package/cypress/e2e/ILC/DesmosGraphing/gradingViewAndCorrectAnswerViewContents.smoke.js +1 -0
  8. package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +1 -0
  9. package/cypress/e2e/ILC/DesmosGraphing/studentViewSettings.js +3 -2
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +13 -13
  11. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +0 -3
  12. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +21 -21
  13. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettingsForGroupedLayout.js +1 -3
  14. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +5 -7
  15. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +3 -3
  16. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +9 -6
  17. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +7 -6
  18. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  19. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePageHeaderSection.js +1 -1
  20. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.js +24 -43
  21. package/cypress/e2e/ILC/EssayResponse/editAndPreviewTabScoringSection.js +1 -0
  22. package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -6
  23. package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +0 -1
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +0 -1
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +0 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +5 -2
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +1 -1
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +1 -1
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +7 -7
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +1 -1
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/specifyCorrectAnswerSection.js +4 -1
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +1 -1
  35. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +2 -0
  36. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsBasic.js +2 -0
  37. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +1 -1
  38. package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +12 -7
  39. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +8 -9
  40. package/cypress/e2e/ILC/Ruler/rulerEditTabFunctionality.js +1 -1
  41. package/cypress/e2e/ILC/Ruler/rulerHeaderSection.js +1 -1
  42. package/cypress/e2e/ILC/SingleSelection/headerSection.js +5 -1
  43. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +6 -7
  44. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -2
  45. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +7 -7
  46. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +1 -1
  47. package/cypress/pages/components/additionalSettingsPanel.js +2 -2
  48. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  49. package/cypress/pages/components/createCustomCategoryFlyout.js +1 -1
  50. package/cypress/pages/components/draggableOptionContainer.js +2 -2
  51. package/cypress/pages/components/essayResponseCommonComponents.js +5 -2
  52. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  53. package/cypress/pages/components/measuringToolComponent.js +2 -1
  54. package/cypress/pages/desmosGraphingPage.js +3 -3
  55. package/cypress/pages/desmosToolPage.js +8 -6
  56. package/cypress/pages/dragAndDropIntoCategoriesPage.js +16 -9
  57. package/cypress/pages/drawingResponsePage.js +21 -38
  58. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +9 -10
  59. package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -2
  60. package/cypress/pages/multipleSelectionPage.js +1 -0
  61. package/cypress/pages/protractorPage.js +3 -4
  62. package/cypress/pages/rulerPage.js +9 -5
  63. package/cypress/pages/singleSelectionPage.js +5 -1
  64. package/package.json +1 -1
  65. package/scripts/sorry-cypress.mjs +2 -2
@@ -112,7 +112,7 @@ describe('Ruler: Edit tab functionality', () => {
112
112
  rulerPage.steps.clickOnDeleteButton();
113
113
  cy.log('Switching to Preview Tab');
114
114
  rulerPage.steps.switchToPreviewTab();
115
- utilities.verifyElementVisibilityState(rulerPage.rulerUploadedImagePreviewTab(), 'notExist');
115
+ rulerPage.steps.verifyRulerUploadedImageNotExistPreviewTab();
116
116
  });
117
117
  });
118
118
 
@@ -43,7 +43,7 @@ describe('Create question page - Ruler: Header section and saving resource tool'
43
43
 
44
44
  it('When user has made some edits/changes and clicks on Cancel button, a popup should be displayed', () => {
45
45
  rulerPage.steps.selectResourceType('ruler');
46
- rulerPage.steps.addInputToOpacityInputField(30);
46
+ rulerPage.steps.enterInputToOpacityInputField(30);
47
47
  rulerPage.cancelButton()
48
48
  .click();
49
49
  utilities.verifyElementVisibilityState(rulerPage.dialogBox(), 'visible');
@@ -42,7 +42,11 @@ describe('Create Item page - Single Selection: Header section and Saving questio
42
42
 
43
43
  describe('Validation error messages', () => {
44
44
  dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
45
- singleSelectionPage.tests.verifyCompulsoryFieldsErrorMessages();
45
+ singleSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
46
+ singleSelectionPage.steps.verifyPointsFieldErrorMessage();
47
+ singleSelectionPage.steps.verifyOptionsInputFieldErrorMessage(0);
48
+ singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
49
+ singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
46
50
  });
47
51
 
48
52
  describe('Saving a question', () => {
@@ -5,7 +5,7 @@ import { dialogBoxBase, multipleSelectionPage, rulerPage } from "../../../pages"
5
5
 
6
6
  const css = Cypress.env('css');
7
7
 
8
- const tools = ['Ruler', 'Protractor', 'Line Reader'];
8
+ const tools = ['Ruler', 'Protractor', 'Reading ruler'];
9
9
  const lengthOfRuler = ['15 cm', '30 cm', '40 cm'];
10
10
  const rotationOptions = ['None', 'Allow rotation', 'Allow rotation and display angle'];
11
11
  const unitOfMeasurementOptions = ['Centimeter', 'Inch', 'Pixel', 'Both centimeter and inch', 'Custom image'];
@@ -183,10 +183,9 @@ describe('Create Item page: Tool settings', () => {
183
183
  rulerPage.steps.verifyDefaultOpacityLabelSliderAndInputField();
184
184
  });
185
185
 
186
- //Failed due to https://redmine.zeuslearning.com/issues/556472
187
186
  it('\'Ruler Color\' label and 6 solid color should be displayed and by default \'White\' color radio button should be selected', () => {
188
- utilities.verifyInnerText(rulerPage.rulerColorLabel(), 'Ruler Color');
189
- utilities.verifyElementVisibilityState(rulerPage.rulerColorLabel(), 'visible');
187
+ utilities.verifyInnerText(rulerPage.toolColorLabel(), 'Ruler Color');
188
+ utilities.verifyElementVisibilityState(rulerPage.toolColorLabel(), 'visible');
190
189
  rulerPage.steps.verifyToolColorBlocksVisibility();
191
190
  rulerPage.steps.verifyToolColorSelectedState(0);
192
191
  });
@@ -219,12 +218,12 @@ describe('Create Item page: Tool settings', () => {
219
218
  toolSettingsComponent.steps.verifyToolUnselectedState(0);
220
219
  });
221
220
 
222
- //TODO: need to update according to https://redmine.zeuslearning.com/issues/557448
223
- it('When user clicks on Edit icon button for ruler tool and clicks on \'Ok\' button, then tool should enter selected state and popup should disappear', () => {
221
+ // Failed due to https://redmine.zeuslearning.com/issues/557448
222
+ it('When user clicks on Edit icon button for ruler tool and clicks on \'Ok\' button, then tool should not enter selected state and popup should disappear', () => {
224
223
  toolSettingsComponent.steps.clickOnToolEditIcon(0);
225
224
  dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
226
225
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
227
- toolSettingsComponent.steps.verifyToolSelectedState(0);
226
+ toolSettingsComponent.steps.verifyToolUnselectedState(0);
228
227
  });
229
228
  });
230
229
 
@@ -186,12 +186,11 @@ describe('Tool settings content for all views', () => {
186
186
  'border': `1px solid ${css.color.activeButtons}`,
187
187
  'background-color': css.color.defaultBackground,
188
188
  'font-size': css.fontSize.normal,
189
- 'font-weight': css.fontWeight.medium
189
+ 'font-weight': css.fontWeight.semibold
190
190
  });
191
191
  });
192
192
 
193
193
  //Failed due to https://redmine.zeuslearning.com/issues/557552
194
-
195
194
  it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
196
195
  cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
197
196
  });
@@ -22,7 +22,7 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
22
22
  {
23
23
  displayName: 'Curved line',
24
24
  additionalOptions: [' strokefontcolor', ' strokefontcolorpicker'],
25
- secondaryToolbarOptions: ['Stroke color', 'Stroke thickness', 'Line type', 'Opacity'],
25
+ secondaryToolbarOptions: ['Stroke color', 'Stroke thickness', 'Opacity'],
26
26
  tooltipText: 'Curved LineDraw a curved line',
27
27
  toolType: 'tool'
28
28
  },
@@ -39,7 +39,7 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
39
39
  {
40
40
  displayName: 'Text',
41
41
  additionalOptions: [' specialchar', ' mathchar', ' fontsize', ' strokefontcolor', ' strokefontcolorpicker'],
42
- secondaryToolbarOptions: ['Special characters', 'Math characters', 'Font Size', 'Text color', 'Opacity'],
42
+ secondaryToolbarOptions: ['Special characters', 'Math characters', 'Font size', 'Text color', 'Opacity'],
43
43
  tooltipText: 'TextAdd text',
44
44
  toolType: 'tool'
45
45
  },
@@ -83,12 +83,12 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
83
83
  toolType: 'tool'
84
84
  },
85
85
  {
86
- displayName: 'Bring forward',
86
+ displayName: 'Bring to front',
87
87
  tooltipText: 'Bring forwardBring selected item forward a layer',
88
88
  toolType: 'action'
89
89
  },
90
90
  {
91
- displayName: 'Bring backward',
91
+ displayName: 'Sent to back',
92
92
  tooltipText: 'Bring backwardSend selected item back a layer',
93
93
  toolType: 'action'
94
94
  },
@@ -108,18 +108,18 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
108
108
  toolType: 'action'
109
109
  },
110
110
  {
111
- displayName: 'Full Screen',
111
+ displayName: 'Full screen',
112
112
  tooltipText: 'Full ScreenView the canvas using your whole screen',
113
113
  toolType: 'dialog'
114
114
  },
115
115
  {
116
- displayName: 'Clear All',
116
+ displayName: 'Clear all',
117
117
  tooltipText: 'Clear AllClear entire canvas',
118
118
  toolType: 'dialog'
119
119
  }
120
120
  ],
121
121
 
122
- additionalOptions: [' specialchar', ' mathchar', ' fontsize', ' strokefontcolor', ' strokefontcolorpicker', ' fillcolor', ' fillcolorpicker'],
122
+ additionalOptions: [' SpecialChar', ' MathChar', ' FontSize', ' StrokeFontColor', ' StrokeFontColorPicker', ' FillColor', ' FillColorPicker'],
123
123
 
124
124
  additionalOptionsTooltip: ['Special characters', 'Math characters', 'Font size', 'Stroke font color', 'Stroke font color picker', 'Fill color', 'Fill color picker']
125
125
  }
@@ -162,7 +162,7 @@ export const equationEditorCategoriesAndSymbols = {
162
162
  sqrt: {
163
163
  title: 'Square Root',
164
164
  text: null,
165
- ariaLabel: 'Sqrt',
165
+ ariaLabel: 'squareroot',
166
166
  displayText: null,
167
167
  },
168
168
  cubeRoot: {
@@ -11,7 +11,7 @@ const selectors = {
11
11
  additionalSettingsAcknowledgementsLabel: () => cy.get('.additional-settings-detail-wrapper .additional-settings-label').eq(2),
12
12
  additionalSettingsTeacherGuidelinesInputField: () => cy.get('[title="Teacher Scoring Guidelines"]'),
13
13
  additionalSettingsSampleAnswerInputField: () => cy.get('[title="Sample Answer"]'),
14
- additionalSettingsAcknowledgementsInputField: () => cy.get('[title="acknowledgements & reference"]'),
14
+ additionalSettingsAcknowledgementsInputField: () => cy.get('[title="acknowledgements & references"]'),
15
15
  //Font-size dropdown
16
16
  fontSizeLabel: () => cy.get('#Font-Size-dropdown-label'),
17
17
  fontSizeDropdown: () => cy.get('#Font-Size-select'),
@@ -81,7 +81,7 @@ const tests = {
81
81
 
82
82
  it('\'Acknowledgements & reference\' label and input field should be displayed and user should be able to enter \'Acknowledgements\'', () => {
83
83
  additionalSettingsPanel.additionalSettingsAcknowledgementsLabel()
84
- .verifyInnerText('Acknowledgements & reference');
84
+ .verifyInnerText('Acknowledgements and references');
85
85
  additionalSettingsPanel.additionalSettingsAcknowledgementsInputField()
86
86
  .type('Acknowledgements')
87
87
  .should('have.text', 'Acknowledgements');
@@ -16,7 +16,7 @@ const selectors = {
16
16
  correctAnswerAccordionLabel: () => cy.get('[class*="AnswerAccordionstyles__Label"]').eq(0),
17
17
  alternativeAnswerAccordionLabel: () => cy.get('[class*="AnswerAccordionstyles__Label"]'),
18
18
  deleteAlternateAccordionButton: () => cy.get('.answer-accordion-label button'),
19
- specifyCorrectAnswerErrorIcon: () => cy.get('[aria-label="Error in"]'),
19
+ specifyCorrectAnswerErrorIcon: () => cy.get('[id="Icon_material-error"]'),
20
20
  pointsLabelAnswerAccordion: () => cy.get('[class*="AnswerAccordionstyles__PointsLabel"]'),
21
21
  pointsAnswerAccordion: () => cy.get('[class*="PointsLabel"]').next('[class*="AnswerAccordionstyles__Points"]')
22
22
  }
@@ -146,7 +146,7 @@ const tests = {
146
146
  let helpText;
147
147
  switch (questionType) {
148
148
  case 'multiple selection':
149
- helpText = 'You can set the correct answer by selecting the correct answer option.';
149
+ helpText = 'You can set the correct answer by selecting the correct answer option(s).';
150
150
  break;
151
151
  case 'single selection':
152
152
  helpText = 'You can set the correct answer by selecting the correct answer option.';
@@ -187,7 +187,7 @@ const tests = {
187
187
  case 'highlight image':
188
188
  helpText = 'You can set the correct answer by selecting the correct answer(s) in the response area(s).';
189
189
  break;
190
- case 'fill in the gaps over image - text':
190
+ case 'fill in the gaps over image with text':
191
191
  helpText = 'You can set the correct answer by entering the correct answer(s) in the response area(s).';
192
192
  break;
193
193
  case 'fill in the gaps over image - dropdown':
@@ -343,7 +343,7 @@ const steps = {
343
343
  createCustomCategoryFlyout.categoryCharacters(symbolARIALabel)
344
344
  .should('have.class', 'Mui-selected')
345
345
  .within(() => {
346
- utilities.verifyElementVisibilityState(essayResponsePage.equationEditorSectionTickIcon(), 'exist');
346
+ utilities.verifyElementVisibilityState(createCustomCategoryFlyout.symbolTickIcon(), 'exist');
347
347
  });
348
348
  });
349
349
  },
@@ -9,8 +9,8 @@ const threeOptions = ['option 1', 'option 2', 'option 3'];
9
9
 
10
10
  const selectors = {
11
11
  draggableOption: () => cy.get('[class*="DraggableItems"][class*="style__ItemWrapper"]'),
12
- optionsContainerSpecifyCorrectAnswerSection: () => cy.get('[data-rbd-droppable-id*="item-list"]').eq(0),
13
- optionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [data-rbd-droppable-id*="item-list"]').eq(0),
12
+ optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.option-drag-and-drop'),
13
+ optionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .option-drag-and-drop'),
14
14
  groupedOptionsTitleSpecifyCorrectAnswerSection: () => cy.get('[class*="GroupTitleWrapper"]'),
15
15
  groupedOptionsContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="GroupDiv"]'),
16
16
  groupedOptionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="GroupDiv"]'),
@@ -281,7 +281,7 @@ const steps = {
281
281
  .should('have.attr', 'title', defaultFormattingOptions[count])
282
282
  .and('be.visible');
283
283
  });
284
- essayResponseCommonComponents.previewTabToolbarOption('Decrease Indent')
284
+ essayResponseCommonComponents.previewTabToolbarOption(toolbarOption)
285
285
  .next()
286
286
  .should('have.attr', 'role', 'separator')
287
287
  .should('be.visible');
@@ -296,10 +296,13 @@ const steps = {
296
296
  essayResponseCommonComponents.previewTabToolbarOption(toolbarOption)
297
297
  .click()
298
298
  .should('have.attr', 'aria-pressed', 'false');
299
- } else {
299
+ } else if (toolbarOption == 'Bold' || toolbarOption == 'Italic' || toolbarOption == 'Underline' || toolbarOption == 'Insert/Remove Bulleted List' || toolbarOption == 'Insert/Remove Numbered List' || toolbarOption == 'Strikethrough' || toolbarOption == 'Subscript' || toolbarOption == 'Superscript' || toolbarOption == 'Block Quote' || toolbarOption == 'Code Inline' || toolbarOption == 'Align Left' || toolbarOption == 'Align Center' || toolbarOption == 'Align Right' || toolbarOption == 'Align Justify' || toolbarOption == 'Text direction left to right' || toolbarOption == 'Text direction right to left') {
300
300
  essayResponseCommonComponents.previewTabToolbarOption(toolbarOption)
301
301
  .click()
302
302
  .should('have.attr', 'aria-pressed', 'true');
303
+ } else {
304
+ essayResponseCommonComponents.previewTabToolbarOption(toolbarOption)
305
+ .click();
303
306
  }
304
307
  },
305
308
 
@@ -5,7 +5,7 @@ const selectors = {
5
5
  maxCapacityPerDropzoneDropdown: () => cy.get('#Maximum-capacity-per-dropzone-select'),
6
6
  maxCapacityPerDropzoneDropdownListOptions: (ariaLabel = null) => {
7
7
  if (ariaLabel) {
8
- return cy.get(`[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"][aria-label*="${ariaLabel}"]`)
8
+ return cy.get(`[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"][aria-label="${ariaLabel}"]`)
9
9
  } else {
10
10
  return cy.get('[aria-labelledby*="Maximum-capacity-per-dropzone-dropdown-label"] [role="option"]')
11
11
  }
@@ -2,7 +2,7 @@ import utilities from "../../support/helpers/utilities";
2
2
  import { commonComponents } from "./commonComponents";
3
3
  import { dialogBoxBase } from "../dialogBoxBase";
4
4
 
5
- const colorValues = ['rgba(255, 255, 255, 1)', 'rgb(186, 201, 255)', 'rgb(128, 239, 255)', 'rgb(255, 238, 215)', 'rgb(255, 238, 78)', 'rgb(220, 223, 230)'];
5
+ const colorValues = ['rgb(255, 255, 255)', 'rgb(186, 201, 255)', 'rgb(128, 239, 255)', 'rgb(255, 238, 215)', 'rgb(255, 238, 78)', 'rgb(220, 223, 230)'];
6
6
 
7
7
  const selectors = {
8
8
  ...commonComponents,
@@ -17,6 +17,7 @@ const selectors = {
17
17
  }
18
18
  },
19
19
  rotationButtonInPreviewTab: () => cy.get('.icon-rotate'),
20
+ toolColorLabel: () => cy.get('.color-pallete p'),
20
21
  toolColorBlock: () => cy.get('[class*="ColorBlockWrapper"] .MuiToggleButton-root')
21
22
  }
22
23
 
@@ -242,9 +242,9 @@ const tests = {
242
242
  ...additionalSettingsPanel.tests,
243
243
  verifyGraphingQuestionSpecifyPredefinedExpressionContent: () => {
244
244
  it('When user selects a scoring type the contents of the Specify predefined expression should be displayed', () => {
245
- utilities.verifyElementVisibilityState(desmosGraphingPage.desmosGraphingTool(), 'visible');
246
- utilities.verifyElementVisibilityState(desmosGraphingPage.previewTabDesmosToolGraph(), 'visible');
247
- utilities.verifyElementVisibilityState(desmosToolComponent.previewTabDesmosToolKeypadButton(), 'visible');
245
+ utilities.verifyElementVisibilityState(desmosGraphingPage.desmosGraphingTool(), 'exist');
246
+ utilities.verifyElementVisibilityState(desmosGraphingPage.previewTabDesmosToolGraph(), 'exist');
247
+ utilities.verifyElementVisibilityState(desmosToolComponent.previewTabDesmosToolKeypadButton(), 'exist');
248
248
  });
249
249
  }
250
250
  }
@@ -16,7 +16,7 @@ const selectors = {
16
16
  widthInputField: () => cy.get('.text-input-field input').eq(0),
17
17
  heightInputField: () => cy.get('.text-input-field input').eq(1),
18
18
  previewTabDesmosToolVisibilityButton: () => cy.get('.desmos-tool-visibility-button'),
19
- previewTabDesmosToolVisibleImage: () => cy.get('.desmos-tool-visibility-button #eye'),
19
+ previewTabDesmosToolVisibleImage: () => cy.get('.desmos-tool-visibility-button svg'),
20
20
  previewTabDesmosToolHideImage: () => cy.get('.desmos-tool-visibility-button #Hide_cell'),
21
21
  }
22
22
 
@@ -79,7 +79,7 @@ const steps = {
79
79
  * @param {string} desmosName name of the desmos
80
80
  */
81
81
  verifyPreviewTabDesmosToolVisibilityButtonLabel: (visibility, desmosName) => {
82
- utilities.verifyInnerText(desmosToolPage.previewTabDesmosToolVisibilityButton(), `${visibility} desmos ${desmosName}`)
82
+ utilities.verifyInnerText(desmosToolPage.previewTabDesmosToolVisibilityButton(), `${visibility} Desmos ${desmosName}`)
83
83
  if (visibility == 'Hide') {
84
84
  utilities.verifyElementVisibilityState(desmosToolPage.previewTabDesmosToolHideImage(), 'visible');
85
85
  } else {
@@ -108,7 +108,7 @@ const tests = {
108
108
  */
109
109
  verifyEditTabContents: (desmosTool) => {
110
110
  it(`\'Desmos - ${desmosTool} visibility\' label should be displayed on the edit tab`, () => {
111
- desmosToolPage.steps.verifyDesmosVisibilityLabel(`Desmos ${desmosTool} Visibility`);
111
+ desmosToolPage.steps.verifyDesmosVisibilityLabel(`Desmos ${desmosTool} visibility`);
112
112
  });
113
113
 
114
114
  it('\'Width (px)\' and \'Height (px)\' labels with input fields should be displayed and by default it would be set to 600px by 400 px respectively', () => {
@@ -121,12 +121,14 @@ const tests = {
121
121
  });
122
122
 
123
123
  it('\'Add show/hide button\' checkbox and label should be displayed and by default the checkbox should be unchecked', () => {
124
- desmosToolPage.steps.verifyAddShowHideButtonLabelAndCheckbox();
124
+ toolVisibilityComponent.steps.verifyAddShowHideButtonLabel();
125
+ toolVisibilityComponent.steps.verifyAddShowHideButtonCheckboxUnchecked();
125
126
  });
126
127
 
127
128
  it(`When the user checks the \'Add show/hide button\' checkbox then \'Launch the Desmos - ${desmosTool} by default\' checkbox and label should be displayed and by default it should be unchecked`, () => {
128
129
  desmosToolPage.steps.checkAddShowHideButtonCheckbox();
129
- desmosToolPage.steps.verifyLaunchToolByDefaultLabelAndCheckbox(`desmos ${desmosTool}`);
130
+ toolVisibilityComponent.steps.verifyLaunchToolByDefaultLabel(`Desmos ${desmosTool}`);
131
+ toolVisibilityComponent.steps.verifyLaunchToolByDefaultCheckboxUnchecked();
130
132
  });
131
133
 
132
134
  it(`The user should be able to check the \'Launch the Desmos - ${desmosTool} by default\' checkbox`, () => {
@@ -183,7 +185,7 @@ const tests = {
183
185
  'font-size': css.fontSize.normal,
184
186
  'font-weight': css.fontWeight.semibold
185
187
  });
186
- utilities.verifyCSS(desmosToolComponent.previewTabDesmosToolDragHandle().find('[id*="drag_handle"]'), {
188
+ utilities.verifyCSS(desmosToolComponent.previewTabDesmosToolDragHandle().find('svg path'), {
187
189
  'fill': css.color.activeButtons,
188
190
  });
189
191
  utilities.verifyCSS(desmosToolPage.previewTabDesmosToolHideImage(), {
@@ -509,18 +509,25 @@ const steps = {
509
509
  },
510
510
 
511
511
  /**
512
- * Sets options in dropzones in the Preview Tab based on the provided optionsObject.
513
- * @param {Object} optionsObject - An object where keys are option texts and values are dropzone indices.
514
- * @param {number} groupNumber index of the group
515
- * @example clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 4, 'Whale': 4 })
512
+ * Clicks on a specific option from the nth group in the draggable options container in the preview tab
513
+ * and then drops it into a specified dropzone in the dropzone area of the preview tab.
514
+ * @param {number} groupNumber - The index of the group containing the draggable options.
515
+ * @param {Object} options - The options for the draggable option and dropzone.
516
+ * @param {string} options.optionText - The text of the option to be clicked and dragged.
517
+ * @param {number} options.dropzoneIndex - The index of the dropzone where the option will be dropped.
518
+ * @returns {undefined}
516
519
  */
517
- clickAndDropOptionFromNthGroupInDropzonePreviewTab: (groupNumber, optionsObject) => {
520
+ clickAndDropOptionFromNthGroupInDropzonePreviewTab: (groupNumber, { optionText, dropzoneIndex }) => {
518
521
  draggableOptionContainer.groupedOptionsContainerPreviewTab()
519
522
  .eq(groupNumber)
520
- .parents('.item-list')
521
523
  .within(() => {
522
- steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection(optionsObject);
524
+ draggableOptionContainer.draggableOption()
525
+ .contains(optionText)
526
+ .click();
523
527
  });
528
+ dragAndDropIntoCategoriesPage.dropzoneCellSpecifyCorrectAnswerSection()
529
+ .eq(dropzoneIndex)
530
+ .click({ force: true });
524
531
  },
525
532
 
526
533
  verifyCorrectAnswerSectionNotExists: () => {
@@ -1363,7 +1370,7 @@ const steps = {
1363
1370
  let animals = [['Bat', 'Platypus', 'Panda', 'Zebra'],
1364
1371
  ['Peacock', 'Falcon', 'Eagle', 'Tiger'],
1365
1372
  ['Parrot', 'Lion', 'Whale', 'Elephant'],
1366
- ['Giraffe', 'Kangaroo', 'Bat', 'Flying squirrel']
1373
+ ['Giraffe', 'Kangaroo', 'Ostrich', 'Flying squirrel']
1367
1374
  ];
1368
1375
  let groupTitles = ['Group A', 'Group B', 'Group C', 'Group D'];
1369
1376
  draggableOptionsSectionComponent.steps.expandDraggableOptionsLayoutDropdown()
@@ -1412,7 +1419,7 @@ const tests = {
1412
1419
  ...commonComponents.tests,
1413
1420
  ...autoScoredScoringSectionMultiResponseType.tests,
1414
1421
  ...enableOuterBorderComponent.tests,
1415
-
1422
+ ...createQuestionBasePage.tests,
1416
1423
  verifyContentsOfSpecifyCorrectAnswerSection: (scoringType) => {
1417
1424
  it(`When the user selects ${scoringType} from scoring type dropdown then the specify correct answer sections should be displayed`, () => {
1418
1425
  dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertySpecifyCorrectAnswer(0, 'None');
@@ -45,7 +45,7 @@ const selectors = {
45
45
  colorPickerBlock: () => cy.get('.color-picker-block'),
46
46
  colorPickerBlockCloseIcon: () => cy.get('[class*="ColorSelectionComponentstyles__CloseIcon"]'),
47
47
  defaultFillColorsLabel: () => cy.get('[class*="ColorSelectionComponentstyles__LabelWrapper"]').eq(1),
48
- defaultFillColorsWrapper: () => cy.get('ColorSelectionComponentstyles__DefaultColorOptions').eq(1),
48
+ defaultFillColorsWrapper: () => cy.get('[class*="ColorSelectionComponentstyles__DefaultColorOptions"]').eq(1),
49
49
 
50
50
  //Customize special characters
51
51
  customizeSpecialCharactersCheckbox: () => cy.get('[data-ngie-testid="customize-special-characters-checkbox"] .ngie-checkbox input'),
@@ -79,7 +79,7 @@ const selectors = {
79
79
  previewTabDrawingToolbarWrapper: () => cy.get('.edit-question-preview-wrapper .drawing-tool__toolbar'),
80
80
  previewTabDrawingToolbarOption: (drawingOption = null) => {
81
81
  if (drawingOption) {
82
- return cy.get(`.drawing-tool__button[aria-label = "${drawingOption}"]:visible`)
82
+ return cy.get(`.drawing-tool__button[aria-label*= "${drawingOption}"]:visible`)
83
83
  } else {
84
84
  return cy.get('.drawing-tool__button:visible')
85
85
  }
@@ -118,11 +118,7 @@ const selectors = {
118
118
  fontSizesLabels: () => cy.get('.text-size .drawing-tool-options__options__text-size__value'),
119
119
 
120
120
  //Insert image
121
- insertImageContainer: () => cy.get('.edit-question-preview-wrapper .drawing-tool-modal__content'),
122
- insertImageContainerTitle: () => cy.get('.drawing-tool-modal__content .image-upload__title-text'),
123
- insertImageContainerHelptext: () => cy.get('.image-upload__dropzone p'),
124
- insertImageContainerSelectButton: () => cy.get('.drawing-tool-modal__content .image-upload__button'),
125
- insertImageContainerCloseButton: () => cy.get('.drawing-tool-modal__content .drawing-tool-modal__close-button'),
121
+ insertImageContainer: () => cy.get('[class="drawing-tool-modal__content Image upload"]'),
126
122
  inputTypeFile: () => cy.get('input[type="file"]'),
127
123
  insertImageContainerErrorMessage: () => cy.get('.image-upload__error'),
128
124
 
@@ -135,8 +131,8 @@ const selectors = {
135
131
 
136
132
  //Background section
137
133
  backgroundLabel: () => cy.get('[class*="BackgroundLabelWrapper"]'),
138
- blankCanvasLabel: () => cy.get('label[aria-label="Blank Canvas"]'),
139
- blankCanvasRadioButton: () => cy.get('input[aria-label="Blank Canvas"]'),
134
+ blankCanvasLabel: () => cy.get('label[aria-label="Blank canvas"]'),
135
+ blankCanvasRadioButton: () => cy.get('input[aria-label="Blank canvas"]'),
140
136
  imageLabel: () => cy.get('label[aria-label="Image"]'),
141
137
  imageRadioButton: () => cy.get('input[aria-label="Image"]'),
142
138
  patternLabel: () => cy.get('label[aria-label="Pattern"]'),
@@ -168,7 +164,7 @@ const selectors = {
168
164
  opacityInputField: () => cy.get('.opacity-input-field input'),
169
165
  editTabDrawingToolbarOption: (drawingOption = null) => {
170
166
  if (drawingOption) {
171
- return cy.get(`.drawing-tool__button[aria-label="${drawingOption}"]`)
167
+ return cy.get(`.drawing-tool__button[aria-label*="${drawingOption}"]`)
172
168
  } else {
173
169
  return cy.get('.drawing-tool__button')
174
170
  }
@@ -540,10 +536,9 @@ const steps = {
540
536
  * @description this function verifies the thickness of the stroke
541
537
  */
542
538
  verifySecondaryPopupEraserThickness: (thickness, index) => {
543
- drawingResponsePage.previewTabSecondaryOptionPopupEraserImage()
539
+ drawingResponsePage.previewTabSecondaryOptionPopupOptions()
544
540
  .eq(index)
545
- .should('have.attr', 'height', thickness)
546
- .and('have.attr', 'width', thickness);
541
+ .should('have.attr', 'aria-label', `Eraser thickness ${thickness}px`);
547
542
  },
548
543
 
549
544
  verifySecondaryPopupExist: () => {
@@ -613,8 +608,7 @@ const steps = {
613
608
  * @param {string} fileSize size of the file being uploaded
614
609
  */
615
610
  verifyUploadingFilesMessage: (fileName, fileSize) => {
616
- drawingResponsePage.insertImageContainer()
617
- .should('have.text', `Uploading files. Please wait...${fileName} - ${fileSize}`)
611
+ utilities.verifyInnerText(drawingResponsePage.insertImageContainer(), `Uploading files. Please wait...\n${fileName} - ${fileSize}`);
618
612
  },
619
613
 
620
614
  /**
@@ -639,8 +633,7 @@ const steps = {
639
633
  verifySecondaryPopupLineType: (lineType, index) => {
640
634
  drawingResponsePage.previewTabSecondaryOptionPopupOptions()
641
635
  .eq(index)
642
- .find('svg')
643
- .should('have.attr', 'aria-label', `${lineType}`);
636
+ .should('have.attr', 'aria-label', `Line type ${lineType}`);
644
637
  },
645
638
 
646
639
  /**
@@ -648,7 +641,7 @@ const steps = {
648
641
  * @param {string} color Color of the selected text color which is displayed under toolbar icon
649
642
  */
650
643
  verifySelectedTextColorUnderTextColorOptionInPreviewTab: (color) => {
651
- utilities.verifyCSS(drawingResponsePage.previewTabSecondaryToolbarOption().eq(3).find('svg path[data-name*="Path"]').eq(0), {
644
+ utilities.verifyCSS(drawingResponsePage.previewTabSecondaryToolbarOption().eq(0).find('svg path[data-name*="Path"]').eq(0), {
652
645
  'fill': color
653
646
  });
654
647
  },
@@ -845,7 +838,7 @@ const steps = {
845
838
 
846
839
  verifyMathCharacterCategoryTileIsNotSelected: (categoryName) => {
847
840
  drawingResponsePage.mathCharacterTiles(categoryName)
848
- .should('have.attr', 'aria-pressed', 'false')
841
+ .should('have.attr', 'data-aria-pressed', 'false')
849
842
  .within(() => {
850
843
  utilities.verifyElementVisibilityState(drawingResponsePage.customizeToolbarOptionsAndControlsSectionTickIcon(), 'hidden');
851
844
  });
@@ -909,19 +902,15 @@ const steps = {
909
902
  },
910
903
 
911
904
  verifyCenterOptionAlignmentIsSelected: () => {
912
- drawingResponsePage.centerOption().find('button')
913
- .then(($element) => {
914
- const attributeValue = $element.attr('aria-label');
915
- expect(attributeValue).to.include('selected');
916
- });
905
+ drawingResponsePage.centerOption()
906
+ .find('button')
907
+ .should('have.attr', 'aria-pressed', 'true');
917
908
  },
918
909
 
919
910
  verifyTopLeftOptionAlignmentIsSelected: () => {
920
- drawingResponsePage.topLeftOption().find('button')
921
- .then(($element) => {
922
- const attributeValue = $element.attr('aria-label');
923
- expect(attributeValue).to.include('selected');
924
- });
911
+ drawingResponsePage.topLeftOption()
912
+ .find('button')
913
+ .should('have.attr', 'aria-pressed', 'true');
925
914
  },
926
915
 
927
916
  /**
@@ -1012,10 +1001,7 @@ const steps = {
1012
1001
  */
1013
1002
  verifyPatternOptionIsSelected: (arialabel) => {
1014
1003
  drawingResponsePage.selectPatternOptionsButton(arialabel)
1015
- .then(($element) => {
1016
- const attributeValue = $element.attr('aria-label');
1017
- expect(attributeValue).to.include('selected');
1018
- });
1004
+ .should('have.attr', 'aria-pressed', 'true');
1019
1005
  },
1020
1006
 
1021
1007
  verifyFlagThisQuestionAsNonAccessibleCheckboxIsUnchecked: () => {
@@ -1050,10 +1036,7 @@ const steps = {
1050
1036
  */
1051
1037
  verifyStrokeLineThicknessOptionIsSelected: (arialabel) => {
1052
1038
  drawingResponsePage.defaultStrokeLineThicknessButton(arialabel)
1053
- .then(($element) => {
1054
- const attributeValue = $element.attr('aria-label');
1055
- expect(attributeValue).to.include('selected');
1056
- });
1039
+ .should('have.attr', 'aria-pressed', 'true');
1057
1040
  },
1058
1041
 
1059
1042
  /**
@@ -1312,7 +1295,7 @@ const steps = {
1312
1295
  * @param {string} toolbarOption title of the toolbar options
1313
1296
  * @description Select the toolbar option or controls tile in customize section
1314
1297
  */
1315
- unselectToolbarOptionsAndControlsFormattingOptionsTiles: (toolbarOption) => {
1298
+ deselectToolbarOptionsAndControlsFormattingOptionsTiles: (toolbarOption) => {
1316
1299
  drawingResponsePage.toolbarOptionsAndControlsFormattingOptionsTiles(toolbarOption)
1317
1300
  .click()
1318
1301
  .find('[role="menuitemcheckbox"]')
@@ -316,14 +316,13 @@ const steps = {
316
316
  },
317
317
 
318
318
  verifyPointsPerResponseLabel: () => {
319
- utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'Points per response: -');
319
+ utilities.verifyInnerText(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'Points per response:\n-');
320
320
  utilities.verifyElementVisibilityState(autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel(), 'visible');
321
321
  },
322
322
 
323
- //Need to remove this once https://redmine.zeuslearning.com/issues/557787 is resolved
324
- verifyPartialEqualWeightsScore: (pointsPerResponse) => {
325
- autoScoredScoringSectionMultiResponseType.pointsPerResponseLabel()
326
- .contains(pointsPerResponse);
323
+ verifyPartialEqualWeightsPointsPerResponseScore: (pointsPerResponse) => {
324
+ autoScoredScoringSectionMultiResponseType.partialEqualWeightsPointsPerResponseScore()
325
+ .should('have.text', pointsPerResponse);
327
326
  },
328
327
 
329
328
  verifyOptionContainerOptionSpecifyCorrectAnswerSection: (index, optionText) => {
@@ -544,11 +543,11 @@ const steps = {
544
543
  });
545
544
  },
546
545
 
547
- /**
548
- * @param {number} count count of dropzones in specify correct answer section
549
- * @description verifies count of dropzones in specify correct answer section
550
- */
551
- verifyDropzoneCountInSpecifyCorrectAnswerSection: (count) => {
546
+ /**
547
+ * @param {number} count count of dropzones in specify correct answer section
548
+ * @description verifies count of dropzones in specify correct answer section
549
+ */
550
+ verifyDropzoneCountInSpecifyCorrectAnswerSection: (count) => {
552
551
  utilities.verifyElementCount(fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperSpecifyCorrectAnswerSection(), count);
553
552
  }
554
553
  }
@@ -53,8 +53,7 @@ const selectors = {
53
53
  noneLabel: () => cy.get('[aria-label="None"].ngie-radio-label'),
54
54
  limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
55
55
  limitReachedWarningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
56
- correctAnswerResponseWrapper: () => cy.get('.cloze-with-text-correct-response-wrapper .cloze-with-text-answer-status-response-preview-wrapper'),
57
- correctAnswerResponse: () => cy.get('[class*="ResponseInputComponentstyles__ResponseInputWrapper"] input'),
56
+ correctAnswerResponseWrapper: () => cy.get('.label-image-with-text-correct-response-wrapper [class*="ClozeWithTextResponsestyles__AnswerCell"]'),
58
57
  specialCharactersButtonPreviewTab: () => cy.get('.cloze-with-text-special-character-button'),
59
58
 
60
59
  //Special characters section
@@ -484,6 +484,7 @@ const steps = {
484
484
  checkSetMinMaxNumberOfAnswersCheckbox: () => {
485
485
  multipleSelectionPage.setMinMaxNumberOfAnswersCheckbox()
486
486
  .click()
487
+ multipleSelectionPage.setMinMaxNumberOfAnswersCheckbox()
487
488
  .should('be.checked');
488
489
  },
489
490