itemengine-cypress-automation 1.0.202 → 1.0.203

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 (47) hide show
  1. package/cypress/config-files/ilqa.json +1 -1
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +2 -2
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +3 -3
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +14 -2
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightBasic.js +1 -1
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightBasic.js +1 -1
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +356 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +320 -0
  9. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +355 -0
  10. package/cypress/e2e/ILC/ChartsBar/Scoring/toleranceThresholdScoring.js +141 -0
  11. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +170 -0
  12. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/additionalSettingsForDropzones.js +170 -0
  13. package/cypress/e2e/ILC/ImageHighlight/Scoring/singleSelectionPreviewScoring.js +250 -0
  14. package/cypress/e2e/ILC/ImageHighlight/singleMultipleSelection.js +99 -0
  15. package/cypress/e2e/ILC/MultipleSelectionGridNew/additionalSettings.js +89 -0
  16. package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationBorderProperties.js +53 -0
  17. package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationGridProperties.js +98 -0
  18. package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +89 -0
  19. package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCustomizationBorderProperties.js +54 -0
  20. package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +90 -0
  21. package/cypress/e2e/ILC/SingleSelectionGridNew/styleAndLayoutCutomizationGridProperties.js +99 -0
  22. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingPenaltyScoring.js +61 -0
  23. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +227 -0
  24. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +380 -0
  25. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +294 -0
  26. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +383 -0
  27. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +7 -7
  28. package/cypress/pages/chartsBarPage.js +1 -4
  29. package/cypress/pages/chartsDotPlotPage.js +0 -13
  30. package/cypress/pages/components/additionalSettingsPanel.js +1 -0
  31. package/cypress/pages/components/ariaLabelSectionComponent.js +1 -1
  32. package/cypress/pages/components/chartsCommonComponent.js +19 -0
  33. package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +1 -0
  34. package/cypress/pages/components/gridQuestionCommonComponent.js +1836 -134
  35. package/cypress/pages/components/singleMultipleSelectionModeComponent.js +74 -1
  36. package/cypress/pages/dragAndDropIntoCategoriesPage.js +25 -2
  37. package/cypress/pages/essayResponsePage.js +9 -1
  38. package/cypress/pages/feedbackScalePage.js +1 -1
  39. package/cypress/pages/fillInTheGapsDragAndDropPage.js +111 -30
  40. package/cypress/pages/matchingPage.js +2 -1
  41. package/cypress/pages/multipleSelectionGridPage.js +4 -2
  42. package/cypress/pages/shortTextResponsePage.js +2 -2
  43. package/cypress/pages/singleSelectionGridPage.js +4 -2
  44. package/cypress/pages/textEntryMathPage.js +1 -0
  45. package/cypress/pages/textEntryMathWithImagePage.js +1 -1
  46. package/cypress/pages/uploadResponsePage.js +1 -3
  47. package/package.json +1 -1
