itemengine-cypress-automation 1.0.306 → 1.0.308

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 (59) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +19 -19
  2. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +12 -2
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +10 -1
  4. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/gradingViewAndCorrectAnswerView.smoke.js +1 -1
  5. package/cypress/e2e/ILC/ChartsBar/HorizontalOrientationBarChart/previewContentsForAllViews.smoke.js +1 -1
  6. package/cypress/e2e/ILC/ChartsBar/allOrNothingScoringForAllViews.smoke.js +10 -1
  7. package/cypress/e2e/ILC/ChartsBar/gradingViewAndCorrectAnswerView.smoke.js +2 -2
  8. package/cypress/e2e/ILC/ChartsBar/previewContentsForAllViews.smoke.js +10 -1
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +12 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +79 -2
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +12 -2
  12. package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +19 -21
  13. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +8 -0
  14. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +11 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +10 -1
  16. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +10 -1
  17. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +12 -3
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +13 -4
  19. package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +12 -3
  20. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +12 -2
  21. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +13 -4
  22. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +11 -1
  23. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +10 -2
  24. package/cypress/e2e/ILC/ImageHighlight/allOrNothingForAllViews.smoke.js +11 -1
  25. package/cypress/e2e/ILC/ImageHighlight/previewContentsForAllViews.smoke.js +13 -4
  26. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +12 -3
  27. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +10 -1
  28. package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/previewContentsForAllViews.smoke.js +12 -3
  29. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +13 -4
  30. package/cypress/e2e/ILC/Matching/previewTabContentsForAllViews.smoke.js +12 -3
  31. package/cypress/e2e/ILC/MatchingDropdown/previewContentsForAllViews.smoke.js +13 -4
  32. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +18 -9
  33. package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +12 -3
  34. package/cypress/e2e/ILC/MultipleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +14 -5
  35. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +11 -1
  36. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +12 -2
  37. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +10 -1
  38. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +10 -0
  39. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +10 -1
  40. package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +10 -1
  41. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +10 -1
  42. package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +10 -1
  43. package/cypress/e2e/ILC/SingleSelectionGridNew/allOrNothingBasicForAllViews.smoke.js +10 -1
  44. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -1
  45. package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +23 -14
  46. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +11 -2
  47. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +13 -13
  48. package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +13 -5
  49. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +12 -2
  50. package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +11 -1
  51. package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +13 -4
  52. package/cypress/e2e/ILC/UploadResponse/thumbNail.smoke.js +16 -6
  53. package/cypress/e2e/ILC/VideoResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +14 -4
  54. package/cypress/e2e/ILC/VideoResponseNew/previewContentsForAllViews.smoke.js +12 -3
  55. package/cypress/e2e/applitools.config.js +12 -0
  56. package/cypress/pages/components/equationEditorSectionCommonComponent.js +1 -0
  57. package/cypress/support/commands.js +14 -1
  58. package/cypress.config.js +2 -0
  59. package/package.json +4 -1
@@ -317,23 +317,23 @@ describe('Preview of Audio response for bar audio recorder style', () => {
317
317
  audioResponsePage.steps.switchToPreviewTab();
318
318
  audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
319
319
  });
320
-
320
+
321
321
  it('When the user hovers over the \'Play\' button, a tooltip \'Play\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
322
322
  audioResponsePage.playbackPlayButton()
323
323
  .verifyTooltip('Play');
324
324
  });
325
-
325
+
326
326
  it('When the user clicks on \'Play\' button, then the audio should start playing. Timer should display the amount of audio that has been played and the total audio length in (mm:ss)/(mm:ss) format.', () => {
327
327
  audioResponsePage.steps.startPlayback();
328
328
  audioResponsePage.steps.waitForPlaybackToBeginBarPreview();
329
329
  audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:03', '00:10');
330
330
  });
331
-
331
+
332
332
  it('When the user hovers over the \'Pause\' button, a tooltip \'Pause\' should be displayed and on moving away the focus, the tooltip should disappear', () => {
333
333
  audioResponsePage.playbackPauseButton()
334
334
  .verifyTooltip('Pause');
335
335
  });
336
-
336
+
337
337
  it('CSS of \'Preview\' section if playback is initiated', { tags: 'css' }, () => {
338
338
  utilities.verifyCSS(audioResponsePage.barPreviewPlaybackTime(), {
339
339
  'color': css.color.liText,
@@ -347,11 +347,11 @@ describe('Preview of Audio response for bar audio recorder style', () => {
347
347
  'stroke': css.color.secondaryBtnActive
348
348
  });
349
349
  });
350
-
350
+
351
351
  it('Accessibility of \'Preview\' section if playback is initiated', { tags: 'a11y' }, () => {
352
352
  cy.checkAccessibility(audioResponsePage.barPreviewPlaybackWrapper());
353
353
  });
354
-
354
+
355
355
  it('When the audio player is in playback state and the user clicks on \'Pause\' button, then playback should get paused. Progress bar and timer should not update further and the \'Pause\' button should get replaced with \'Play\' button', () => {
356
356
  audioResponsePage.steps.resetQuestionPreview();
357
357
  audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
@@ -363,7 +363,7 @@ describe('Preview of Audio response for bar audio recorder style', () => {
363
363
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
364
364
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'notExist');
365
365
  });
366
-
366
+
367
367
  it('CSS of \'Preview\' section if playback is paused', { tags: 'css' }, () => {
368
368
  utilities.verifyCSS(audioResponsePage.playbackPlayButton().find('svg rect'), {
369
369
  'fill': css.color.secondaryBtnBg
@@ -372,36 +372,36 @@ describe('Preview of Audio response for bar audio recorder style', () => {
372
372
  'stroke': css.color.secondaryBtnActive
373
373
  });
374
374
  });
375
-
375
+
376
376
  it('Accessibility of \'Preview\' section if if playback is paused', { tags: 'a11y' }, () => {
377
377
  cy.checkAccessibility(audioResponsePage.barPreviewPlaybackWrapper());
378
378
  });
379
-
379
+
380
380
  it('When audio player is in paused state and user clicks on \'Play\' button, then playback should get resumed and \'Play\' button should get replaced with \'Pause\' button.', () => {
381
381
  audioResponsePage.steps.startPlayback();
382
382
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'visible');
383
383
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'notExist');
384
384
  });
385
-
385
+
386
386
  it('When the user seeks the progress bar slider while the audio is playing, then the audio should continue to play from the position where the slider is seeked', () => {
387
387
  audioResponsePage.steps.seekProgressBarSliderToCenter();
388
388
  audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
389
389
  });
390
-
390
+
391
391
  it('When the user seeks the progress bar slider while the audio is paused, then the audio playback should be in paused state and on playing the audio, then the audio should play from the position where the slider is seeked', () => {
392
392
  audioResponsePage.steps.pausePlayback();
393
393
  audioResponsePage.steps.seekProgressBarSliderToCenter();
394
394
  audioResponsePage.steps.startPlayback();
395
395
  audioResponsePage.steps.verifyProgressBarSliderPosition(actualAudioSeekedInPercent);
396
396
  });
397
-
397
+
398
398
  it('When the audio playback is completed, the \'Pause\' button should get replaced with \'Play\' button', () => {
399
399
  audioResponsePage.steps.verifyPlaybackTimeBarPreview('00:10', '00:10');
400
400
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPlayButton(), 'visible');
401
401
  utilities.verifyElementVisibilityState(audioResponsePage.playbackPauseButton(), 'notExist');
402
402
  audioResponsePage.steps.verifyProgressBarSliderPosition(99);
403
403
  });
404
-
404
+
405
405
  it('CSS of progress bar in hover state', { tags: 'css' }, () => {
406
406
  audioResponsePage.steps.hoverOnProgressBarSlider();
407
407
  utilities.verifyCSS(audioResponsePage.progressBarSlider().parents('span[class*="MuiSlider-thumb"]'), {
@@ -409,7 +409,7 @@ describe('Preview of Audio response for bar audio recorder style', () => {
409
409
  });
410
410
  });
411
411
  });
412
-
412
+
413
413
  describe('Playback player : Volume control', () => {
414
414
  abortEarlySetup();
415
415
  before(() => {
@@ -419,10 +419,10 @@ describe('Preview of Audio response for bar audio recorder style', () => {
419
419
  audioResponsePage.steps.switchToPreviewTab();
420
420
  audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
421
421
  });
422
-
422
+
423
423
  audioResponsePage.tests.verifyVolumeControlFunctionality();
424
424
  });
425
-
425
+
426
426
  describe('Playback player : Playback speed', () => {
427
427
  const playbackSpeedOptions = ['1', '1.25', '1.5', '2'];
428
428
  abortEarlySetup();
@@ -433,9 +433,9 @@ describe('Preview of Audio response for bar audio recorder style', () => {
433
433
  audioResponsePage.steps.switchToPreviewTab();
434
434
  audioResponsePage.steps.recordAndSaveAudioBarPreview(10000);
435
435
  });
436
-
436
+
437
437
  audioResponsePage.tests.verifyPlaybackSpeedContents(playbackSpeedOptions);
438
-
438
+
439
439
  for (let index = 0; index < playbackSpeedOptions.length; index++) {
440
440
  it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
441
441
  audioResponsePage.steps.resetQuestionPreview();
@@ -450,7 +450,7 @@ describe('Preview of Audio response for bar audio recorder style', () => {
450
450
  });
451
451
  };
452
452
  });
453
-
453
+
454
454
  describe('Playback player : Retake my audio response', () => {
455
455
  abortEarlySetup();
456
456
  before(() => {
@@ -11,6 +11,14 @@ describe('Create item page - audio response: Grading view, Correct answer view c
11
11
  cy.loginAs('admin');
12
12
  });
13
13
 
14
+ beforeEach(() => {
15
+ cy.startApplitools();
16
+ });
17
+
18
+ afterEach(() => {
19
+ cy.eyesClose();
20
+ });
21
+
14
22
  if (views.includes('Grading view')) {
15
23
  describe('Grading view contents', { tags: 'smoke' }, () => {
16
24
  let actualAudioSeekedInPercent = 50
@@ -74,8 +82,9 @@ describe('Create item page - audio response: Grading view, Correct answer view c
74
82
  audioResponsePage.steps.verifyProgressBarSliderPosition(99);
75
83
  });
76
84
 
77
- it('A download button should be displayed in the playback player', () => {
85
+ it('Audio response - A download button should be displayed in the playback player', () => {
78
86
  utilities.verifyElementVisibilityState(audioResponsePage.downloadAudioButton(), 'visible');
87
+ cy.eyesCheckWindow(`Audio response: Grading view - Verify download button is displayed in the playback player.`);
79
88
  });
80
89
 
81
90
  it('Empty score input field and total score should be displayed', () => {
@@ -125,8 +134,9 @@ describe('Create item page - audio response: Grading view, Correct answer view c
125
134
 
126
135
  correctAnswerViewPage.tests.verifyManualScoredQuestionHelpTextCorrectAnswerPage();
127
136
 
128
- it('The points alloted to the question should be displayed', () => {
137
+ it('Audio response: The points alloted to the question should be displayed', () => {
129
138
  correctAnswerViewPage.steps.verifyAvailablePoints(10);
139
+ cy.eyesCheckWindow('Audio response: Correct answer view contents');
130
140
  });
131
141
  });
132
142
  }
@@ -11,6 +11,14 @@ describe('Create item page - Audio response: Preview contents', () => {
11
11
  cy.loginAs('admin');
12
12
  });
13
13
 
14
+ beforeEach(() => {
15
+ cy.startApplitools();
16
+ });
17
+
18
+ afterEach(() => {
19
+ cy.eyesClose();
20
+ });
21
+
14
22
  views.forEach((view) => {
15
23
  describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
16
24
  abortEarlySetup();
@@ -106,7 +114,7 @@ describe('Create item page - Audio response: Preview contents', () => {
106
114
  utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
107
115
  });
108
116
 
109
- it('When the user clicks on the stop recording button, the recording should stop and the recording should get saved', () => {
117
+ it(`${view} - Audio response - When the user clicks on the stop recording button, the recording should stop and the recording should get saved`, () => {
110
118
  audioResponsePage.steps.stopRecordingStandardPreview();
111
119
  utilities.verifyInnerText(audioResponsePage.savingStatusText(), 'Saving');
112
120
  utilities.verifyElementVisibilityState(audioResponsePage.savingStatusText(), 'visible');
@@ -116,6 +124,7 @@ describe('Create item page - Audio response: Preview contents', () => {
116
124
  utilities.verifyElementVisibilityState(audioResponsePage.previewVolumeMeter(), 'visible');
117
125
  utilities.verifyElementVisibilityState(audioResponsePage.playbackProgressBar(), 'visible');
118
126
  audioResponsePage.steps.verifyResponseIsRecordedHelpText();
127
+ cy.eyesCheckWindow(`${view} - Audio response - Verify recording stops and is saved when the Stop recording button is clicked`);
119
128
  });
120
129
  });
121
130
  });
@@ -96,7 +96,7 @@ describe('Create item page - Charts - Bar horizontal orientation: Grading view,
96
96
  });
97
97
 
98
98
  it('All the bar graphs in grading view should be non-editable', () => {
99
- chartsBarPage.steps.verifyDragHandleNotVisible();
99
+ chartsBarPage.steps.verifyDragHandleNotVisible();
100
100
  for (let index = 0; index < 5; index++) {
101
101
  utilities.triggerMouseover(utilities.getNthElement(chartsBarPage.previewTabBar(), index));
102
102
  utilities.verifyElementVisibilityState(chartsBarPage.barAndPointTooltipWrapper(), 'notExist');
@@ -142,7 +142,7 @@ describe('Create item page: Charts - Bar horizontal orientation- Preview content
142
142
 
143
143
  chartsBarPage.tests.verifyBarTooltipContentsCSSAndA11yInPreviewTab('3', barBackgroundColor[3], 'Bar 4');
144
144
 
145
- it('User should be able to edit the label a bar', () => {
145
+ it('Horizontal: User should be able to edit the label a bar', () => {
146
146
  chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(0, '2000');
147
147
  chartsBarPage.steps.editBarLabelHorizontalInPreviewTab(3, '2004');
148
148
  });
@@ -11,6 +11,14 @@ describe('Create item page - Charts - Bar: All or nothing ', () => {
11
11
  cy.loginAs('admin');
12
12
  });
13
13
 
14
+ beforeEach(() => {
15
+ cy.startApplitools();
16
+ });
17
+
18
+ afterEach(() => {
19
+ cy.eyesClose();
20
+ });
21
+
14
22
  if (!grepTags || !grepTags.includes('smoke')) {
15
23
  describe('Question preview modes: Student view and Grading view', () => {
16
24
  abortEarlySetup();
@@ -290,7 +298,7 @@ describe('Create item page - Charts - Bar: All or nothing ', () => {
290
298
  });
291
299
 
292
300
  //Fully correct
293
- it('When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view \'Your answer is correct\' should be displayed, correct icons should be displayed on the correctly attempted bars and the correct answer section graph should not be displayed', () => {
301
+ it(`${view} - Charts bar: Vertical - Charts bar: Vertical - When the user attempts the question correctly then the user should be awarded with full points and on switching to grading view 'Your answer is correct' should be displayed, correct icons should be displayed on the correctly attempted bars and the correct answer section graph should not be displayed`, () => {
294
302
  if (view === 'Grading view') {
295
303
  studentViewPage.steps.clearResponses();
296
304
  }
@@ -312,6 +320,7 @@ describe('Create item page - Charts - Bar: All or nothing ', () => {
312
320
  chartsBarPage.steps.verifyBarCorrectIncorrectIconInPreviewTab(4, 'correct');
313
321
  chartsBarPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
314
322
  chartsBarPage.steps.verifyCorrectAnswerSectionNotExist();
323
+ cy.eyesCheckWindow(`${view} - Fully correct case`);
315
324
  });
316
325
  });
317
326
  });
@@ -107,7 +107,7 @@ describe('Create item page - Charts - Bar: Grading view, Correct answer view con
107
107
  utilities.verifyElementVisibilityState(chartsBarPage.correctAnswersLabel(), 'visible');
108
108
  });
109
109
 
110
- it('Correct answer should be displayed in the correct answer section', () => {
110
+ it('Charts bar: Vertical - Correct answer should be displayed in the correct answer section', () => {
111
111
  chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 0, barValue: 2, range: 20 });
112
112
  chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 1, barValue: 2, range: 20 });
113
113
  chartsBarPage.steps.verifyBarHeightInCorrectAnswerSection({ barIndex: 2, barValue: 5, range: 20 });
@@ -220,7 +220,7 @@ describe('Create item page - Charts - Bar: Grading view, Correct answer view con
220
220
  utilities.verifyElementVisibilityState(chartsBarPage.previewTabToolBarWrapper(), 'notExist');
221
221
  });
222
222
 
223
- it('The correct answer set by user should be displayed in the correct answer view', () => {
223
+ it('Charts bar: Verical - The correct answer set by user should be displayed in the correct answer view', () => {
224
224
  chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 0, barValue: 2, range: 20 });
225
225
  chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 1, barValue: 2, range: 20 });
226
226
  chartsBarPage.steps.verifyBarHeightInPreviewTab({ barIndex: 2, barValue: 5, range: 20 });
@@ -13,6 +13,14 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
13
13
  cy.loginAs('admin');
14
14
  });
15
15
 
16
+ beforeEach(() => {
17
+ cy.startApplitools();
18
+ });
19
+
20
+ afterEach(() => {
21
+ cy.eyesClose();
22
+ });
23
+
16
24
  views.forEach((view) => {
17
25
  describe(`Preview tab contents - Edit bar graphs, graph labels, locked graph ${view}`, { tags: 'smoke' }, () => {
18
26
  abortEarlySetup();
@@ -144,9 +152,10 @@ describe('Create item page: Charts - Bar - Preview contents in all views', () =>
144
152
 
145
153
  chartsBarPage.tests.verifyBarTooltipContentsCSSAndA11yInPreviewTab('3', barBackgroundColor[3], 'Bar 4');
146
154
 
147
- it('User should be able to edit the label a bar', () => {
155
+ it(`${view} - Charts bar: Vertical User should be able to edit the label a bar`, () => {
148
156
  chartsBarPage.steps.editBarLabelInPreviewTab(0, '2000');
149
157
  chartsBarPage.steps.editBarLabelInPreviewTab(1, '2001');
158
+ cy.eyesCheckWindow(`${view} - Charts bar: Vertical after editing the bar height and labels`);
150
159
  });
151
160
 
152
161
  it('CSS of preview tab contents', { tags: 'css' }, () => {
@@ -11,6 +11,14 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
11
11
  cy.loginAs('admin');
12
12
  });
13
13
 
14
+ beforeEach(() => {
15
+ cy.startApplitools();
16
+ });
17
+
18
+ afterEach(() => {
19
+ cy.eyesClose();
20
+ });
21
+
14
22
  if (!grepTags || !grepTags.includes('smoke')) {
15
23
  describe('Question preview modes: Student view and Grading view', () => {
16
24
  abortEarlySetup();
@@ -204,7 +212,7 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
204
212
  dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], []], ['1', '2', '3', '4', '5', '6']);
205
213
  });
206
214
 
207
- it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
215
+ it(`${view} - When user attempts the question correctly, the user should be awarded full points and on switching to 'Grading' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text 'Your answer is correct' and correct answer section should not be displayed`, () => {
208
216
  if (view === 'Grading view') {
209
217
  studentViewPage.steps.clearResponses();
210
218
  };
@@ -229,6 +237,7 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
229
237
  //Need to remove comment once https://redmine.zeuslearning.com/issues/577009 is resolved
230
238
  // dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
231
239
  dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
240
+ cy.eyesCheckWindow(`${view} - DND - Correct attempt`);
232
241
  });
233
242
  });
234
243
  });
@@ -245,6 +254,8 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
245
254
  dragAndDropIntoCategoriesPage.steps.expandScoringTypeDropdown();
246
255
  dragAndDropIntoCategoriesPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
247
256
  utilities.verifyInnerText(dragAndDropIntoCategoriesPage.scoringTypeDropdown(), 'Manually scored');
257
+ cy.log('Adding wait to ensure Manually scored is selected');
258
+ cy.wait(2000);
248
259
  dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Parrot', 'Whale']);
249
260
  break;
250
261
  case 'Grading view':
@@ -1,4 +1,5 @@
1
1
  import { dragAndDropIntoCategoriesPage, itemPreviewPage, studentViewPage } from "../../../pages";
2
+ import { equationEditorFlyout } from "../../../pages/components";
2
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
3
4
  import utilities from "../../../support/helpers/utilities";
4
5
  const css = Cypress.env('css');
@@ -11,6 +12,14 @@ describe('Create item page - Drag and drop into categories: Preview contents', (
11
12
  cy.loginAs('admin');
12
13
  });
13
14
 
15
+ beforeEach(() => {
16
+ cy.startApplitools();
17
+ });
18
+
19
+ afterEach(() => {
20
+ cy.eyesClose();
21
+ });
22
+
14
23
  views.forEach((view) => {
15
24
  describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
16
25
  abortEarlySetup();
@@ -77,9 +86,10 @@ describe('Create item page - Drag and drop into categories: Preview contents', (
77
86
  }
78
87
  });
79
88
 
80
- it('Question instructions should be visible', () => {
89
+ it(`DND into categories: ${view} Question instructions should be visible`, () => {
81
90
  utilities.verifyInnerText(dragAndDropIntoCategoriesPage.questionInstructionsText(), 'Drag and drop options in correct categories');
82
91
  utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.questionInstructionsText(), 'visible');
92
+ cy.eyesCheckWindow(`DND into categories: ${view} Default question state`);
83
93
  });
84
94
 
85
95
  it(`The category table as set by the user should be displayed in the ${view}`, () => {
@@ -195,4 +205,71 @@ describe('Create item page - Drag and drop into categories: Preview contents', (
195
205
  });
196
206
  });
197
207
  });
198
- });
208
+
209
+ //https://weldnorthed.atlassian.net/browse/IEI-4579
210
+ views.forEach((view) => {
211
+ describe('Equations in table layout', () => {
212
+ before(() => {
213
+ switch (view) {
214
+ case 'Question preview':
215
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
216
+ cy.barsPreLoaderWait();
217
+ dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options in correct categories');
218
+ dragAndDropIntoCategoriesPage.steps.enterTextInOptionInputField(0, 'Bat');
219
+ dragAndDropIntoCategoriesPage.steps.enterTextInOptionInputField(1, 'Eagle');
220
+ dragAndDropIntoCategoriesPage.steps.modifyTableCellProperty(3, 'Text');
221
+ dragAndDropIntoCategoriesPage.steps.modifyTableCellProperty(6, 'Text');
222
+ dragAndDropIntoCategoriesPage.steps.modifyTableCellProperty(9, 'Text');
223
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
224
+ dragAndDropIntoCategoriesPage.steps.focusWithinCellText(3);
225
+ dragAndDropIntoCategoriesPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
226
+ dragAndDropIntoCategoriesPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
227
+ dragAndDropIntoCategoriesPage.steps.focusWithinCellText(6);
228
+ dragAndDropIntoCategoriesPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
229
+ equationEditorFlyout.steps.enterTextInPreviewInputField('This is a equation');
230
+ equationEditorFlyout.steps.clickOnOkButton();
231
+ dragAndDropIntoCategoriesPage.steps.focusWithinCellText(9);
232
+ dragAndDropIntoCategoriesPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
233
+ equationEditorFlyout.steps.enterTextInPreviewInputField('This is a very long text to test the equation editor');
234
+ equationEditorFlyout.steps.clickOnOkButton();
235
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
236
+ break;
237
+ case 'Item view':
238
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
239
+ break;
240
+ case 'Item preview':
241
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
242
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
243
+ break;
244
+ case 'Student view':
245
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
246
+ break;
247
+ case 'Grading view':
248
+ cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
249
+ break;
250
+ case 'Correct answer view':
251
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
252
+ break;
253
+ default:
254
+ throw new Error('Invalid view');
255
+ }
256
+ });
257
+
258
+ after(() => {
259
+ if (view === 'Question preview') {
260
+ dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
261
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
262
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
263
+ }
264
+ if (view === 'Student view') {
265
+ studentViewPage.steps.submitResponse();
266
+ utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
267
+ }
268
+ });
269
+
270
+ it(`DND into categories ${view}: The equations should be correctly displayed in all views`, () => {
271
+ cy.eyesCheckWindow(`Equations in table layout: ${view}`);
272
+ });
273
+ });
274
+ });
275
+ });
@@ -13,6 +13,14 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
13
13
  cy.loginAs('admin');
14
14
  });
15
15
 
16
+ beforeEach(() => {
17
+ cy.startApplitools();
18
+ });
19
+
20
+ afterEach(() => {
21
+ cy.eyesClose();
22
+ });
23
+
16
24
  if (views.includes('Grading view')) {
17
25
  describe('Grading view contents', { tags: 'smoke' }, () => {
18
26
  abortEarlySetup();
@@ -50,10 +58,11 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
50
58
  utilities.verifyElementVisibilityState(drawingResponsePage.questionInstructionsText(), 'visible');
51
59
  });
52
60
 
53
- it('A preview of the canvas along with the play button should be displayed and user should be able to click on the play button', () => {
61
+ it('Drawing response: A preview of the canvas along with the play button should be displayed and user should be able to click on the play button', () => {
54
62
  utilities.verifyElementVisibilityState(drawingResponsePage.gradingViewPlayFeatureButton(), 'visible');
55
63
  utilities.verifyElementVisibilityState(drawingResponsePage.previewTabLowerCanvas(), 'visible');
56
64
  drawingResponsePage.steps.clickOnPlayButtonInGradingView();
65
+ cy.eyesCheckWindow(`Checking grading view for drawing response`);
57
66
  });
58
67
 
59
68
  it('Empty score input field and total score should be displayed', () => {
@@ -91,9 +100,10 @@ describe('Create item page - Drawing response: Grading view, Correct answer view
91
100
  utilities.verifyElementVisibilityState(correctAnswerViewPage.correctAnswerViewQuestionInstructions(), 'visible');
92
101
  });
93
102
 
94
- it('\'This is a manual scored question\' help text should be displayed in the correct answer view', () => {
103
+ it('Drawing response: \'This is a manual scored question\' help text should be displayed in the correct answer view', () => {
95
104
  utilities.verifyTextContent(correctAnswerViewPage.manualScoredQuestionHelpText(), 'This is a manual scored question.');
96
105
  utilities.verifyElementVisibilityState(correctAnswerViewPage.manualScoredQuestionHelpText(), 'visible');
106
+ cy.eyesCheckWindow(`Checking correct answer view for drawing response`);
97
107
  });
98
108
 
99
109
  it('The points alloted to the question should be displayed', () => {