itemengine-cypress-automation 1.0.82 → 1.0.84

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. package/cypress/e2e/ILC/DesmosGraphing/previewTabContent.smoke.js +3 -3
  2. package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +30 -0
  3. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  4. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingForAllViews.smoke.js +3 -3
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingGroupedScoring.js +158 -0
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +1 -1
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/manuallyAndNonScored.js +2 -2
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsBasic.js +3 -163
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsBasic.js +2 -2
  15. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/FillInTheGapsOverImageDragAndDropScoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +43 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +510 -0
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +678 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +7 -7
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +7 -7
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/headerSection.js +82 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/manuallyAndNonScoredEditTab.js +3 -3
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +198 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/specifyCorrectAnswerSection.js +2 -2
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +11 -11
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettingsForGroupedLayout.js +263 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/switchingCasesBetweenOptionsLayout.js +1 -1
  32. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -1
  33. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +1 -1
  34. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
  35. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/allOrNothingPenaltyScoring.js +1 -1
  36. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/manuallyAndNonScored.js +2 -2
  37. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  38. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsBasic.js +3 -3
  39. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  40. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  41. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsBasic.js +2 -2
  42. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +4 -4
  43. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +1 -1
  44. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  45. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +80 -0
  46. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/allOrNothingForAllViews.smoke.js +4 -4
  47. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  48. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/editTabScoringSection.js +10 -10
  49. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/previewContentsForAllViews.smoke.js +1 -1
  50. package/cypress/e2e/ILC/{FillInTheGapsOverImageText → FillInTheGapsOverImageTextNew}/specifyCorrectAnswerSection.js +2 -2
  51. package/cypress/e2e/ILC/Protractor/protractorEditTabBasicsSection.js +2 -0
  52. package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +2 -0
  53. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +177 -171
  54. package/cypress/pages/components/backgroundImageUploadComponent.js +19 -3
  55. package/cypress/pages/components/draggableOptionContainer.js +13 -0
  56. package/cypress/pages/components/essayResponseCommonComponents.js +175 -25
  57. package/cypress/pages/components/figOverImageCanvasComponent.js +257 -0
  58. package/cypress/pages/components/imageActionsComponent.js +30 -0
  59. package/cypress/pages/components/index.js +5 -5
  60. package/cypress/pages/components/measuringToolComponent.js +0 -54
  61. package/cypress/pages/components/opacityComponent.js +64 -0
  62. package/cypress/pages/dragAndDropIntoCategoriesPage.js +16 -1
  63. package/cypress/pages/essayResponsePage.js +5 -7
  64. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +152 -11
  65. package/cypress/pages/fillInTheGapsOverImageTextPage.js +7 -6
  66. package/cypress/pages/protractorPage.js +3 -1
  67. package/cypress/pages/rulerPage.js +5 -24
  68. package/cypress/pages/selectQuestionResourceToolPage.js +1 -1
  69. package/package.json +1 -1
  70. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -0
  71. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -0
  72. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -0
  73. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/allOrNothingPenaltyScoring.js +0 -0
  74. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/manuallyAndNonScoredScoring.js +0 -0
  75. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +0 -0
  76. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionBasic.js +0 -0
  77. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +0 -0
  78. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionCorrectPointsGreaterThanAlternativePoints.js +0 -0
  79. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +0 -0
  80. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +0 -0
  81. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneBasic.js +0 -0
  82. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +0 -0
  83. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +0 -0
  84. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/Scoring/perDropzoneMinimumAndPenaltyScoring.js +0 -0
  85. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/allOrNothingBasicForAllViews.smoke.js +0 -0
  86. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/checkAnswerFunctionalityForAllViews.smoke.js +0 -0
  87. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/clickAndDrop.js +0 -0
  88. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/draggableOptions.js +0 -0
  89. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabBasicSection.js +0 -0
  90. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/editTabScoring.js +0 -0
  91. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/headerSection.js +0 -0
  92. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/manuallyAndNonScoredScoringEditTab.js +0 -0
  93. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/minimumScoringPenaltyPointsAndRoundingDropdown.js +0 -0
  94. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/previewContentsForAllViews.smoke.js +0 -0
  95. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/specifyCorrectAnswerSection.js +0 -0
  96. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettings.js +0 -0
  97. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/studentViewSettingsForGroupedLayout.js +0 -0
  98. /package/cypress/e2e/ILC/{DragAndDropIntoCategories → DragAndDropIntoCategoriesNew}/switchingCasesBetweenOptionsLayout.js +0 -0