@@ -1,3 +1,6 @@
1
+ const css = Cypress.env('css');
2
+ import utilities from "../../support/helpers/utilities";
3
+
1
4
  const selectors = {
2
5
  multipleSelectionToggleButton: () => cy.get('.response-toggle-wrapper button[aria-label*="Multiple selection"]'),
3
6
  singleSelectionToggleButton: () => cy.get('.response-toggle-wrapper button[aria-label*="Single selection"]'),
@@ -12,10 +15,80 @@ const steps = {
12
15
  selectSingleSelectionToggle: () => {
13
16
  singleMultipleSelectionModeComponent.singleSelectionToggleButton()
14
17
  .click();
18
+ },
19
+
20
+ /**
21
+ * @param {("Single selection"|"Multiple selection")} toggleButtonType - Type of toggle button.
22
+ * @description Verifies the selected state of toggle button.
23
+ */
24
+ verifyToggleButtonSelected: (toggleButtonType) => {
25
+ switch (toggleButtonType) {
26
+ case 'Single Selection':
27
+ singleMultipleSelectionModeComponent.singleSelectionToggleButton()
28
+ .should('have.attr','aria-pressed','true');
29
+ break;
30
+ case 'Multiple selection':
31
+ singleMultipleSelectionModeComponent.multipleSelectionToggleButton()
32
+ .should('have.attr','aria-pressed','true');
33
+ break;
34
+ default:
35
+ throw new Error('Invalid toggle button');
36
+ }
37
+ },
38
+
39
+ /**
40
+ * @param {("Single selection"|"Multiple selection")} toggleButtonType - Type of toggle button.
41
+ * @description Verifies the not-selected state of toggle button.
42
+ */
43
+ verifyToggleButtonNotSelected: (toggleButtonType) => {
44
+ switch (toggleButtonType) {
45
+ case 'Single Selection':
46
+ singleMultipleSelectionModeComponent.singleSelectionToggleButton()
47
+ .should('have.attr','aria-pressed','false');
48
+ break;
49
+ case 'Multiple selection':
50
+ singleMultipleSelectionModeComponent.multipleSelectionToggleButton()
51
+ .should('have.attr','aria-pressed','false');
52
+ break;
53
+ default:
54
+ throw new Error('Invalid toggle button');
55
+ }
56
+ },
57
+ }
58
+
59
+ const tests = {
60
+ verifySingleMultipleSelectionModeContentCSSandA11y: () => {
61
+ it('\'Single selection\' and \'Multiple selection\' toggle buttons should be visible and \'Multiple selection\' should be selected by default',() => {
62
+ utilities.verifyElementVisibilityState(singleMultipleSelectionModeComponent.singleSelectionToggleButton(),'visible');
63
+ utilities.verifyElementVisibilityState(singleMultipleSelectionModeComponent.multipleSelectionToggleButton(),'visible');
64
+ utilities.verifyInnerText(singleMultipleSelectionModeComponent.singleSelectionToggleButton(),'Single selection');
65
+ utilities.verifyInnerText(singleMultipleSelectionModeComponent.multipleSelectionToggleButton(),'Multiple selection');
66
+ singleMultipleSelectionModeComponent.steps.verifyToggleButtonSelected('Multiple selection');
67
+ });
68
+
69
+ it('CSS of Single multiple selection toggle buttons', { tags: 'css' }, () => {
70
+ utilities.verifyCSS(singleMultipleSelectionModeComponent.singleSelectionToggleButton(), {
71
+ 'background-color': css.color.transparent,
72
+ 'color':css.color.UnselectedToggleButton,
73
+ 'font-size': css.fontSize.normal,
74
+ 'font-weight': css.fontWeight.bold
75
+ });
76
+ utilities.verifyCSS(singleMultipleSelectionModeComponent.multipleSelectionToggleButton(), {
77
+ 'background-color': css.color.toggleButtonSelectedBg,
78
+ 'color':css.color.primaryBtn,
79
+ 'font-size': css.fontSize.normal,
80
+ 'font-weight': css.fontWeight.bold
81
+ });
82
+ });
83
+
84
+ it('Accessibility of Single multiple selection toggle buttons', { tags: 'a11y' }, () => {
85
+ cy.checkAccessibility(singleMultipleSelectionModeComponent.multipleSelectionToggleButton().parents('[class*="HighlightImagestyles__ToggleWrapper"]'));
86
+ });
15
87
  }
16
88
  }
17
89
 
18
90
  export const singleMultipleSelectionModeComponent = {
19
91
  ...selectors,
20
- steps
92
+ steps,
93
+ tests
21
94
  }
@@ -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 } 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, styleAndLayoutCustomizationAccordionComponent } from "./components";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  import constants from "../fixtures/constants";
4
4
  const css = Cypress.env('css');
@@ -56,7 +56,7 @@ const selectors = {
56
56
  rightArrowNavigationButton: () => cy.get('[class*="DragAndDropTablestyles__PaginationRightControl"]'),
57
57
 
58
58
  //Specify correct answer matrix
59
- tableCellContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="CellDropZonestyles__CellContainer"]'),
59
+ tableCellContainerSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [class*="styles__CellContainer"]'),
60
60
  tableRowContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="Matrixstyles__RowContainer"]'),
61
61
  leftArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [aria-label="Left Pagination Button"]'),
62
62
  rightArrowNavigationButtonSpecifyCorrectAnswerSection: () => cy.get('.classification-set-correct-answer-wrapper [aria-label="Right Pagination Button"]'),
@@ -90,6 +90,9 @@ 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"]'),
93
96
  }
94
97
 
95
98
  const steps = {
@@ -921,11 +924,17 @@ const steps = {
921
924
  dragAndDropIntoCategoriesPage.leftArrowNavigationButton()
922
925
  .click();
923
926
  },
927
+
924
928
  clickOnLeftArrowNavigationButtonSpecifyCorrectAnswerSection: () => {
925
929
  dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection()
926
930
  .click();
927
931
  },
928
932
 
933
+ clickOnLeftArrowNavigationButtonPreviewTab: () => {
934
+ dragAndDropIntoCategoriesPage.leftArrowNavigationButtonPreviewTab()
935
+ .click();
936
+ },
937
+
929
938
  clickOnRightArrowNavigationButton: () => {
930
939
  dragAndDropIntoCategoriesPage.rightArrowNavigationButton()
931
940
  .click();
@@ -936,6 +945,11 @@ const steps = {
936
945
  .click();
937
946
  },
938
947
 
948
+ clickOnRightArrowNavigationButtonPreviewTab: () => {
949
+ dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab()
950
+ .click();
951
+ },
952
+
939
953
  /**
940
954
  * @description Verify column is visible in the specify columns and rows section table
941
955
  * @param {number} columnIndex Index of the column
@@ -952,6 +966,14 @@ const steps = {
952
966
  utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.tableCellContainerSpecifyCorrectAnswerSection().eq(columnIndex), 'visible');
953
967
  },
954
968
 
969
+ /**
970
+ * @description Verify column is visible in the preview tab table
971
+ * @param {number} columnIndex Index of the column
972
+ */
973
+ verifyColumnIsVisibleInTablePreviewTab: (columnIndex) => {
974
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.cellContainerPreviewTab().eq(columnIndex), 'visible');
975
+ },
976
+
955
977
  /**
956
978
  * @description Verify column is not visible in the specify columns and rows section table
957
979
  * @param {number} columnIndex Index of the column
@@ -1286,6 +1308,7 @@ const tests = {
1286
1308
  ...createQuestionBasePage.tests,
1287
1309
  ...additionalSettingsPanel.tests,
1288
1310
  ...additionalSettingsAccessibilitySectionComponent.tests,
1311
+ ...styleAndLayoutCustomizationAccordionComponent.tests,
1289
1312
  verifyContentsOfSpecifyCorrectAnswerSection: (scoringType) => {
1290
1313
  it(`When the user selects ${scoringType} from scoring type dropdown then the specify correct answer sections should be displayed`, () => {
1291
1314
  dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertySpecifyCorrectAnswer(0, 'None');
@@ -804,7 +804,15 @@ const steps = {
804
804
  categoryNamesArray.forEach((categoryTooltipName) => {
805
805
  essayResponsePage.equationEditorSectionCategories()
806
806
  .contains(categoryTooltipName, { matchCase: false })
807
- .verifyTooltip(categoryTooltipName);
807
+ .trigger('mouseover')
808
+ commonComponents.tooltipText()
809
+ .and('be.visible')
810
+ .should('have.text', categoryTooltipName)
811
+ essayResponsePage.equationEditorSectionCategories()
812
+ .contains(categoryTooltipName, { matchCase: false })
813
+ .trigger('mouseout')
814
+ commonComponents.tooltipText()
815
+ .should('not.exist');
808
816
  });
809
817
  },
810
818
 
@@ -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-label').eq(1)
100
+ additionalSettingsAcknowledgementsLabel:()=> cy.get('.additional-settings-container [class*="InlineRichTextComponentstyles__LabelWarpper"]')
101
101
  }
102
102
 
103
103
  const steps = {
@@ -1,7 +1,7 @@
1
1
  import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
3
  const css = Cypress.env('css');
4
- import { createQuestionBasePage, optionsWrapperComponent, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInputFieldComponent, fillInTheGapsDragAndDropCommonComponents, correctIncorrectAnswerLabelComponent, questionInstructionsComponent, autoScoredStudentViewSettings, ckEditorToolbar, equationEditorFlyout, draggableOptionContainer, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, draggableOptionsSectionComponent, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, responseAreaSettingsPopupComponent, styleAndLayoutCustomizationAccordionComponent, figCommonStyleAndLayoutComponent, draggableOptionsStyleAndLayoutComponent } from "./components"
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
 
6
6
  //TODO update option container selectors when https://redmine.zeuslearning.com/issues/563159 is resolved
7
7
  const selectors = {
@@ -20,6 +20,8 @@ const selectors = {
20
20
  ...enableOuterBorderComponent,
21
21
  ...responseAreaSettingsPopupComponent,
22
22
  ...additionalSettingsPanel,
23
+ ...gradingViewEnumerationComponent,
24
+ ...ariaLabelSectionComponent,
23
25
  ...styleAndLayoutCustomizationAccordionComponent,
24
26
  ...figCommonStyleAndLayoutComponent,
25
27
  ...draggableOptionsStyleAndLayoutComponent,
@@ -51,6 +53,7 @@ const selectors = {
51
53
  optionContainerOptionsPreviewTab: () => cy.get('.no-split-pane-wrapper .draggable-selected-item'),
52
54
  dropzoneWrapperPreviewTab: () => cy.get('.label-image-with-dnd-canvas-wrapper .cell'),
53
55
  dropzoneNumeration: () => cy.get('[class*="DroppableHotspotstyle__NumerationDiv"]'),
56
+ correctAnswerSectionWithoutEnumerationWrapper: () => cy.get('[class*="ClozeWithDragAndDropstyles__CorrectAnswers"] .question-text-wrapper'),
54
57
  //Additional settings
55
58
  accessibilityLabel: () => cy.get('[class*="Accessibilitystyles__AccessibilityLabelWrapper"]'),
56
59
  flagNonAccessibleCheckbox: () => cy.get('[data-ngie-testid="response-option-checkbox"] input'),
@@ -79,6 +82,8 @@ const steps = {
79
82
  ...allowMultipleInstancesOfSameDraggableOptionComponent.steps,
80
83
  ...additionalSettingsPanel.steps,
81
84
  ...responseAreaSettingsPopupComponent.steps,
85
+ ...gradingViewEnumerationComponent.steps,
86
+ ...ariaLabelSectionComponent.steps,
82
87
  ...styleAndLayoutCustomizationAccordionComponent.steps,
83
88
  ...figCommonStyleAndLayoutComponent.steps,
84
89
  ...draggableOptionsStyleAndLayoutComponent.steps,
@@ -634,8 +639,8 @@ const steps = {
634
639
  */
635
640
  verifyOptionTextNotWordWrappedInDropzoneSpecifyCorrectAnswerSection: (dropzoneIndex) => {
636
641
  utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), dropzoneIndex)
637
- .find('.item-content-container')
638
- .should('not.have.class', 'word-wrap');
642
+ .find('.question-text-wrapper')
643
+ .should('not.have.class', 'word-wrap-area');
639
644
  },
640
645
 
641
646
  /**
@@ -644,8 +649,8 @@ const steps = {
644
649
  */
645
650
  verifyOptionTextIsWordWrappedInDropzoneSpecifyCorrectAnswerSection: (dropzoneIndex) => {
646
651
  utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection(), dropzoneIndex)
647
- .find('.item-content-container')
648
- .should('have.class', 'word-wrap');
652
+ .find('.question-text-wrapper')
653
+ .should('have.class', 'word-wrap-area');
649
654
  },
650
655
 
651
656
  verifyDropzoneHeightWhenLongTextIsDroppedInSpecifyCorrectAnswerSection: () => {
@@ -671,8 +676,8 @@ const steps = {
671
676
  */
672
677
  verifyOptionTextNotWordWrappedInDropzonePreviewTab: (dropzoneIndex) => {
673
678
  utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), dropzoneIndex)
674
- .find('.item-content-container')
675
- .should('not.have.class', 'word-wrap');
679
+ .find('.question-text-wrapper')
680
+ .should('not.have.class', 'word-wrap-area');
676
681
  },
677
682
 
678
683
  /**
@@ -681,8 +686,8 @@ const steps = {
681
686
  */
682
687
  verifyOptionTextIsWordWrappedInDropzonePreviewTab: (dropzoneIndex) => {
683
688
  utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), dropzoneIndex)
684
- .find('.item-content-container')
685
- .should('have.class', 'word-wrap');
689
+ .find('.question-text-wrapper')
690
+ .should('have.class', 'word-wrap-area');
686
691
  },
687
692
 
