itemengine-cypress-automation 1.0.122 → 1.0.125

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  2. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
  3. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +1 -1
  4. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +4 -2
  5. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -1
  6. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +11 -12
  7. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +1 -1
  8. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +4 -3
  9. package/cypress/e2e/migration/migration.js +7 -2
  10. package/cypress/e2e/migration/migration10.js +5 -0
  11. package/cypress/e2e/migration/migration2.js +5 -0
  12. package/cypress/e2e/migration/migration3.js +5 -0
  13. package/cypress/e2e/migration/migration4.js +5 -0
  14. package/cypress/e2e/migration/migration5.js +5 -0
  15. package/cypress/e2e/migration/migration6.js +5 -0
  16. package/cypress/e2e/migration/migration7.js +5 -0
  17. package/cypress/e2e/migration/migration8.js +5 -0
  18. package/cypress/e2e/migration/migration9.js +5 -0
  19. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  20. package/cypress/pages/drawingResponsePage.js +6 -5
  21. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +1 -1
  22. package/cypress/pages/textEntryMathPage.js +15 -7
  23. package/cypress/pages/uploadResponsePage.js +10 -1
  24. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +36 -7
  25. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
  26. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +48 -0
  27. package/package.json +1 -1
@@ -346,7 +346,7 @@ describe('Preview of Audio response for compact audio recorder style', () => {
346
346
  audioResponsePage.steps.startPlaybackCompactPreview();
347
347
  audioResponsePage.steps.waitForPlaybackToBeginCompactPreview();
348
348
  audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:05', '00:10');
349
- audioResponsePage.steps.pauseAndVerifyProgressBarSliderPosition();
349
+ audioResponsePage.steps.pauseAndVerifyProgressBarSliderPositionCompactPreview();
350
350
  audioResponsePage.steps.verifyPlaybackTimeCompactPreview('00:05', '00:10');
351
351
  utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPlayPlaybackButton(), 'visible');
352
352
  utilities.verifyElementVisibilityState(audioResponsePage.compactPreviewPausePlaybackButton(), 'notExist');
@@ -3,7 +3,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
3
  import utilities from "../../../support/helpers/utilities";
4
4
 
5
5
  const css = Cypress.env('css');
6
- const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', 'Bring to front', 'Sent to back', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
6
+ const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', 'Bring to front', 'Send to back', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
7
7
  const patterns = ['Grid', 'Lines', 'Dots', 'Circular', 'Graph', 'Quadrant'];
8
8
  const orientationOptions = ['Portrait', 'Landscape', 'Square'];
9
9
  const imageAlternativeText = ['Grid pattern of evenly spaced horizontal and vertical lines', 'Line pattern of evenly spaced horizontal lines', 'Dot pattern of evenly spaced horizontal and vertical dots', 'Circular pattern of evenly spaced concentric circles', 'Graph pattern of evenly spaced horizontal and vertical lines', 'Quadrant pattern of evenly spaced horizontal and vertical lines'];
@@ -6,7 +6,7 @@ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
6
6
  const views = utilities.getViews(gradingAndCorrectAnsView);
7
7
  var itemReferenceID = "";
8
8
 
9
- const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', 'Bring to front', 'Sent to back', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
9
+ const defaultToolbarAndControlOptions = ['Select', 'Scribble', 'Line', 'Curved line', 'Capture image', 'Insert image', 'Text', 'Point eraser', 'Bring to front', 'Send to back', 'Duplicate', 'Undo', 'Redo', 'Full screen', 'Clear all'];
10
10
 
11
11
  describe('Create item page - Drawing response: Grading view, Correct answer view contents', () => {
12
12
  before(() => {
@@ -7,8 +7,10 @@ const grepTags = Cypress.env('grepTags');
7
7
 
8
8
  const formattingOptions = ['Bold', 'Italic', 'Underline', 'Bulleted List', 'Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent', 'Equation Editor', 'Insert Image', 'Strikethrough', 'Subscript', 'Superscript', 'Special Characters', 'Math Characters', 'Insert Hyperlink', 'Block Quote', 'Remove Format', 'Code Inline', 'Code Editor', 'Align Left', 'Align Center', 'Align Right', 'Align Justify', 'Text direction left to right', 'Text direction right to left', 'Insert Horizontal Line', 'Font size', 'Font Color', 'Highlight Text'];
9
9
  const defaultSelectedFormattingOptions = ['Bold', 'Italic', 'Underline', 'Bulleted List', 'Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent'];
10
+ const unselectedOptions = formattingOptions.filter(option => !defaultSelectedFormattingOptions.includes(option));
10
11
  const defaultFormattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Insert/Remove Bulleted List', 'Insert/Remove Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent'];
11
12
  const formattingOptionsPreviewTab = ['Bold (Ctrl+B)', 'Italic (Ctrl+I)', 'Underline (Ctrl+U)', 'Insert/Remove Bulleted List', 'Insert/Remove Numbered List', 'Insert Table', 'Increase Indent', 'Decrease Indent', 'Equation Editor', 'Insert Image', 'Strikethrough', 'Subscript', 'Superscript', 'Special characters', 'Math characters', 'Insert Hyperlink', 'Block Quote', 'Remove Format', 'Code Inline', 'Code Editor', 'Align Left', 'Align Center', 'Align Right', 'Align Justify', 'Text direction left to right', 'Text direction right to left', 'Insert Horizontal Line', 'Font Size', 'Text Color', 'Highlight Text', 'Undo (Ctrl+Z)', 'Redo (Ctrl+Y)'];
13
+ const unselectedOptionsPreviewTab = formattingOptionsPreviewTab.filter(option => !defaultFormattingOptionsPreviewTab.includes(option));
12
14
 
13
15
  describe('Create question page - Essay Response: Customize formatting options (for student player) accordion contents, toolbar options', () => {
14
16
  before(() => {
@@ -84,7 +86,7 @@ describe('Create question page - Essay Response: Customize formatting options (f
84
86
  defaultSelectedFormattingOptions.forEach((option) => {
85
87
  essayResponsePage.steps.verifyCustomizeFormattingOptionIsSelected(option);
86
88
  });
87
- formattingOptions.splice(8, formattingOptions.length).forEach((option) => {
89
+ unselectedOptions.forEach((option) => {
88
90
  essayResponsePage.steps.verifyCustomizeFormattingOptionNotSelected(option);
89
91
  });
90
92
  });
@@ -125,7 +127,7 @@ describe('Create question page - Essay Response: Customize formatting options (f
125
127
  it('When the user selects all formatting options from the \'Customize formatting options\' accordion, all formatting options should appear in the preview tab', () => {
126
128
  essayResponsePage.steps.switchToEditTab();
127
129
  essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
128
- essayResponsePage.steps.selectCustomizedFormattingOption(formattingOptions.splice(8, formattingOptions.length));
130
+ essayResponsePage.steps.selectCustomizedFormattingOption(unselectedOptions);
129
131
  formattingOptions.forEach((option) => {
130
132
  essayResponsePage.steps.verifyCustomizeFormattingOptionIsSelected(option);
131
133
  });
@@ -88,7 +88,7 @@ describe('Preview tab contents for all views', () => {
88
88
  });
89
89
 
90
90
  it('The image uploaded in the \'Background image\' section should be displayed', () => {
91
- utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'visible');
91
+ utilities.verifyElementVisibilityState(fillInTheGapsOverImageDragAndDropPage.canvasImage(), 'exist');
92
92
  });
93
93
 
94
94
  if (view !== 'Grading view' && view !== 'Correct answer view') {
@@ -29,7 +29,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
29
29
  it('When the user sets correct answer responses and allots points, then the alloted points should be displayed in the preview tab', () => {
30
30
  textEntryMathPage.steps.switchToEditTab();
31
31
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
32
- textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'Correct answer 1');
32
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'Correctanswer1');
33
33
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
34
34
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
35
35
  textEntryMathPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
@@ -41,7 +41,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
41
41
 
42
42
  it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab, users response should not persist', () => {
43
43
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
44
- equationEditorFlyout.steps.enterTextInPreviewInputField(0, 'Correct answer 1');
44
+ equationEditorFlyout.steps.enterTextInPreviewInputField(0, 'Correctanswer1');
45
45
  equationEditorFlyout.steps.clickOnOkButton();
46
46
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
47
47
  equationEditorFlyout.steps.enterQuadraticEquation();
@@ -66,7 +66,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
66
66
  textEntryMathPage.steps.addResponseToken();
67
67
  textEntryMathPage.steps.addResponseToken();
68
68
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
69
- textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'Correct answer 1');
69
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'Correctanswer1');
70
70
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
71
71
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
72
72
  textEntryMathPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
@@ -123,9 +123,8 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
123
123
  textEntryMathPage.steps.switchToGradingView();
124
124
  textEntryMathPage.steps.verifyPreviewScore(0, 20);
125
125
  }
126
- utilities.verifyElementVisibilityState(textEntryMathPage.tickIcon(), 'notExist');
127
126
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
128
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct answer 1', '2x2y2+4xy+4', '6×π']);
127
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correctanswer1', '2x2y2+4xy+4', '6×π']);
129
128
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
130
129
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
131
130
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(0);
@@ -158,7 +157,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
158
157
  textEntryMathPage.steps.verifyIncorrectResponseIcon(1);
159
158
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
160
159
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
161
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct answer 1', '2x2y2+4xy+4', '6×π']);
160
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correctanswer1', '2x2y2+4xy+4', '6×π']);
162
161
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
163
162
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
164
163
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
@@ -169,7 +168,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
169
168
  studentViewPage.steps.clearResponses();
170
169
  }
171
170
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
172
- equationEditorFlyout.steps.enterTextInPreviewInputField('Correct answer 1');
171
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Correctanswer1');
173
172
  equationEditorFlyout.steps.clickOnOkButton();
174
173
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
175
174
  equationEditorFlyout.steps.enterQuadraticEquation();
@@ -190,7 +189,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
190
189
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
191
190
  textEntryMathPage.steps.verifyIncorrectResponseIcon(2);
192
191
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
193
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct answer 1', '2x2y2+4xy+4', '6×π']);
192
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correctanswer1', '2x2y2+4xy+4', '6×π']);
194
193
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
195
194
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
196
195
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
@@ -201,7 +200,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
201
200
  studentViewPage.steps.clearResponses();
202
201
  }
203
202
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
204
- equationEditorFlyout.steps.enterTextInPreviewInputField('Correct answer 1');
203
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Correctanswer1');
205
204
  equationEditorFlyout.steps.clickOnOkButton();
206
205
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
207
206
  equationEditorFlyout.steps.enterQuadraticEquation();
@@ -219,7 +218,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
219
218
  textEntryMathPage.steps.verifyCorrectResponseIcon(1);
220
219
  textEntryMathPage.steps.verifyCorrectIncorrectIconNotExist(2);
221
220
  textEntryMathPage.steps.verifyResponseFieldNumerationPreviewTab();
222
- textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correct answer 1', '2x2y2+4xy+4', '6×π']);
221
+ textEntryMathPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Correctanswer1', '2x2y2+4xy+4', '6×π']);
223
222
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(1, '2 x squared y squared plus 4 x y plus 4');
224
223
  textEntryMathPage.steps.verifyCorrectAnswerResponsesAriaLabel(2, '6 times pi');
225
224
  textEntryMathPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
@@ -230,7 +229,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
230
229
  studentViewPage.steps.clearResponses();
231
230
  }
232
231
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(0);
233
- equationEditorFlyout.steps.enterTextInPreviewInputField('Correct answer 1');
232
+ equationEditorFlyout.steps.enterTextInPreviewInputField('Correctanswer1');
234
233
  equationEditorFlyout.steps.clickOnOkButton();
235
234
  textEntryMathPage.steps.focusInResponseAnswerInputFieldPreviewTab(1);
236
235
  equationEditorFlyout.steps.enterQuadraticEquation();
@@ -266,7 +265,7 @@ describe('Create Item page - Text entry math: All or nothing ', () => {
266
265
  textEntryMathPage.steps.addResponseToken();
267
266
  textEntryMathPage.steps.addResponseToken();
268
267
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(0);
269
- textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'Correct answer 1');
268
+ textEntryMathPage.steps.addInputToResponseAnswerInputFieldSpecifyCorrectAnswer(0, 'Correctanswer1');
270
269
  textEntryMathPage.steps.expandResponseAccordionSpecifyCorrectAnswer(1);
271
270
  textEntryMathPage.steps.focusInResponseAnswerInputFieldSpecifyCorrectAnswerSection(1);
272
271
  textEntryMathPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
@@ -80,7 +80,7 @@ describe('Create item page - Text entry math: Preview contents', () => {
80
80
  });
81
81
 
82
82
  it('The image uploaded in the \'Background image\' section should be displayed', () => {
83
- utilities.verifyElementVisibilityState(textEntryMathWithImagePage.canvasImage(), 'visible');
83
+ utilities.verifyElementVisibilityState(textEntryMathWithImagePage.canvasImage(), 'exist');
84
84
  });
85
85
 
86
86
  if (view !== 'Grading view' && view !== 'Correct answer view') {
@@ -70,8 +70,8 @@ describe('Create item page - Upload response : Preview contents', () => {
70
70
 
71
71
  it('When user uploads multiple files, then uploaded files should be visible in the uploaded file section and file limit should be updated accordingly', () => {
72
72
  uploadResponsePage.steps.uploadFile(['uploads/sample.pdf', 'uploads/sample.jpg']);
73
- uploadResponsePage.steps.uploadedFileContentsPreviewTab(0, 'sample.pdf');
74
- uploadResponsePage.steps.uploadedFileContentsPreviewTab(1, 'sample.jpg');
73
+ uploadResponsePage.steps.verifyUploadedFileNameVisible('sample.pdf');
74
+ uploadResponsePage.steps.verifyUploadedFileNameVisible('sample.jpg');
75
75
  uploadResponsePage.steps.verifyUploadedFileLimitCount(2, 3);
76
76
  utilities.verifyElementCount(uploadResponsePage.fileName(), 2);
77
77
  });
@@ -132,6 +132,7 @@ describe('Create item page - Upload response : Preview contents', () => {
132
132
  cy.checkAccessibility(uploadResponsePage.questionWrapperPreviewTab());
133
133
  });
134
134
 
135
+ //Failed due to https://redmine.zeuslearning.com/issues/563182
135
136
  it('When user uploads file type which is not selected from the \'Supported file types\' accordion menu, then file upload error message - \'The file type is not supported. Please upload files with the following supported formats: *file format separated by commas*\' should be displayed', () => {
136
137
  uploadResponsePage.steps.uploadFile('uploads/sample.heif');
137
138
  uploadResponsePage.steps.verifyWarningMessage('The file type is not supported. Please upload files with the following supported formats: CSV, Excel, GIF, JPG, Open Office, PDF, PNG, Powerpoint, Publisher, RTF, TXT, Word, XPS, ZIP.');
@@ -145,7 +146,7 @@ describe('Create item page - Upload response : Preview contents', () => {
145
146
 
146
147
  if (view != 'Question preview') {
147
148
  it('On clicking on the file name, user should be able to download the file', () => {
148
- cy.verifyUploadFilePreviewDownload('sample.pdf');
149
+ cy.verifyUploadFilePreviewDownload('sample.jpg');
149
150
  cy.log('Added wait here to pause till the file download is complete');
150
151
  cy.wait(5000);
151
152
  });
@@ -34,7 +34,7 @@ Cypress.Commands.add('lazyLoadPreviewQuestions', (count, retries = 5) => {
34
34
  cy.learnosityLoaderWait();
35
35
  })
36
36
 
37
- const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["essayResponse"]
37
+ const migrationQuestionTypes = Cypress.env('migrationQuestionTypes');//["essayResponse", "essayResponseBasic", "mcq"]
38
38
  const migrationQuestionTypesLrn = migrationQuestionTypes.map((questionType) => lrnQuestionTypesENUM[questionType]);
39
39
  let lrnMcqTypesRegex = /Multiple choice – standard|Multiple choice – multiple response|True or false|Multiple choice – block layout/;
40
40
  let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
@@ -43,7 +43,7 @@ let lrnEssayResponseRegex = /Math essay with rich text|Essay with rich text/
43
43
  let lrnQuestionDataArr = [];
44
44
  let lrnGradingDataArr = [];
45
45
 
46
- let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);//["0715a48c-4c1f-4eed-8058-793ad9402f89", "c476e9ca-2ac6-4ebc-b548-241ef3cd13bb"]
46
+ let referenceIds = JSON.parse(Cypress.env('referenceIds')).slice(0, 100);//["d15153f9-fe28-4407-851e-bc2d36551711", "2f4fd7c7-8d5a-48b8-96fa-5d729238033f", "0715a48c-4c1f-4eed-8058-793ad9402f89", "9835f858-9866-43ad-a79b-d8da59723d3b"]
47
47
 
48
48
  if (referenceIds.length > 0) {
49
49
  describe('Migration item check for MCQ questions', () => {
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,6 +88,7 @@ if (referenceIds.length > 0) {
88
88
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMath(lrnQuestionDataArr, index);
89
89
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImage(lrnQuestionDataArr, index);
90
90
  case lrnQuestionTypesENUM.essayResponse: return extractLrnQuestionData.essayResponse(lrnQuestionDataArr, index);
91
+ case lrnQuestionTypesENUM.essayResponseBasic: return extractLrnQuestionData.essayResponseBasic(lrnQuestionDataArr, index);
91
92
  default: throw new Error('Invalid lrn question type');
92
93
  }
93
94
  }
@@ -105,6 +106,7 @@ if (referenceIds.length > 0) {
105
106
  case 'textEntryMath': return verifyIeQuestionData.textEntryMath(questionData, index);
106
107
  case 'textEntryMathImage': return verifyIeQuestionData.textEntryMathImage(questionData, index);
107
108
  case 'essayResponse': return verifyIeQuestionData.essayResponse(questionData, index);
109
+ case 'essayResponseBasic': return verifyIeQuestionData.essayResponseBasic(questionData, index);
108
110
  default: throw new Error('Invalid ngie question type');
109
111
  }
110
112
  });
@@ -127,6 +129,9 @@ if (referenceIds.length > 0) {
127
129
  case lrnQuestionTypesENUM.mcq: return extractLrnQuestionData.mcqGrading(lrnGradingDataArr, index);
128
130
  case lrnQuestionTypesENUM.textEntryMath: return extractLrnQuestionData.textEntryMathGrading(lrnGradingDataArr, index);
129
131
  case lrnQuestionTypesENUM.textEntryMathImage: return extractLrnQuestionData.textEntryMathImageGrading(lrnGradingDataArr, index);
132
+ case lrnQuestionTypesENUM.essayResponse:
133
+ case lrnQuestionTypesENUM.essayResponseBasic:
134
+ return;
130
135
  default: throw new Error('Invalid lrn question type');
131
136
  }
132
137
  }
@@ -88,7 +88,7 @@ export const drawingToolbarOptionsAndAdditionalOptions = {
88
88
  toolType: 'action'
89
89
  },
90
90
  {
91
- displayName: 'sent to back',
91
+ displayName: 'Send to back',
92
92
  tooltipText: 'Bring backwardSend selected item back a layer',
93
93
  toolType: 'action'
94
94
  },
@@ -649,7 +649,7 @@ const steps = {
649
649
  drawingResponsePage.charactersPopupCharactersCategoryWrapper()
650
650
  .eq(categoryIndex)
651
651
  .within(() => {
652
- categorySymbolsArray[index].forEach((symbolARIALabel, index) => {
652
+ categorySymbolsArray.forEach((symbolARIALabel, index) => {
653
653
  drawingResponsePage.charactersPopupCharacterSymbol()
654
654
  .eq(index)
655
655
  .find('svg')
@@ -676,6 +676,7 @@ const steps = {
676
676
  categoryListArray.forEach((category, index) => {
677
677
  utilities.verifyInnerText(drawingResponsePage.specialCharactersPopupCategoryTitle().eq(index), `${category.categoryName}`);
678
678
  utilities.verifyElementVisibilityState(drawingResponsePage.specialCharactersPopupCategoryTitle().eq(index), 'visible');
679
+ utilities.scrollIntoView(drawingResponsePage.specialCharactersPopupCategoryAccordionIcon().eq(index));
679
680
  utilities.verifyElementVisibilityState(drawingResponsePage.specialCharactersPopupCategoryAccordionIcon().eq(index), 'visible');
680
681
  });
681
682
  },
@@ -687,8 +688,8 @@ const steps = {
687
688
  verifySpecialCharactersPopupCategoryAccordionIsExpanded: (index) => {
688
689
  drawingResponsePage.specialCharactersPopupCategoryTitle()
689
690
  .eq(index)
690
- .within(() => {
691
- cy.wrap()
691
+ .within(($element) => {
692
+ cy.wrap($element)
692
693
  .find('span[class*="icon-open"]')
693
694
  .should('exist');
694
695
  });
@@ -702,8 +703,8 @@ const steps = {
702
703
  verifySpecialCharactersPopupCategoryAccordionIsCollapsed: (index) => {
703
704
  drawingResponsePage.specialCharactersPopupCategoryTitle()
704
705
  .eq(index)
705
- .within(() => {
706
- cy.wrap()
706
+ .within(($element) => {
707
+ cy.wrap($element)
707
708
  .find('span[class*="icon-open"]')
708
709
  .should('not.exist');
709
710
  });
@@ -13,7 +13,7 @@ const selectors = {
13
13
  ...optionsWrapperComponent,
14
14
  ...randomizeOptionsComponent,
15
15
  ...backgroundImageUploadComponent,
16
- dropdownWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class="Canvasstyle__DropzoneWrapper"]'),
16
+ dropdownWrapperPreviewTab: () => cy.get('[class*="question-preview-wrapper"] [class*="Canvasstyle__DropzoneWrapper"]'),
17
17
  correctAnswerSectionWrapper: () => cy.get('.dnd-correct-answer-wrapper'),
18
18
  correctAnswerResponseWrapper: () => cy.get('[class*="LabelImageWithDropdownPreviewstyles__AnswerCell"]'),
19
19
  correctAnswerResponse: () => cy.get('[class*="LabelImageWithDropdownPreviewstyles__AnswerWrapper"]'),
@@ -12,6 +12,7 @@ const selectors = {
12
12
  ...autoScoredSpecifyCorrectAnswerSection,
13
13
 
14
14
  addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
15
+ responseToken: () => cy.get('.cke_button__addresponse'),
15
16
 
16
17
  //TODO: Update below selectors after https://redmine.zeuslearning.com/issues/557945 is resolved
17
18
  //Response accordion
@@ -84,7 +85,7 @@ const selectors = {
84
85
  responseFieldWrapperPreviewTab: () => cy.get('.cloze-response-wrapper'),
85
86
  responseFieldNumerationPreviewTab: () => cy.get('.preview-question-text-wrapper .response-input-adornment'),
86
87
  questionContainerPreviewTab: () => cy.get('[class*="ClozeWithTextPreviewstyle__QuestionPreviewWrapper"]'),
87
- tickIcon: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper .tick-icon-wrapper'),
88
+ tickIcon: () => cy.get('.tick-icon-wrapper'),
88
89
  correctAnswersContainerResponse: () => cy.get('.cloze-with-text-correct-response-wrapper .response-input-field'),
89
90
  correctAnswersContainerResponseNumeration: () => cy.get('.cloze-with-text-correct-response-wrapper .response-input-adornment'),
90
91
  correctAnswersLabel: () => cy.get('.cloze-with-text-correct-answer-label'),
@@ -111,6 +112,13 @@ const steps = {
111
112
  .should('have.attr', 'aria-selected', 'true');
112
113
  },
113
114
 
115
+ addResponseToken: () => {
116
+ questionInputFieldComponent.questionInputField()
117
+ .click();
118
+ textEntryMathPage.responseToken()
119
+ .click();
120
+ },
121
+
114
122
  /**
115
123
  * @description Verify response accordion is collapsed in specify correct answer section
116
124
  * @param {number} responseIndex index of response accordion
@@ -653,8 +661,8 @@ const steps = {
653
661
  verifyCorrectAnswerResponsesAriaLabel: (index, correctAnswerAriaLabel) => {
654
662
  textEntryMathPage.correctAnswersContainerResponse()
655
663
  .eq(index)
656
- .find('[role="math"]')
657
- .should('have.attr', 'aria-label', correctAnswerAriaLabel);
664
+ .invoke('attr', 'value')
665
+ .should('include', correctAnswerAriaLabel);
658
666
  },
659
667
 
660
668
  verifyResponseFieldNumerationPreviewTab: () => {
@@ -784,8 +792,8 @@ const tests = {
784
792
  });
785
793
 
786
794
  it('When user adds response tokens in the question section they should be displayed in the \'Specify correct answer\' section in collapsed state', () => {
787
- textEntryMathPage.steps.addResponseToken();
788
- textEntryMathPage.steps.addResponseToken();
795
+ textEntryMathPage.steps.addResponseAreaInQuestionField();
796
+ textEntryMathPage.steps.addResponseAreaInQuestionField();
789
797
  utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
790
798
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(0);
791
799
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(1);
@@ -841,8 +849,8 @@ const tests = {
841
849
  });
842
850
 
843
851
  it('When user adds response tokens in question input field, then response accordions should be displayed in collapsed state in the \'Specify correct answer section\' with appropriate numeration', () => {
844
- textEntryMathPage.steps.addResponseToken();
845
- textEntryMathPage.steps.addResponseToken();
852
+ textEntryMathPage.steps.addResponseAreaInQuestionField();
853
+ textEntryMathPage.steps.addResponseAreaInQuestionField();
846
854
  utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
847
855
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(0);
848
856
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(1);
@@ -160,6 +160,15 @@ const steps = {
160
160
  utilities.verifyInnerText(utilities.getNthElement(uploadResponsePage.fileName(), fileIndex), fileName);
161
161
  },
162
162
 
163
+ /**
164
+ * @param {string} fileName - The expected name of the uploaded file.
165
+ * Verifies the displayed name of an uploaded file
166
+ */
167
+ verifyUploadedFileNameVisible: (fileName) => {
168
+ uploadResponsePage.uploadedFilesSectionWrapper()
169
+ .contains(fileName);
170
+ },
171
+
163
172
  stopUploadingFile: () => {
164
173
  uploadResponsePage.stopUploadingButton()
165
174
  .click();
@@ -360,7 +369,7 @@ const steps = {
360
369
  uploadFile: (file) => {
361
370
  uploadResponsePage.inputTypeFile()
362
371
  .attachFile(file);
363
- cy.wait(2000);
372
+ cy.wait(2000);
364
373
  },
365
374
 
366
375
  verifyDefaultSelectedFileTypes: () => {
@@ -14,6 +14,9 @@ export const lrnPage = {
14
14
  backgroundCanvasImage: () => cy.get('.lrn_imagecloze_image'),
15
15
  essayResponseTextArea: () => cy.get('.lrn_texteditor_editable'),
16
16
  essayResponseToolbarButton: () => cy.get('[aria-label="Text controls"] button.lrn_btn'),
17
+ essayResponseFooter: () => cy.get('.lrn-toolbar-footer'),
18
+ essayResponseToolbarWordCountWrapper: () => cy.get('.lrn_toolbar_right'),
19
+ essayResponseWordLimit: () => cy.get('.lrn_word_limit'),
17
20
  steps: {
18
21
  checkShowAnswersToggle: () => {
19
22
  lrnPage.showAnswersToggle()
@@ -264,12 +267,6 @@ export const extractLrnQuestionData = {
264
267
  },
265
268
 
266
269
  essayResponse: (lrnQuestionDataArr, index) => {
267
- //instructions
268
- //text in the input field
269
- //placeholder
270
- //wordlimit and stuff
271
- //toolbar icons
272
- //check with abhishek if we need to cover the grading view/else we can just check if the questino is not giving any error in grading view, i.e it is visible
273
270
  let obj = {};
274
271
  cy.log(`Extracting the question instructions and options from question ${index}`);
275
272
  obj.questionIndex = index;
@@ -293,12 +290,44 @@ export const extractLrnQuestionData = {
293
290
  let ariaLabel = $button[0].attributes["aria-label"].nodeValue;
294
291
  if (!ariaLabel) ariaLabel = $button[0].attributes["title"].nodeValue;
295
292
  if (ariaLabel != 'Edit table') toolbarButtons.push(ariaLabel);
296
- })
293
+ });
297
294
  obj.toolbarButtons = toolbarButtons;
295
+ lrnPage.essayResponseFooter()
296
+ .then(($element) => {
297
+ let innerHTML = $element[0].innerHTML;
298
+ if (innerHTML.includes('lrn_word_count')) obj.hasWordCount = true;
299
+ if (innerHTML.includes('lrn_word_limit')) obj.hasWordLimit = true;
300
+ });
298
301
  });
299
302
  lrnQuestionDataArr.push(obj);
300
303
  },
301
304
 
305
+ essayResponseBasic: (lrnQuestionDataArr, index) => {
306
+ let obj = {};
307
+ cy.log(`Extracting the question instructions and options from question ${index}`);
308
+ obj.questionIndex = index;
309
+ obj.questionType = 'essayResponseBasic';
310
+ lrnPage.questionWrapper()
311
+ .eq(index)
312
+ .within(() => {
313
+ lrnPage.questionInstructions()
314
+ .then(($ins) => {
315
+ let text = $ins[0].innerText;
316
+ obj.previewQuestionInstructions = text;
317
+ });
318
+ lrnPage.essayResponseTextArea()
319
+ .then(($element) => {
320
+ let textAreaPlaceholder = $element[0].attributes["data-placeholder"]?.nodeValue;
321
+ obj.textAreaPlaceholder = textAreaPlaceholder;
322
+ });
323
+ lrnPage.essayResponseWordLimit()
324
+ .then(($element) => {
325
+ let innerText = $element[0].innerText;
326
+ if (innerText) obj.hasWordLimit = true;
327
+ });
328
+ });
329
+ lrnQuestionDataArr.push(obj);
330
+ },
302
331
  /* singleSelection: (lrnQuestionDataArr, index) => {
303
332
  let obj = {};
304
333
  cy.log(`Extracting the question instructions and options from question ${index}`);
@@ -3,6 +3,7 @@ const lrnQuestionTypesENUM = {
3
3
  textEntryMath: 'Cloze math',
4
4
  textEntryMathImage: 'Cloze math with image',
5
5
  essayResponse: 'essayResponse',
6
+ essayResponseBasic: 'Essay with plain text',
6
7
  singleSelection: 'Multiple choice – standard',
7
8
  multipleSelection: 'Multiple choice – multiple response',
8
9
  trueOrFalse: 'True or false',
@@ -13,6 +13,9 @@ export const iePage = {
13
13
  textEntryMathCorrectAnswerMathMl: () => cy.get('.ngie_latex math'),
14
14
  textEntryMathCorrectAnswersResponseText: () => cy.get('.ngie_latex'),
15
15
  backgroundCanvasImage: () => cy.get('.background-image'),
16
+ essayResponseWordLimit: () => cy.get('.input-limit-label'),
17
+ essayResponseWordCount: () => cy.get('[class*="indexstyle__WordCharCountWrapper"]'),
18
+ essayResponseFooter: () => cy.get('.essay-character-view-wrapper'),
16
19
  };
17
20
 
18
21
  export const verifyIeQuestionData = {
@@ -177,6 +180,51 @@ export const verifyIeQuestionData = {
177
180
  }).then(() => {
178
181
  expect(ieButtonsTitle).to.have.deep.members(ieButtonsExpected);
179
182
  });
183
+ if (expectedQuestionData.hasWordLimit || expectedQuestionData.hasWordCount) {
184
+ if (expectedQuestionData.hasWordLimit) {
185
+ iePage.essayResponseWordLimit()
186
+ .should('exist')
187
+ .and('not.be.empty');
188
+ } else {
189
+ iePage.essayResponseWordLimit()
190
+ .should('be.empty');
191
+ }
192
+ if (expectedQuestionData.hasWordCount) {
193
+ iePage.essayResponseWordCount()
194
+ .should('exist')
195
+ .and('not.be.empty');
196
+ } else {
197
+ iePage.essayResponseWordCount()
198
+ .should('be.empty');
199
+ }
200
+ } else {
201
+ iePage.essayResponseFooter()
202
+ .should('not.exist');
203
+ }
204
+ });
205
+ },
206
+
207
+ essayResponseBasic: (expectedQuestionData, index) => {
208
+ cy.get('[class*="ngie-essay-response"]')
209
+ .eq(index)
210
+ .within(() => {
211
+ utilities.verifyInnerText(singleSelectionPage.questionInstructionsText(), expectedQuestionData.previewQuestionInstructions);
212
+ essayResponsePage.responseField()
213
+ .then(($element) => {
214
+ let textAreaPlaceholder = $element[0].attributes["data-cke-editorplaceholder"]?.nodeValue;
215
+ expect(textAreaPlaceholder).to.be.eq(expectedQuestionData.textAreaPlaceholder);
216
+ });
217
+ iePage.essayResponseWordCount()
218
+ .should('exist')
219
+ .and('not.be.empty');
220
+ if (expectedQuestionData.hasWordLimit) {
221
+ iePage.essayResponseWordLimit()
222
+ .should('exist')
223
+ .and('not.be.empty');
224
+ } else {
225
+ iePage.essayResponseWordLimit()
226
+ .should('be.empty');
227
+ }
180
228
  });
181
229
  },
182
230
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.122",
3
+ "version": "1.0.125",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {