itemengine-cypress-automation 1.0.351 → 1.0.352

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 (29) hide show
  1. package/cypress/e2e/ILC/ChartsLine/editQuestion.smoke.js +0 -2
  2. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/blankResponseScoring.js +29 -25
  3. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/dropzoneStyleAndLayoutCustomization.js +6 -3
  4. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +2 -1
  5. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +2 -2
  6. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +0 -1
  7. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/Scoring/blankResponseScoring.js +18 -20
  8. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/styleAndLayoutCustomization.js +2 -1
  9. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/blankResponseScoring.js +21 -30
  10. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +2 -1
  11. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +2 -2
  12. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +2 -2
  13. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/blankResponseScoring.js +23 -30
  14. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +2 -4
  15. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/blankResponseScoring.js +20 -20
  16. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +3 -6
  17. package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +1 -0
  18. package/cypress/e2e/Sessions/scores.js +8 -5
  19. package/cypress/pages/components/autoScoredScoringPreviewTab.js +2 -2
  20. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +16 -28
  21. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +3 -3
  22. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +23 -29
  23. package/cypress/pages/components/gridQuestionCommonComponent.js +0 -37
  24. package/cypress/pages/components/imageCanvasComponent.js +5 -4
  25. package/cypress/pages/drawingResponsePage.js +4 -4
  26. package/cypress/pages/multipleSelectionPage.js +0 -37
  27. package/cypress/pages/singleSelectionPage.js +0 -37
  28. package/cypress/support/commands.js +0 -2
  29. package/package.json +1 -1
@@ -19,29 +19,28 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights f
19
19
  fillInTheGapsTextPage.steps.switchToPreviewTab();
20
20
  });
21
21
 
22
- it('When the user has not set any answer in the \'Specify correct answer\' section and switches to the \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
22
+ it('When the user has not set any answer in the \'Specify correct answer\' section and switches to the \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section should not be displayed', () => {
23
23
  fillInTheGapsTextPage.steps.switchToGradingView();
24
- fillInTheGapsTextPage.steps.verifyPreviewScore(0, 24);
24
+ fillInTheGapsTextPage.steps.checkManuallyScoredScoringLabel();
25
25
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
26
26
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
27
27
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
28
28
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
29
- utilities.verifyInnerText(fillInTheGapsTextPage.correctAnswersLabel(), 'Correct answers');
29
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.correctAnswersLabel(), 'notExist');
30
30
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
31
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['', '', '']);
32
31
  });
33
32
 
34
- it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
33
+ it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then no icons should be displayed beside the responses, full points should be allocated and correct answer section should not be displayed', () => {
35
34
  fillInTheGapsTextPage.steps.resetQuestionPreview();
36
35
  fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '1' }]);
37
36
  fillInTheGapsTextPage.steps.clearAnswerInputFieldPreviewTab(0);
38
37
  fillInTheGapsTextPage.steps.switchToGradingView();
39
- fillInTheGapsTextPage.steps.verifyPreviewScore(24, 24);
40
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
41
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
42
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
43
- fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
44
- fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
38
+ fillInTheGapsTextPage.steps.checkManuallyScoredScoringLabel();
39
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
40
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
41
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
42
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.correctAnswersLabel(), 'notExist');
43
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
45
44
  });
46
45
 
47
46
  it('When the user has not set any answer in the \'Specify correct answer\' section and enters incorrect response in any response in the preview tab then correct icons should be displayed beside the empty responses, incorrect icons should be displayed beside incorrect responses, points for the correct answers should be allocated and correct answer section should be displayed', () => {
@@ -136,28 +135,29 @@ describe('Create item page - Fill in the gaps with text: Partial equal weights f
136
135
  fillInTheGapsTextPage.steps.switchToPreviewTab();
137
136
  });
138
137
 
139
- it('When the user has not set any answer in the \'Specify correct answer\' section and switches to the \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
138
+ it('When the user has not set any answer in the \'Specify correct answer\' section and switches to the \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct/incorrect status message should not be displayed, correct answers section with a label \'Correct answers\' should not be displayed', () => {
140
139
  fillInTheGapsTextPage.steps.switchToGradingView();
141
- fillInTheGapsTextPage.steps.verifyPreviewScore(0, 24);
140
+ fillInTheGapsTextPage.steps.checkManuallyScoredScoringLabel();
142
141
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
143
142
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
144
143
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
145
144
  fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
146
- utilities.verifyInnerText(fillInTheGapsTextPage.correctAnswersLabel(), 'Correct answers');
145
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.correctAnswersLabel(), 'notExist');
147
146
  fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
148
- fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['', '', '']);
149
147
  });
150
148
 
151
- it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then correct icons should be displayed beside all the responses, full points should be allocated and correct answer section should not be displayed', () => {
149
+ it('When the user has not set any answer in the \'Specify correct answer\' section and interacts with the question in the preview tab then no icons should be displayed beside the responses, full points should be allocated and correct answer section should not be displayed', () => {
152
150
  fillInTheGapsTextPage.steps.resetQuestionPreview();
153
151
  fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: '1' }]);
154
152
  fillInTheGapsTextPage.steps.clearAnswerInputFieldPreviewTab(0);
155
153
  fillInTheGapsTextPage.steps.switchToGradingView();
156
- fillInTheGapsTextPage.steps.verifyPreviewScore(24, 24);
157
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
158
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
159
- fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
154
+ fillInTheGapsTextPage.steps.checkManuallyScoredScoringLabel();
155
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
156
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
157
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
160
158
  fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
159
+ utilities.verifyElementVisibilityState(fillInTheGapsTextPage.correctAnswersLabel(), 'notExist');
160
+ fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
161
161
  });
162
162
 
163
163
  it('When the user has not set any answer in the \'Specify correct answer\' section and enters incorrect response in any response in the preview tab then correct icons should be displayed beside the empty responses, incorrect icons should be displayed beside incorrect responses, points for the correct answers should be allocated and correct answer section should be displayed', () => {
@@ -169,6 +169,7 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
169
169
  utilities.verifyElementVisibilityState(fillInTheGapsTextPage.warningIcon(), 'notExist');
170
170
  });
171
171
  });
172
+
172
173
  //https://weldnorthed.atlassian.net/browse/IEI-5098
173
174
  describe('Fill in the gaps text: Answer input field - Specify correct answer section', () => {
174
175
  abortEarlySetup();
@@ -193,10 +194,6 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
193
194
  fillInTheGapsTextPage.steps.focusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0);
194
195
  });
195
196
 
196
- it('When the user enters text that triggers the tooltip, then the user should be able to enter text and focus in', () => {
197
- fillInTheGapsTextPage.steps.focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0);
198
- });
199
-
200
197
  //Unable to check tooltip using cypress
201
198
  it.skip('When the user enters a long text, then the user should be able to see the tooltip', () => {
202
199
  fillInTheGapsTextPage.answerInputFieldSpecifyCorrectAnswerSection()
@@ -204,7 +201,7 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
204
201
  });
205
202
 
206
203
  it('When the user removes text, then the user should be able to check focus', () => {
207
- fillInTheGapsTextPage.steps.clearAnswerInputField();
204
+ fillInTheGapsTextPage.steps.clearAnswerInputField(0);
208
205
  fillInTheGapsTextPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswer(0);
209
206
  });
210
207
  });
@@ -244,7 +241,7 @@ describe('Create item page - Fill in the gaps with text: Question instructions,
244
241
  });
245
242
 
246
243
  it('When the user removes text, then the user should be able to check focus', () => {
247
- fillInTheGapsTextPage.steps.clearAnswerInputFieldPreviewTab();
244
+ fillInTheGapsTextPage.steps.clearAnswerInputFieldPreviewTab(0);
248
245
  fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
249
246
  });
250
247
  });
@@ -165,6 +165,7 @@ describe('Create item page - Fill in the gaps with text: Scoring section', () =>
165
165
  fillInTheGapsTextPage.steps.verifyPointsLabelAndInputFieldInResponseAccordion(1, '');
166
166
  });
167
167
 
168
+ //Failing due to https://weldnorthed.atlassian.net/browse/IEI-5624
168
169
  it('User should be able to set points in the \'Points\' input fields', () => {
169
170
  fillInTheGapsTextPage.steps.allotPointsInResponseAccordion(0, 1);
170
171
  fillInTheGapsTextPage.steps.allotPointsInResponseAccordion(1, 3);
@@ -6,7 +6,14 @@ describe('Scores API cases', () => {
6
6
  var timestamp;
7
7
  var dtScoreUpdateArray = [];
8
8
 
9
- let itemReferenceIdNew = "cd2f017-4f0-33b3-062b-ab6150047a83";
9
+ let itemReferenceIdNew;
10
+ const domainMapping = {
11
+ 'sandbox.itemengine-qa.il-apps.com': "0ee6c7-ef6e-717-4b8-cda87eaac101",
12
+ 'sandbox.itemengine-staging.il-apps.com': "a50ba14-5603-b55e-7cc-d17404ce5afb",
13
+ 'sandbox.itemengine-prod.il-apps.com': "444d582-3e4-b18f-e52c-5c8c732717"
14
+ };
15
+
16
+ itemReferenceIdNew = domainMapping[domainName] || null;
10
17
  let dt_score_update;
11
18
  let response_id;
12
19
  let dt_saved;
@@ -127,10 +134,6 @@ describe('Scores API cases', () => {
127
134
  .should('have.attr', 'aria-expanded', 'true');
128
135
  cy.contains('Scores')
129
136
  .click();
130
- cy.contains('Scores')
131
- .parent()
132
- .parent()
133
- .should('have.class', 'Mui-selected');
134
137
  cy.url()
135
138
  .should('eq', Cypress.config().baseUrl + '/item-engine/data-api/sessions/fetch-scores');
136
139
  });
@@ -155,7 +155,7 @@ const steps = {
155
155
  //Need to update once https://weldnorthed.atlassian.net/browse/IEI-5618 is resolved
156
156
  autoScoredScoringPreviewTab.scoringTypeLabelPreviewTab()
157
157
  .contains('Non scored', { matchCase: false });
158
- },
158
+ }
159
159
  }
160
160
 
161
161
  const tests = {
@@ -167,7 +167,7 @@ const tests = {
167
167
  .should('be.checked');
168
168
  autoScoredScoringPreviewTab.gradingViewRadioButton()
169
169
  .should('not.be.checked');
170
- autoScoredScoringPreviewTab.steps.verifyPreviewScore(0, 0);
170
+ autoScoredScoringPreviewTab.steps.checkManuallyScoredScoringLabel();
171
171
  autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
172
172
  });
173
173
 
@@ -326,43 +326,31 @@ const tests = {
326
326
  .verifyPseudoClassBeforeProperty('color', css.color.activeButtons);
327
327
  });
328
328
 
329
- it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in enabled state', () => {
330
- utilities.verifyElementNotDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
331
- autoScoredSpecifyCorrectAnswerSection.steps.clickOnAddAlternativeAnswerButton();
332
- });
333
-
334
- it('CSS of warning popup', { tags: 'css' }, () => {
335
- utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
336
- 'color': css.color.flyoutTitle,
337
- 'font-size': css.fontSize.heading,
338
- 'font-weight': css.fontWeight.semibold
339
- });
340
- utilities.verifyCSS(dialogBoxBase.dialogBoxContent(), {
341
- 'color': css.color.labels,
342
- 'font-size': css.fontSize.default,
343
- 'font-weight': css.fontWeight.regular
344
- });
345
- utilities.verifyCSS(dialogBoxBase.buttonClose().find('svg'), {
346
- 'fill': css.color.closeIcon
347
- });
348
- });
349
-
350
- it('Accessibility of warning popup', { tags: 'a11y' }, () => {
351
- cy.checkAccessibility(dialogBoxBase.dialogBox());
352
- dialogBoxBase.steps.closeWarningPopup();
329
+ it('If user has not selected correct answer in the correct accordion, then the Add alternative answer button should be in disabled state', () => {
330
+ utilities.verifyElementDisabled(autoScoredSpecifyCorrectAnswerSection.alternativeAnswerButton());
353
331
  });
354
332
  },
355
333
 
356
334
  verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordion: () => {
357
- it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then a warning popup should be displayed and on closing the popup, alternative 2 accordion should be in expanded state', () => {
335
+ it('When user tries to expand correct accordion when all the mandatory fields are not filled in the alternative accordion, then correct answer accordion should be expanded and alternative 2 accordion should be in collapsed state', () => {
358
336
  autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
359
337
  .click();
360
- dialogBoxBase.steps.closeWarningPopup();
361
- //TODO: Need to add error message according to question types
362
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
338
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
339
+ .eq(1)
340
+ .should('have.attr', 'aria-expanded', 'false');
341
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
342
+ .should('have.attr', 'aria-expanded', 'true');
343
+ });
344
+
345
+ it('When user tries to expand alternative accordion when all the mandatory fields are not filled in the correct accordion, then correct answer accordion should be collapsed and alternative 2 accordion should be in expanded state', () => {
346
+ autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
347
+ .eq(1)
348
+ .click();
363
349
  autoScoredSpecifyCorrectAnswerSection.alternativeAnswerAccordion()
364
350
  .eq(1)
365
351
  .should('have.attr', 'aria-expanded', 'true');
352
+ autoScoredSpecifyCorrectAnswerSection.correctAnswerAccordion()
353
+ .should('have.attr', 'aria-expanded', 'false');
366
354
  });
367
355
  }
368
356
  }
@@ -417,7 +417,7 @@ const steps = {
417
417
  },
418
418
 
419
419
  compareDropdownMenuAndDropdownWidthForAutoScaled: () => {
420
- let originalDropdownWidth
420
+ let originalDropdownWidth;
421
421
  utilities.getNthElement(fillInTheGapsDropdownCommonComponent.dropdownSpecifyCorrectAnswerSection(), 0)
422
422
  .parents('.response-dropdown-wrapper')
423
423
  .then(($originalDropdownWidth) => {
@@ -763,9 +763,9 @@ const tests = {
763
763
  });
764
764
 
765
765
  //Note: the expand and close dropdown does not work hence selecting one option here, the error message appears
766
- it('When user expands and collapses the dropdown without selecting any option, \'Error: Please set a correct answer.\' error message should be displayed', () => {
766
+ it('When user expands and collapses the dropdown without selecting any option, error message should not be displayed', () => {
767
767
  fillInTheGapsDropdownCommonComponent.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, 'Flower');
768
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
768
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
769
769
  });
770
770
 
771
771
  it('When the user selects any option from the dropdown, then error message should disappear and that option should be displayed on the dropdown', () => {
@@ -105,7 +105,7 @@ const steps = {
105
105
  utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
106
106
  .clear();
107
107
  utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
108
- .type(responseText, { delay: 500 });
108
+ .type(responseText, { delay: 0 });
109
109
  utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
110
110
  .click();
111
111
  utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), responseIndex)
@@ -474,7 +474,8 @@ const steps = {
474
474
  */
475
475
  focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer: (answerFieldIndex) => {
476
476
  utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), answerFieldIndex)
477
- .click()
477
+ .click();
478
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), answerFieldIndex)
478
479
  .blur();
479
480
  },
480
481
 
@@ -779,8 +780,7 @@ const steps = {
779
780
  utilities.getNthElement(fillInTheGapsTextCommonComponent.responseAccordionAnswerInputFieldWrapper(), answerFieldIndex)
780
781
  .within(() => {
781
782
  fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection()
782
- .clear()
783
- .blur();
783
+ .clear();
784
784
  });
785
785
  },
786
786
 
@@ -908,10 +908,9 @@ const steps = {
908
908
 
909
909
  const tests = {
910
910
  verifySetLimitSectionErrorConditionsForMinAndMaxCharacterInputFields: () => {
911
- it('When the user clears the minimum character limit input field and focuses out of it, then error message \'Error: Minimum character limit is required\' should be displayed below the input field', () => {
911
+ it('When the user clears the minimum character limit input field and focuses out of it, then error message should not be displayed', () => {
912
912
  fillInTheGapsTextCommonComponent.steps.clearAndFocusOutOfMinimumCharacterLimitInputField();
913
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Minimum character limit is required.');
914
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
913
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
915
914
  });
916
915
 
917
916
  commonComponents.tests.verifyErrorMessageCSSAndA11y();
@@ -921,10 +920,9 @@ const tests = {
921
920
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
922
921
  });
923
922
 
924
- it('When the user clears the maximum character limit input field and focuses out of it, then error message \'Error: Maximum character limit is required.\' should be displayed below the input field', () => {
923
+ it('When the user clears the maximum character limit input field and focuses out of it, then error message should not be displayed', () => {
925
924
  fillInTheGapsTextCommonComponent.steps.clearAndFocusOutOfMaximumCharacterLimitInputField();
926
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Maximum character limit is required.');
927
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
925
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
928
926
  });
929
927
 
930
928
  it('When the user enters value in maximum character limit input field then the error message should disappear', () => {
@@ -932,10 +930,9 @@ const tests = {
932
930
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
933
931
  });
934
932
 
935
- it('When the user sets minimum limit input field value greater than maximum limit input field value then error message \'Error: Minimum limit must be less than or equal to maximum limit.\' and \'Error: Maximum limit must be greater than or equal to minimum limit.\'should be displayed below the minimum and maximum input field respectively', () => {
933
+ it('When the user sets minimum limit input field value greater than maximum limit input field value then error message should not be displayed', () => {
936
934
  fillInTheGapsTextCommonComponent.steps.setMinimumLimit(45);
937
- fillInTheGapsTextCommonComponent.steps.verifyMaximumLimitErrorMessage();
938
- fillInTheGapsTextCommonComponent.steps.verifyMinimumLimitErrorMessage();
935
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
939
936
  });
940
937
 
941
938
  commonComponents.tests.verifyErrorMessageCSSAndA11y();
@@ -945,10 +942,9 @@ const tests = {
945
942
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
946
943
  });
947
944
 
948
- it('When the user sets maximum limit input field value less than minimum limit input field value then error message \'Error: Minimum limit must be less than or equal to maximum limit.\' and \'Error: Maximum limit must be greater than or equal to minimum limit.\'should be displayed below the minimum and maximum input field respectively', () => {
945
+ it('When the user sets maximum limit input field value less than minimum limit input field value then error message should not be displayed', () => {
949
946
  fillInTheGapsTextCommonComponent.steps.setMaximumLimit(26);
950
- fillInTheGapsTextCommonComponent.steps.verifyMaximumLimitErrorMessage();
951
- fillInTheGapsTextCommonComponent.steps.verifyMinimumLimitErrorMessage();
947
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
952
948
  });
953
949
 
954
950
  it('When the user sets maximum limit input field value greater than or equal to minimum limit input field value then error message should disappear', () => {
@@ -1008,8 +1004,7 @@ const tests = {
1008
1004
 
1009
1005
  it('When user enters zero in maximum limit input field, then error message \'Error: Maximum limit must be greater than 0.\' should be displayed', () => {
1010
1006
  fillInTheGapsTextCommonComponent.steps.setMaximumLimit(0);
1011
- utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Maximum limit must be greater than 0.');
1012
- utilities.verifyElementVisibilityState(commonComponents.errorMessage().eq(1), 'visible');
1007
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1013
1008
  });
1014
1009
 
1015
1010
  it('When user enters limit more than zero in maximum limit input field, then error message should disappear', () => {
@@ -1017,10 +1012,9 @@ const tests = {
1017
1012
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1018
1013
  });
1019
1014
 
1020
- it('When user enters minimum limit more than maximum limit then error messages should be displayed and when user enters equal value then the error message should disappear', () => {
1015
+ it('When user enters minimum limit more than maximum limit then error messages should not be displayed', () => {
1021
1016
  fillInTheGapsTextCommonComponent.steps.setMinimumLimit(60);
1022
- utilities.verifyInnerText(commonComponents.errorMessage().eq(0), 'Error: Minimum limit must be less than or equal to Maximum limit.');
1023
- utilities.verifyInnerText(commonComponents.errorMessage().eq(1), 'Error: Maximum limit must be greater than or equal to Minimum limit.');
1017
+ commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1024
1018
  fillInTheGapsTextCommonComponent.steps.setMaximumLimit(60);
1025
1019
  commonComponents.steps.verifyErrorMessageIsNotDisplayed();
1026
1020
  });
@@ -1246,9 +1240,9 @@ const tests = {
1246
1240
  utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextCommonComponent.responseAccordionLabel(), 1), 'Response 2');
1247
1241
  });
1248
1242
 
1249
- it('When user focuses in and out of the response accordion \'Answer\' input field, \'Error: Answer is required.\' error message should be displayed', () => {
1243
+ it('When user focuses in and out of the response accordion \'Answer\' input field, error message should not be displayed', () => {
1250
1244
  fillInTheGapsTextCommonComponent.steps.focusInAndFocusOutOfResponseAnswerInputFieldSpecifyCorrectAnswer(0, 0);
1251
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1245
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
1252
1246
  });
1253
1247
 
1254
1248
  it('When gives an input to \'Answer\' input field, then error message should disappear', () => {
@@ -1424,10 +1418,10 @@ const tests = {
1424
1418
  utilities.verifyElementVisibilityState(fillInTheGapsTextCommonComponent.responseAccordionAddAlternateButtonLabel(), 'visible');
1425
1419
  });
1426
1420
 
1427
- it('When user has not entered text inside answer input field and clicks on \'Add alternate\' answer then \'Error: Answer is required.\' error message should be displayed', () => {
1428
- fillInTheGapsTextCommonComponent.steps.addAlternateAnswerInResponseAccordion(0);
1429
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
1430
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'visible');
1421
+ it('When user has not entered text inside answer input field and clicks on \'Add alternate\' button, then the button should be disabled and \'Answer is required\' tooltip should be displayed', () => {
1422
+ utilities.verifyElementDisabled(utilities.getNthElement(fillInTheGapsTextCommonComponent.responseAccordionAddAlternateButton(), 0).find('button'));
1423
+ utilities.getNthElement(fillInTheGapsTextCommonComponent.responseAccordionAddAlternateButton(), 0)
1424
+ .verifyTooltip('Answer is required');
1431
1425
  });
1432
1426
 
1433
1427
  it('When user enters text inside answer input field, then error message should disappear', () => {
@@ -1437,6 +1431,7 @@ const tests = {
1437
1431
 
1438
1432
  it('When the user clicks on the \'Add Alternate\' button, then one alternate answer input field should be displayed', () => {
1439
1433
  fillInTheGapsTextCommonComponent.steps.addAlternateAnswerInResponseAccordion(0);
1434
+ utilities.triggerMouseout(fillInTheGapsTextCommonComponent.responseAccordionAddAlternateButton());
1440
1435
  utilities.verifyElementCount(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), 2);
1441
1436
  utilities.verifyElementVisibilityState(fillInTheGapsTextCommonComponent.responseAccordionAddAlternateButton(), 'visible');
1442
1437
  });
@@ -1455,9 +1450,8 @@ const tests = {
1455
1450
  fillInTheGapsTextCommonComponent.steps.verifyAnswerInputFieldPlaceholder(1);
1456
1451
  });
1457
1452
 
1458
- it('When the user clicks on the \'Add Alternate\' button without entering text in the newly added alternate answer input field, then an error message should be displayed, indicating \'Error: Answer is required.\'', () => {
1453
+ it('When the user clicks on the \'Add Alternate\' button without entering text in the newly added alternate answer input field, new input field should not be added', () => {
1459
1454
  fillInTheGapsTextCommonComponent.steps.addAlternateAnswerInResponseAccordion(0);
1460
- utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Answer is required.');
1461
1455
  utilities.verifyElementCount(fillInTheGapsTextCommonComponent.answerInputFieldSpecifyCorrectAnswerSection(), 2);
1462
1456
  });
1463
1457
 
@@ -2071,43 +2071,6 @@ const steps = {
2071
2071
  }
2072
2072
 
2073
2073
  const tests = {
2074
- verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet: () => {
2075
- it('When the user has not set correct answer option(s) and alloted points, \'Student view\' radio button should be checked, \'Grading view\' button should not be checked, 0 points should be displayed and no correct or incorrect icons should be displayed in the preview tab', () => {
2076
- utilities.verifyInnerText(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), 'Student view');
2077
- utilities.verifyInnerText(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), 'Grading view');
2078
- autoScoredScoringPreviewTab.studentViewRadioButton()
2079
- .should('be.checked');
2080
- autoScoredScoringPreviewTab.gradingViewRadioButton()
2081
- .should('not.be.checked');
2082
- autoScoredScoringPreviewTab.steps.checkManuallyScoredScoringLabel();
2083
- autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
2084
- });
2085
-
2086
- it('CSS of Preview mode contents', { tags: 'css' }, () => {
2087
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), {
2088
- 'color': css.color.labelText,
2089
- 'font-size': css.fontSize.normal,
2090
- 'font-weight': css.fontWeight.regular
2091
- });
2092
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), {
2093
- 'color': css.color.labelText,
2094
- 'font-size': css.fontSize.normal,
2095
- 'font-weight': css.fontWeight.regular
2096
- });
2097
- utilities.verifyCSS(autoScoredScoringPreviewTab.scoreLabelPreviewTab(), {
2098
- 'color': css.color.codeBlockText,
2099
- 'font-size': css.fontSize.default,
2100
- 'font-weight': css.fontWeight.bold
2101
- });
2102
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButton().parent().find('svg'), {
2103
- 'fill': css.color.activeButtons
2104
- });
2105
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButton().parent().find('svg path'), {
2106
- 'fill': css.color.uncheckedCheckbox
2107
- });
2108
- });
2109
- },
2110
-
2111
2074
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
2112
2075
  it(`When the user selects any scoring type except for manual scored, then the question grid should be displayed in the specify correct answer section`, () => {
2113
2076
  gridQuestionCommonComponent.steps.verifyTableCellPropertySpecifyCorrectAnswerSection({ row: 0, column: 0 }, 'None');
@@ -38,6 +38,7 @@ const selectors = {
38
38
  },
39
39
  textResponse: () => cy.get('[class*="Canvasstyle__TextBoxContainer"] textarea'),
40
40
  canvasImage: () => cy.get('.canvas-image').eq(0),
41
+ canvasUploadedImage: () => cy.get('.canvas-image'),
41
42
  canvasImageInPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="ImageWrapper"] img'),
42
43
  imagePropertiesLabel: () => cy.get('[class*="ImagePropertiesstyles__SectionLabel"]'),
43
44
  fillImageToCanvasLabel: () => cy.get('[data-ngie-testid="fill-image-to-canvas-checkbox"] .MuiFormControlLabel-label'),
@@ -791,10 +792,10 @@ const tests = {
791
792
  * @param {"text container"|"dropzone"} response value for the error message
792
793
  */
793
794
  verifyInsertAndDeleteResponseAreaFunctionality: (response) => {
794
- it(`When user clicks on close button for response container, then response container should be removed from canvas and error message should be displayed`, () => {
795
+ it(`When user clicks on close button for response container, then response container should be removed from canvas and error message should not be displayed`, () => {
795
796
  imageCanvasComponent.steps.removeResponseArea(0);
796
797
  utilities.verifyElementVisibilityState(imageCanvasComponent.responseAreaWrapper(), 'notExist');
797
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
798
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
798
799
  });
799
800
 
800
801
  it('When user adds response container, then error message should disappear', () => {
@@ -847,13 +848,13 @@ const tests = {
847
848
  imageCanvasComponent.steps.verifyRedoButtonDisabled();
848
849
  });
849
850
 
850
- it(`When the user reaches the initial state by performing undo actions, the 'Undo' button should get disabled and error message should 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 not be displayed`, () => {
851
852
  for (let i = 0; i < 4; i++) {
852
853
  imageCanvasComponent.steps.undoAction();
853
854
  }
854
855
  utilities.verifyElementCount(imageCanvasComponent.responseArea(), 0);
855
856
  imageCanvasComponent.steps.verifyUndoButtonDisabled();
856
- utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'exist');
857
+ utilities.verifyElementVisibilityState(commonComponents.errorMessage(), 'notExist');
857
858
  });
858
859
 
859
860
  it('When the user reaches the latest state by performing redo actions, the \'Redo\' button should get disabled and error message should disappear', () => {
@@ -650,12 +650,12 @@ const steps = {
650
650
  clickOnCancelIconOfCaptureImage: () => {
651
651
  drawingResponsePage.captureCancelImageIcon()
652
652
  .should('exist')
653
- .click();
653
+ .click({ force: true });
654
654
  },
655
655
 
656
656
  clickOnCaptureButtonOfCaptureImage: () => {
657
657
  drawingResponsePage.captureImageButton()
658
- .click();
658
+ .click({ force: true });
659
659
  },
660
660
 
661
661
  verifyCaptureImageIsVisible: () => {
@@ -679,13 +679,13 @@ const steps = {
679
679
  clickOnRetakeButton: () => {
680
680
  drawingResponsePage.retakeButton()
681
681
  .should('exist')
682
- .click();
682
+ .click({ force: true });
683
683
  },
684
684
 
685
685
  clickOnSaveButton: () => {
686
686
  drawingResponsePage.saveButton()
687
687
  .should('exist')
688
- .click();
688
+ .click({ force: true });
689
689
  },
690
690
 
691
691
  verifyCameraIsVisible: () => {
@@ -914,43 +914,6 @@ const tests = {
914
914
  ...ckEditorInsertTableComponent.tests,
915
915
  ...ckEditorInsertImageComponent.tests,
916
916
  ...ckEditorLinkComponent.tests,
917
- verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet: () => {
918
- it('When the user has not set correct answer option(s) and alloted points, \'Student view\' radio button should be checked, \'Grading view\' button should not be checked, 0 points should be displayed and no correct or incorrect icons should be displayed in the preview tab', () => {
919
- utilities.verifyInnerText(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), 'Student view');
920
- utilities.verifyInnerText(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), 'Grading view');
921
- autoScoredScoringPreviewTab.studentViewRadioButton()
922
- .should('be.checked');
923
- autoScoredScoringPreviewTab.gradingViewRadioButton()
924
- .should('not.be.checked');
925
- autoScoredScoringPreviewTab.steps.checkManuallyScoredScoringLabel();
926
- autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
927
- });
928
-
929
- it('CSS of Preview mode contents', { tags: 'css' }, () => {
930
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), {
931
- 'color': css.color.labelText,
932
- 'font-size': css.fontSize.normal,
933
- 'font-weight': css.fontWeight.regular
934
- });
935
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), {
936
- 'color': css.color.labelText,
937
- 'font-size': css.fontSize.normal,
938
- 'font-weight': css.fontWeight.regular
939
- });
940
- utilities.verifyCSS(autoScoredScoringPreviewTab.scoreLabelPreviewTab(), {
941
- 'color': css.color.codeBlockText,
942
- 'font-size': css.fontSize.default,
943
- 'font-weight': css.fontWeight.bold
944
- });
945
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButton().parent().find('svg'), {
946
- 'fill': css.color.activeButtons
947
- });
948
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButton().parent().find('svg path'), {
949
- 'fill': css.color.uncheckedCheckbox
950
- });
951
- });
952
- },
953
-
954
917
  /**
955
918
  * Verifies the contents and functionality of the 'Specify correct answer' accordion for multiple selection questions.
956
919
  * @param {{'Correct' | 'Alternative'}} accordionName - The name of the accordion to be used in the validation.
@@ -719,43 +719,6 @@ const tests = {
719
719
  ...autoScoredStudentViewSettings.tests,
720
720
  ...additionalSettingsAccessibilitySectionComponent.tests,
721
721
  ...mcqAdditionalSettingsBase.tests,
722
- verifyPreviewModesAndScoreWhenPointsAndCorrectAnswersIsNotSet: () => {
723
- it('When the user has not set correct answer option(s) and alloted points, \'Student view\' radio button should be checked, \'Grading view\' button should not be checked, 0 points should be displayed and no correct or incorrect icons should be displayed in the preview tab', () => {
724
- utilities.verifyInnerText(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), 'Student view');
725
- utilities.verifyInnerText(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), 'Grading view');
726
- autoScoredScoringPreviewTab.studentViewRadioButton()
727
- .should('be.checked');
728
- autoScoredScoringPreviewTab.gradingViewRadioButton()
729
- .should('not.be.checked');
730
- autoScoredScoringPreviewTab.steps.checkManuallyScoredScoringLabel();
731
- autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
732
- });
733
-
734
- it('CSS of Preview mode contents', { tags: 'css' }, () => {
735
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButtonLabel(), {
736
- 'color': css.color.labelText,
737
- 'font-size': css.fontSize.normal,
738
- 'font-weight': css.fontWeight.regular
739
- });
740
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButtonLabel(), {
741
- 'color': css.color.labelText,
742
- 'font-size': css.fontSize.normal,
743
- 'font-weight': css.fontWeight.regular
744
- });
745
- utilities.verifyCSS(autoScoredScoringPreviewTab.scoreLabelPreviewTab(), {
746
- 'color': css.color.codeBlockText,
747
- 'font-size': css.fontSize.default,
748
- 'font-weight': css.fontWeight.bold
749
- });
750
- utilities.verifyCSS(autoScoredScoringPreviewTab.studentViewRadioButton().parent().find('svg'), {
751
- 'fill': css.color.activeButtons
752
- });
753
- utilities.verifyCSS(autoScoredScoringPreviewTab.gradingViewRadioButton().parent().find('svg path'), {
754
- 'fill': css.color.uncheckedCheckbox
755
- });
756
- });
757
- },
758
-
759
722
  verifyContentsOfSpecifyCorrectAnswerSection: () => {
760
723
  it('In the \'Correct\' accordion, all options with checkboxes should be displayed', () => {
761
724
  utilities.verifyElementCount(singleSelectionPage.optionWrapperSpecifyCorrectAnswerSection(), 4);
@@ -133,8 +133,6 @@ Cypress.Commands.add('interceptGraphql', (operationName) => {
133
133
  req.alias = `${operationName}`;
134
134
  }
135
135
  });
136
- cy.get('[class*="GlobalLoaderstyles__GlobalLoaderWrapper"]')
137
- .should('not.be.visible');
138
136
  });
139
137
 
140
138
  Cypress.Commands.add('fill', { prevSubject: 'element' }, ($subj, text) => {