688
693
  verifyDropzoneHeightWhenLongTextIsDroppedInPreviewTab: () => {
@@ -734,11 +739,85 @@ const steps = {
734
739
  utilities.hoverAwayFromElement();
735
740
  },
736
741
 
742
+ /**
743
+ * Verifies that the partial equal weights points per response score is as expected.
744
+ * @param {string} pointsPerResponse - The expected points per response score text.
745
+ */
737
746
  verifyPartialEqualWeightsPointsPerResponseScore: (pointsPerResponse) => {
738
747
  fillInTheGapsDragAndDropPage.partialEqualWeightsPointsPerResponseScore()
739
748
  .should('have.text', pointsPerResponse);
740
749
  },
741
750
 
751
+ verifyDropzoneNumerationNotExists: () => {
752
+ utilities.verifyElementVisibilityState(fillInTheGapsDragAndDropPage.dropzoneNumeration(), 'notExist');
753
+ },
754
+
755
+ /**
756
+ * Verifies the enumeration of dropzones in the preview tab against the provided array.
757
+ * @param {Array<string>} enumerationArray - The array of expected enumerations.
758
+ * @example - verifyDropzoneEnumeration(['1', '2', '3']);
759
+ */
760
+ verifyDropzoneEnumeration: (enumerationArray) => {
761
+ utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), enumerationArray.length);
762
+ enumerationArray.forEach((option, index) => {
763
+ fillInTheGapsDragAndDropPage.dropzonePreviewTab()
764
+ .eq(index)
765
+ .within(() => {
766
+ utilities.verifyTextContent(fillInTheGapsDragAndDropPage.dropzoneNumeration(), `${option}`);
767
+ });
768
+ });
769
+ },
770
+
771
+ /**
772
+ * Verifies the enumeration of correct answer responses against the provided array.
773
+ * @param {Array<string>} enumerationArray - The array of expected correct answer enumerations.
774
+ * @example - verifyCorrectAnswerResponsesEnumeration(['A', 'B', 'C']);
775
+ */
776
+ verifyCorrectAnswerResponsesEnumeration: (enumerationArray) => {
777
+ utilities.verifyElementCount(fillInTheGapsDragAndDropCommonComponents.correctAnswersOptions(), enumerationArray.length);
778
+ enumerationArray.forEach((option, index) => {
779
+ utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswersNumeration(), index), `${option}`);
780
+ });
781
+ },
782
+
783
+ /**
784
+ * Verifies the correct answer responses without enumeration.
785
+ * @param {string[]} correctAnswerArray - An array of correct answer responses to verify.
786
+ * @returns {void}
787
+ */
788
+ verifyCorrectAnswerResponsesWithoutEnumeration: (correctAnswerArray) => {
789
+ utilities.verifyElementCount(fillInTheGapsDragAndDropCommonComponents.correctAnswerResponseWrapperWithoutEnumeration(), correctAnswerArray.length);
790
+ correctAnswerArray.forEach((correctAnswer, index) => {
791
+ utilities.getNthElement(fillInTheGapsDragAndDropCommonComponents.correctAnswerResponseWrapperWithoutEnumeration(), index)
792
+ .within(($element) => {
793
+ utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
794
+ utilities.verifyInnerText(cy.wrap($element), correctAnswer);
795
+ })
796
+ });
797
+ },
798
+
799
+ /**
800
+ * Verifies the 'aria-label' attribute of a dropzone element in the preview tab.
801
+ * @param {number} inputFieldIndex - The index of the dropzone element to verify.
802
+ * @param {string} ariaLabel - The expected value of the 'aria-label' attribute.
803
+ */
804
+ verifyDropzoneAriaLabelPreviewTab: (inputFieldIndex, ariaLabel) => {
805
+ fillInTheGapsDragAndDropPage.dropzonePreviewTab()
806
+ .eq(inputFieldIndex)
807
+ .should('have.attr', 'aria-label', ariaLabel)
808
+ },
809
+
810
+ /**
811
+ * Verifies the 'aria-label' attribute of a dropzone element in the 'Specify Correct Answer' section.
812
+ * @param {number} inputFieldIndex - The index of the dropzone element to verify.
813
+ * @param {string} ariaLabel - The expected value of the 'aria-label' attribute.
814
+ */
815
+ verifyDropzoneAriaLabelSpecifyCorrectAnswerSection: (inputFieldIndex, ariaLabel) => {
816
+ fillInTheGapsDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
817
+ .eq(inputFieldIndex)
818
+ .should('have.attr', 'aria-label', ariaLabel)
819
+ },
820
+
742
821
  /**
743
822
  * Verifies the placement of the draggable option panel.
744
823
  * @param {('Bottom' | 'Top' | 'Left' | 'Right')} panelPlacement - The placement of the draggable option panel.
@@ -805,10 +884,10 @@ const steps = {
805
884
  },
806
885
 
807
886
  /**
808
- * Verifies the border color of a draggable option.
809
- * @param {number} optionIndex - The index of the draggable option.
810
- * @param {string} borderValue - The expected border value of the draggable option.
811
- */
887
+ * Verifies the border color of a draggable option.
888
+ * @param {number} optionIndex - The index of the draggable option.
889
+ * @param {string} borderValue - The expected border value of the draggable option.
890
+ */
812
891
  verifyDraggableOptionBorderColor: (optionIndex, borderValue) => {
813
892
  utilities.verifyCSS(utilities.getNthElement(draggableOptionContainer.draggableOption(), optionIndex), {
814
893
  'border': borderValue
@@ -816,22 +895,22 @@ const steps = {
816
895
  },
817
896
 
818
897
  /**
819
- * Verifies the border style of a draggable option.
820
- * @param {number} optionIndex - The index of the draggable option.
821
- * @param {string} borderStyle - The expected border style of the draggable option.
822
- */
898
+ * Verifies the border style of the dropzone at the specified index.
899
+ * @param {number} optionIndex - The index of the response area to verify.
900
+ * @param {string} borderStyle - The expected border style value in CSS format.
901
+ */
823
902
  verifyDraggableOptionBorderStyle: (optionIndex, borderStyle) => {
824
903
  const styleName = borderStyle.toLowerCase();
825
- utilities.verifyCSS(utilities.getNthElement(draggableOptionContainer.draggableOption(), optionIndex), {
904
+ utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDragAndDropPage.draggableOption(), optionIndex), {
826
905
  'border-style': styleName
827
906
  });
828
907
  },
829
908
 
830
909
  /**
831
- * Verifies the drag handle icon of the draggable options.
832
- * @param {('Default' | 'Arrows' | 'None')} dragIcon - The type of drag icon.
833
- * @throws {Error} If an incorrect drag icon is provided.
834
- */
910
+ * Verifies the drag handle icon of the draggable options.
911
+ * @param {('Default' | 'Arrows' | 'None')} dragIcon - The type of drag icon.
912
+ * @throws {Error} If an incorrect drag icon is provided.
913
+ */
835
914
  verifyDraggableOptionDragHandleIcon: (dragIcon) => {
836
915
  draggableOptionContainer.draggableOption()
837
916
  .each(($element) => {
@@ -868,10 +947,10 @@ const steps = {
868
947
  },
869
948
 
870
949
  /**
871
- * Verifies the border color of the dropzone at the specified index.
872
- * @param {number} dropzoneIndex - The index of the response area to verify.
873
- * @param {string} borderValue - The expected border color value in CSS format.
874
- */
950
+ * Verifies the border color of the dropzone at the specified index.
951
+ * @param {number} dropzoneIndex - The index of the response area to verify.
952
+ * @param {string} borderValue - The expected border color value in CSS format.
953
+ */
875
954
  verifyDropzoneBorderColor: (dropzoneIndex, borderValue) => {
876
955
  utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), dropzoneIndex), {
877
956
  'border': borderValue
@@ -879,10 +958,10 @@ const steps = {
879
958
  },
880
959
 
881
960
  /**
882
- * Verifies the border style of the dropzone at the specified index.
883
- * @param {number} dropzoneIndex - The index of the response area to verify.
884
- * @param {string} borderStyle - The expected border style value in CSS format.
885
- */
961
+ * Verifies the border style of the dropzone at the specified index.
962
+ * @param {number} dropzoneIndex - The index of the response area to verify.
963
+ * @param {string} borderStyle - The expected border style value in CSS format.
964
+ */
886
965
  verifyDropzoneBorderStyle: (dropzoneIndex, borderStyle) => {
887
966
  const styleName = borderStyle.toLowerCase();
888
967
  utilities.verifyCSS(utilities.getNthElement(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), dropzoneIndex), {
@@ -909,6 +988,8 @@ const tests = {
909
988
  ...questionInstructionsComponent.tests,
910
989
  ...questionInputFieldComponent.tests,
911
990
  ...additionalSettingsPanel.tests,
991
+ ...gradingViewEnumerationComponent.tests,
992
+ ...ariaLabelSectionComponent.tests,
912
993
  ...styleAndLayoutCustomizationAccordionComponent.tests,
913
994
  ...figCommonStyleAndLayoutComponent.tests,
914
995
  ...draggableOptionsStyleAndLayoutComponent.tests,
@@ -75,6 +75,7 @@ const selectors = {
75
75
  correctAnswersOptions: () => cy.get('.match-list-drag-and-drop .question-text-wrapper'),
76
76
  correctAnswersWrapper: () => cy.get('.match-list-drag-and-drop'),
77
77
  correctAnswersOptionContainer: () => cy.get('.draggable-selected-option'),
78
+ gradingViewOption: () => cy.get('..item-content-wrapper'),
78
79
  questionBorderPreviewTab: () => cy.get('[class*="ClozeWithDragAndDropstyles__WrapperDiv"]'),
79
80
  correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.answer-status-response-preview-wrapper .item-wrapper'),
80
81
  correctAnswerTextWithoutEnumeration: () => cy.get('.answer-status-response-preview-wrapper .item-wrapper'),
@@ -942,7 +943,7 @@ const steps = {
942
943
  },
943
944
 
944
945
  verifyGradingViewOptionDisabled: () => {
945
- matchingPage.correctAnswersOptionContainer()
946
+ matchingPage.gradingViewOption()
946
947
  .should('have.css', 'pointer-events', 'none');
947
948
  },
948
949
 
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, studentViewSettingsLabelComponent, randomizeOptionsComponent, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
2
+ import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, studentViewSettingsLabelComponent, randomizeOptionsComponent, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent } from "./components";
3
3
  const css = Cypress.env('css');
4
4
 
5
5
  const selectors = {
@@ -31,6 +31,7 @@ const steps = {
31
31
  ...randomizeOptionsComponent.steps,
32
32
  ...commonComponents.steps,
33
33
  ...additionalSettingsPanel.steps,
34
+ ...styleAndLayoutCustomizationAccordionComponent.steps,
34
35
  /**
35
36
  * Modifies the property of an option cell in the grid for checkbox settings.
36
37
  * @param {Object} position - The position of the option cell.
@@ -154,6 +155,7 @@ const tests = {
154
155
  ...commonComponents.tests,
155
156
  ...additionalSettingsPanel.tests,
156
157
  ...additionalSettingsAccessibilitySectionComponent.tests,
158
+ ...styleAndLayoutCustomizationAccordionComponent.tests,
157
159
  /**
158
160
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
159
161
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
@@ -242,7 +244,7 @@ const tests = {
242
244
  optionCellPropertyMenuOptions.forEach((cellType, index) => {
243
245
  utilities.verifyInnerText(utilities.getNthElement(multipleSelectionGridPage.editCellPropertyListOption(), index), cellType);
244
246
  });
245
- multipleSelectionGridPage.steps.verifyCellPropertyMenuOptionIsSelected(optionCellPropertyMenuOptions[2]);
247
+ multipleSelectionGridPage.steps.verifyCellPropertyMenuOptionIsSelected(optionCellPropertyMenuOptions[0]);
246
248
  });
247
249
 
248
250
  it('CSS of default option type dropdown in active state', { tags: 'css' }, () => {
@@ -829,7 +829,7 @@ const steps = {
829
829
 
830
830
  verifyAriaLabelAddedResponseFieldPreviewTab: (text) => {
831
831
  shortTextResponsePage.previewTabResponseField()
832
- .should('have.attr', 'aria-label', `${text} Maximum 50 characters`);
832
+ .should('have.attr', 'aria-label', `${text} `);
833
833
  },
834
834
 
835
835
  verifyAnswerInputFieldHasDefaultAriaLabelInSpecifyCorrectAnswerSection: () => {
@@ -839,7 +839,7 @@ const steps = {
839
839
 
840
840
  verifyResponseFieldHasDefaultAriaLabelInPreviewTab: () => {
841
841
  shortTextResponsePage.previewTabResponseField()
842
- .should('have.attr', 'aria-label', 'Enter your response to the question here Maximum 50 characters');
842
+ .should('have.attr', 'aria-label', 'Enter your response to the question here ');
843
843
  },
844
844
 
845
845
  checkFlagThisItemNonAccessibleCheckbox: () => {
@@ -1,5 +1,5 @@
1
1
  import utilities from "../support/helpers/utilities";
2
- import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, randomizeOptionsComponent, studentViewSettingsLabelComponent, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent } from "./components";
2
+ import { createQuestionBasePage, questionInstructionsComponent, gridQuestionCommonComponent, scoringSectionBaseEditTab, ckEditorToolbar, equationEditorFlyout, autoScoredScoringPreviewTab, correctIncorrectAnswerLabelComponent, autoScoredScoringSectionMultiResponseType, autoScoredStudentViewSettings, specifyRowsAndColumnsComponent, autoScoredSpecifyCorrectAnswerSection, randomizeOptionsComponent, studentViewSettingsLabelComponent, commonComponents, additionalSettingsPanel, additionalSettingsAccessibilitySectionComponent, styleAndLayoutCustomizationAccordionComponent } from "./components";
3
3
  const css = Cypress.env('css');
4
4
 
5
5
  const selectors = {
@@ -35,6 +35,7 @@ const steps = {
35
35
  ...randomizeOptionsComponent.steps,
36
36
  ...commonComponents.steps,
37
37
  ...additionalSettingsPanel.steps,
38
+ ...styleAndLayoutCustomizationAccordionComponent.steps,
38
39
  /**
39
40
  * Modifies the property of an option cell in the grid for radio button settings.
40
41
  * @param {Object} position - The position of the option cell.
@@ -158,6 +159,7 @@ const tests = {
158
159
  ...createQuestionBasePage.tests,
159
160
  ...additionalSettingsPanel.tests,
160
161
  ...additionalSettingsAccessibilitySectionComponent.tests,
162
+ ...styleAndLayoutCustomizationAccordionComponent.tests,
161
163
  /**
162
164
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
163
165
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
@@ -222,7 +224,7 @@ const tests = {
222
224
  optionCellPropertyMenuOptions.forEach((cellType, index) => {
223
225
  utilities.verifyInnerText(utilities.getNthElement(singleSelectionGridPage.editCellPropertyListOption(), index), cellType);
224
226
  });
225
- singleSelectionGridPage.steps.verifyCellPropertyMenuOptionIsSelected(optionCellPropertyMenuOptions[2]);
227
+ singleSelectionGridPage.steps.verifyCellPropertyMenuOptionIsSelected(optionCellPropertyMenuOptions[0]);
226
228
  });
227
229
 
228
230
  it('CSS of default option type dropdown in active state', { tags: 'css' }, () => {
@@ -10,6 +10,7 @@ const selectors = {
10
10
  ...createQuestionBasePage,
11
11
  ...autoScoredScoringSectionMultiResponseType,
12
12
  ...autoScoredSpecifyCorrectAnswerSection,
13
+ ...commonComponents,
13
14
 
14
15
  addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
15
16
  responseToken: () => cy.get('.cke_button__addresponse'),
@@ -15,7 +15,7 @@ const selectors = {
15
15
  canvasInPreviewTab: () => cy.get('[class*="PreviewTabstyles__ContentWrapper"] .image-container'),
16
16
  textAreaPreviewTab: () => cy.get('.label-image-with-text-preview [class*="TextBoxContainer"]'),
17
17
  tickIcon: () => cy.get('.add-background-tick-icon-wrapper [data-name*="Rectangle"]'),
18
- responseFieldWrapperPreviewTab: () => cy.get('.cloze-response-wrapper'),
18
+ responseFieldWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="__PointerWrapper"]'),
19
19
  responseFieldNumerationPreviewTab: () => cy.get('.image-container .response-input-adornment')
20
20
  }
21
21
 
@@ -298,11 +298,9 @@ const steps = {
298
298
  });
299
299
  },
300
300
 
301
- verifyEditDisplayTextPopupInputFieldAndSelectedText: () => {
301
+ verifyEditDisplayTextPopupInputField: () => {
302
302
  uploadResponsePage.editDisplayTextPopupInputField()
303
303
  .should('have.value', 'image.png')
304
- .parent()
305
- .and('have.class', 'Mui-focused');
306
304
  },
307
305
 
308
306
  clearEditDisplayTextPopupInputField: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.202",
3
+ "version": "1.0.203",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {