itemengine-cypress-automation 1.0.204-graphQLUpdate-b0c0036.0 → 1.0.204

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +22 -22
  2. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneBasic.js +4 -4
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +2 -2
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +2 -2
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/specifyCorrectAnswerSection.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +8 -8
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +5 -1
  12. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +2 -0
  13. package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +19 -21
  14. package/cypress/e2e/ILC/EssayResponseMath/mathCharacters.js +2 -4
  15. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +14 -1
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +6 -2
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +4 -3
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +3 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/conditionalCheckboxScoring.js +56 -56
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +6 -4
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +4 -4
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +3 -3
  26. package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +2 -2
  27. package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +8 -3
  28. package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +1 -1
  29. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +2 -2
  30. package/cypress/e2e/ILC/Matching/toolSettings.js +1 -1
  31. package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +248 -0
  32. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +1 -1
  33. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +3 -0
  34. package/cypress/e2e/ILC/SingleSelection/additionalSettings.js +249 -0
  35. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1 -1
  36. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +6 -6
  37. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +0 -1
  38. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +1 -1
  39. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +4 -4
  40. package/cypress/e2e/ILC/chartsDotsPlot/dotTypeFunctionality.js +235 -0
  41. package/cypress/e2e/ILC/chartsDotsPlot/minimumScoringPenaltyPointsAndRoundingDropdown.js +5 -5
  42. package/cypress/e2e/ILC/chartsDotsPlot/numberLineAxisSettings.js +265 -0
  43. package/cypress/e2e/ILC/chartsDotsPlot/previewContentsForAllViews.smoke.js +6 -6
  44. package/cypress/e2e/ILC/chartsDotsPlot/scoring/manualAndNonScoredScoring.js +3 -3
  45. package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +594 -0
  46. package/cypress/e2e/ILC/chartsDotsPlot/studentViewSettings.js +2 -3
  47. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  48. package/cypress/fixtures/fillColorDefaultProperties.js +2 -2
  49. package/cypress/pages/chartsDotPlotPage.js +588 -59
  50. package/cypress/pages/components/autoScoredScoringPreviewTab.js +1 -1
  51. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
  52. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  53. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  54. package/cypress/pages/components/chartsCommonComponent.js +10 -1
  55. package/cypress/pages/components/customizeMathCharacterComponent.js +10 -5
  56. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +2 -2
  57. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +4 -3
  58. package/cypress/pages/components/gridQuestionCommonComponent.js +11 -11
  59. package/cypress/pages/components/imageCanvasComponent.js +2 -2
  60. package/cypress/pages/components/layoutSectionComponent.js +20 -18
  61. package/cypress/pages/components/mcqAdditionalSettingsBase.js +164 -24
  62. package/cypress/pages/dialogBoxBase.js +1 -1
  63. package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -5
  64. package/cypress/pages/drawingResponsePage.js +3 -3
  65. package/cypress/pages/feedbackScalePage.js +16 -9
  66. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +6 -1
  67. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -1
  68. package/cypress/pages/gridFillPage.js +17 -14
  69. package/cypress/pages/itemPreviewSettingsPage.js +1 -0
  70. package/cypress/pages/matchingPage.js +1 -1
  71. package/cypress/pages/multipleSelectionPage.js +173 -1
  72. package/cypress/pages/singleSelectionPage.js +171 -1
  73. package/package.json +2 -2
@@ -14,7 +14,7 @@ const selectors = {
14
14
  correctIncorrectAnswerLabel: () => cy.get('.answer-label-text'),
15
15
  checkAnswerButton: () => cy.get('.check-answer-and-status-wrapper button'),
16
16
  correctIncorrectAnswerBorder: () => cy.get('[class*="question-preview-wrapper"] [class*="correct-answer-border"]'),
17
- scoringTypeLabelPreviewTab: () => cy.get('.score-text-wrapper')
17
+ scoringTypeLabelPreviewTab: () => cy.get('[class*="ScoringPreviewBandstyles__ScoreWrapper"]')
18
18
  }
19
19
 
20
20
  const steps = {
@@ -300,6 +300,7 @@ const steps = {
300
300
  case 'specify points for each incorrect answer':
301
301
  case 'specify points for each incorrect dropdown':
302
302
  case 'specify points for each incorrect dot plot':
303
+ case 'specify points for each incorrect text container':
303
304
  autoScoredScoringSectionMultiResponseType.specifyPointsForEachIncorrectOptionRadioButton()
304
305
  .click();
305
306
  break;
@@ -356,7 +356,7 @@ const tests = {
356
356
  .within(() => {
357
357
  utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.pleaseEnterPointsErrorMessage(), 'notExist');
358
358
  });
359
- if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math' && questionType != 'text selection') {
359
+ if (questionType != 'list ordering' && questionType != 'short text response' && questionType != 'text entry math' && questionType != 'text selection' && questionType != 'fill in the gaps with text' && questionType != 'fill in the gaps over image text') {
360
360
  steps.verifySpecifyCorrectAnswerErrorMessage();
361
361
  }
362
362
  else if (questionType === 'short text response' || questionType === 'fill in the gaps with text' || questionType === 'fill in the gaps over image text' || questionType === 'text entry math') {
@@ -11,7 +11,7 @@ const selectors = {
11
11
  fileNameLabel: () => cy.get('[class*="__LabelWrapper"][class*="Upload"]').eq(1),
12
12
  fileUploadSection: () => cy.get('.file-input-wrapper'),
13
13
  chooseFileButton: () => cy.get('.choose-file-button'),
14
- noFileChosenLabel: () => cy.get('[aria-label="No file chosen"]'),
14
+ noFileChosenLabel: () => cy.get('[class*="UploadImagestyles__SelectedFile"] [class*="UploadImagestyles__FileLabelWrapper"]'),
15
15
  uploadImageProgressBar: () => cy.get('[class*="ProgressBar"]'),
16
16
  uploadedFileNameLabel: () => cy.get('[class*="styles__SelectedFileWithIcon"][class*="Upload"]'),
17
17
  deleteImageIcon: () => cy.get('[aria-label*="Delete image"]'),
@@ -169,6 +169,15 @@ const steps = {
169
169
  });
170
170
  },
171
171
 
172
+ /**
173
+ * @description Verifies the graph title
174
+ * @param {string} label - The expected title of the graph.
175
+ */
176
+ verifyGraphTitleInSelectChartType: (label) => {
177
+ utilities.verifyElementVisibilityState(chartsCommonComponent.selectChartTypeGraphTitleButton(), 'visible');
178
+ utilities.verifyInnerText(chartsCommonComponent.selectChartTypeGraphTitleButton(), label);
179
+ },
180
+
172
181
  /**
173
182
  * @description Verifies the graph title
174
183
  * @param {string} label - The expected title of the graph.
@@ -211,7 +220,7 @@ const tests = {
211
220
  verifyToleranceThresholdLabelAndInputField: () => {
212
221
  it('Tolerance/Threshold label and input field should be displayed and by default input field should be empty', () => {
213
222
  utilities.verifyElementVisibilityState(chartsCommonComponent.toleranceThresholdLabel(), 'visible');
214
- utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdLabel(), 'Tolerance/Threshold');
223
+ utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdLabel(), 'Tolerance');
215
224
  utilities.verifyElementVisibilityState(chartsCommonComponent.toleranceThresholdInputField(), 'visible');
216
225
  utilities.verifyInnerText(chartsCommonComponent.toleranceThresholdInputField(), '');
217
226
  });
@@ -59,7 +59,12 @@ const steps = {
59
59
  customizeMathCharacterComponent.mathCharactersPreviewPopupSymbol()
60
60
  .eq(index)
61
61
  .find('path')
62
- .should('have.attr', 'data-name', `${symbol}`);
62
+ .invoke('attr', 'data-name')
63
+ .then((dataName) => {
64
+ let newDataName = dataName.trim();
65
+ newDataName = newDataName.toLowerCase();
66
+ expect(newDataName).to.equal(symbol.toLowerCase());
67
+ });
63
68
  });
64
69
  utilities.verifyElementCount(customizeMathCharacterComponent.mathCharactersPreviewPopupSymbol(), category.symbols.length);
65
70
  });
@@ -109,10 +114,10 @@ const steps = {
109
114
  .click();
110
115
  },
111
116
 
112
- /**
113
- * This function verifies the the math category characters are not selectedF
114
- * @param {string} categoryName math category characters aria label
115
- */
117
+ /**
118
+ * This function verifies the the math category characters are not selectedF
119
+ * @param {string} categoryName math category characters aria label
120
+ */
116
121
  verifyMathCharacterCategoryTileIsNotSelected: (categoryName) => {
117
122
  customizeMathCharacterComponent.mathCharacterTiles(categoryName)
118
123
  .should('have.attr', 'data-aria-pressed', 'false')
@@ -334,7 +334,7 @@ const steps = {
334
334
  expandAndCollapseDropdownInSpecifyCorrectAnswerSection: (dropdownIndex) => {
335
335
  utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), dropdownIndex)
336
336
  .click();
337
- utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownListOptions(), 'visible');
337
+ utilities.verifyElementVisibilityState(fillInTheGapsDropdownCommonComponent.dropdownListOptions(), 'exist');
338
338
  cy.get('body')
339
339
  .click({ position: 'center' });
340
340
  },
@@ -729,7 +729,7 @@ const tests = {
729
729
  });
730
730
 
731
731
  it('When the user selects any option from the dropdown, then error message should disappear and that option should be displayed on the dropdown', () => {
732
- fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, optionsForDropdown[0]);
732
+ fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, 'Flower');
733
733
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
734
734
  });
735
735
 
@@ -999,11 +999,12 @@ const tests = {
999
999
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1000
1000
  });
1001
1001
 
1002
- it('When user should not be able to add limit more than 50 inside minimum and maximum limit input field', () => {
1002
+ it('When user enters minimum limit more than maximum limit then error messages should be displayed and when user enters equal value then the error message should disappear', () => {
1003
1003
  fillInTheGapsTextCommonComponent.steps.setMinimumLimit(60);
1004
- fillInTheGapsTextCommonComponent.steps.verifyMinimumLimit(6);
1004
+ utilities.verifyInnerText(commonComponents.errorMessage().eq(0), 'Error: Minimum limit must be less than or equal to Maximum limit.');
1005
+ utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Maximum limit must be greater than or equal to Minimum limit.');
1005
1006
  fillInTheGapsTextCommonComponent.steps.setMaximumLimit(60);
1006
- fillInTheGapsTextCommonComponent.steps.verifyMaximumLimit(6);
1007
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1007
1008
  });
1008
1009
  },
1009
1010
 
@@ -1144,7 +1144,7 @@ const steps = {
1144
1144
  verifyNumerationStyleOptionSelected: (index) => {
1145
1145
  gridQuestionCommonComponent.numerationStyleOptions()
1146
1146
  .eq(index)
1147
- .should('have.attr', 'aria-selected', 'true')
1147
+ .should('have.attr', 'aria-pressed', 'true')
1148
1148
  },
1149
1149
 
1150
1150
  /**
@@ -1251,7 +1251,7 @@ const steps = {
1251
1251
  */
1252
1252
  verifyOptionAlignmentInCellButtonSelected: (option) => {
1253
1253
  gridQuestionCommonComponent.optionAlignmentInCellButton(option)
1254
- .should('have.attr', 'aria-selected', 'true');
1254
+ .should('have.attr', 'aria-pressed', 'true');
1255
1255
  },
1256
1256
 
1257
1257
  /**
@@ -1586,14 +1586,14 @@ const steps = {
1586
1586
  verifyColumnDimensionsSpecifyCorrectAnswer: (dimension) => {
1587
1587
  switch (dimension) {
1588
1588
  case 'Auto':
1589
- gridQuestionCommonComponent.tableRowHeadersSpecifyCorrectAnswerSection()
1589
+ gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
1590
1590
  .each(($el) => {
1591
1591
  cy.wrap($el)
1592
1592
  .should('not.have.css', 'width', '225px');
1593
1593
  });
1594
1594
  break;
1595
1595
  case 'Custom':
1596
- gridQuestionCommonComponent.tableRowHeadersSpecifyCorrectAnswerSection()
1596
+ gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
1597
1597
  .each(($el) => {
1598
1598
  cy.wrap($el)
1599
1599
  .should('have.css', 'width', '225px');
@@ -1611,14 +1611,14 @@ const steps = {
1611
1611
  verifyColumnDimensionsPreviewTab: (dimension) => {
1612
1612
  switch (dimension) {
1613
1613
  case 'Auto':
1614
- gridQuestionCommonComponent.tableRowHeadersPreviewTab()
1614
+ gridQuestionCommonComponent.tableCellWrapperPreviewTab()
1615
1615
  .each(($el) => {
1616
1616
  cy.wrap($el)
1617
1617
  .should('not.have.css', 'width', '225px');
1618
1618
  });
1619
1619
  break;
1620
1620
  case 'Custom':
1621
- gridQuestionCommonComponent.tableRowHeadersPreviewTab()
1621
+ gridQuestionCommonComponent.tableCellWrapperPreviewTab()
1622
1622
  .each(($el) => {
1623
1623
  cy.wrap($el)
1624
1624
  .should('have.css', 'width', '225px');
@@ -1679,13 +1679,13 @@ const steps = {
1679
1679
  },
1680
1680
 
1681
1681
  verifyTableColumnWidthSpecifyCorrectAnswer: (index, width) => {
1682
- gridQuestionCommonComponent.tableCellSpecifyCorrectAnswerSection()
1682
+ gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
1683
1683
  .eq(index)
1684
1684
  .should('have.css', 'width', `${width}px`);
1685
1685
  },
1686
1686
 
1687
1687
  verifyTableColumnDoeNotHaveSpecifiedWidthSpecifyCorrectAnswer: (index, width) => {
1688
- gridQuestionCommonComponent.tableCellSpecifyCorrectAnswerSection()
1688
+ gridQuestionCommonComponent.tableCellWrapperSpecifyCorrectAnswerSection()
1689
1689
  .eq(index)
1690
1690
  .should('not.have.css', 'width', `${width}px`);
1691
1691
  },
@@ -1707,13 +1707,13 @@ const steps = {
1707
1707
  },
1708
1708
 
1709
1709
  verifyTableColumnWidthPreviewTab: (index, width) => {
1710
- gridQuestionCommonComponent.tableCellPreviewTab()
1710
+ gridQuestionCommonComponent.tableCellWrapperPreviewTab()
1711
1711
  .eq(index)
1712
1712
  .should('have.css', 'width', `${width}px`);
1713
1713
  },
1714
1714
 
1715
1715
  verifyTableColumnDoeNotHaveSpecifiedWidthPreviewTab: (index, width) => {
1716
- gridQuestionCommonComponent.tableCellPreviewTab()
1716
+ gridQuestionCommonComponent.tableCellWrapperPreviewTab()
1717
1717
  .eq(index)
1718
1718
  .should('not.have.css', 'width', `${width}px`);
1719
1719
  },
@@ -1858,7 +1858,7 @@ const steps = {
1858
1858
 
1859
1859
  checkApplyToFirstColumnRadioButton: () => {
1860
1860
  gridQuestionCommonComponent.applyToFirstColumnRadioButton()
1861
- .click()
1861
+ .dblclick()
1862
1862
  .should('be.checked');
1863
1863
  },
1864
1864
 
@@ -107,7 +107,7 @@ const steps = {
107
107
  utilities.verifyElementVisibilityState(imageCanvasComponent.canvasImage(), 'visible');
108
108
  utilities.verifyElementVisibilityState(backgroundImageUploadComponent.uploadImageProgressBar(), 'notExist');
109
109
  //Note: wait is added here for the image to fully load, else the first two response areas gets overlapped
110
- cy.wait(2000);
110
+ cy.wait(5000);
111
111
  },
112
112
 
113
113
  verifyImageIsUploadedInPreviewTab: () => {
@@ -445,7 +445,7 @@ const steps = {
445
445
  case 'top right':
446
446
  return { top: '-19px', left: '-31px' };
447
447
  case 'top':
448
- return { top: '-22.5px', left: '-23.5px' };
448
+ return { top: '-22.5px', left: '-25.5px' };
449
449
  case 'top left':
450
450
  return { top: '-27px', left: '-24px' };
451
451
  case 'left':
@@ -58,34 +58,34 @@ const selectors = {
58
58
  numberLineNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg'),
59
59
  numberLineAxisNumberLineSection: () => cy.get('.number-line-grid-setting .ngie-jxgbox svg line'),
60
60
  numberLineTitleNumberLineSection: () => cy.get('[class*="LineGraphComponentsstyles__TitleContainer"]'),
61
- minLabel: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] [class*="LineGraphComponentsstyles__CustomInputFieldLabel"]').eq(0),
62
- minInputField: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] input').eq(0),
63
- maxLabel: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] [class*="LineGraphComponentsstyles__CustomInputFieldLabel"]').eq(1),
64
- maxInputField: () => cy.get('[class*="LineGraphComponentsstyles__GraphRightLeft"] input').eq(1),
65
- intervalLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [aria-labelledby="Interval"]'),
61
+ minLabel: () => cy.get('[class*="CustomInputFieldWrapper"] [class*="CustomInputFieldLabel"]').eq(0),
62
+ minInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(0),
63
+ maxLabel: () => cy.get('[class*="CustomInputFieldWrapper"] [class*="CustomInputFieldLabel"]').eq(1),
64
+ maxInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(1),
65
+ intervalLabel: () => cy.get('[aria-labelledby="Interval"]'),
66
66
  intervalInputField: () => cy.get('input[id="Interval"]'),
67
- annotateEveryLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [aria-labelledby="Annotate every"]'),
67
+ annotateEveryLabel: () => cy.get('[aria-labelledby="Annotate every"]'),
68
68
  annotateEveryInputField: () => cy.get('input[id="Annotate every"]'),
69
- lineSettingsToggleButtonWrapper: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
70
- lineSettingsLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] .single-select-toggle-group-title').eq(0),
69
+ lineSettingsToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
70
+ lineSettingsLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(0),
71
71
  lineSettingsToggleButton: (ariaLabel = null) => {
72
72
  if (ariaLabel !== null) {
73
- return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find(`button[aria-label*="${ariaLabel}"]`);
73
+ return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find(`button[aria-label*="${ariaLabel}"]`);
74
74
  } else {
75
- return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find('button');
75
+ return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(0).find('button');
76
76
  }
77
77
  },
78
- displayNumbersToggleButtonWrapper: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(1),
79
- displayNumbersLabel: () => cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] .single-select-toggle-group-title').eq(1),
78
+ displayNumbersToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(1),
79
+ displayNumbersLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(1),
80
80
  displayNumbersToggleButton: (ariaLabel = null) => {
81
81
  if (ariaLabel !== null) {
82
- return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find(`button[aria-label*="${ariaLabel}"]`);
82
+ return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find(`button[aria-label*="${ariaLabel}"]`);
83
83
  } else {
84
- return cy.get('[class*="LineGridSettingstyles__LineSettingFlexWrapper"] [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find('button');
84
+ return cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ButtonContainer"]').eq(1).find('button');
85
85
  }
86
86
  },
87
- displaySpecificAnnotationLabel: () => cy.get('[class*="LineGridSettingstyles__SpecificAnnotationWrapper"] .inline-text-property-label'),
88
- displaySpecificAnnotationInputField: () => cy.get('[class*="LineGridSettingstyles__SpecificAnnotationWrapper"] input')
87
+ displaySpecificAnnotationLabel: () => cy.get('.number-line-grid-setting [class*="SpecificAnnotationWrapper"] [class*="PropertyLabel"]'),
88
+ displaySpecificAnnotationInputField: () => cy.get('.number-line-grid-setting [class*="SpecificAnnotationWrapper"] input')
89
89
  }
90
90
 
91
91
  const steps = {
@@ -582,7 +582,8 @@ const steps = {
582
582
  enterTextInIntervalInputField: (value) => {
583
583
  layoutSectionComponent.intervalInputField()
584
584
  .clear()
585
- .type(value);
585
+ .type(value, { force: true })
586
+ .trigger('input');
586
587
  },
587
588
 
588
589
  /**
@@ -620,7 +621,8 @@ const steps = {
620
621
  enterTextInDisplaySpecificAnnotationInputField: (value) => {
621
622
  layoutSectionComponent.displaySpecificAnnotationInputField()
622
623
  .clear()
623
- .type(value);
624
+ .type(value)
625
+ .blur();
624
626
  },
625
627
 
626
628
  /**
@@ -26,44 +26,184 @@ const selectors = {
26
26
  //Number of option columns
27
27
  numberOfOptionColumnsLabel: () => cy.get('#Number-of-Option-Columns-dropdown-label'),
28
28
  numberOfOptionColumnsDropdown: () => cy.get('#Number-of-Option-Columns-select'),
29
- numberOfOptionColumnsListOptions: (optionNumber) => cy.get('[aria-labelledby="Number-of-Option-Columns-dropdown-label Number-of-Option-Columns-placeholder"] li[role="option"]').eq(optionNumber),
29
+ numberOfOptionColumnsListOptions: (optionNumber) => cy.get(`[aria-labelledby="Number-of-Option-Columns-dropdown-label Number-of-Option-Columns-placeholder"] li[role="option"][aria-label*=${optionNumber}]`),
30
30
  //Option orientation dropdown
31
- optionOrientationLabel: () => cy.get('#Option-Orientation-dropdown-label'),
32
- optionOrientationDropdown: () => cy.get('#Option-Orientation-select'),
33
- optionOrientationListOptions: (optionIndex) => cy.get('[aria-labelledby="Option-Orientation-dropdown-label Option-Orientation-placeholder"] li[role="option"]').eq(optionIndex),
34
- optionNumeration: () => cy.get('.mcq-option-numeration')
31
+ optionDirectionLabel: () => cy.get('.option-direction [class*="__LabelWrapper"]').eq(0),
32
+ optionDirectionOptions: (optionAriaLabel) => cy.get(`.ngie-toggle-button-label-wrapper button[aria-label*="option direction ${optionAriaLabel}"]`),
33
+ optionAlignmentLabel: () => cy.get('.option-alignment [class*="__LabelWrapper"]').eq(0),
34
+ optionAlignmentOptions: (optionAriaLabel) => cy.get(`.option-alignment button[aria-label*="Option alignment ${optionAriaLabel}"]`),
35
+ optionNumeration: () => cy.get('.mcq-option-numeration'),
36
+ multipleColumnsLabel: () => cy.get('[data-ngie-testid="multiple-columns-checkbox"] .MuiFormControlLabel-label'),
37
+ multipleColumnsCheckbox: () => cy.get('[data-ngie-testid="multiple-columns-checkbox"] input'),
35
38
  }
36
39
 
37
40
  const steps = {
38
- verifyOptionDesignDropdownSelectedOption: (selectedOption) => {
39
- utilities.verifyInnerText(mcqAdditionalSettingsBase.optionDesignDropdown(), selectedOption)
41
+ expandOptionDesignDropdown: () => {
42
+ mcqAdditionalSettingsBase.optionDesignDropdown()
43
+ .click();
40
44
  },
41
45
 
42
- verifyOptionNumerationDropdownSelectedOption: (selectedOption) => {
43
- utilities.verifyInnerText(mcqAdditionalSettingsBase.optionNumerationDropdown(), selectedOption)
46
+ /**
47
+ * Verifies that the specified option design is selected.
48
+ * @param {string} option - The option to verify.
49
+ */
50
+ verifyOptionDesignOptionSelected: (option) => {
51
+ mcqAdditionalSettingsBase.optionDesignDropdownListOptions(option)
52
+ .should('have.attr', 'aria-selected', 'true');
44
53
  },
45
54
 
46
- verifySpecifyCorrectAnswerOptionNumeration: () => {
47
- mcqAdditionalSettingsBase.optionNumeration()
48
- .each(($option, index) => {
49
- cy.wrap($option)
50
- .should('have.text', index + 1)
51
- });
55
+ /**
56
+ * Selects an option from the design dropdown list.
57
+ * @param {string} option - The option to select.
58
+ */
59
+ selectOptionDesignDropdownOption: (option) => {
60
+ mcqAdditionalSettingsBase.optionDesignDropdownListOptions(option)
61
+ .click();
62
+ },
63
+
64
+ expandOptionNumerationDropdown: () => {
65
+ mcqAdditionalSettingsBase.optionNumerationDropdown()
66
+ .click();
67
+ },
68
+
69
+ /**
70
+ * Selects an option from the numeration dropdown list.
71
+ * @param {string} option - The option to select.
72
+ */
73
+ selectOptionNumerationDropdownOption: (option) => {
74
+ mcqAdditionalSettingsBase.optionNumerationDropdownListOptions(option)
75
+ .click();
76
+ },
77
+
78
+ /**
79
+ * Verifies that the specified numeration dropdown option is selected.
80
+ * @param {string} option - The option to verify.
81
+ */
82
+ verifyOptionNumerationDropdownOptionSelected: (option) => {
83
+ mcqAdditionalSettingsBase.optionNumerationDropdownListOptions(option)
84
+ .should('have.attr', 'aria-selected', 'true');
85
+ },
86
+
87
+ /**
88
+ * Verifies the inner text of numeration options.
89
+ * @param {Array<string>} numerationArray - Array of numeration options to verify.
90
+ */
91
+ verifyOptionNumeration: (numerationArray) => {
92
+ numerationArray.forEach((option, index) => {
93
+ utilities.verifyInnerText(mcqAdditionalSettingsBase.optionNumeration().eq(index), option);
94
+ })
95
+ },
96
+
97
+ verifyMultipleColumnsCheckboxUnchecked: () => {
98
+ mcqAdditionalSettingsBase.multipleColumnsCheckbox()
99
+ .should('not.be.checked');
100
+ },
101
+
102
+ checkMultipleColumnsCheckbox: () => {
103
+ mcqAdditionalSettingsBase.multipleColumnsCheckbox()
104
+ .click()
105
+ .should('be.checked');
106
+ },
107
+
108
+ expandNumberOfOptionsColumnDropdown: () => {
109
+ mcqAdditionalSettingsBase.numberOfOptionColumnsDropdown()
110
+ .click();
52
111
  },
53
112
 
54
- verifyPreviewTabOptionNumeration: () => {
55
- commonComponents.previewTabQuestionWrapper()
56
- .within(() => {
57
- mcqAdditionalSettingsBase.optionNumeration()
58
- .each(($option, index) => {
59
- cy.wrap($option)
60
- .should('have.text', index + 1)
61
- });
113
+ /**
114
+ * Selects a number of option columns from the dropdown list.
115
+ * @param {string} option - The option to select.
116
+ */
117
+ selectNumberOfOptionColumnDropdownOption: (option) => {
118
+ mcqAdditionalSettingsBase.numberOfOptionColumnsListOptions(option)
119
+ .click();
120
+ },
121
+
122
+ /**
123
+ * This function verifies selected state of option
124
+ * @param {string} option to be verified as selected
125
+ */
126
+ verifyOptionDirectionOptionSelected: (option) => {
127
+ mcqAdditionalSettingsBase.optionDirectionOptions(option)
128
+ .should('have.attr', 'aria-pressed', 'true');
129
+ },
130
+
131
+ /**
132
+ * This function verifies selected state of option
133
+ * @param {string} option to be verified as selected
134
+ */
135
+ verifyOptionAlignmentOptionSelected: (option) => {
136
+ mcqAdditionalSettingsBase.optionAlignmentOptions(option)
137
+ .should('have.attr', 'aria-pressed', 'true');
138
+ },
139
+
140
+ /**
141
+ * This function selects option from option direction dropdown
142
+ * @param {string} option to be selected
143
+ */
144
+ selectOptionDirectionOption: (option) => {
145
+ mcqAdditionalSettingsBase.optionDirectionOptions(option)
146
+ .click();
147
+ },
148
+
149
+ /**
150
+ * This function selects option from option alignment
151
+ * @param {string} option to be selected
152
+ */
153
+ selectOptionAlignmentOption: (option) => {
154
+ mcqAdditionalSettingsBase.optionAlignmentOptions(option)
155
+ .click();
156
+ }
157
+ }
158
+
159
+ const tests = {
160
+ verifyMultipleColumnsFunctionality: () => {
161
+ const numberOfOptionColumn = ['2', '3', '4', '5', '6'];
162
+ it('Multiple columns checkbox and label should be displayed and by default the checkbox should be unchecked', () => {
163
+ utilities.verifyInnerText(mcqAdditionalSettingsBase.multipleColumnsLabel(), 'Multiple columns');
164
+ mcqAdditionalSettingsBase.steps.verifyMultipleColumnsCheckboxUnchecked();
165
+ });
166
+
167
+ it('When user checks the \'Multiple columns\' checkbox then \'Number of option columns\' label and dropdown should be displayed and by default \'2\' option should be selected', () => {
168
+ mcqAdditionalSettingsBase.steps.checkMultipleColumnsCheckbox();
169
+ utilities.verifyInnerText(mcqAdditionalSettingsBase.numberOfOptionColumnsLabel(), 'Number of option columns');
170
+ utilities.verifyInnerText(mcqAdditionalSettingsBase.numberOfOptionColumnsDropdown(), '2');
171
+ });
172
+
173
+ it('When user expands \'Number of option columns\' then options from 2 to 6 should be displayed', () => {
174
+ mcqAdditionalSettingsBase.steps.expandNumberOfOptionsColumnDropdown();
175
+ numberOfOptionColumn.forEach((option) => {
176
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.numberOfOptionColumnsListOptions(option), 'visible');
62
177
  });
178
+ mcqAdditionalSettingsBase.steps.selectNumberOfOptionColumnDropdownOption('2');
179
+ });
180
+
181
+ it('\'Option direction\' label should be displayed 2 options \'Row by Row\' and \'Column by Column\' and by default \'Row by Row\' should be selected', () => {
182
+ utilities.verifyInnerText(mcqAdditionalSettingsBase.optionDirectionLabel(), 'Option direction');
183
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionDirectionOptions('row by row'), 'visible');
184
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionDirectionOptions('column by column'), 'visible');
185
+ mcqAdditionalSettingsBase.steps.verifyOptionDirectionOptionSelected('row by row');
186
+ });
187
+
188
+ it('\'Option alignment\' label should be displayed 3 options \'Left\', \'Center\', \'Right\' and by default \'Left\' should be selected', () => {
189
+ utilities.verifyInnerText(mcqAdditionalSettingsBase.optionAlignmentLabel(), 'Option alignment');
190
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('left'), 'visible');
191
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('center'), 'visible');
192
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('right'), 'visible');
193
+ mcqAdditionalSettingsBase.steps.verifyOptionAlignmentOptionSelected('left');
194
+ });
195
+
196
+ it('When user selects \'Column by Column\' option then option alignment section should not be displayed', () => {
197
+ mcqAdditionalSettingsBase.steps.selectOptionDirectionOption('column by column');
198
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('left'), 'notExist');
199
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('center'), 'notExist');
200
+ utilities.verifyElementVisibilityState(mcqAdditionalSettingsBase.optionAlignmentOptions('right'), 'notExist');
201
+ });
63
202
  }
