itemengine-cypress-automation 1.0.238-deletedCypressRepeat-09cad14.0 → 1.0.238

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +3 -3
  2. package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +2 -2
  3. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +2 -2
  4. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +14 -13
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +1 -1
  6. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +5 -3
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +4 -2
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +1 -1
  9. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
  10. package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +2 -1
  11. package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +6 -3
  12. package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +2 -1
  13. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  14. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
  15. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
  16. package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -4
  17. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +144 -0
  18. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +144 -0
  19. package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
  20. package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +112 -0
  21. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +397 -0
  22. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +179 -0
  23. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +158 -0
  24. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +179 -0
  25. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +143 -0
  26. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +167 -0
  27. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +145 -0
  28. package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +166 -0
  29. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +12 -10
  30. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +3 -5
  31. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +3 -3
  32. package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +2 -2
  33. package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +2 -0
  34. package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +1 -1
  35. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +2 -1
  36. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +6 -0
  37. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +10 -2
  38. package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +13 -1
  39. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +10 -0
  40. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -0
  41. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +2 -0
  42. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +4 -2
  43. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -0
  44. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +37 -5
  45. package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +6 -0
  46. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -0
  47. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -0
  48. package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +4 -5
  49. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +6 -0
  50. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +4 -1
  51. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +2 -0
  52. package/cypress/e2e/ILC/UploadResponse/uploadedFileProperties.js +1 -1
  53. package/cypress/pages/audioResponsePage.js +1 -0
  54. package/cypress/pages/components/createQuestionBasePage.js +49 -4
  55. package/cypress/pages/components/draggableOptionsStyleAndLayoutComponent.js +1 -1
  56. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
  57. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +22 -0
  58. package/cypress/pages/components/gridQuestionCommonComponent.js +5 -2
  59. package/cypress/pages/components/imageCanvasComponent.js +6 -9
  60. package/cypress/pages/components/numberLineCommonComponent.js +6 -6
  61. package/cypress/pages/components/questionInstructionsComponent.js +3 -2
  62. package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -2
  63. package/cypress/pages/feedbackScalePage.js +1 -1
  64. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
  65. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -0
  66. package/cypress/pages/geoGebraActivityPage.js +13 -1
  67. package/cypress/pages/imageHighlightPage.js +1 -0
  68. package/cypress/pages/listOrderingPage.js +1 -1
  69. package/cypress/pages/matchingPage.js +21 -0
  70. package/cypress/pages/multipleSelectionGridPage.js +16 -0
  71. package/cypress/pages/numberLineLabelPage.js +16 -3
  72. package/cypress/pages/shortTextResponsePage.js +1 -0
  73. package/package.json +1 -1
  74. /package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/{checkAnswerFunctionalityForAllViews.js → checkAnswerFunctionalityForAllViews.smoke.js} +0 -0
@@ -200,6 +200,8 @@ describe('Create item page - Number line: Scoring section', () => {
200
200
 
201
201
  it('User should be able to set points in the \'Points\' input fields', () => {
202
202
  numberLineLabelPage.steps.allotPartialDifferentWeightsPoints([2.3, 3.4]);
203
+ cy.log('Adding a wait for the points to update')
204
+ cy.wait(2000)
203
205
  });
204
206
 
205
207
  it('CSS of \'Points\' label and \'Points\' input fields', { tags: 'css' }, () => {
@@ -26,7 +26,7 @@ describe('Create question page - Short text response: Question Instructions, Set
26
26
  shortTextResponsePage.steps.switchToEditTab();
27
27
  shortTextResponsePage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
28
28
  shortTextResponsePage.steps.switchToPreviewTab();
29
- utilities.verifyTextContent(utilities.getNthElement(shortTextResponsePage.questionInstructionsText(), 0), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
29
+ utilities.verifyTextContent(shortTextResponsePage.questionInstructionsTextPreviewTab(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
30
30
  });
31
31
  });
32
32
 
@@ -431,7 +431,8 @@ describe('Create item page - Single selection grid: Question instructions, Speci
431
431
  singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 1 }, '');
432
432
  singleSelectionGridPage.steps.verifyTextInGridCellSpecifyCorrectAnswerSection({ row: rowIndex, column: 2 }, '');
433
433
  };
434
- utilities.verifyInnerText(singleSelectionGridPage.defaultTextDropdown(), 'Custom');
434
+ //Uncomment after https://redmine.zeuslearning.com/issues/577642 has been resolved.
435
+ // utilities.verifyInnerText(singleSelectionGridPage.defaultTextDropdown(), 'Custom');
435
436
  });
436
437
 
437
438
  it('When the user checks the \'Same radio button text in each column\' checkbox again, then the cells in each column should have the same text in all edit tab grids', () => {
@@ -21,6 +21,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
21
21
  textEntryMathPage.steps.addTextInQuestionInstructionsInputField('Enter the correct answer in the response field');
22
22
  textEntryMathPage.steps.addResponseArea();
23
23
  textEntryMathPage.steps.addResponseArea();
24
+ textEntryMathPage.steps.expandAdditionalSettings();
25
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
24
26
  textEntryMathPage.steps.switchToPreviewTab();
25
27
  });
26
28
 
@@ -79,6 +81,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
79
81
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
80
82
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
81
83
  equationEditorFlyout.steps.enterEquationUsingPiSymbol();
84
+ textEntryMathPage.steps.expandAdditionalSettings();
85
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
82
86
  textEntryMathPage.steps.switchToPreviewTab();
83
87
  break;
84
88
  case 'Item preview':
@@ -280,6 +284,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
280
284
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
281
285
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
282
286
  equationEditorFlyout.steps.enterEquationUsingPiSymbol();
287
+ textEntryMathPage.steps.expandAdditionalSettings();
288
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
283
289
  textEntryMathPage.steps.allotPoints(20);
284
290
  });
285
291
 
@@ -35,6 +35,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
35
35
  before(() => {
36
36
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
37
37
  cy.barsPreLoaderWait();
38
+ textEntryMathPage.steps.expandAdditionalSettings();
39
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
38
40
  });
39
41
 
40
42
  it('By default \'Add structure\' tab will have active selection', () => {
@@ -85,12 +87,12 @@ describe('Create item page - Text entry math: Question instructions, Add structu
85
87
  utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
86
88
  });
87
89
 
88
- it('When the user removes all response areas from the question input field, an error message \'Error: Minimum one response token is required.\' should be displayed', () => {
90
+ it('When the user removes all response areas from the question input field, an error message should not be displayed', () => {
89
91
  cy.log('Switching to edit tab')
90
92
  textEntryMathPage.steps.switchToEditTab();
91
93
  textEntryMathPage.steps.deleteAResponseArea(0);
92
94
  textEntryMathPage.steps.deleteAResponseArea(0);
93
- utilities.verifyInnerText(textEntryMathPage.errorMessage(), 'Error: Minimum one response token is required.')
95
+ utilities.verifyElementVisibilityState(textEntryMathPage.errorMessage(), 'notExist');
94
96
  });
95
97
 
96
98
  textEntryMathPage.tests.verifyErrorMessageCSSAndA11y();
@@ -107,6 +109,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
107
109
  cy.barsPreLoaderWait();
108
110
  textEntryMathPage.steps.addResponseArea();
109
111
  textEntryMathPage.steps.addResponseArea();
112
+ textEntryMathPage.steps.expandAdditionalSettings();
113
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
110
114
  });
111
115
 
112
116
  it('For the two response token in question input field, two response accordions \'Response 1\' and \'Response 2\' should be present in collapsed state in the \'Specify correct answer section\'', () => {
@@ -140,6 +144,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
140
144
  cy.barsPreLoaderWait();
141
145
  textEntryMathPage.steps.addResponseArea();
142
146
  textEntryMathPage.steps.addResponseArea();
147
+ textEntryMathPage.steps.expandAdditionalSettings();
148
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
143
149
  });
144
150
 
145
151
  it('For the two response token in question input field, in additional settings accordion, two \'ARIA label for text containers\'input fields should be displayed', () => {
@@ -164,6 +170,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
164
170
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
165
171
  cy.barsPreLoaderWait();
166
172
  textEntryMathPage.steps.switchToPreviewTab();
173
+ textEntryMathPage.steps.expandAdditionalSettings();
174
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
167
175
  });
168
176
 
169
177
  it('The default question input field content should be displayed in the preview tab question', () => {
@@ -49,6 +49,8 @@ describe('Create item page - Text entry math: Scoring section', () => {
49
49
  before(() => {
50
50
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
51
51
  cy.barsPreLoaderWait();
52
+ textEntryMathPage.steps.expandAdditionalSettings();
53
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
52
54
  });
53
55
 
54
56
  it('User should be able to select \'Partial - equal weights\' scoring type', () => {
@@ -69,6 +71,8 @@ describe('Create item page - Text entry math: Scoring section', () => {
69
71
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
70
72
  cy.barsPreLoaderWait();
71
73
  textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
74
+ textEntryMathPage.steps.expandAdditionalSettings();
75
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
72
76
  });
73
77
 
74
78
  textEntryMathPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
@@ -135,6 +139,8 @@ describe('Create item page - Text entry math: Scoring section', () => {
135
139
  before(() => {
136
140
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
137
141
  cy.barsPreLoaderWait();
142
+ textEntryMathPage.steps.expandAdditionalSettings();
143
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
138
144
  });
139
145
 
140
146
  it('User should be able to select \'Partial - different weights\' scoring', () => {
@@ -155,6 +161,8 @@ describe('Create item page - Text entry math: Scoring section', () => {
155
161
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
156
162
  cy.barsPreLoaderWait();
157
163
  textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
164
+ textEntryMathPage.steps.expandAdditionalSettings();
165
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
158
166
  });
159
167
 
160
168
  textEntryMathPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
@@ -207,6 +215,8 @@ describe('Create item page - Text entry math: Scoring section', () => {
207
215
  before(() => {
208
216
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
209
217
  cy.barsPreLoaderWait();
218
+ textEntryMathPage.steps.expandAdditionalSettings();
219
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
210
220
  });
211
221
 
212
222
  it('User should be able to select \'Manually scored\' scoring type from scoring type dropdown', () => {
@@ -217,7 +227,7 @@ describe('Create item page - Text entry math: Scoring section', () => {
217
227
  it('When the user has selected \'Manually scored\' scoring type, then the specify correct answer section should not be displayed', () => {
218
228
  utilities.verifyElementVisibilityState(textEntryMathPage.specifyCorrectAnswerLabel(), 'notExist');
219
229
  utilities.verifyElementVisibilityState(textEntryMathPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
220
- });
230
+ });
221
231
 
222
232
  textEntryMathPage.tests.verifyScoringSectionContentsForManuallyScoredScoringType();
223
233
 
@@ -250,6 +260,8 @@ describe('Create item page - Text entry math: Scoring section', () => {
250
260
  cy.barsPreLoaderWait();
251
261
  textEntryMathPage.steps.expandScoringTypeDropdown();
252
262
  textEntryMathPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
263
+ textEntryMathPage.steps.expandAdditionalSettings();
264
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
253
265
  });
254
266
 
255
267
  textEntryMathPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
@@ -26,6 +26,8 @@ describe('Create item page - Text entry math: Equivalent structure evaluation me
26
26
  textEntryMathPage.steps.selectSyntaxDropdownListOption('Number');
27
27
  textEntryMathPage.steps.expandAdditionalSettings();
28
28
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
29
+ textEntryMathPage.steps.expandAdditionalSettings();
30
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
29
31
  textEntryMathPage.steps.switchToPreviewTab();
30
32
  });
31
33
 
@@ -342,6 +344,8 @@ describe('Create item page - Text entry math: Equivalent structure evaluation me
342
344
  textEntryMathPage.steps.selectSyntaxDropdownListOption('Fraction');
343
345
  textEntryMathPage.steps.expandAdditionalSettings();
344
346
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
347
+ textEntryMathPage.steps.expandAdditionalSettings();
348
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
345
349
  textEntryMathPage.steps.switchToPreviewTab();
346
350
  });
347
351
 
@@ -779,6 +783,8 @@ describe('Create item page - Text entry math: Equivalent structure evaluation me
779
783
  textEntryMathPage.steps.selectSyntaxDropdownListOption('Variable');
780
784
  textEntryMathPage.steps.expandAdditionalSettings();
781
785
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
786
+ textEntryMathPage.steps.expandAdditionalSettings();
787
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
782
788
  textEntryMathPage.steps.switchToPreviewTab();
783
789
  });
784
790
 
@@ -927,6 +933,8 @@ describe('Create item page - Text entry math: Equivalent structure evaluation me
927
933
  textEntryMathPage.steps.selectSyntaxDropdownListOption('Expression');
928
934
  textEntryMathPage.steps.expandAdditionalSettings();
929
935
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
936
+ textEntryMathPage.steps.expandAdditionalSettings();
937
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
930
938
  textEntryMathPage.steps.switchToPreviewTab();
931
939
  });
932
940
 
@@ -1225,6 +1233,8 @@ describe('Create item page - Text entry math: Equivalent structure evaluation me
1225
1233
  textEntryMathPage.steps.selectSyntaxDropdownListOption('Scientific');
1226
1234
  textEntryMathPage.steps.expandAdditionalSettings();
1227
1235
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
1236
+ textEntryMathPage.steps.expandAdditionalSettings();
1237
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
1228
1238
  textEntryMathPage.steps.switchToPreviewTab();
1229
1239
  });
1230
1240
 
@@ -22,6 +22,8 @@ describe('Create item page - Text entry math: Match exact evaluation method', ()
22
22
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
23
23
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
24
24
  textEntryMathPage.steps.selectEvaluationMethod('Match exact');
25
+ textEntryMathPage.steps.expandAdditionalSettings();
26
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
25
27
  });
26
28
 
27
29
  it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the exact same value then it should be treated as correct', () => {
@@ -24,6 +24,8 @@ describe('Create item page - Text entry math: Match value evaluation method', ()
24
24
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
25
25
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
26
26
  textEntryMathPage.steps.selectEvaluationMethod('Match value');
27
+ textEntryMathPage.steps.expandAdditionalSettings();
28
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
27
29
  });
28
30
 
29
31
  it('When the user enters a numeric value in \'Specify correct answer\' response field and then the user enters the exact same value then it should be treated as correct', () => {
@@ -23,6 +23,8 @@ describe('Create item page - Text entry math: Value is equivalent evaluation met
23
23
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
24
24
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
25
25
  textEntryMathPage.steps.selectEvaluationMethod('Symbols are equivalent');
26
+ textEntryMathPage.steps.expandAdditionalSettings();
27
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
26
28
  });
27
29
 
28
30
  it('When the user enters a equation using decimals in \'Specify correct answer\' section and the user enters the same exact answer it should be treated as correct', () => {
@@ -421,8 +423,8 @@ describe('Create item page - Text entry math: Value is equivalent evaluation met
421
423
  });
422
424
 
423
425
  it('When the user enters a equation using different signs in \'Specify correct answer\' and the user enters the exact same equation then it should be treated as correct', () => {
424
- textEntryMathPage.steps.switchToEditTab();
425
- textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
426
+ textEntryMathPage.steps.switchToEditTab();
427
+ textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
426
428
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(0);
427
429
  equationEditorFlyout.steps.clearAll();
428
430
  equationEditorFlyout.steps.enterTextInPreviewInputField('8-9=-1');
@@ -21,6 +21,8 @@ describe('Create item page - Text entry math: Value is equivalent evaluation met
21
21
  textEntryMathPage.steps.expandAdditionalSettings();
22
22
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
23
23
  textEntryMathPage.steps.allotPoints(20);
24
+ textEntryMathPage.steps.expandAdditionalSettings();
25
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
24
26
  });
25
27
 
26
28
  it('When the user enters a equation using decimals in \'Specify correct answer\' section and the user enters the same exact answer it should be treated as correct', () => {
@@ -24,6 +24,8 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
24
24
  textEntryMathPage.steps.selectEvaluationMethod('Response is true');
25
25
  textEntryMathPage.steps.expandAdditionalSettings();
26
26
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
27
+ textEntryMathPage.steps.expandAdditionalSettings();
28
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
27
29
  textEntryMathPage.steps.switchToPreviewTab();
28
30
  });
29
31
 
@@ -51,14 +53,14 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
51
53
  // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
52
54
  });
53
55
 
54
- it('When the user attempts the question using two inequalities then it should be treated as correct', () => {
56
+ it('When the user attempts the question using two inequalities then it should be treated as incorrect', () => {
55
57
  textEntryMathPage.steps.resetQuestionPreview();
56
58
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
57
59
  equationEditorFlyout.steps.enterTextInPreviewInputField('4+1>4<6');
58
60
  equationEditorFlyout.steps.clickOnOkButton();
59
61
  textEntryMathPage.steps.switchToGradingView();
60
- textEntryMathPage.steps.verifyCorrectResponseIcon(0);
61
- // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
62
+ textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
63
+ // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
62
64
  });
63
65
 
64
66
  it('When the user attempts the question using incorrect comparison of decimals then it should be treated as incorrect', () => {
@@ -219,6 +221,8 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
219
221
  textEntryMathPage.steps.selectEvaluationMethod('Expanded form');
220
222
  textEntryMathPage.steps.expandAdditionalSettings();
221
223
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
224
+ textEntryMathPage.steps.expandAdditionalSettings();
225
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
222
226
  textEntryMathPage.steps.switchToPreviewTab();
223
227
  });
224
228
 
@@ -263,7 +267,7 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
263
267
  // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
264
268
  });
265
269
 
266
- it('When the user attempts the question using mixed fractions then it should be treated as incorrect', () => {
270
+ it('When the user attempts the question using mixed fractions then it should be treated as correct if denominator is greater than numerator', () => {
267
271
  textEntryMathPage.steps.resetQuestionPreview();
268
272
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
269
273
  equationEditorFlyout.steps.enterTextInPreviewInputField('2');
@@ -271,6 +275,18 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
271
275
  equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '4']);
272
276
  equationEditorFlyout.steps.clickOnOkButton();
273
277
  textEntryMathPage.steps.switchToGradingView();
278
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
279
+ // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
280
+ });
281
+
282
+ it('When the user attempts the question using mixed fractions then it should be treated as incorrect if denominator is less than numerator', () => {
283
+ textEntryMathPage.steps.resetQuestionPreview();
284
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
285
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
286
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['mixedFraction'] }]);
287
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '2']);
288
+ equationEditorFlyout.steps.clickOnOkButton();
289
+ textEntryMathPage.steps.switchToGradingView();
274
290
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
275
291
  // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
276
292
  });
@@ -418,6 +434,8 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
418
434
  textEntryMathPage.steps.selectEvaluationMethod('Factored form');
419
435
  textEntryMathPage.steps.expandAdditionalSettings();
420
436
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
437
+ textEntryMathPage.steps.expandAdditionalSettings();
438
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
421
439
  textEntryMathPage.steps.switchToPreviewTab();
422
440
  });
423
441
 
@@ -616,6 +634,8 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
616
634
  textEntryMathPage.steps.selectEvaluationMethod('Simplified version');
617
635
  textEntryMathPage.steps.expandAdditionalSettings();
618
636
  textEntryMathPage.steps.selectEquationEditorSectionCategories([equationEditorCategoriesAndSymbols.trig.displayName, equationEditorCategoriesAndSymbols.greek.displayName, equationEditorCategoriesAndSymbols.calculus.displayName]);
637
+ textEntryMathPage.steps.expandAdditionalSettings();
638
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
619
639
  textEntryMathPage.steps.switchToPreviewTab();
620
640
  });
621
641
 
@@ -661,7 +681,7 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
661
681
  // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
662
682
  });
663
683
 
664
- it('When the user attempts the question using mixed fractions then it should be treated as incorrect', () => {
684
+ it('When the user attempts the question using mixed fractions then it should be treated as correct if denominator is greater than numerator', () => {
665
685
  textEntryMathPage.steps.resetQuestionPreview();
666
686
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
667
687
  equationEditorFlyout.steps.enterTextInPreviewInputField('2');
@@ -669,6 +689,18 @@ describe('Create item page - Text entry math: All or nothing scoring', () => {
669
689
  equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '4']);
670
690
  equationEditorFlyout.steps.clickOnOkButton();
671
691
  textEntryMathPage.steps.switchToGradingView();
692
+ textEntryMathPage.steps.verifyCorrectResponseIcon(0);
693
+ // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
694
+ });
695
+
696
+ it('When the user attempts the question using mixed fractions then it should be treated as incorrect if denominator is less than numerator', () => {
697
+ textEntryMathPage.steps.resetQuestionPreview();
698
+ textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
699
+ equationEditorFlyout.steps.enterTextInPreviewInputField('1');
700
+ equationEditorFlyout.steps.enterEquation([{ categoryName: 'intermediate', symbolName: ['mixedFraction'] }]);
701
+ equationEditorFlyout.steps.enterTextInFirstEmptyBox(['3', '2']);
702
+ equationEditorFlyout.steps.clickOnOkButton();
703
+ textEntryMathPage.steps.switchToGradingView();
672
704
  textEntryMathPage.steps.verifyIncorrectResponseIcon(0);
673
705
  // textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
674
706
  });
@@ -17,6 +17,8 @@ describe('Create item page - Text entry math: Minimum scoring, Penalty scoring,
17
17
  textEntryMathPage.steps.addResponseArea();
18
18
  textEntryMathPage.steps.addResponseArea();
19
19
  textEntryMathPage.steps.allotPoints(10);
20
+ textEntryMathPage.steps.expandAdditionalSettings();
21
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
20
22
  });
21
23
 
22
24
  textEntryMathPage.tests.verifyMinimumScoringDropdown();
@@ -39,6 +41,8 @@ describe('Create item page - Text entry math: Minimum scoring, Penalty scoring,
39
41
  textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'a+b');
40
42
  textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(1, 'a−b');
41
43
  textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
44
+ textEntryMathPage.steps.expandAdditionalSettings();
45
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
42
46
  });
43
47
 
44
48
  textEntryMathPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
@@ -199,6 +203,8 @@ describe('Create item page - Text entry math: Minimum scoring, Penalty scoring,
199
203
  textEntryMathPage.steps.addResponseArea();
200
204
  textEntryMathPage.steps.allotPoints(10);
201
205
  textEntryMathPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
206
+ textEntryMathPage.steps.expandAdditionalSettings();
207
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
202
208
  });
203
209
 
204
210
  textEntryMathPage.tests.verifyRoundingDropdown();
@@ -32,6 +32,8 @@ describe('Create item page - Text entry math: Preview contents', () => {
32
32
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
33
33
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
34
34
  equationEditorFlyout.steps.enterQuadraticEquation();
35
+ textEntryMathPage.steps.expandAdditionalSettings();
36
+ textEntryMathPage.steps.selectModalVisibilityTypeButton();
35
37
  textEntryMathPage.steps.switchToPreviewTab();
36
38
  break;
37
39
  case 'Item view':
@@ -232,6 +232,7 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
232
232
 
233
233
  it('When user clicks on answer input field delete button, then the respective answer field should be deleted and the numeration of remaining answer input fields should be updated accordingly', () => {
234
234
  cy.log('Pre-step: Add one more answer input field');
235
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'a+b');
235
236
  textEntryMathPage.steps.addAlternateAnswerInResponseAccordion(0);
236
237
  textEntryMathPage.steps.clickOnAnswerInputDeleteButton(0);
237
238
  utilities.verifyElementCount(textEntryMathPage.responseAccordionAnswerInputField(), 2);
@@ -47,8 +47,7 @@ describe('Create Item page - Text entry math: Specify correct answer, Alternativ
47
47
  .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
48
48
  });
49
49
 
50
- //Failing here due to https://redmine.zeuslearning.com/issues/567075, adding a skip as it is postponed. Once resolved remove the above cases and the comment added below
51
- // textEntryMathPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('text entry math');
50
+ textEntryMathPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('text entry math');
52
51
 
53
52
  it('When user has added points and given input in response accordion answer input field in the \'Correct\' accordion, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
54
53
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
@@ -67,11 +66,12 @@ describe('Create Item page - Text entry math: Specify correct answer, Alternativ
67
66
  });
68
67
 
69
68
  it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the name for this new accordion should be \'Alternative 2\'', () => {
69
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, '12');
70
70
  textEntryMathPage.steps.addAlternativeAnswerAccordion(2);
71
71
  });
72
72
 
73
73
  //Failing here due to https://redmine.zeuslearning.com/issues/567075, adding a skip as it is postponed.
74
- //textEntryMathPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
74
+ // textEntryMathPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion();
75
75
 
76
76
  it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the name of the alternative answer accordions should get updated accordingly', () => {
77
77
  cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
@@ -81,8 +81,7 @@ describe('Create Item page - Text entry math: Specify correct answer, Alternativ
81
81
  textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(1, 'axb');
82
82
  textEntryMathPage.steps.allotPoints(5);
83
83
  textEntryMathPage.steps.deleteAlternativeAnswerAccordion(1);
84
- utilities.verifyElementVisibilityState(textEntryMathPage.alternativeAnswerAccordion().contains('Alternative 2'), 'notExist');
85
- textEntryMathPage.steps.verifyAlternativeAnswerAccordionLabel(0);
84
+ utilities.verifyInnerText(textEntryMathPage.alternativeAnswerAccordionLabel(), `Alternative 1`);
86
85
  });
87
86
 
88
87
  //Need to remove skip once https://redmine.zeuslearning.com/issues/571545 is resolved
@@ -24,6 +24,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
24
24
  textEntryMathWithImagePage.steps.verifyImageIsUploaded();
25
25
  textEntryMathWithImagePage.steps.insertResponseArea(10);
26
26
  textEntryMathWithImagePage.steps.insertResponseArea(40);
27
+ textEntryMathWithImagePage.steps.expandAdditionalSettings();
28
+ textEntryMathWithImagePage.steps.selectModalVisibilityTypeButton();
27
29
  textEntryMathWithImagePage.steps.switchToPreviewTab();
28
30
  });
29
31
 
@@ -85,6 +87,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
85
87
  textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(2);
86
88
  textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
87
89
  equationEditorFlyout.steps.enterEquationUsingPiSymbol();
90
+ textEntryMathWithImagePage.steps.expandAdditionalSettings();
91
+ textEntryMathWithImagePage.steps.selectModalVisibilityTypeButton();
88
92
  textEntryMathWithImagePage.steps.switchToPreviewTab();
89
93
  break;
90
94
  case 'Item preview':
@@ -288,6 +292,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
288
292
  textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(2);
289
293
  equationEditorFlyout.steps.enterEquationUsingPiSymbol();
290
294
  textEntryMathWithImagePage.steps.allotPoints(20);
295
+ textEntryMathWithImagePage.steps.expandAdditionalSettings();
296
+ textEntryMathWithImagePage.steps.selectModalVisibilityTypeButton();
291
297
  });
292
298
 
293
299
  it('When the user selects \'Award minimum score\' from the minimum scoring dropdown, does not attempt the question and switches to grading view, then the user should be awarded with minimum points', () => {
@@ -195,7 +195,8 @@ describe('Create item page - Text entry math: Question instructions, Options sec
195
195
  textEntryMathWithImagePage.tests.verifyInsertAndDeleteResponseAreaFunctionality('text container');
196
196
  });
197
197
 
198
- describe('Canvas : Undo, Redo, Clear all - Edit tab canvas section functionality', () => {
198
+ //Remove skip once https://redmine.zeuslearning.com/issues/574944 is resolved
199
+ describe.skip('Canvas : Undo, Redo, Clear all - Edit tab canvas section functionality', () => {
199
200
  abortEarlySetup();
200
201
  before(() => {
201
202
  textEntryMathWithImagePage.steps.navigateToCreateQuestion('Text Entry Math');
@@ -386,6 +387,8 @@ describe('Create item page - Text entry math: Question instructions, Options sec
386
387
  textEntryMathWithImagePage.steps.verifyFileNameLabel('highlightImage.jpg');
387
388
  utilities.verifyElementVisibilityState(textEntryMathWithImagePage.uploadImageProgressBar(), 'visible');
388
389
  textEntryMathWithImagePage.steps.verifyImageIsUploaded();
390
+ textEntryMathWithImagePage.steps.expandAdditionalSettings();
391
+ textEntryMathWithImagePage.steps.selectModalVisibilityTypeButton();
389
392
  });
390
393
 
391
394
  it('When the user has uploaded canvas image, then switching to the preview tab should display canvas image with same dimensions', () => {
@@ -36,6 +36,8 @@ describe('Create item page - Text entry math: Preview contents', () => {
36
36
  textEntryMathWithImagePage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
37
37
  textEntryMathWithImagePage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
38
38
  equationEditorFlyout.steps.enterQuadraticEquation();
39
+ textEntryMathWithImagePage.steps.expandAdditionalSettings();
40
+ textEntryMathWithImagePage.steps.selectModalVisibilityTypeButton();
39
41
  textEntryMathWithImagePage.steps.switchToPreviewTab();
40
42
  break;
41
43
  case 'Item view':
@@ -26,7 +26,7 @@ describe('Create question page - Upload Response: Preview', () => {
26
26
  });
27
27
 
28
28
  it('As soon as the scanning for viruses is complete, the preloader should disappear', () => {
29
- utilities.verifyElementVisibilityState(uploadResponsePage.scanningForVirusPreLoader(), 'hidden');
29
+ utilities.verifyElementVisibilityState(uploadResponsePage.scanningForVirusPreLoader(), 'notExist');
30
30
  });
31
31
 
32
32
  it('When the user uploads a file containing virus \'Error: A virus was detected, please upload another file\' error message should be displayed inline with file name, the uploaded file count should increase after a virus file gets uploaded', () => {
@@ -49,6 +49,7 @@ const selectors = {
49
49
  standardRecorderStyleButton: () => cy.get('[data-ngie-testid="standard-toggle-button"]'),
50
50
  barRecorderStyleButton: () => cy.get('[data-ngie-testid="bar-toggle-button"]'),
51
51
  compactRecorderStyleButton: () => cy.get('[data-ngie-testid="compact-toggle-button"]'),
52
+ recordingText: () => cy.get('.minimal-recording-text'),
52
53
  //compact style
53
54
  compactPreviewRecordButton: () => cy.get('.recorder-buttons-wrapper .record-button'),
54
55
  compactPreviewPauseRecordingButton: () => cy.get('.recorder-buttons-wrapper .pause-button'),
@@ -3,9 +3,10 @@ import { createItemPage } from "../createItemPage";
3
3
  import { dialogBoxBase } from "../dialogBoxBase";
4
4
  import { selectQuestionResourceToolPage } from "../selectQuestionResourceToolPage";
5
5
  import { commonComponents } from "./commonComponents";
6
- import { playbackControlsBaseComponent } from "./playbackControlsBaseComponent";
6
+ import { gridQuestionCommonComponent } from "./gridQuestionCommonComponent";
7
+ import { optionsWrapperComponent } from "./optionsWrapperComponent";
7
8
  import { questionInstructionsComponent } from "./questionInstructionsComponent";
8
- import { scoringSectionBase } from "./scoringSectionBase";
9
+ import { scoringSectionBaseEditTab } from "./scoringSectionBaseEditTab";
9
10
  const css = Cypress.env('css');
10
11
 
11
12
  const selectors = {
@@ -15,7 +16,9 @@ const selectors = {
15
16
  cancelButton: () => cy.get('[class*="header-wrapper"] .ngie-button').eq(0),
16
17
  saveQuestionButton: () => cy.get('[class*="header-wrapper"] .ngie-button').eq(1),
17
18
  //Note: Adding visible as this is hidden in tools and does not exist in questions
18
- editTabWrapper: () => cy.get('[class*="EditTabWrapper"]:visible')
19
+ editTabWrapper: () => cy.get('[class*="EditTabWrapper"]:visible'),
20
+ canvasLabel: () => cy.get('[class*="Canvasstyle__CanvasTxt"]'),
21
+ backgroundImageLabel: () => cy.get('[class*="Background"][class*="LabelWrapper"]')
19
22
  }
20
23
 
21
24
  const steps = {
@@ -100,6 +103,48 @@ const steps = {
100
103
  cy.wait(2000);
101
104
  createQuestionBasePage.cancelButton()
102
105
  .click();
106
+ },
107
+
108
+ /**
109
+ * This function verifies warning icon
110
+ * @param {string[]} requiredFieldsArray array of required input field
111
+ */
112
+ verifyWarningIconOnRequiredFields: (requiredFieldsArray) => {
113
+ requiredFieldsArray.forEach((field) => {
114
+ if (field === 'Please set points') {
115
+ scoringSectionBaseEditTab.pointsWrapper()
116
+ .within(() => {
117
+ utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
118
+ });
119
+ } else if (field === 'Please enter all option') {
120
+ optionsWrapperComponent.optionsLabel()
121
+ .within(() => {
122
+ utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
123
+ });
124
+ } else if (field === 'Please upload an image') {
125
+ createQuestionBasePage.backgroundImageLabel()
126
+ .within(() => {
127
+ utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
128
+ });
129
+ } else if (field === 'Please insert a dropzone' || field === 'Please insert a text container') {
130
+ createQuestionBasePage.canvasLabel()
131
+ .parents('[class*="CanvasLabelWrapper"]')
132
+ .within(() => {
133
+ //Need to remove comment once query is resolved https://redmine.zeuslearning.com/issues/579100
134
+ //utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
135
+ });
136
+ } else if (field === 'Please enter all questions') {
137
+ gridQuestionCommonComponent.specifyRowsAndColumnsTableHelpText()
138
+ .within(() => {
139
+ utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
140
+ });
141
+ } else if (field === 'Please enter all prompts') {
142
+ gridQuestionCommonComponent.specifyRowsAndColumnsTableHelpText()
143
+ .within(() => {
144
+ utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
145
+ });
146
+ }
147
+ })
103
148
  }
104
149
  }
105
150
 
@@ -160,7 +205,7 @@ const tests = {
160
205
  selectQuestionResourceToolPage.steps.selectQuestionType(questionType);
161
206
  questionInstructionsComponent.steps.addTextInQuestionInstructionsInputField('Edited');
162
207
  if (questionType !== 'feedback scale' && questionType !== 'highlight image') {
163
- scoringSectionBase.steps.allotPoints(20);
208
+ scoringSectionBaseEditTab.steps.allotPoints(20);
164
209
  };
165
210
  createQuestionBasePage.cancelButton()
166
211
  .click();