itemengine-cypress-automation 1.0.563-IEI-6998-Add-coverage-for-image-hightlight-question-type-238d7b4.0 → 1.0.564-IEI-7011-cf323ce.0

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 (24) hide show
  1. package/cypress/config-files/ilprod.json +2 -1
  2. package/cypress/config-files/ilqa.json +2 -1
  3. package/cypress/config-files/ilstage.json +2 -1
  4. package/cypress/e2e/ILC/ImageHighlight/additionalSettings.js +0 -87
  5. package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +11 -62
  6. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +12 -14
  7. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +3 -12
  8. package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +3 -66
  9. package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +2 -16
  10. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +168 -1
  11. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +86 -0
  12. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +91 -0
  13. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +79 -0
  14. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +130 -0
  15. package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +16 -0
  16. package/cypress/pages/components/index.js +1 -0
  17. package/cypress/pages/components/showAlternativeAnswersComponent.js +169 -0
  18. package/cypress/pages/imageHighlightPage.js +7 -184
  19. package/cypress/pages/itemPreviewPage.js +0 -1
  20. package/cypress/pages/multipleSelectionPage.js +3 -1
  21. package/cypress/pages/singleSelectionPage.js +5 -1
  22. package/cypress/support/helpers/utilities.js +0 -16
  23. package/package.json +1 -1
  24. package/service.yaml +9 -1
@@ -1,6 +1,6 @@
1
1
  import constants from "../fixtures/constants";
2
2
  import utilities from "../support/helpers/utilities";
3
- import { additionalSettingsPanel, createQuestionBasePage, mcqAdditionalSettingsBase, scoringSectionBaseEditTab, autoScoredSpecifyCorrectAnswerSection, optionsWrapperComponent, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, lockUnlockOptionComponent, questionInstructionsComponent, additionalSettingsAccessibilitySectionComponent } from "./components";
3
+ import { additionalSettingsPanel, createQuestionBasePage, mcqAdditionalSettingsBase, scoringSectionBaseEditTab, autoScoredSpecifyCorrectAnswerSection, optionsWrapperComponent, commonComponents, autoScoredScoringPreviewTab, autoScoredStudentViewSettings, ckEditorToolbar, equationEditorFlyout, randomizeOptionsComponent, lockUnlockOptionComponent, questionInstructionsComponent, additionalSettingsAccessibilitySectionComponent, showAlternativeAnswersComponent } from "./components";
4
4
  import { createItemPage } from "./createItemPage";
5
5
  import { selectQuestionResourceToolPage } from "./selectQuestionResourceToolPage";
6
6
  const css = Cypress.env('css');
@@ -21,6 +21,7 @@ const selectors = {
21
21
  ...randomizeOptionsComponent,
22
22
  ...lockUnlockOptionComponent,
23
23
  ...createItemPage,
24
+ ...showAlternativeAnswersComponent,
24
25
  optionsRadioButton: () => cy.get('input[type="radio"]'),
25
26
  optionsRadioButtonForSpecifyCorrectAnswer: () => cy.get('.radio-option-wrapper:visible input[type="radio"]'),
26
27
  editTabOptionsWrapper: () => cy.get('.edit-mcq-option-wrapper'),
@@ -61,6 +62,7 @@ const steps = {
61
62
  ...lockUnlockOptionComponent.steps,
62
63
  ...createItemPage.steps,
63
64
  ...selectQuestionResourceToolPage.steps,
65
+ ...showAlternativeAnswersComponent.steps,
64
66
  /**
65
67
  * Verifies the contents of an option wrapper in the 'Specify correct answer' section for single selection questions.
66
68
  * @param {number} optionIndex - The index of the option wrapper to be verified.
@@ -728,6 +730,8 @@ const steps = {
728
730
  singleSelectionPage.steps.setCorrectAnswer(correctAnswer);
729
731
  singleSelectionPage.saveQuestionButton().click();
730
732
  },
733
+
734
+
731
735
  };
732
736
 
733
737
  const tests = {
@@ -295,22 +295,6 @@ const utilities = {
295
295
  }
296
296
  });
297
297
  },
298
-
299
- /**
300
- * Verifies the selected/not selected state of an element.
301
- * @param {Cypress.Chainable} element - The element containing the image
302
- * @param {string} state - 'selected' | 'notSelected'
303
- */
304
- verifiedElementSelectedNotSelectedState: (selector, state) => {
305
- switch (state) {
306
- case 'selected':
307
- selector.should('have.attr', 'aria-pressed', 'true');
308
- break;
309
- case 'notSelected':
310
- selector.should('have.attr', 'aria-pressed', 'false');
311
- break;
312
- }
313
- },
314
298
  }
315
299
 
316
300
  export default utilities
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.563-IEI-6998-Add-coverage-for-image-hightlight-question-type-238d7b4.0",
3
+ "version": "1.0.564-IEI-7011-cf323ce.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/service.yaml CHANGED
@@ -102,21 +102,29 @@ namespaces:
102
102
  value: "dev"
103
103
  - name: FILE_CONFIG
104
104
  value: "dev"
105
+ - name: ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT
106
+ value: "false"
105
107
  qa:
106
108
  env:
107
109
  - name: STAGE
108
110
  value: "qa"
109
111
  - name: FILE_CONFIG
110
112
  value: "qa"
113
+ - name: ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT
114
+ value: "true"
111
115
  staging:
112
116
  env:
113
117
  - name: STAGE
114
118
  value: "stage"
115
119
  - name: FILE_CONFIG
116
120
  value: "stage"
121
+ - name: ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT
122
+ value: "false"
117
123
  prod:
118
124
  env:
119
125
  - name: STAGE
120
126
  value: "prod"
121
127
  - name: FILE_CONFIG
122
- value: "prod"
128
+ value: "prod"
129
+ - name: ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT
130
+ value: "false"