64
203
  }
65
204
 
66
205
  export const mcqAdditionalSettingsBase = {
67
206
  ...selectors,
68
- steps
207
+ steps,
208
+ tests
69
209
  }
@@ -9,7 +9,7 @@ const selectors = {
9
9
  buttonReject: () => cy.get('[data-testid="reject-button"]'),
10
10
  buttonAccept: () => cy.get('[data-testid="accept-button"]'),
11
11
  buttonClose: () => cy.get('[aria-label="CLOSE"]'),
12
- dialogBoxContentText: () => cy.get('[class*="dialog-content"] [class*="EditQuestionstyles__PopupContentWrapper"]')
12
+ dialogBoxContentText: () => cy.get('[class*="dialog-content"] [class*="__PopupContentWrapper"]')
13
13
  }
14
14
 
15
15
  const steps = {
@@ -1,4 +1,4 @@
1
- import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent } from "./components";
1
+ import { optionsWrapperComponent, createQuestionBasePage, autoScoredSpecifyCorrectAnswerSection, scoringSectionBaseEditTab, autoScoredScoringSectionMultiResponseType, questionInstructionsComponent, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, commonComponents, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, allowMultipleInstancesOfSameDraggableOptionComponent, studentViewSettingsLabelComponent, additionalSettingsPanel, draggableOptionContainer, draggableOptionsSectionComponent, maximumCapacityPerDropzoneComponent, enableOuterBorderComponent, specifyRowsAndColumnsComponent, additionalSettingsAccessibilitySectionComponent } from "./components";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  import constants from "../fixtures/constants";
4
4
  const css = Cypress.env('css');
@@ -90,9 +90,6 @@ const selectors = {
90
90
  maxLimitInEachDropzoneHelpText: () => cy.get('[class*="Matrixstyles__MaxLimitWrapper"]'),
91
91
  dropzoneGridSpecifyCorrectAnswerSection: () => cy.get('[class*="Matrixstyles__TableWrapper"]'),
92
92
  dropzoneGridPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__TableWrapper"]'),
93
-
94
- //Additional settings
95
- layoutLabel: () => cy.get('[class*="Layoutstyles__SectionWrapper"]'),
96
93
  }
97
94
 
98
95
  const steps = {
@@ -1308,7 +1305,6 @@ const tests = {
1308
1305
  ...createQuestionBasePage.tests,
1309
1306
  ...additionalSettingsPanel.tests,
1310
1307
  ...additionalSettingsAccessibilitySectionComponent.tests,
1311
- ...styleAndLayoutCustomizationAccordionComponent.tests,
1312
1308
  verifyContentsOfSpecifyCorrectAnswerSection: (scoringType) => {
1313
1309
  it(`When the user selects ${scoringType} from scoring type dropdown then the specify correct answer sections should be displayed`, () => {
1314
1310
  dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertySpecifyCorrectAnswer(0, 'None');
@@ -165,9 +165,9 @@ const selectors = {
165
165
  selectPatternOptionsLabel: () => cy.get('.drawing-response-options [class*="ListItemLabel"]'),
166
166
 
167
167
  //additional settings
168
- accessibilityLabel: () => cy.get('[class*="DrawingResponsestyles__AccessibilityWrapper"] .layout-label'),
169
- flagThisQuestionAsNonAccessibleCheckboxLabel: () => cy.get('[data-ngie-testid="flag-this-question-as-non-accessible-checkbox"]'),
170
- flagThisQuestionAsNonAccessibleCheckbox: () => cy.get('[data-ngie-testid="flag-this-question-as-non-accessible-checkbox"] input'),
168
+ accessibilityLabel: () => cy.get('[class*="Accessibilitystyles__AccessibilityLabelWrapper"]'),
169
+ flagThisQuestionAsNonAccessibleCheckboxLabel: () => cy.get('.accessibility-wrapper .MuiFormControlLabel-label'),
170
+ flagThisQuestionAsNonAccessibleCheckbox: () => cy.get('.accessibility-wrapper input'),
171
171
  canvasStyleLayoutLabel: () => cy.get('[class*="DrawingResponsestyles__LayoutLabel"].layout-label').eq(0),
172
172
  defaultStrokeLineThicknessLabel: () => cy.get('.line-thickness-label'),
173
173
  setLineTypeLabel: () => cy.get('.line-type-label'),
@@ -78,8 +78,8 @@ const selectors = {
78
78
  editColorButton: () => cy.get('.icon-pencil'),
79
79
  allowStudentsToAddCommentCheckbox: () => cy.get('[data-ngie-testid="allow-students-to-add-comment-checkbox"] input'),
80
80
  allowStudentsToAddCommentCheckboxLabel: () => cy.get('[data-ngie-testid="allow-students-to-add-comment-checkbox"] .MuiFormControlLabel-label'),
81
- commentLabel: () => cy.get('.describe-your-experience .inline-text-property-label'),
82
- commentInputField: () => cy.get('input[aria-label="Comment"]'),
81
+ commentLabel: () => cy.get('.describe-your-experience [class*="__LabelWarpper"]'),
82
+ commentInputField: () => cy.get('.describe-your-experience [role="textbox"]'),
83
83
  legendSectionLabel: () => cy.get('.feedback-legend-wrapper [class*="LegendLabelWrapper"]'),
84
84
  showLegendCheckboxLabel: () => cy.get('[data-ngie-testid="show-legend-checkbox"] .MuiFormControlLabel-label'),
85
85
  showLegendCheckbox: () => cy.get('[data-ngie-testid="show-legend-checkbox"] input'),
@@ -97,7 +97,7 @@ const selectors = {
97
97
  scoringHelpText: () => cy.get('[class*="ScoringText"]'),
98
98
  studentViewSettingsLabel: () => cy.get('[class*="StudentViewSettingsLabel"]'),
99
99
  legendAccordionWrapper: () => cy.get('[class*="feedback-layout-accordion"]'),
100
- additionalSettingsAcknowledgementsLabel:()=> cy.get('.additional-settings-container [class*="InlineRichTextComponentstyles__LabelWarpper"]')
100
+ additionalSettingsAcknowledgementsLabel: () => cy.get('.additional-settings-container [class*="InlineRichTextComponentstyles__LabelWarpper"]')
101
101
  }
102
102
 
103
103
  const steps = {
@@ -183,11 +183,11 @@ const steps = {
183
183
  .should('have.class', 'selected-button');
184
184
  },
185
185
 
186
- /**
187
- * @param {number} buttonIndex index of the feedback button
188
- * @description this function verifies the selected state of a feedback button
189
- */
190
- verifyFeedbackNumberButtonSelectedState: (buttonIndex) => {
186
+ /**
187
+ * @param {number} buttonIndex index of the feedback button
188
+ * @description this function verifies the selected state of a feedback button
189
+ */
190
+ verifyFeedbackNumberButtonSelectedState: (buttonIndex) => {
191
191
  utilities.getNthElement(feedbackScalePage.feedbackNumberButton(), buttonIndex)
192
192
  .should('have.class', 'selected-button');
193
193
  },
@@ -678,7 +678,14 @@ const steps = {
678
678
  * @param {string} text - The expected text in the comment input field.
679
679
  */
680
680
  verifyTextInCommentInputField: (text) => {
681
- utilities.verifyInputFieldValue(feedbackScalePage.commentInputField(), text)
681
+ feedbackScalePage.commentInputField()
682
+ .should('have.text', text);
683
+ },
684
+
685
+ verifyCommentInputFieldDisabledGradingView: () => {
686
+ feedbackScalePage.commentInputField()
687
+ .parents('.disabled-input-field')
688
+ .should('exist');
682
689
  },
683
690
 
684
691
  collapseLegendAccordion: () => {