@@ -0,0 +1,64 @@
1
+ import utilities from "../../support/helpers/utilities";
2
+
3
+ const selectors = {
4
+ opacityLabel: () => cy.get('[class*="OpacityWrapper"] [class*="Label"]').last(),
5
+ opacityInputField: () => cy.get('[class*="OpacityWrapper"] input[type="text"]').last(),
6
+ opacitySlider: () => cy.get('[class*="OpacityWrapper"] .MuiSlider-colorPrimary'),
7
+ }
8
+
9
+ const steps = {
10
+ verifyDefaultOpacityLabelSliderAndInputField: (value) => {
11
+ utilities.verifyInnerText(opacityComponent.opacityLabel(), 'Opacity');
12
+ utilities.verifyElementVisibilityState(opacityComponent.opacityLabel(), 'visible');
13
+ utilities.verifyElementVisibilityState(opacityComponent.opacitySlider(), 'visible');
14
+ utilities.verifyElementVisibilityState(opacityComponent.opacityInputField(), 'visible');
15
+ },
16
+
17
+ /**
18
+ * @param {number} value holds value of input field
19
+ * @description function verifies value in input field
20
+ */
21
+ verifyOpacityInputFieldValue: (value) => {
22
+ opacityComponent.opacityInputField()
23
+ .should('have.value', value);
24
+ },
25
+
26
+ verifyMaxOpacitySliderValue: () => {
27
+ opacityComponent.opacitySlider()
28
+ .find('[aria-orientation="horizontal"]')
29
+ .should('have.attr', 'aria-valuemax', 100);
30
+ },
31
+
32
+ /**
33
+ * @param {number} value holds value of slider
34
+ * @description function verifies value in slider
35
+ */
36
+ verifyOpacitySliderValue: (value) => {
37
+ opacityComponent.opacitySlider()
38
+ .find('input')
39
+ .should('have.value', value);
40
+ },
41
+
42
+ /**
43
+ * @param {number} value holds value to be added in input field
44
+ * @description function adds value in input field
45
+ */
46
+ enterInputToOpacityInputField: (value) => {
47
+ opacityComponent.opacityInputField()
48
+ .clear()
49
+ .type(value)
50
+ .blur();
51
+ opacityComponent.opacityInputField()
52
+ .should('have.value', value);
53
+ },
54
+
55
+ clickOnOpacitySlider: () => {
56
+ opacityComponent.opacitySlider()
57
+ .click();
58
+ }
59
+ }
60
+
61
+ export const opacityComponent = {
62
+ ...selectors,
63
+ steps
64
+ }
@@ -508,6 +508,21 @@ const steps = {
508
508
  });
509
509
  },
510
510
 
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 })
516
+ */
517
+ clickAndDropOptionFromNthGroupInDropzonePreviewTab: (groupNumber, optionsObject) => {
518
+ draggableOptionContainer.groupedOptionsContainerPreviewTab()
519
+ .eq(groupNumber)
520
+ .parents('.item-list')
521
+ .within(() => {
522
+ steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection(optionsObject);
523
+ });
524
+ },
525
+
511
526
  verifyCorrectAnswerSectionNotExists: () => {
512
527
  utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.correctAnswerContainer(), 'notExist');
513
528
  },
@@ -1348,7 +1363,7 @@ const steps = {
1348
1363
  let animals = [['Bat', 'Platypus', 'Panda', 'Zebra'],
1349
1364
  ['Peacock', 'Falcon', 'Eagle', 'Tiger'],
1350
1365
  ['Parrot', 'Lion', 'Whale', 'Elephant'],
1351
- ['Giraffe', 'Kangaroo', 'Ostrich', 'Flying squirrel']
1366
+ ['Giraffe', 'Kangaroo', 'Bat', 'Flying squirrel']
1352
1367
  ];
1353
1368
  let groupTitles = ['Group A', 'Group B', 'Group C', 'Group D'];
1354
1369
  draggableOptionsSectionComponent.steps.expandDraggableOptionsLayoutDropdown()
@@ -1,5 +1,5 @@
1
1
  import { equationEditorCategoriesAndSymbols } from "../fixtures/equationEditorCategoriesAndSymbols ";
2
- import { questionInstructionsComponent, scoringSectionBase, createQuestionBasePage, additionalSettingsPanel, previewScoringAndShowCorrectAnswerComponent, commonComponents } from "./components";
2
+ import { questionInstructionsComponent, scoringSectionBaseEditTab, createQuestionBasePage, additionalSettingsPanel, autoScoredScoringPreviewTab, commonComponents } from "./components";
3
3
  import { equationEditorFlyout } from "./components/equationEditorFlyout";
4
4
  import { essayResponseCommonComponents } from "./components/essayResponseCommonComponents";
5
5
  import { specialOrMathCharacters } from "../fixtures/specialAndMathCharacters";
@@ -9,15 +9,13 @@ let originalText;
9
9
  let formattedText;
10
10
 
11
11
  const selectors = {
12
- ...scoringSectionBase,
12
+ ...scoringSectionBaseEditTab,
13
13
  ...createQuestionBasePage,
14
14
  ...additionalSettingsPanel,
15
15
  ...questionInstructionsComponent,
16
16
  ...essayResponseCommonComponents,
17
17
  ...commonComponents,
18
18
  //Basic section
19
- setWordLimitLabel: () => cy.get('[class*="EssayResponseComponentstyles__PropertyLabel"]'),
20
- setWordLimitInputField: () => cy.get('.essay-response-question-word-limit-setting-wrapper input[type="text"]'),
21
19
  displayWordLimitLabel: () => cy.get('#Display-word-limit-dropdown-label'),
22
20
  displayWordLimitDropdown: () => cy.get('#Display-word-limit-select'),
23
21
  displayWordLimitDropdownListOptions: (optionIndex) => cy.get('.dropdown-list-ul [role="option"]').eq(optionIndex),
@@ -114,7 +112,7 @@ const specialAndMathCharacters = {
114
112
  const steps = {
115
113
  ...createQuestionBasePage.steps,
116
114
  ...questionInstructionsComponent.steps,
117
- ...scoringSectionBase.steps,
115
+ ...scoringSectionBaseEditTab.steps,
118
116
  ...additionalSettingsPanel.steps,
119
117
  ...essayResponseCommonComponents.steps,
120
118
  expandCustomizeFormattingOptionsAccordion: () => {
@@ -190,8 +188,8 @@ const tests = {
190
188
  ...createQuestionBasePage.tests,
191
189
  ...questionInstructionsComponent.tests,
192
190
  ...additionalSettingsPanel.tests,
193
- ...scoringSectionBase.tests,
194
- ...previewScoringAndShowCorrectAnswerComponent.tests,
191
+ ...scoringSectionBaseEditTab.tests,
192
+ ...autoScoredScoringPreviewTab.tests,
195
193
  ...commonComponents.tests,
196
194
  insertEquationAndVerifyInputFieldContentsAndWordCount: (expectedOutput, wordCount) => {
197
195
  it(`On clicking the Ok button the symbols/equation entered should be displayed in the preview tab input field and the Word count should increase to ${wordCount}`, () => {
@@ -1,6 +1,7 @@
1
1
  import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
- import { createQuestionBasePage, questionInstructionsComponent, uploadImageSectionComponent, scoringSectionBaseEditTab, optionsWrapperComponent, equationEditorFlyout, ckEditorToolbar, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, maximumCapacityPerDropzoneComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, figOverImageCanvasComponent, backgroundImageUploadComponent, correctIncorrectAnswerLabelComponent, draggableOptionsSectionComponent, draggableOptionContainer, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel } from "./components"
3
+ import { createQuestionBasePage, questionInstructionsComponent, uploadImageSectionComponent, scoringSectionBaseEditTab, optionsWrapperComponent, equationEditorFlyout, ckEditorToolbar, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, maximumCapacityPerDropzoneComponent, autoScoredSpecifyCorrectAnswerSection, autoScoredScoringSectionMultiResponseType, figOverImageCanvasComponent, backgroundImageUploadComponent, correctIncorrectAnswerLabelComponent, draggableOptionsSectionComponent, draggableOptionContainer, studentViewSettingsLabelComponent, randomizeOptionsComponent, enableOuterBorderComponent, allowMultipleInstancesOfSameDraggableOptionComponent, additionalSettingsPanel, opacityComponent, imageActionsComponent } from "./components";
4
+ import { dialogBoxBase } from "./dialogBoxBase";
4
5
  const css = Cypress.env('css');
5
6
 
6
7
  const selectors = {
@@ -17,17 +18,24 @@ const selectors = {
17
18
  ...figOverImageCanvasComponent,
18
19
  ...backgroundImageUploadComponent,
19
20
  ...correctIncorrectAnswerLabelComponent,
21
+ ...dialogBoxBase,
20
22
  ...optionsWrapperComponent,
21
23
  ...draggableOptionsSectionComponent,
22
24
  ...draggableOptionContainer,
23
25
  ...randomizeOptionsComponent,
24
26
  ...enableOuterBorderComponent,
25
27
  ...autoScoredStudentViewSettings,
28
+ ...opacityComponent,
29
+ ...uploadImageSectionComponent,
30
+ ...imageActionsComponent,
26
31
  dropzonePreviewTab: () => cy.get('.drag-and-drop-canvas [class*="__DraggableWrapper"]'),
27
- dropzonePreviewTabWrapper: () => cy.get('[class*="Canvasstyle__DropzoneWrapper"]'),
32
+ dropzoneContainerPreviewTab: () => cy.get('[class*="Canvasstyle__DropzoneWrapper"]'),
28
33
  optionContainerOptionsPreviewTab: () => cy.get('.item-list .draggable-options-item:visible'),
34
+ dropzoneWrapperPreviewTab: () => cy.get('.label-image-with-dnd-canvas-wrapper .cell'),
29
35
  optionContainerOptionsSpecifyCorrectAnswerSection: () => cy.get('.option-drag-and-drop .item-list .draggable-options-item:visible'),
30
36
  dropzoneSpecifyCorrectAnswerSection: () => cy.get('.dropzone-and-label-wrapper [class*="__DraggableWrapper"]:visible'),
37
+ optionPreviewTab: () => cy.get('.draggable-options-item'),
38
+ dropzoneWrapperSpecifyCorrectAnswerSection: () => cy.get('.cell'),
31
39
  correctIncorrectAnswerBlock: () => cy.get('[class*="-answer-block"]'),
32
40
  correctIncorrectStatusMessageText: () => cy.get('[class*="AnswerStatusText"]'),
33
41
  dropzoneNumeration: () => cy.get('.drag-and-drop-canvas .answer-numeration-number-box'),
@@ -41,7 +49,7 @@ const selectors = {
41
49
  dropzoneLabelSpecifyCorrectAnswerSection: () => cy.get('.dropzone-and-label-wrapper .title-casing'),
42
50
  questionBorderPreviewTab: () => cy.get('.label-image-with-dnd-canvas-wrapper [class*="DragDropContextLayoutWrapper"]'),
43
51
  maxLimitInEachDropzoneHelpText: () => cy.get('[class*="Canvasstyle__LimitWrapper"]'),
44
- penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]'),
52
+ penaltyPointsForEachIncorrectDropzoneInputField: () => cy.get('input[aria-label="Penalty points for each incorrect dropzone"]')
45
53
  }
46
54
 
47
55
  const steps = {
@@ -69,6 +77,8 @@ const steps = {
69
77
  ...allowMultipleInstancesOfSameDraggableOptionComponent.steps,
70
78
  ...commonComponents.steps,
71
79
  ...additionalSettingsPanel.steps,
80
+ ...opacityComponent.steps,
81
+ ...imageActionsComponent.steps,
72
82
 
73
83
  /**
74
84
  * @description Verifies the text content of a specific preview tab dropzone element.
@@ -159,7 +169,7 @@ const steps = {
159
169
  .contains(optionText)
160
170
  .click();
161
171
  draggableOptionContainer.optionsContainerSpecifyCorrectAnswerSection()
162
- .click();
172
+ .click({ force: true });
163
173
  },
164
174
 
165
175
  /**
@@ -243,7 +253,7 @@ const steps = {
243
253
  * @param {number} optionIndex - The index of the option to verify.
244
254
  */
245
255
  verifyCorrectOptionIcon: (optionIndex) => {
246
- fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTabWrapper()
256
+ fillInTheGapsOverImageDragAndDropPage.dropzoneContainerPreviewTab()
247
257
  .eq(optionIndex)
248
258
  .within(() => {
249
259
  utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.tickIconWrapper(), {
@@ -257,7 +267,7 @@ const steps = {
257
267
  * @param {number} optionIndex - The index of the option to verify.
258
268
  */
259
269
  verifyIncorrectOptionIcon: (optionIndex) => {
260
- fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTabWrapper()
270
+ fillInTheGapsOverImageDragAndDropPage.dropzoneContainerPreviewTab()
261
271
  .eq(optionIndex)
262
272
  .within(() => {
263
273
  utilities.verifyCSS(fillInTheGapsOverImageDragAndDropPage.tickIconWrapper(), {
@@ -271,7 +281,7 @@ const steps = {
271
281
  * @param {number} optionIndex - The index of the option to verify.
272
282
  */
273
283
  verifyCorrectIncorrectIconNotExist: (optionIndex) => {
274
- fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTabWrapper()
284
+ fillInTheGapsOverImageDragAndDropPage.dropzoneContainerPreviewTab()
275
285
  .eq(optionIndex)
276
286
  .within(() => {
277
287
  utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.tickIconWrapper(), 'notExist');
@@ -279,9 +289,11 @@ const steps = {
279
289
  },
280
290
 
281
291
  verifyDropzoneNumeration: () => {
282
- for (let index = 0; index < fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab().length; index++) {
283
- utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsOverImageDragAndDropPage.dropzoneNumeration(), index), index + 1);
284
- }
292
+ fillInTheGapsOverImageDragAndDropPage.dropzoneNumeration()
293
+ .each(($element, index) => {
294
+ cy.wrap($element)
295
+ .should('have.text', `${index + 1}`)
296
+ });
285
297
  },
286
298
 
287
299
  /**
@@ -331,7 +343,7 @@ const steps = {
331
343
  let flowers = [['Flower', 'Petals', 'Seed', 'Pollen'],
332
344
  ['Leaflet', 'Leaves', 'Leaf', 'Green'],
333
345
  ['Stem', 'Branch', 'Trunk', 'Tree'],
334
- ['Rose', 'Lily', 'Orchid', 'Tulip']
346
+ ['Rose', 'Lily', 'Orchid', 'Petals']
335
347
  ];
336
348
  let groupTitles = ['Group A', 'Group B', 'Group C', 'Group D'];
337
349
  draggableOptionsSectionComponent.steps.expandDraggableOptionsLayoutDropdown()
@@ -371,6 +383,134 @@ const steps = {
371
383
  .type(`${points}`)
372
384
  .should('have.value', points)
373
385
  .blur();
386
+ },
387
+
388
+ verifyInactiveStateOfAllDropzoneInSpecifyCorrectAnswerSection: () => {
389
+ fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperSpecifyCorrectAnswerSection()
390
+ .should('not.have.class', 'dragging-over');
391
+ },
392
+
393
+ verifyActiveStateOfAllDropzoneInSpecifyCorrectAnswerSection: () => {
394
+ fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperSpecifyCorrectAnswerSection()
395
+ .should('have.class', 'dragging-over');
396
+ },
397
+
398
+ /**
399
+ * @param {number} dropzoneIndex index of the dropzone in specify correct answer section
400
+ * @param {string[]} responseArray array of options set as correct responses in a category cell
401
+ */
402
+ verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection: (dropzoneIndex, responseArray) => {
403
+ fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
404
+ .eq(dropzoneIndex)
405
+ .within(() => {
406
+ responseArray.forEach((response, count) => {
407
+ draggableOptionContainer.draggableOption()
408
+ .eq(count)
409
+ .verifyInnerText(response);
410
+ });
411
+ });
412
+ },
413
+
414
+ /**
415
+ * @param {number} responseAreaIndex Index of the stem response area in set correct answer section
416
+ * @description Verify drag handle is not visible in filled category cell in preview tab
417
+ */
418
+ verifyDragHandleNotVisibleInFilledDropzoneOfSpecifyCorrectAnswerSection: (responseAreaIndex) => {
419
+ fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
420
+ .eq(responseAreaIndex)
421
+ .within(() => {
422
+ draggableOptionContainer.draggableOptionDragIcon()
423
+ .should('not.exist');
424
+ });
425
+ },
426
+
427
+ /**
428
+ * @param {string} optionName denotes the text content of the draggable option
429
+ * @param {number} dropzoneIndex - The index of the dropzone.
430
+ * @description click on a draggable option present in the category cell of specify correct answer section
431
+ */
432
+ clickOnDraggableOptionInDropzoneOfSpecifyCorrectAnswerSection: (optionName, dropzoneIndex) => {
433
+ fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
434
+ .eq(dropzoneIndex)
435
+ .within(() => {
436
+ draggableOptionContainer.draggableOption()
437
+ .contains(optionName)
438
+ .click();
439
+ });
440
+ },
441
+
442
+ clickOnDropzoneOfSpecifyCorrectAnswerSection: (categoryIndex) => {
443
+ fillInTheGapsOverImageDragAndDropPage.dropzoneSpecifyCorrectAnswerSection()
444
+ .eq(categoryIndex)
445
+ .click({ force: true });
446
+ },
447
+
448
+
449
+ verifyInactiveStateOfAllDropzoneInPreviewTab: () => {
450
+ fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperPreviewTab()
451
+ .should('not.have.class', 'dragging-over');
452
+ },
453
+
454
+ verifyActiveStateOfAllDropzoneInPreviewTab: () => {
455
+ fillInTheGapsOverImageDragAndDropPage.dropzoneWrapperPreviewTab()
456
+ .should('have.class', 'dragging-over');
457
+ },
458
+
459
+ /**
460
+ * @param {string} optionName denotes the text content of the draggable option
461
+ * @param {number} dropzoneIndex - The index of the dropzone.
462
+ * @description click on a draggable option present in the category cell of specify correct answer section
463
+ */
464
+ clickOnDraggableOptionInDropzoneOfPreviewTab: (optionName, dropzoneIndex) => {
465
+ fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
466
+ .eq(dropzoneIndex)
467
+ .within(() => {
468
+ draggableOptionContainer.draggableOption()
469
+ .contains(optionName)
470
+ .click();
471
+ });
472
+ },
473
+
474
+ clickOnDropzoneOfPreviewTab: (categoryIndex) => {
475
+ fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
476
+ .eq(categoryIndex)
477
+ .click({ force: true });
478
+ },
479
+
480
+ /**
481
+ * @param {number} responseAreaIndex Index of the stem response area in set correct answer section
482
+ * @description Verify drag handle is not visible in filled category cell in preview tab
483
+ */
484
+ verifyDragHandleNotVisibleInFilledDropzoneOfPreviewTab: (responseAreaIndex) => {
485
+ fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
486
+ .eq(responseAreaIndex)
487
+ .within(() => {
488
+ draggableOptionContainer.draggableOptionDragIcon()
489
+ .should('not.exist');
490
+ });
491
+ },
492
+
493
+ /**
494
+ * Sets options in dropzone in the Preview Tab based on the provided optionsObject.
495
+ * @param {Object[]} responses - An array of objects containing the responseIndex, responseText and dropzone index
496
+ * @param {number} responses[].groupIndex - The index of the group
497
+ * @param {string} responses[].responseText - The text of the option
498
+ * @param {string} responses[].dropzoneIndex - The index of the dropzone
499
+ */
500
+ clickAndDropOptionFromNthGroupInDropzonePreviewTab: (responses) => {
501
+ responses.forEach(({ responseText, groupIndex, dropzoneIndex }) => {
502
+ draggableOptionContainer.groupedOptionsContainerPreviewTab()
503
+ .eq(groupIndex)
504
+ .parents('.item-list')
505
+ .within(() => {
506
+ fillInTheGapsOverImageDragAndDropPage.optionPreviewTab()
507
+ .contains(responseText)
508
+ .click();
509
+ });
510
+ fillInTheGapsOverImageDragAndDropPage.dropzonePreviewTab()
511
+ .eq(dropzoneIndex)
512
+ .click({ force: true });
513
+ });
374
514
  }
375
515
  }
376
516
 
@@ -378,6 +518,7 @@ const tests = {
378
518
  ...autoScoredScoringPreviewTab.tests,
379
519
  ...scoringSectionBaseEditTab.tests,
380
520
  ...autoScoredScoringSectionMultiResponseType.tests,
521
+ ...questionInstructionsComponent.tests,
381
522
  ...autoScoredSpecifyCorrectAnswerSection.tests,
382
523
  ...draggableOptionsSectionComponent.tests,
383
524
  ...optionsWrapperComponent.tests,
@@ -24,12 +24,13 @@ const selectors = {
24
24
  answerInputFieldSpecifyCorrectAnswerSection: () => cy.get('.label-image-text-inline-text-field input'),
25
25
  answerInputFieldPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .response-input-field input'),
26
26
  correctAnswerSectionWrapper: () => cy.get('.cloze-with-text-correct-answer-wrapper'),
27
- correctAnswersLabel: () => cy.get('.correct-answers-label'),
27
+ correctAnswersLabel: () => cy.get('.label-image-with-text-correct-answer-label'),
28
28
  responseStatusWrapper: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper'),
29
29
  tickIconWrapper: () => cy.get('.tick-icon-wrapper [data-name*="Rectangle"]'),
30
30
  responseAreaNumeration: () => cy.get('.response-input-adornment'),
31
- correctAnswerResponseWrapper: () => cy.get('.cloze-with-text-correct-response-wrapper .cloze-with-text-answer-status-response-preview-wrapper'),
32
- correctAnswerResponse: () => cy.get('[class*="ResponseInputComponentstyles__ResponseInputWrapper"] input')
31
+ correctAnswerResponseNumeration: () => cy.get('.answer-numeration-number-box'),
32
+ correctAnswerResponseWrapper: () => cy.get('[class*="ClozeWithTextResponsestyles__AnswerCell"]'),
33
+ correctAnswerResponse: () => cy.get('[class*="AnswerWrapperForLabel"]')
33
34
  }
34
35
 
35
36
  const steps = {
@@ -145,7 +146,7 @@ const steps = {
145
146
  fillInTheGapsOverImageTextPage.answerInputFieldPreviewTab()
146
147
  .each(($element, index) => {
147
148
  cy.wrap($element)
148
- .parents('.response-input-field')
149
+ .parents('.cloze-with-text-response-field-wrapper')
149
150
  .within(() => {
150
151
  utilities.verifyTextContent(fillInTheGapsOverImageTextPage.responseAreaNumeration(), `${index + 1}`);
151
152
  });
@@ -163,9 +164,9 @@ const steps = {
163
164
  fillInTheGapsOverImageTextPage.correctAnswerResponseWrapper()
164
165
  .eq(index)
165
166
  .within(() => {
166
- utilities.verifyInnerText(fillInTheGapsOverImageTextPage.responseAreaNumeration(), `${index + 1}`);
167
+ utilities.verifyInnerText(fillInTheGapsOverImageTextPage.correctAnswerResponseNumeration(), `${index + 1}`);
167
168
  fillInTheGapsOverImageTextPage.correctAnswerResponse()
168
- .should('have.value', correctAnswer);
169
+ .should('have.text', correctAnswer);
169
170
  });
170
171
  });
171
172
  },
@@ -1,7 +1,7 @@
1
1
  import { commonComponents } from "./components";
2
2
  import { createItemPage } from "./createItemPage";
3
3
  import utilities from "../support/helpers/utilities";
4
- import { createQuestionBasePage, additionalSettingsPanel, measuringToolComponent, toolVisibilityComponent } from "./components";
4
+ import { createQuestionBasePage, additionalSettingsPanel, measuringToolComponent, toolVisibilityComponent, opacityComponent } from "./components";
5
5
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
6
6
  import { dialogBoxBase } from "./dialogBoxBase";
7
7
 
@@ -12,6 +12,7 @@ const selectors = {
12
12
  ...selectQuestionResourceToolPage,
13
13
  ...createQuestionBasePage,
14
14
  ...toolVisibilityComponent,
15
+ ...opacityComponent,
15
16
  //edit tab
16
17
  angleTypeLabel: () => cy.get('#Angle-type-dropdown-label'),
17
18
  angleTypeDropdown: () => cy.get('#Angle-type-select'),
@@ -50,6 +51,7 @@ const steps = {
50
51
  ...selectQuestionResourceToolPage.steps,
51
52
  ...toolVisibilityComponent.steps,
52
53
  ...commonComponents.steps,
54
+ ...opacityComponent.steps,
53
55
  expandAngleTypeDropdown: () => {
54
56
  protractorPage.angleTypeDropdown()
55
57
  .click();
@@ -1,6 +1,6 @@
1
1
  import { createItemPage } from "./createItemPage";
2
2
  import utilities from "../support/helpers/utilities";
3
- import { createQuestionBasePage, additionalSettingsPanel, commonComponents, toolVisibilityComponent, measuringToolComponent } from "./components";
3
+ import { createQuestionBasePage, additionalSettingsPanel, commonComponents, imageActionsComponent, toolVisibilityComponent, measuringToolComponent, opacityComponent } from "./components";
4
4
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
5
5
  import { dialogBoxBase } from "./dialogBoxBase";
6
6
  const css = Cypress.env('css');
@@ -13,6 +13,8 @@ const selectors = {
13
13
  ...toolVisibilityComponent,
14
14
  ...dialogBoxBase,
15
15
  ...measuringToolComponent,
16
+ ...opacityComponent,
17
+ ...imageActionsComponent,
16
18
  alternativeTextLabel: () => cy.get('.alternative-text'),
17
19
  rotationDropdownListOption: (ariaLabel = null) => {
18
20
  if (ariaLabel) {
@@ -64,8 +66,6 @@ const selectors = {
64
66
  fileUploadProgressBar: () => cy.get('[class*="CustomRulerImagestyles__ProgressBar"]'),
65
67
  lockAspectRatioButton: () => cy.get('[aria-label="Locked aspect ratio"]'),
66
68
  resetButton: () => cy.get('[aria-label="Reset image size"]'),
67
- lockAspectRatioButton: () => cy.get('[class*="CustomRulerImagestyles__LockIconWrapper"]'),
68
- resetDimensionsButton: () => cy.get('[aria-label="Reset image size"]'),
69
69
  //preview tab
70
70
  rulerPreviewTab: () => cy.get('[class*="RulerComponentstyles__DefaultRulerWrapper"]'),
71
71
  rulerUploadedImagePreviewTab: () => cy.get('[class*="RulerComponentstyles__RulerComponentWrapper"] img'),
@@ -85,6 +85,8 @@ const steps = {
85
85
  ...selectQuestionResourceToolPage.steps,
86
86
  ...toolVisibilityComponent.steps,
87
87
  ...measuringToolComponent.steps,
88
+ ...opacityComponent.steps,
89
+ ...imageActionsComponent.steps,
88
90
 
89
91
  /**
90
92
  * @param {string[]} dropdownOptionsArray array containing options of rotation dropdown list
@@ -193,22 +195,6 @@ const steps = {
193
195
  });
194
196
  },
195
197
 
196
- unlockAspectRatio: () => {
197
- rulerPage.lockAspectRatioButton()
198
- .click();
199
- rulerPage.lockAspectRatioButton()
200
- .find('button')
201
- .should('have.attr', 'aria-label', 'Unlocked aspect ratio');
202
- },
203
-
204
- lockAspectRatio: () => {
205
- rulerPage.lockAspectRatioButton()
206
- .click();
207
- rulerPage.lockAspectRatioButton()
208
- .find('button')
209
- .should('have.attr', 'aria-label', 'Locked aspect ratio');
210
- },
211
-
212
198
  /**
213
199
  * @param {number} width holds value of width attribute
214
200
  * @description function updates width in input field
@@ -267,11 +253,6 @@ const steps = {
267
253
  .should('have.value', height)
268
254
  },
269
255
 
270
- resetDimensions: () => {
271
- rulerPage.resetDimensionsButton()
272
- .click();
273
- },
274
-
275
256
  clickOnDeleteButton: () => {
276
257
  rulerPage.deleteImageButton()
277
258
  .click();
@@ -35,7 +35,7 @@ const questionTypeCategoryMap = {
35
35
  'list matching': 'List',
36
36
  'list ordering': 'List',
37
37
  'list sorting': 'List',
38
- 'essay response - rich text': 'Constructed response',
38
+ 'essay response': 'Constructed response',
39
39
  'essay response - basic': 'Constructed response',
40
40
  'essay response - math': 'Constructed response',
41
41
  'short text response': 'Constructed response',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.82",
3
+ "version": "1.0.84",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {