itemengine-cypress-automation 1.0.286-fixesE2E24thJan-7a46dd4.0 → 1.0.289-27thJanRepoUpdate-e883226.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddTranscriptRadioButton .js +4 -4
  2. package/cypress/e2e/ILC/DeleteItem/deleteItem.ts +140 -0
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +4 -4
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +97 -0
  5. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/manuallyAndNonScoredScoringEditTab.js +9 -0
  6. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +1 -1
  7. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +8 -0
  8. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +1 -1
  9. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +10 -0
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/additionalSettings.js +27 -2
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/draggableOptions.js +0 -1
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/manuallyAndNonScoredEditTab.js +16 -0
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/manuallyAndNonScored.js +10 -0
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +10 -1
  15. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +8 -0
  16. package/cypress/e2e/ILC/Graphing/Scoring/manuallyAndNonScoredScoring.js +8 -0
  17. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +3 -3
  18. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -0
  19. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +8 -0
  20. package/cypress/e2e/ILC/ImageHighlight/Scoring/manuallyAndNonScored.js +8 -0
  21. package/cypress/e2e/ILC/ListOrderingDropdown/manuallyAndNonScoredEditTab.js +10 -0
  22. package/cypress/e2e/ILC/ListOrderingNew/manuallyAndNonScoredEditTab.js +10 -0
  23. package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +3 -3
  24. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +13 -0
  25. package/cypress/e2e/ILC/Matching/Scoring/manuallyAndNonScored.js +8 -0
  26. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +1 -1
  27. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +8 -0
  28. package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +1 -0
  29. package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +8 -0
  30. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +8 -0
  31. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +5 -5
  32. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +8 -0
  33. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +1 -1
  34. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +2 -1
  35. package/cypress/e2e/ILC/NumberLineLabel/manuallyAndNonScoredEditTab.js +9 -0
  36. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +2 -2
  37. package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +8 -0
  38. package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +0 -1
  39. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +8 -0
  40. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +8 -0
  41. package/cypress/e2e/ILC/TextEntryMath/customSettingsSeparators.ts +262 -75
  42. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +92 -0
  43. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +47 -0
  44. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +47 -0
  45. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  46. package/cypress/e2e/ILC/TextSelection/ScoringGeneric/manuallyAndNonScored.js +8 -0
  47. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +2 -3
  48. package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +8 -0
  49. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +1 -1
  50. package/cypress/fixtures/evaluationMethodsAndCustomSettings.js +58 -1
  51. package/cypress/pages/audioPlayerPage.js +1 -2
  52. package/cypress/pages/components/ckEditorAudioPlayerComponent.js +12 -0
  53. package/cypress/pages/components/customSettingsSeparatorsComponent.ts +37 -0
  54. package/cypress/pages/components/draggableOptionContainer.js +2 -2
  55. package/cypress/pages/components/equationEditorFlyout.js +9 -0
  56. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +0 -4
  57. package/cypress/pages/components/imageCanvasComponent.js +7 -7
  58. package/cypress/pages/components/layoutSectionComponent.js +8 -6
  59. package/cypress/pages/components/numberLineCommonComponent.js +8 -4
  60. package/cypress/pages/createItemPage.js +21 -1
  61. package/cypress/pages/dragAndDropIntoCategoriesPage.js +6 -6
  62. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +23 -21
  63. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +4 -0
  64. package/cypress/pages/graphingPage.js +14 -13
  65. package/cypress/pages/listOrderingPage.js +31 -4
  66. package/cypress/pages/multipleSelectionPage.js +10 -1
  67. package/cypress/pages/rulerPage.js +1 -0
  68. package/cypress/pages/singleSelectionPage.js +2 -0
  69. package/cypress/pages/studentViewPage.js +2 -0
  70. package/cypress/pages/textEntryMathPage.js +35 -16
  71. package/package.json +1 -1
@@ -424,5 +424,52 @@ describe('Create item page - Text entry math: Value is equivalent evaluation met
424
424
  textEntryMathPage.steps.verifyCorrectResponseIcon(0);
425
425
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
426
426
  });
427
+
428
+ //RCA - https://weldnorthed.atlassian.net/browse/IEI-4999
429
+ it('When the user enters decimal values in the \'Specify correct answer\' section then the exact same answer should be validated', () => {
430
+ textEntryMathPage.steps.switchToEditTab();
431
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
432
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
433
+ equationEditorFlyout.steps.clearAll();
434
+ equationEditorFlyout.steps.enterTextInPreviewInputField('36.5');
435
+ equationEditorFlyout.steps.clickOnOkButton();
436
+ textEntryMathPage.steps.switchToPreviewTab();
437
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
438
+ equationEditorFlyout.steps.enterTextInPreviewInputField('36.5');
439
+ equationEditorFlyout.steps.clickOnOkButton();
440
+ textEntryMathPage.steps.switchToGradingView();
441
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
442
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
443
+ });
444
+
445
+ it('When the user enters values that are factors of the answer set then answer should not be validated', () => {
446
+ textEntryMathPage.steps.resetQuestionPreview();
447
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
448
+ equationEditorFlyout.steps.enterTextInPreviewInputField('18.25');
449
+ equationEditorFlyout.steps.clickOnOkButton();
450
+ textEntryMathPage.steps.switchToGradingView();
451
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
452
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
453
+ });
454
+
455
+ it('When the user enters values that are factors of the answer set then answer should not be validated', () => {
456
+ textEntryMathPage.steps.resetQuestionPreview();
457
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
458
+ equationEditorFlyout.steps.enterTextInPreviewInputField('9.125');
459
+ equationEditorFlyout.steps.clickOnOkButton();
460
+ textEntryMathPage.steps.switchToGradingView();
461
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
462
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
463
+ });
464
+
465
+ it('When the user enters values that are multiples of the answer set then answer should not be validated', () => {
466
+ textEntryMathPage.steps.resetQuestionPreview();
467
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
468
+ equationEditorFlyout.steps.enterTextInPreviewInputField('109.5');
469
+ equationEditorFlyout.steps.clickOnOkButton();
470
+ textEntryMathPage.steps.switchToGradingView();
471
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
472
+ textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
473
+ });
427
474
  });
428
475
  });
@@ -75,7 +75,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
75
75
  });
76
76
 
77
77
  it('When user clicks on \'Add evaluation\' button, then a tab \'Evaluation 2\' should be added in the response accordion', () => {
78
- textEntryMathPage.steps.clickOnAddEvaluationButton(0);
78
+ textEntryMathPage.steps.clickOnAddEvaluationButton();
79
79
  utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.evaluationTab(), 1), 'Evaluation 2');
80
80
  utilities.verifyElementCount(textEntryMathPage.evaluationTab(), 2);
81
81
  utilities.verifyElementVisibilityState(utilities.getNthElement(textEntryMathPage.evaluationTab(), 1), 'visible');
@@ -90,7 +90,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
90
90
  textEntryMathPage.tests.verifyEvaluationTabEvaluationMethodContainers();
91
91
 
92
92
  it('User should be able to add another evaluation method for the response using \'Add evaluation\' button and the name for this new evaluation tab should be \'Evaluation 3\'', () => {
93
- textEntryMathPage.steps.clickOnAddEvaluationButton(1);
93
+ textEntryMathPage.steps.clickOnAddEvaluationButton();
94
94
  utilities.verifyInnerText(utilities.getNthElement(textEntryMathPage.evaluationTab(), 2), 'Evaluation 3');
95
95
  utilities.verifyElementCount(textEntryMathPage.evaluationTab(), 3);
96
96
  });
@@ -40,6 +40,10 @@ describe('Create Item page - Text selection: Manually and non scored', () => {
40
40
  });
41
41
 
42
42
  textSelectionPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
43
+
44
+ it('User should able to save question with manually scored scoring type', () => {
45
+ textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
46
+ });
43
47
  });
44
48
 
45
49
  describe('Question Preview: Non Scored', () => {
@@ -145,5 +149,9 @@ describe('Create Item page - Text selection: Manually and non scored', () => {
145
149
  textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
146
150
  textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();*/
147
151
  });
152
+
153
+ it('User should able to save question with non scored scoring type', () => {
154
+ textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
155
+ });
148
156
  });
149
157
  });
@@ -197,12 +197,11 @@ describe('Create Item page: Tool settings', () => {
197
197
 
198
198
  it('\'Add show/hide button\' label and checkbox should be displayed and by default the checkbox should be checked', () => {
199
199
  utilities.verifyElementVisibilityState(rulerPage.addShowHideButtonCheckbox(), 'exist');
200
- rulerPage.steps.verifyAddShowHideButtonCheckboxUnchecked()
200
+ rulerPage.steps.verifyAddShowHideButtonCheckboxChecked()
201
201
  rulerPage.steps.verifyAddShowHideButtonLabel();
202
202
  });
203
203
 
204
- it('When user checks \'Add show/hide button\' checkbox then \'Launch the ruler by default\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
205
- rulerPage.steps.checkAddShowHideButtonCheckbox();
204
+ it('The \'Launch the ruler by default\' label and checkbox should be displayed and by default the checkbox should be unchecked', () => {
206
205
  rulerPage.steps.verifyLaunchToolByDefaultCheckboxUnchecked();
207
206
  utilities.verifyElementVisibilityState(rulerPage.launchToolByDefaultCheckbox(), 'exist');
208
207
  rulerPage.steps.verifyLaunchToolByDefaultLabel('ruler');
@@ -35,6 +35,10 @@ describe('Create question page - Upload Response: Scoring', () => {
35
35
  });
36
36
 
37
37
  uploadResponsePage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
38
+
39
+ it('User should able to save question with manually scored scoring type', () => {
40
+ uploadResponsePage.steps.saveAQuestionAndVerifySnackbar();
41
+ });
38
42
  });
39
43
 
40
44
  describe('Question Preview: Non scored', () => {
@@ -66,5 +70,9 @@ describe('Create question page - Upload Response: Scoring', () => {
66
70
  uploadResponsePage.steps.uploadedFileContentsPreviewTab(0, 'highlightImage.jpg');
67
71
  uploadResponsePage.steps.verifyUploadedFileName(0, 'highlightImage.jpg');
68
72
  });
73
+
74
+ it('User should able to save question with non scored scoring type', () => {
75
+ uploadResponsePage.steps.saveAQuestionAndVerifySnackbar();
76
+ });
69
77
  });
70
78
  });
@@ -153,7 +153,7 @@ describe('Create item page - Upload response : Preview contents', () => {
153
153
  });
154
154
 
155
155
  //Failed due to https://weldnorthed.atlassian.net/browse/IEI-4741
156
- it.skip('Accessibility of Preview tab', { tags: 'a11y' }, () => {
156
+ it('Accessibility of Preview tab', { tags: 'a11y' }, () => {
157
157
  cy.checkAccessibility(uploadResponsePage.questionWrapperPreviewTab());
158
158
  });
159
159
 
@@ -80,4 +80,61 @@ export const customSettingsIds = {
80
80
  checkForParenthesisGrouping: 'check-for-parenthesis-groups-checkbox',
81
81
  ignoreSpacesBeforeAndAfter: 'ignore-spaces-before-and-after-checkbox',
82
82
  ignoreExtraSpaces: 'ignore-extra-spaces-checkbox',
83
- }
83
+ }
84
+
85
+ export const customSettings = [
86
+ {
87
+ method: 'Symbols are equivalent',
88
+ decimalSeparator: ['Dot', 'Comma'],
89
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
90
+ additionalOptions: ['Decimal places to be compared']
91
+ },
92
+ {
93
+ method: 'Value is equivalent',
94
+ decimalSeparator: ['Dot', 'Comma'],
95
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
96
+ additionalOptions: ['Decimal places to be compared', 'Tolerance']
97
+ },
98
+ {
99
+ method: 'Match value',
100
+ decimalSeparator: ['Dot', 'Comma'],
101
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
102
+ additionalOptions: []
103
+ },
104
+ {
105
+ method: 'Equivalent structure',
106
+ decimalSeparator: [],
107
+ thousandsSeparator: [],
108
+ additionalOptions: []
109
+ },
110
+ {
111
+ method: 'Response is true',
112
+ decimalSeparator: ['Dot', 'Comma'],
113
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
114
+ additionalOptions: ['Decimal places to be compared']
115
+ },
116
+ {
117
+ method: 'Expanded form',
118
+ decimalSeparator: ['Dot', 'Comma'],
119
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
120
+ additionalOptions: []
121
+ },
122
+ {
123
+ method: 'Factored form',
124
+ decimalSeparator: ['Dot', 'Comma'],
125
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
126
+ additionalOptions: []
127
+ },
128
+ {
129
+ method: 'Simplified version',
130
+ decimalSeparator: ['Dot', 'Comma'],
131
+ thousandsSeparator: ['None', 'Comma or space', 'Comma', 'Space'],
132
+ additionalOptions: []
133
+ },
134
+ {
135
+ method: 'Match exact',
136
+ decimalSeparator: [],
137
+ thousandsSeparator: [],
138
+ additionalOptions: []
139
+ }
140
+ ];
@@ -853,8 +853,7 @@ const steps = {
853
853
  */
854
854
  uploadTranscriptFile: (filePath) => {
855
855
  audioPlayerPage.transcriptInputTypeFile()
856
- .attachFile(filePath);
857
- utilities.verifyElementVisibilityState(audioPlayerPage.transcriptFileUploadProgressBar(), 'hidden');
856
+ .attachFile(`uploads/${filePath}`);
858
857
  audioPlayerPage.steps.addWaitToPlayAudio(1000);
859
858
  },
860
859
 
@@ -34,6 +34,7 @@ const selectors = {
34
34
  audioPlayerChooseFileButton: () => cy.get('.uploadAudioFile .file-input-btn-wrapper button'),
35
35
  noFileChosenLabel: () => cy.get('.selected-file-wrapper'),
36
36
  uploadedFileNameLabel: () => cy.get('.uploadAudioFile .selected-file-wrapper'),
37
+ uploadedTranscriptFileNameLabel: () => cy.get('.selected-file-wrapper'),
37
38
  //Error
38
39
  sourceUrlInputFieldErrorMessage: () => cy.get('.error-text-message'),
39
40
  uploadFileSectionErrorMessage: () => cy.get('[class*="AudioPlayerFormstyles__ErrorBlock"]'),
@@ -491,6 +492,17 @@ const steps = {
491
492
  .should('not.be.visible');
492
493
  },
493
494
 
495
+ /**
496
+ * Uploads a file to the audio player by attaching the file located at the specified filePath.
497
+ * @param {string} file name of the file in fixtures/upload folder
498
+ * @description this function uploads a file
499
+ */
500
+ uploadInvalidFile: (file) => {
501
+ ckEditorAudioPlayerComponent.inputTypeFile()
502
+ .attachFile(`uploads/${file}`);
503
+ },
504
+
505
+
494
506
  /**
495
507
  * Uploads a transcript file to the audio player by attaching the file located at the specified filePath.
496
508
  * @param {string} file name of the file in fixtures/upload folder
@@ -1,3 +1,5 @@
1
+ import { commonComponents } from "./commonComponents";
2
+
1
3
  const selectors = {
2
4
  decimalSeparatorLabel: () => cy.get('.single-select-toggle-group-title').eq(0),
3
5
  thousandSeparatorLabel: () => cy.get('.single-select-toggle-group-title').eq(1),
@@ -24,6 +26,8 @@ const selectors = {
24
26
  }
25
27
 
26
28
  const steps = {
29
+ ...commonComponents.steps,
30
+
27
31
  /**
28
32
  * This function selects decimal separator options
29
33
  * @param option aria-label of the option to be selected
@@ -83,6 +87,28 @@ const steps = {
83
87
  .should('be.visible');
84
88
  },
85
89
 
90
+ /**
91
+ * @description type in the decimal place to compare input field
92
+ * @param {string} text - text to be entered in the input field
93
+ */
94
+ enterTextInDecimalPlaceToBeComparedInputField: (text: string) => {
95
+ customSettingsSeparatorComponent.decimalPlacesToBeComparedInputField()
96
+ .type(text);
97
+ },
98
+
99
+ /**
100
+ * @description clear the tolerance input field
101
+ */
102
+ clearDecimalPlaceToCompareInputField: () => {
103
+ customSettingsSeparatorComponent.decimalPlacesToBeComparedInputField()
104
+ .clear();
105
+ },
106
+
107
+ verifyDecimalPlaceToBeCompareInputFieldValue: (value: string)=>{
108
+ customSettingsSeparatorComponent.decimalPlacesToBeComparedInputField()
109
+ .should('have.attr','value',value)
110
+ },
111
+
86
112
  verifyVisibilityOfToleranceSection: () => {
87
113
  customSettingsSeparatorComponent.toleranceLabel()
88
114
  .should('have.text', 'Tolerance');
@@ -123,7 +149,18 @@ const steps = {
123
149
  verifySelectedStateOfThousandsSeparator: (option: string) => {
124
150
  customSettingsSeparatorComponent.thousandSeparatorToggleOptions(option)
125
151
  .should('have.class', 'single-select-toggle-button-selected');
152
+ },
153
+
154
+ focusInDecimalPlaceToComapreInputField: () => {
155
+ customSettingsSeparatorComponent.decimalPlacesToBeComparedInputField()
156
+ .focus();
157
+ },
158
+
159
+ focusOutDecimalPlaceToComapreInputField: () => {
160
+ customSettingsSeparatorComponent.decimalPlacesToBeComparedInputField()
161
+ .blur();
126
162
  }
163
+
127
164
  }
128
165
 
129
166
  export const customSettingsSeparatorComponent = {
@@ -9,9 +9,9 @@ const threeOptions = ['option 1', 'option 2', 'option 3'];
9
9
 
10
10
  //TODO update option container selectors when https://redmine.zeuslearning.com/issues/563159 is resolved
11
11
  const selectors = {
12
- draggableOption: () => cy.get('[class*="DraggableItems"][class*="__ItemWrapper"]'),
12
+ draggableOption: () => cy.get('[class*="DraggableItemstyles__DraggableItemWrapper"] [role="menu"],[class*="DraggableItemstyles__DraggableItemWrapper"][role="button"]'),
13
13
  optionsContainerSpecifyCorrectAnswerSection: () => cy.get('.option-drag-and-drop'),
14
- optionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .option-drag-and-drop'),
14
+ optionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] .option-drag-and-drop,[class*="question-preview-wrapper"] .standard-options-dropzone'),
15
15
  groupedOptionsTitleSpecifyCorrectAnswerSection: () => cy.get('[class*="GroupTitleWrapper"]'),
16
16
  groupedOptionsContainerSpecifyCorrectAnswerSection: () => cy.get('[class*="GroupDiv"]'),
17
17
  groupedOptionsContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="GroupDiv"]'),
@@ -29,6 +29,7 @@ const selectors = {
29
29
  buttonNext: () => cy.get('.next-btn'),
30
30
  buttonPrevious: () => cy.get('.previous-btn'),
31
31
  inputFieldCursor: () => cy.get('.mq-hasCursor'),
32
+ formulaTemplateWithoutResponseBoxCursor: () => cy.get('.mq-root-block .mq-hasCursor'),
32
33
  inputFieldFirstEmptyBox: () => cy.get('.next-gen-equation-editor .mq-empty').eq(0),
33
34
  categoryTooltip: () => cy.get('.__react_component_tooltip'),
34
35
  dialogBoxTitle: () => cy.get('#alert-dialog-title'),
@@ -271,6 +272,14 @@ const steps = {
271
272
  .type(text)
272
273
  },
273
274
 
275
+ /**
276
+ * @description simulate a keyboard key press
277
+ * @param {string} key - key to be pressed at the cursor
278
+ */
279
+ simulateKeyboardPress: (key) => {
280
+ cy.realPress(key)
281
+ },
282
+
274
283
  /**
275
284
  * @description selects the character from equation editor
276
285
  * @param {string} characterAriaLabel aria label of character
@@ -248,10 +248,6 @@ const steps = {
248
248
  utilities.verifyElementDisabledClass(utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownPreviewTab(), dropdownIndex));
249
249
  },
250
250
 
251
- verifyVisibilityOfCorrectAnswerLabel: ()=>{
252
- utilities.verifyInnerText(fillInTheGapsOverImageDropdownPage.correctAnswersLabel(), 'Correct answers');
253
- },
254
-
255
251
  /**
256
252
  * @param {string[]} dropdownOptionsArray Array of dropdown options
257
253
  * @description Verify the options displayed in dropdown
@@ -144,13 +144,13 @@ const steps = {
144
144
  verifyCanvasImageTopLeftAligned: () => {
145
145
  imageCanvasComponent.canvasImage()
146
146
  .should('have.css', 'top', '0px')
147
- .and('have.css', 'left', '0px');
147
+ .and('have.css', 'left', '1px');
148
148
  },
149
149
 
150
150
  verifyCanvasImageTopLeftAlignedInPreviewTab: () => {
151
151
  imageCanvasComponent.canvasImageInPreviewTab()
152
152
  .should('have.css', 'top', '0px')
153
- .and('have.css', 'left', '0px');
153
+ .and('have.css', 'left', '1px');
154
154
  },
155
155
 
156
156
  verifyCanvasImageTopRightAligned: () => {
@@ -257,7 +257,7 @@ const steps = {
257
257
 
258
258
  verifyNoImageAlternativeTextPresentInEditTab: () => {
259
259
  imageCanvasComponent.canvasImage()
260
- .should('have.attr', 'alt', 'highlightImage.jpg');
260
+ .should('have.attr', 'alt', 'highlightImage');
261
261
  },
262
262
 
263
263
  verifyImageFitsToCanvas: () => {
@@ -848,13 +848,13 @@ const tests = {
848
848
  imageCanvasComponent.steps.verifyRedoButtonDisabled();
849
849
  });
850
850
 
851
- it(`When the user reaches the initial state by performing undo actions, the 'Undo' button should get disabled and error message should not be displayed`, () => {
851
+ it(`When the user reaches the initial state by performing undo actions, the 'Undo' button should get disabled and error message should be displayed`, () => {
852
852
  for (let i = 0; i < 4; i++) {
853
853
  imageCanvasComponent.steps.undoAction();
854
854
  }
855
855
  utilities.verifyElementCount(imageCanvasComponent.responseArea(), 0);
856
856
  imageCanvasComponent.steps.verifyUndoButtonDisabled();
857
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
857
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
858
858
  });
859
859
 
860
860
  it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
@@ -866,10 +866,10 @@ const tests = {
866
866
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
867
867
  });
868
868
 
869
- it(`When user clicks on 'Clear all' button, then all response container should be deleted and error message should not be displayed`, () => {
869
+ it(`When user clicks on 'Clear all' button, then all response container should be deleted and error message should be displayed`, () => {
870
870
  imageCanvasComponent.steps.clearAllCanvas();
871
871
  utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaWrapper(), 'notExist');
872
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
872
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
873
873
  });
874
874
  },
875
875
 
@@ -17,11 +17,11 @@ const selectors = {
17
17
  return cy.get('.number-line-layout-options [class*="SingleSelectToggleGroupstyles__ButtonContainer"] button');
18
18
  }
19
19
  },
20
- widthLabel: () => cy.get('.number-line-layout-options [aria-labelledby="Width (px)"]'),
20
+ widthLabel: () => cy.get('.number-line-layout-options [for="Width (px)"]'),
21
21
  widthInputField: () => cy.get('.number-line-layout-options input[aria-label="Width (px)"]'),
22
22
  heightLabel: () => cy.get('.number-line-layout-options [aria-labelledby="Height (px)"]'),
23
23
  heightInputField: () => cy.get('.number-line-layout-options input[aria-label="Height (px)"]'),
24
- marginLabel: () => cy.get('.margin-input-wrapper [aria-labelledby="Margin (px)"]'),
24
+ marginLabel: () => cy.get('.margin-input-wrapper [for="Margin (px)"]'),
25
25
  marginInputField: () => cy.get('.number-line-layout-options input[aria-label="Margin (px)"]'),
26
26
  responseSpacingLabel: () => cy.get('.dropdown-wrapper [aria-labelledby="Response Spacing"]'),
27
27
  responseSpacingInputField: () => cy.get('.dropdown-wrapper input[aria-label="Response Spacing"]'),
@@ -64,9 +64,9 @@ const selectors = {
64
64
  minInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(0),
65
65
  maxLabel: () => cy.get('[class*="CustomInputFieldWrapper"] [class*="CustomInputFieldLabel"]').eq(1),
66
66
  maxInputField: () => cy.get('[class*="CustomInputFieldWrapper"] input').eq(1),
67
- intervalLabel: () => cy.get('[aria-labelledby="Interval"]'),
67
+ intervalLabel: () => cy.get('[for="Interval"]'),
68
68
  intervalInputField: () => cy.get('input[id="Interval"]'),
69
- annotateEveryLabel: () => cy.get('[aria-labelledby="Annotate every"]'),
69
+ annotateEveryLabel: () => cy.get('[for="Annotate every"]'),
70
70
  annotateEveryInputField: () => cy.get('input[id="Annotate every"]'),
71
71
  lineSettingsToggleButtonWrapper: () => cy.get('.number-line-grid-setting [class*="SingleSelectToggleGroupstyles__ToggleButtonWrapper"]').eq(0),
72
72
  lineSettingsLabel: () => cy.get('.number-line-grid-setting .single-select-toggle-group-title').eq(0),
@@ -727,8 +727,10 @@ const steps = {
727
727
  .find('.number-line-tick-font')
728
728
  .eq(index)
729
729
  .then(($el) => {
730
- const innerText = $el[0].innerText;
731
- expect(innerText.trim()).to.equal(value.toString());
730
+ const innerText = $el[0].innerText.trim(); // Extract and trim text
731
+ const formattedInnerText = parseFloat(innerText).toFixed(2); // Format DOM value to 2 decimal places
732
+ const formattedExpectedValue = parseFloat(value).toFixed(2); // Format expected value to 2 decimal places
733
+ expect(formattedInnerText).to.equal(formattedExpectedValue);
732
734
  });
733
735
  });
734
736
  },
@@ -274,8 +274,10 @@ const steps = {
274
274
  .find('.number-line-tick-font')
275
275
  .eq(index)
276
276
  .then(($el) => {
277
- const innerText = $el[0].innerText;
278
- expect(innerText.trim()).to.equal(value.toString());
277
+ const innerText = $el[0].innerText.trim(); // Extract and trim text
278
+ const formattedInnerText = parseFloat(innerText).toFixed(2); // Format DOM value to 2 decimal places
279
+ const formattedExpectedValue = parseFloat(value).toFixed(2); // Format expected value to 2 decimal places
280
+ expect(formattedInnerText).to.equal(formattedExpectedValue);
279
281
  });
280
282
  });
281
283
  },
@@ -309,8 +311,10 @@ const steps = {
309
311
  .find('.number-line-tick-font')
310
312
  .eq(index)
311
313
  .then(($el) => {
312
- const innerText = $el[0].innerText;
313
- expect(innerText.trim()).to.equal(value.toString());
314
+ const innerText = $el[0].innerText.trim();
315
+ const formattedInnerText = parseFloat(innerText).toFixed(2);
316
+ const formattedExpectedValue = parseFloat(value).toFixed(2);
317
+ expect(formattedInnerText).to.equal(formattedExpectedValue);
314
318
  });
315
319
  });
316
320
  },
@@ -32,7 +32,9 @@ const selectors = {
32
32
  sectionsNumber2Label: () => cy.get('.tablist-numbered-label').eq(1),
33
33
  noPreviewText: () => cy.get('[class*="__NoPreview"]'),
34
34
  editItemButton: () => cy.get('.icon-pencil'),
35
- pointsValue: () => cy.get('[class*="PreviewTabstyles__PointsValue"]')
35
+ pointsValue: () => cy.get('[class*="PreviewTabstyles__PointsValue"]'),
36
+ moreActionsButton: () => cy.get('[class*="MoreActionMenuButton"] [type="button"]'),
37
+ deleteItemButton: () => cy.get('[aria-label="Delete Button"]')
36
38
  }
37
39
 
38
40
  const steps = {
@@ -105,6 +107,11 @@ const steps = {
105
107
  .should('be.visible');
106
108
  },
107
109
 
110
+ verifyAddQuestionAndAddResourceButtonIsVisible: () => {
111
+ createItemPage.addResourceAndToolsButton()
112
+ .should('be.visible');
113
+ },
114
+
108
115
  clickOnTagsButton: () => {
109
116
  createItemPage.tagsButton()
110
117
  .click();
@@ -609,6 +616,19 @@ const steps = {
609
616
  */
610
617
  verifyQuestionTitle: (index, questionType) => {
611
618
  utilities.verifyInnerText(utilities.getNthElement(createItemPage.questionTitle(), index), questionType);
619
+ },
620
+
621
+ /**
622
+ * @param {number} index Index of the question/resource
623
+ * @description deletes the question/resource
624
+ */
625
+ deleteItem: (index) => {
626
+ createItemPage.moreActionsButton()
627
+ .eq(index)
628
+ .click();
629
+ createItemPage.deleteItemButton()
630
+ .eq(index)
631
+ .click();
612
632
  }
613
633
  }
614
634
 
@@ -33,7 +33,7 @@ const selectors = {
33
33
  tableCellContainer: () => cy.get('[class*="DragAndDropTablestyles__CellContainer"]'),
34
34
  dropzoneCellSpecifyCorrectAnswerSection: () => cy.get('[class*="CellDropZonestyles__CellContainer"][class*="dropzone-cell"]'),
35
35
  //Note: Items render twice in student view, need to remove .first()
36
- dropzoneCellPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="CellDropZonestyles__CellContainer"][class*="dropzone-cell"]'),
36
+ dropzoneCellPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="CellDropZonestyles__CellContainer"][class*="dropzone-cell"],[class*="question-preview-wrapper"] [class*="DropzoneCellstyles__StyledCell"]'),
37
37
  dropzoneCellNumeration: () => cy.get('.answer-numeration-number-box'),
38
38
  correctAnswerDropzoneCell: () => cy.get('[class*="Matrixstyles__AnswerCell"]'),
39
39
  correctAnswerDropzoneCellTickIcon: () => cy.get('[class*="Matrixstyles__GreenBlock"]'),
@@ -71,7 +71,7 @@ const selectors = {
71
71
  tableRowContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Matrixstyles__RowContainer"]'),
72
72
  leftArrowNavigationButtonPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-label="Left Pagination Button"][class*="Matrixstyles__PaginationControl"]'),
73
73
  rightArrowNavigationButtonPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [aria-label="Right Pagination Button"][class*="Matrixstyles__PaginationControl"]'),
74
- cellContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="CellDropZonestyles__CellContainer"]'),
74
+ cellContainerPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="CellDropZonestyles__CellContainer"],[class*="question-preview-wrapper"] [class*="Cellstyles__StyledCell"]'),
75
75
  cellContainerSpecifyCorrectAnswer: () => cy.get('[class*="CellDropZonestyles__CellContainer"]'),
76
76
  incorrectOptionWrapper: () => cy.get('[class*="question-preview-wrapper"] .incorrect-answer-item'),
77
77
  correctOptionWrapper: () => cy.get('[class*="question-preview-wrapper"] .correct-answer-item'),
@@ -96,7 +96,7 @@ const selectors = {
96
96
  //Style and layout
97
97
  layoutLabel: () => cy.get('[class*="Layoutstyles__SectionWrapper"]'),
98
98
  rowSpacingDropdownLabel: () => cy.get('#Row-spacing-dropdown-label'),
99
- rowSpacingDropdown: () => cy.get('[aria-labelledby*="Row-spacing-dropdown-label"]').eq(0),
99
+ rowSpacingDropdown: () => cy.get('[aria-labelledby*="Row-spacing-select"]').eq(0),
100
100
  rowSpacingDropdownOptions: (ariaLabel = null) => {
101
101
  if (ariaLabel) {
102
102
  return cy.get(`[aria-labelledby*="Row-spacing-dropdown-label"] .dropdown-menu-item[aria-label*="${ariaLabel}"]`)
@@ -105,7 +105,7 @@ const selectors = {
105
105
  }
106
106
  },
107
107
  columnSpacingDropdownLabel: () => cy.get('#Column-spacing-dropdown-label'),
108
- columnSpacingDropdown: () => cy.get('[aria-labelledby*="Column-spacing-dropdown-label"]').eq(0),
108
+ columnSpacingDropdown: () => cy.get('[aria-labelledby*="Column-spacing-select"]').eq(0),
109
109
  columnSpacingDropdownOptions: (ariaLabel = null) => {
110
110
  if (ariaLabel) {
111
111
  return cy.get(`[aria-labelledby*="Column-spacing-dropdown-label"] .dropdown-menu-item[aria-label*="${ariaLabel}"]`)
@@ -820,7 +820,7 @@ const steps = {
820
820
  .eq(optionIndex)
821
821
  .find('[role="math"]')
822
822
  .should('have.attr', 'aria-label', constants.CKEditorInputFieldEnteredEquationAriaLabel)
823
- // .contains(constants.CKEditorInputFieldEnteredEquationText);
823
+ // .contains(constants.CKEditorInputFieldEnteredEquationText);
824
824
  utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.draggableOptionDragIcon(), optionIndex), 'exist');
825
825
  });
826
826
  },
@@ -2243,7 +2243,7 @@ const steps = {
2243
2243
  scoringSectionBaseEditTab.pointsInputField()
2244
2244
  .clear();
2245
2245
  scoringSectionBaseEditTab.pointsInputField()
2246
- .type(`${points}`, { delay: 500 });
2246
+ .type(`${points}`, { delay: 1000 });
2247
2247
  cy.wait(2000);
2248
2248
  scoringSectionBaseEditTab.pointsInputField()
2249
2249
  .should('have.value', points);