itemengine-cypress-automation 1.0.347-miscellaneous-questions-r2-6a04041.0 → 1.0.348-IEI-5944-and-IEI-5945-manualAndNonScoredScript-2983065.0

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 (22) hide show
  1. package/Dockerfile +0 -1
  2. package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerEditTabAddTranscriptRadioButton .js +2 -2
  3. package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerHeaderSectionAndButtons.js +2 -2
  4. package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTab.js +1 -1
  5. package/cypress/e2e/ILC/CkEditorAudioPlayer/audioPlayerPreviewTabTranscript.js +3 -2
  6. package/cypress/e2e/ILC/CkEditorInsertImage/imageInfo.js +3 -3
  7. package/cypress/e2e/ILC/CkEditorInsertTable/tableStyle.js +2 -2
  8. package/cypress/e2e/ILC/CkEditorLink/uploadSection.js +1 -1
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +112 -3
  10. package/cypress/e2e/ILC/Matching/allOrNothingScoringForAllViews.smoke.js +210 -0
  11. package/cypress/e2e/ILC/MatchingDropdown/allOrNothingScoringForAllViews.smoke.js +208 -0
  12. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -2
  13. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/checkScoringLabelBannerAndCorrectAnswer.js +0 -1
  14. package/cypress/e2e/ILC/MultipleSelectionGridNew/styleAndLayoutCustomizationLayoutProperties.js +0 -1
  15. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +2 -2
  16. package/cypress/pages/audioPlayerPage.js +0 -23
  17. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  18. package/cypress/pages/components/ckEditorEquationEditorComponent.js +0 -1
  19. package/cypress/pages/components/ckEditorInsertImageComponent.js +3 -3
  20. package/cypress/pages/components/ckEditorLinkComponent.js +9 -8
  21. package/cypress/pages/textEntryMathPage.js +1 -3
  22. package/package.json +1 -1
package/Dockerfile CHANGED
@@ -27,7 +27,6 @@ RUN chmod +x ./deploy/fillInTheGapsQuestion/run.sh
27
27
  RUN chmod +x ./deploy/resourcesAndToolsQuestion/run.sh
28
28
  RUN chmod +x ./deploy/audioResponseQuestion/run.sh
29
29
  RUN chmod +x ./deploy/dataApi/run.sh
30
- RUN chmod +x ./deploy/feedbackScaleQuestion/run.sh
31
30
 
32
31
  RUN npm ci
33
32
 
@@ -187,8 +187,8 @@ describe('Audio player: Edit tab', () => {
187
187
  });
188
188
 
189
189
  it('The user should be able to enter text in the \'Transcript\' input field', () => {
190
- multipleSelectionPage.steps.enterTextInCKEditorTranscriptInputField('This is a transcript text');
191
- utilities.verifyTextContent(multipleSelectionPage.cKEditorTranscriptInputField(), 'This is a transcript text');
190
+ multipleSelectionPage.steps.enterTextInTranscriptInputField('This is a transcript text');
191
+ utilities.verifyTextContent(multipleSelectionPage.typeInTranscriptInputField(), 'This is a transcript text');
192
192
  });
193
193
 
194
194
  it('CSS of \'Type in transcript\' Section', { tags: 'css' }, () => {
@@ -31,8 +31,8 @@ describe('Audio player: Header section, buttons and saving item', () => {
31
31
 
32
32
  describe('OK button Contents', () => {
33
33
  it('\'OK\' button should be displayed in popup.', () => {
34
- utilities.verifyInnerText(multipleSelectionPage.audioPlayerOkButton(), 'OK');
35
- utilities.verifyElementVisibilityState(multipleSelectionPage.audioPlayerOkButton(), 'visible');
34
+ utilities.verifyInnerText(multipleSelectionPage.okButton(), 'OK');
35
+ utilities.verifyElementVisibilityState(multipleSelectionPage.okButton(), 'visible');
36
36
  });
37
37
 
38
38
  it('CSS of \'OK\' button', { tags: 'css' }, () => {
@@ -32,7 +32,7 @@ describe('Audio player: Edit tab', () => {
32
32
  multipleSelectionPage.steps.switchToEditTab();
33
33
  multipleSelectionPage.steps.clickOnAudioPlayerBlock();
34
34
  multipleSelectionPage.steps.clickOnLimitPlayAttempts();
35
- multipleSelectionPage.steps.setCKEditorPlaybackLimit(2);
35
+ multipleSelectionPage.steps.setPlaybackLimit(2);
36
36
  multipleSelectionPage.steps.clickOnOKButton();
37
37
  multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
38
38
  multipleSelectionPage.steps.switchToPreviewTab();
@@ -32,6 +32,7 @@ describe('Audio player: Edit tab', () => {
32
32
  multipleSelectionPage.steps.switchToEditTab();
33
33
  multipleSelectionPage.steps.clickOnAudioPlayerBlock();
34
34
  multipleSelectionPage.steps.uploadTranscriptFile('sample.txt');
35
+ utilities.verifyElementVisibilityState(multipleSelectionPage.transcriptFileUploadProgressBar(), 'visible');
35
36
  multipleSelectionPage.steps.clickOnOKButton();
36
37
  multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
37
38
  multipleSelectionPage.steps.switchToPreviewTab();
@@ -48,7 +49,7 @@ describe('Audio player: Edit tab', () => {
48
49
  multipleSelectionPage.steps.switchToEditTab();
49
50
  multipleSelectionPage.steps.clickOnAudioPlayerBlock();
50
51
  multipleSelectionPage.steps.clickOnTypeInTranscriptRadioButton();
51
- multipleSelectionPage.steps.enterTextInCKEditorTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
52
+ multipleSelectionPage.steps.enterTextInTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
52
53
  multipleSelectionPage.steps.clickOnOKButton();
53
54
  multipleSelectionPage.steps.focusInAndOutOfQuestionInstructionsInputField();
54
55
  multipleSelectionPage.steps.switchToPreviewTab();
@@ -72,7 +73,7 @@ describe('Audio player: Edit tab', () => {
72
73
  multipleSelectionPage.steps.uploadFile('sample.mp3');
73
74
  utilities.verifyElementVisibilityState(multipleSelectionPage.fileUploadProgressBar(), 'hidden');
74
75
  multipleSelectionPage.steps.clickOnTypeInTranscriptRadioButton();
75
- multipleSelectionPage.steps.enterTextInCKEditorTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
76
+ multipleSelectionPage.steps.enterTextInTranscriptInputField('In triangle ABC,m ∠ ABC = (4x-12) ° and m ∠ ACB = (2x + 26) °');
76
77
  multipleSelectionPage.steps.clickOnOKButton();
77
78
  });
78
79
 
@@ -28,8 +28,8 @@ describe('Insert Image: Edit tab', () => {
28
28
  });
29
29
 
30
30
  it('\'URL\', \'Alternative Text\', \'Width\', \'Height\', \'Border\', \'HSpace\', \'VSpace\' label with input field for each individual label and \'Preview\' label with image preview box should be visible ', () => {
31
- utilities.verifyInnerText(multipleSelectionPage.imageUrlLabel(), 'URL');
32
- utilities.verifyElementVisibilityState(multipleSelectionPage.imageUrlLabel(), 'visible');
31
+ utilities.verifyInnerText(multipleSelectionPage.urlLabel(), 'URL');
32
+ utilities.verifyElementVisibilityState(multipleSelectionPage.urlLabel(), 'visible');
33
33
  utilities.verifyElementVisibilityState(multipleSelectionPage.urlInputField(), 'visible');
34
34
  utilities.verifyInnerText(multipleSelectionPage.alternateTextLabel(), 'Alternative Text');
35
35
  utilities.verifyElementVisibilityState(multipleSelectionPage.alternateTextLabel(), 'visible');
@@ -82,7 +82,7 @@ describe('Insert Image: Edit tab', () => {
82
82
  'font-size': '12px',
83
83
  'font-weight': '400'
84
84
  });
85
- utilities.verifyCSS(multipleSelectionPage.imageUrlLabel(), {
85
+ utilities.verifyCSS(multipleSelectionPage.urlLabel(), {
86
86
  'color': 'rgb(0, 0, 0)',
87
87
  'font-size': '12px',
88
88
  'font-weight': '400'
@@ -82,8 +82,8 @@ describe('Insert Table: Edit tab', () => {
82
82
  it('\'Border size\' label and input field with default value 1, \'Striped\' label and 3 strip options with default value none and \'Add hover state\' label and dropdown with default value none should be displayed.', () => {
83
83
  multipleSelectionPage.steps.scrollingDownInInsertTablePopUp();
84
84
  utilities.verifyInnerText(multipleSelectionPage.borderSizeLabel(), 'Border size');
85
- utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeLabel(), 'exist');
86
- utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeInputField(), 'exist');
85
+ utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeLabel(), 'visible');
86
+ utilities.verifyElementVisibilityState(multipleSelectionPage.borderSizeInputField(), 'visible');
87
87
  utilities.verifyInnerText(multipleSelectionPage.stripedLabel(), 'Striped');
88
88
  utilities.verifyElementVisibilityState(multipleSelectionPage.stripedLabel(), 'visible');
89
89
  utilities.verifyElementVisibilityState(multipleSelectionPage.clearStripes(), 'visible');
@@ -24,7 +24,7 @@ describe('Link Ck Editor: Edit tab', () => {
24
24
  utilities.verifyElementVisibilityState(multipleSelectionPage.uploadSectionTitle(), 'visible');
25
25
  utilities.verifyInnerText(multipleSelectionPage.uploadTitle(), 'Upload');
26
26
  utilities.verifyElementVisibilityState(multipleSelectionPage.uploadTitle(), 'visible');
27
- utilities.verifyElementVisibilityState(multipleSelectionPage.insertImageChooseFileButton(), 'exist');
27
+ utilities.verifyElementVisibilityState(multipleSelectionPage.insertImageChooseFileButton(), 'visible');
28
28
  utilities.verifyInnerText(multipleSelectionPage.sendItToServerButton(), 'Send it to the Server');
29
29
  utilities.verifyElementVisibilityState(multipleSelectionPage.sendItToServerButton(), 'visible');
30
30
  });
@@ -251,12 +251,15 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
251
251
  case 'Question preview':
252
252
  dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
253
253
  cy.barsPreLoaderWait();
254
+ dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options in correct categories.');
254
255
  dragAndDropIntoCategoriesPage.steps.expandScoringTypeDropdown();
255
256
  dragAndDropIntoCategoriesPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
256
257
  utilities.verifyInnerText(dragAndDropIntoCategoriesPage.scoringTypeDropdown(), 'Manually scored');
257
258
  cy.log('Adding wait to ensure Manually scored is selected');
258
259
  cy.wait(2000);
260
+ dragAndDropIntoCategoriesPage.steps.allotPoints(20);
259
261
  dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Parrot', 'Whale']);
262
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
260
263
  break;
261
264
  case 'Grading view':
262
265
  cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
@@ -282,6 +285,11 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
282
285
  });
283
286
  };
284
287
 
288
+ it('Question instructions should be visible', () => {
289
+ dragAndDropIntoCategoriesPage.steps.verifyQuestionInstructionsTextPreviewTab('Drag and drop options in correct categories.');
290
+ dragAndDropIntoCategoriesPage.steps.verifyVisibityOfQuestionInstructionsText();
291
+ });
292
+
285
293
  it('When the user selects \'Grading\' view, correct answer section should not be displayed', () => {
286
294
  if (view === 'Grading view') {
287
295
  studentViewPage.steps.submitResponse();
@@ -290,6 +298,23 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
290
298
  dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
291
299
  };
292
300
  });
301
+
302
+ it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
303
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Parrot': 0, 'Whale': 1 });
304
+ if (view === 'Grading view') {
305
+ studentViewPage.steps.submitResponse();
306
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
307
+ studentViewPage.steps.clickOnGoToGradingViewButton();
308
+ gradingViewPage.steps.verifyGradingViewScore('', 20);
309
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsNotExist();
310
+ dragAndDropIntoCategoriesPage.steps.verifyAnswerStatusBannerNotExist();
311
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExist();
312
+ };
313
+ if (view === 'Question preview' || view === 'Item preview') {
314
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
315
+ dragAndDropIntoCategoriesPage.steps.checkManuallyScoredScoringLabel();
316
+ };
317
+ });
293
318
  });
294
319
  });
295
320
 
@@ -455,10 +480,12 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
455
480
  case 'Question preview':
456
481
  dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
457
482
  cy.barsPreLoaderWait();
458
- dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle']);
459
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
460
483
  dragAndDropIntoCategoriesPage.steps.expandScoringTypeDropdown();
461
484
  dragAndDropIntoCategoriesPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
485
+ dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(7);
486
+ dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock', 'Kite']);
487
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Parrot': 2, 'Platypus': 3, 'Ostrich': 4, 'Whale': 5, 'Flying squirrel': 6, 'Peacock': 7, 'Kite': 8 });
488
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
462
489
  break;
463
490
  case 'Grading view':
464
491
  cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
@@ -484,15 +511,97 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
484
511
  });
485
512
  };
486
513
 
514
+ it('When the user selects "Grading" view without attempting the question, non-scoring label 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 correct/incorrect icons should not be displayed', () => {
515
+ if (view === 'Grading view') {
516
+ studentViewPage.steps.submitResponse();
517
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
518
+ studentViewPage.steps.clickOnGoToGradingViewButton();
519
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
520
+ };
521
+ if (view === 'Question preview' || view === 'Item preview') {
522
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
523
+ dragAndDropIntoCategoriesPage.steps.switchToGradingView();
524
+ dragAndDropIntoCategoriesPage.steps.checkNonScoredScoringLabel();
525
+ dragAndDropIntoCategoriesPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
526
+ };
527
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.correctAnswersLabel(), 'Correct answers');
528
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsNotExist();
529
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle'], ['Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], ['Flying squirrel'], ['Peacock'], ['Kite']], ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
530
+ });
531
+
487
532
  it('When the user attempts the question incorrectly for a non scored Question, then the incorrect Answer label and correct answer section should not be displayed', () => {
488
533
  if (view === 'Grading view') {
489
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 7 });
534
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 8, 'Eagle': 7, 'Parrot': 3, 'Platypus': 2, 'Ostrich': 8, 'Whale': 6, 'Ostrich': 0, 'Flying squirrel': 5, 'Peacock': 4, 'Kite': 1 });
490
535
  studentViewPage.steps.submitResponse();
491
536
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
492
537
  studentViewPage.steps.clickOnGoToGradingViewButton();
493
538
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
539
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(0);
540
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(1);
541
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(2);
542
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
543
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(4);
544
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(5);
545
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(6);
546
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(7);
547
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(8);
548
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle'], ['Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], ['Flying squirrel'], ['Peacock'], ['Kite']], ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
494
549
  };
495
550
  });
551
+
552
+ it('hen the user attempts the question partially correct, then the user should be awarded 0 points and on switching to "Grading" view, correct icon should be displayed beside the correct answer responses, incorrect icon should be displayed beside incorrect answer responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers should be displayed', () => {
553
+ if (view === 'Grading view') {
554
+ studentViewPage.steps.clearResponses();
555
+ };
556
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 2, 'Platypus': 4 });
557
+ if (view === 'Grading view') {
558
+ studentViewPage.steps.submitResponse();
559
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
560
+ studentViewPage.steps.clickOnGoToGradingViewButton();
561
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
562
+ };
563
+ if (view === 'Question preview' || view === 'Item preview') {
564
+ dragAndDropIntoCategoriesPage.steps.checkNonScoredScoringLabel();
565
+ dragAndDropIntoCategoriesPage.steps.switchToGradingView();
566
+ };
567
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
568
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
569
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
570
+ dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(3);
571
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
572
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle'], ['Parrot'], ['Platypus'], ['Ostrich'], ['Whale'], ['Flying squirrel'], ['Peacock'], ['Kite']], ['1', '2', '3', '4', '5', '6', '7', '8', '9']);
573
+ });
574
+
575
+ it('When the user attempts the question correctly, and on switching to "Grading" view, non-scoring label should be displayed, correct icons should be displayed beside the correct responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
576
+ if (view === 'Question preview' || view === 'Item preview') {
577
+ dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
578
+ };
579
+ if (view === 'Grading view') {
580
+ studentViewPage.steps.clearResponses();
581
+ };
582
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0, 'Eagle': 1, 'Parrot': 2, 'Platypus': 3, 'Ostrich': 4, 'Whale': 5, 'Flying squirrel': 6, 'Peacock': 7, 'Kite': 8 });
583
+ if (view === 'Grading view') {
584
+ studentViewPage.steps.submitResponse();
585
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
586
+ studentViewPage.steps.clickOnGoToGradingViewButton();
587
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
588
+ };
589
+ if (view === 'Question preview' || view === 'Item preview') {
590
+ dragAndDropIntoCategoriesPage.steps.checkNonScoredScoringLabel();
591
+ dragAndDropIntoCategoriesPage.steps.switchToGradingView();
592
+ };
593
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
594
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
595
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
596
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(3);
597
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(4);
598
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(5);
599
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(6);
600
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(7);
601
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(8);
602
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
603
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerSectionNotExists();
604
+ });
496
605
  });
497
606
 
498
607
  })
@@ -213,6 +213,216 @@ describe('Create item page - Matching: All or nothing ', () => {
213
213
  });
214
214
  });
215
215
 
216
+ views.forEach((view) => {
217
+ describe(`${view}: Matching drag and drop - Manually scored`, { tags: 'smoke' }, () => {
218
+ abortEarlySetup();
219
+ before(() => {
220
+ switch (view) {
221
+ case 'Question preview':
222
+ matchingPage.steps.navigateToCreateQuestion('matching');
223
+ cy.barsPreLoaderWait();
224
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answers.');
225
+ matchingPage.steps.expandScoringTypeDropdown();
226
+ matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
227
+ matchingPage.steps.allotPoints(20);
228
+ matchingPage.steps.addMultipleOptionFields(2);
229
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
230
+ matchingPage.steps.enterTextInOptionInputField(optionsArray);
231
+ matchingPage.steps.switchToPreviewTab();
232
+ break;
233
+ case 'Item preview':
234
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
235
+ itemPreviewPage.steps.switchToPreviewTab();
236
+ break;
237
+ case 'Grading view':
238
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
239
+ break;
240
+ };
241
+ });
242
+
243
+ beforeEach(() => {
244
+ switch (view) {
245
+ case 'Question preview':
246
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
247
+ matchingPage.steps.resetQuestionPreview();
248
+ break;
249
+ case 'Item preview':
250
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
251
+ itemPreviewPage.steps.resetQuestionPreview();
252
+ break;
253
+ case 'Grading view':
254
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
255
+ break;
256
+ }
257
+ });
258
+
259
+ if (view === 'Question preview') {
260
+ after(() => {
261
+ matchingPage.steps.clickOnSaveQuestionButton();
262
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
263
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
264
+ });
265
+ };
266
+
267
+ it('Question instructions should be visible', () => {
268
+ matchingPage.steps.verifyQuestionInstructionsTextPreviewTab('Fill the categories with the right answers.');
269
+ matchingPage.steps.verifyVisibityOfQuestionInstructionsText();
270
+ });
271
+
272
+ it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
273
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Eagle', dropzoneIndex: 1 }, { optionText: 'Fish', dropzoneIndex: 2 }]);
274
+ if (view === 'Grading view') {
275
+ studentViewPage.steps.submitResponse();
276
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
277
+ studentViewPage.steps.clickOnGoToGradingViewButton();
278
+ gradingViewPage.steps.verifyGradingViewScore('', 20);
279
+ matchingPage.steps.verifyCorrectIncorrectIconNotExist(0);
280
+ matchingPage.steps.verifyCorrectIncorrectIconNotExist(1);
281
+ matchingPage.steps.verifyAnswerStatusBannerNotExist();
282
+ matchingPage.steps.verifyCorrectAnswerSectionNotExist();
283
+ };
284
+ if (view === 'Question preview' || view === 'Item preview') {
285
+ matchingPage.steps.checkManuallyScoredScoringLabel();
286
+ };
287
+ });
288
+ });
289
+ })
290
+
291
+ views.forEach((view) => {
292
+ describe(`${view}: Matching drag and drop - Non scored`, { tags: 'smoke' }, () => {
293
+ abortEarlySetup();
294
+ before(() => {
295
+ switch (view) {
296
+ case 'Question preview':
297
+ matchingPage.steps.navigateToCreateQuestion('matching');
298
+ cy.barsPreLoaderWait();
299
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
300
+ matchingPage.steps.expandScoringTypeDropdown();
301
+ matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
302
+ matchingPage.steps.addMultipleOptionFields(2);
303
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
304
+ matchingPage.steps.enterTextInOptionInputField(optionsArray);
305
+ matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
306
+ matchingPage.steps.switchToPreviewTab();
307
+ break;
308
+ case 'Item preview':
309
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
310
+ itemPreviewPage.steps.switchToPreviewTab();
311
+ break;
312
+ case 'Grading view':
313
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
314
+ break;
315
+ };
316
+ });
317
+
318
+ beforeEach(() => {
319
+ switch (view) {
320
+ case 'Question preview':
321
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
322
+ matchingPage.steps.resetQuestionPreview();
323
+ break;
324
+ case 'Item preview':
325
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
326
+ itemPreviewPage.steps.resetQuestionPreview();
327
+ break;
328
+ case 'Grading view':
329
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
330
+ break;
331
+ }
332
+ });
333
+
334
+ if (view === 'Question preview') {
335
+ after(() => {
336
+ matchingPage.steps.clickOnSaveQuestionButton();
337
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
338
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
339
+ });
340
+ };
341
+
342
+ it('When the user selects "Grading" view without attempting the question, non-scoring label 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 correct/incorrect icons should not be displayed', () => {
343
+ if (view === 'Grading view') {
344
+ studentViewPage.steps.submitResponse();
345
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
346
+ studentViewPage.steps.clickOnGoToGradingViewButton();
347
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
348
+ };
349
+ if (view === 'Question preview' || view === 'Item preview') {
350
+ matchingPage.steps.checkNonScoredScoringLabel();
351
+ matchingPage.steps.switchToGradingView();
352
+ matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
353
+ };
354
+ matchingPage.steps.verifyDropzoneNumeration();
355
+ matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
356
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
357
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
358
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
359
+ });
360
+
361
+ it('When the user attempts the question incorrectly,and on switching to \'Grading\' view non scoring label should be displayed, incorrect icon should be displayed beside incorrect response, a status message with text \'Your answer is incorrect\' and correct answer section with correct answer should be displayed', () => {
362
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Bear', dropzoneIndex: 0 }, { optionText: 'Eagle', dropzoneIndex: 1 }, { optionText: 'Fish', dropzoneIndex: 2 }]);
363
+ if (view === 'Grading view') {
364
+ studentViewPage.steps.submitResponse();
365
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
366
+ studentViewPage.steps.clickOnGoToGradingViewButton();
367
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
368
+ };
369
+ if (view === 'Question preview' || view === 'Item preview') {
370
+ matchingPage.steps.checkNonScoredScoringLabel();
371
+ matchingPage.steps.switchToGradingView();
372
+ };
373
+ matchingPage.steps.verifyIncorrectOptionIcon(0);
374
+ matchingPage.steps.verifyIncorrectOptionIcon(1);
375
+ matchingPage.steps.verifyIncorrectOptionIcon(2);
376
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
377
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
378
+ });
379
+
380
+ it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along should be displayed', () => {
381
+ if (view === 'Grading view') {
382
+ studentViewPage.steps.clearResponses();
383
+ };
384
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
385
+ if (view === 'Grading view') {
386
+ studentViewPage.steps.submitResponse();
387
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
388
+ studentViewPage.steps.clickOnGoToGradingViewButton();
389
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
390
+ };
391
+ if (view === 'Question preview' || view === 'Item preview') {
392
+ matchingPage.steps.checkNonScoredScoringLabel();
393
+ matchingPage.steps.switchToGradingView();
394
+ };
395
+ matchingPage.steps.verifyIncorrectOptionIconForEmptyOption(0);
396
+ matchingPage.steps.verifyCorrectOptionIcon(1);
397
+ matchingPage.steps.verifyCorrectOptionIcon(2);
398
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
399
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
400
+ });
401
+
402
+ it('When the user attempts the question correctly, and on switching to "Grading" view, non-scoring label should be displayed, correct icons should be displayed beside the correct responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
403
+ if (view === 'Grading view') {
404
+ studentViewPage.steps.clearResponses();
405
+ };
406
+ matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Elephant', dropzoneIndex: 0 }, { optionText: 'Fish', dropzoneIndex: 1 }, { optionText: 'Cat', dropzoneIndex: 2 }]);
407
+ if (view === 'Grading view') {
408
+ studentViewPage.steps.submitResponse();
409
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
410
+ studentViewPage.steps.clickOnGoToGradingViewButton();
411
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
412
+ };
413
+ if (view === 'Question preview' || view === 'Item preview') {
414
+ matchingPage.steps.checkNonScoredScoringLabel();
415
+ matchingPage.steps.switchToGradingView();
416
+ };
417
+ matchingPage.steps.verifyCorrectOptionIcon(0);
418
+ matchingPage.steps.verifyCorrectOptionIcon(1);
419
+ matchingPage.steps.verifyCorrectOptionIcon(2);
420
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
421
+ matchingPage.steps.verifyCorrectAnswerSectionNotExists();
422
+ });
423
+ });
424
+ });
425
+
216
426
  if (!grepTags || !grepTags.includes('smoke')) {
217
427
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
218
428
  abortEarlySetup();
@@ -207,6 +207,214 @@ describe('Create item page - Matching: All or nothing ', () => {
207
207
  });
208
208
  });
209
209
 
210
+ views.forEach((view) => {
211
+ describe(`${view}: Matching dropdown - Manually scored`, { tags: 'smoke' }, () => {
212
+ abortEarlySetup();
213
+ before(() => {
214
+ switch (view) {
215
+ case 'Question preview':
216
+ matchingPage.steps.navigateToCreateQuestion('matching');
217
+ cy.barsPreLoaderWait();
218
+ matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
219
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Match the following using dropdowns.');
220
+ matchingPage.steps.expandScoringTypeDropdown();
221
+ matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
222
+ matchingPage.steps.allotPoints(20);
223
+ matchingPage.steps.addMultipleOptionFields(2);
224
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
225
+ matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
226
+ matchingPage.steps.switchToPreviewTab();
227
+ break;
228
+ case 'Item preview':
229
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
230
+ itemPreviewPage.steps.switchToPreviewTab();
231
+ break;
232
+ case 'Grading view':
233
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
234
+ break;
235
+ };
236
+ });
237
+
238
+ beforeEach(() => {
239
+ switch (view) {
240
+ case 'Question preview':
241
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
242
+ matchingPage.steps.resetQuestionPreview();
243
+ break;
244
+ case 'Item preview':
245
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
246
+ itemPreviewPage.steps.resetQuestionPreview();
247
+ break;
248
+ case 'Grading view':
249
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
250
+ break;
251
+ }
252
+ });
253
+
254
+ if (view === 'Question preview') {
255
+ after(() => {
256
+ matchingPage.steps.clickOnSaveQuestionButton();
257
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
258
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
259
+ });
260
+ };
261
+
262
+ it('Question instructions should be visible', () => {
263
+ matchingPage.steps.verifyQuestionInstructionsTextPreviewTab('Match the following using dropdowns.');
264
+ matchingPage.steps.verifyVisibityOfQuestionInstructionsText();
265
+ });
266
+
267
+ it('User should be able to attempt the question in student view, and correct/incorrect icons, "Your answer is correct/incorrect" label, and correct answer section should not be displayed in grading view', () => {
268
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }]);
269
+ if (view === 'Grading view') {
270
+ studentViewPage.steps.submitResponse();
271
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
272
+ studentViewPage.steps.clickOnGoToGradingViewButton();
273
+ gradingViewPage.steps.verifyGradingViewScore('', 20);
274
+ matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
275
+ matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
276
+ matchingPage.steps.verifyAnswerStatusBannerNotExist();
277
+ matchingPage.steps.verifyCorrectAnswerSectionNotExist();
278
+ };
279
+ if (view === 'Question preview' || view === 'Item preview') {
280
+ matchingPage.steps.checkManuallyScoredScoringLabel();
281
+ };
282
+ });
283
+ });
284
+ });
285
+
286
+ views.forEach((view) => {
287
+ describe(`${view}: Matching dropdown - Non scored`, { tags: 'smoke' }, () => {
288
+ abortEarlySetup();
289
+ before(() => {
290
+ switch (view) {
291
+ case 'Question preview':
292
+ matchingPage.steps.navigateToCreateQuestion('matching');
293
+ cy.barsPreLoaderWait();
294
+ matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
295
+ matchingPage.steps.addTextInQuestionInstructionsInputField('Match the following using dropdowns.');
296
+ matchingPage.steps.addMultipleOptionFields(2);
297
+ matchingPage.steps.enterTextInPromptInputField(promptTextArray);
298
+ matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
299
+ matchingPage.steps.expandScoringTypeDropdown();
300
+ matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
301
+ matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
302
+ matchingPage.steps.switchToPreviewTab();
303
+ break;
304
+ case 'Item preview':
305
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
306
+ itemPreviewPage.steps.switchToPreviewTab();
307
+ break;
308
+ case 'Grading view':
309
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
310
+ break;
311
+ };
312
+ });
313
+
314
+ beforeEach(() => {
315
+ switch (view) {
316
+ case 'Question preview':
317
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
318
+ matchingPage.steps.resetQuestionPreview();
319
+ break;
320
+ case 'Item preview':
321
+ matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
322
+ itemPreviewPage.steps.resetQuestionPreview();
323
+ break;
324
+ case 'Grading view':
325
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
326
+ break;
327
+ }
328
+ });
329
+
330
+ if (view === 'Question preview') {
331
+ after(() => {
332
+ matchingPage.steps.clickOnSaveQuestionButton();
333
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
334
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
335
+ });
336
+ };
337
+
338
+ it('When the user selects "Grading" view without attempting the question, dropdown 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', () => {
339
+ if (view === 'Grading view') {
340
+ studentViewPage.steps.submitResponse();
341
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
342
+ studentViewPage.steps.clickOnGoToGradingViewButton();
343
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
344
+ };
345
+ if (view === 'Question preview' || view === 'Item preview') {
346
+ matchingPage.steps.checkNonScoredScoringLabel();
347
+ matchingPage.steps.switchToGradingView();
348
+ matchingPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
349
+ };
350
+ matchingPage.steps.verifyDropdownNumeration(0);
351
+ matchingPage.steps.verifyDropdownNumeration(1);
352
+ matchingPage.steps.verifyDropdownNumeration(2);
353
+ matchingPage.steps.verifyCorrectIncorrectIconsNotExist();
354
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabelNotExist();
355
+ utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
356
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
357
+ });
358
+
359
+ it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to "Grading" view, incorrect icons should be displayed besides all incorrect responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers along with numeration should be displayed', () => {
360
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[0] }, { dropdownIndex: 1, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[2] }]);
361
+ if (view === 'Grading view') {
362
+ studentViewPage.steps.submitResponse();
363
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
364
+ studentViewPage.steps.clickOnGoToGradingViewButton();
365
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
366
+ };
367
+ if (view === 'Question preview' || view === 'Item preview') {
368
+ matchingPage.steps.checkNonScoredScoringLabel();
369
+ matchingPage.steps.switchToGradingView();
370
+ };
371
+ matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
372
+ matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
373
+ matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
374
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
375
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
376
+ });
377
+
378
+ it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to "Grading" view, correct icon should be displayed beside the correct answer responses, incorrect icon should be displayed beside incorrect answer responses, a status message with text "Your answer is incorrect" and correct answer section with all correct answers should be displayed', () => {
379
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[3] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
380
+ if (view === 'Grading view') {
381
+ studentViewPage.steps.submitResponse();
382
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
383
+ studentViewPage.steps.clickOnGoToGradingViewButton();
384
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
385
+ };
386
+ if (view === 'Question preview' || view === 'Item preview') {
387
+ matchingPage.steps.checkNonScoredScoringLabel();
388
+ matchingPage.steps.switchToGradingView();
389
+ };
390
+ matchingPage.steps.verifyCorrectOptionIconDropdown(0);
391
+ matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
392
+ matchingPage.steps.verifyCorrectOptionIconDropdown(2);
393
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
394
+ matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
395
+ });
396
+
397
+ it('When the user attempts the question correctly, and on switching to "Grading" view, non-scoring label should be displayed, correct icons should be displayed beside the correct responses, a status message with text "Your answer is correct" should be displayed and correct answer section should not be displayed', () => {
398
+ matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
399
+ if (view === 'Grading view') {
400
+ studentViewPage.steps.submitResponse();
401
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
402
+ studentViewPage.steps.clickOnGoToGradingViewButton();
403
+ gradingViewPage.steps.verifyScoresNotVisibleForNonScoredQuestions();
404
+ };
405
+ if (view === 'Question preview' || view === 'Item preview') {
406
+ matchingPage.steps.checkNonScoredScoringLabel();
407
+ matchingPage.steps.switchToGradingView();
408
+ };
409
+ matchingPage.steps.verifyCorrectOptionIconDropdown(0);
410
+ matchingPage.steps.verifyCorrectOptionIconDropdown(1);
411
+ matchingPage.steps.verifyCorrectOptionIconDropdown(2);
412
+ matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
413
+ matchingPage.steps.verifyCorrectAnswerSectionNotExists();
414
+ });
415
+ });
416
+ });
417
+
210
418
  if (!grepTags || !grepTags.includes('smoke')) {
211
419
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
212
420
  abortEarlySetup();
@@ -375,8 +375,7 @@ describe('Create Item page - Multiple selection: All or nothing ', () => {
375
375
  multipleSelectionPage.steps.verifyCorrectAnswerSectionExist();
376
376
  });
377
377
 
378
- //Failing due to https://weldnorthed.atlassian.net/browse/IEI-6004
379
- it.skip('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
378
+ it('When the user attempts the question partially correct, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
380
379
  if (view === 'Grading view') {
381
380
  studentViewPage.steps.clearResponses();
382
381
  };
@@ -65,7 +65,6 @@ describe('Create Item page - Multiple selection grid', () => {
65
65
  before(() => {
66
66
  multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
67
67
  cy.barsPreLoaderWait();
68
- multipleSelectionGridPage.steps.addQuestionInstructions('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
69
68
  });
70
69
 
71
70
  it('When the user selects \'Grading\' view without setting the answer, correct answers section and answer status banner should not be displayed', () => {
@@ -38,7 +38,6 @@ describe('Multiple selection grid - Additional settings', () => {
38
38
  multipleSelectionGridPage.steps.navigateToCreateQuestion('multiple selection grid');
39
39
  cy.barsPreLoaderWait();
40
40
  multipleSelectionGridPage.steps.expandStyleAndLayoutCustomizationAccordion();
41
- multipleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
42
41
  });
43
42
 
44
43
  multipleSelectionGridPage.tests.verifyRowAndColumnSpacingFunctionalityPreviewTab();
@@ -209,8 +209,8 @@ describe('Create item page - Text entry math: Question instructions, Add structu
209
209
  });
210
210
 
211
211
  it('Warning icons should be displayed on the required input fields', () => {
212
- utilities.verifyElementVisibilityState(textEntryMathPage.questionWarningIcon(), 'exist');
213
- utilities.verifyElementVisibilityState(textEntryMathPage.warningIcon(), 'exist');
212
+ utilities.verifyElementVisibilityState(scoringSectionBaseEditTab.questionWarningIcon(), 'exist');
213
+ utilities.verifyElementVisibilityState(commonComponents.warningIcon(), 'exist');
214
214
  });
215
215
 
216
216
  it('When required input fields are filled then warning icons should disappear', () => {
@@ -50,8 +50,6 @@ const selectors = {
50
50
  typeInTranscriptLabel: () => cy.get('.type-in-transcript-opt-label'),
51
51
  typeInTranscriptRadioButton: () => cy.get('[aria-label="Type in transcript"][type="radio"]'),
52
52
  transcriptInputField: () => cy.get('[title="Transcript"]'),
53
- cKEditorTranscriptInputField: () => cy.get('textarea[aria-label="Transcript"]'),
54
- ckEditorPlayAttemptsLimitInputField: () => cy.get('input[aria-label="Playback Limit"]'),
55
53
  allowStudentsToDownloadAudioLabel: () => cy.get('.allow-students-to-download-audio .MuiFormControlLabel-label').eq(0),
56
54
  allowStudentsToDownloadAudioCheckbox: () => cy.get('.allow-students-to-download-audio input'),
57
55
  limitPlayAttemptsLabel: () => cy.get('.allow-students-to-download-audio .MuiFormControlLabel-label').eq(1),
@@ -168,13 +166,6 @@ const steps = {
168
166
  .blur();
169
167
  },
170
168
 
171
- enterTextInCKEditorTranscriptInputField: (text) => {
172
- audioPlayerPage.cKEditorTranscriptInputField()
173
- .type(text)
174
- .blur();
175
- },
176
-
177
-
178
169
  verifyTextInTranscriptInputField: (text) => {
179
170
  audioPlayerPage.transcriptInputField()
180
171
  .should('have.text', text);
@@ -715,20 +706,6 @@ const steps = {
715
706
  .type(value)
716
707
  },
717
708
 
718
- /**
719
- * Sets the playback limit value in the audio player's input field.
720
- * @param {string|number} value - The value to set as the playback limit.
721
- * @returns {void}
722
- */
723
- setCKEditorPlaybackLimit: (value) => {
724
- audioPlayerPage.ckEditorPlayAttemptsLimitInputField()
725
- .clear()
726
- .type(value);
727
- cy.wait(2000);
728
- audioPlayerPage.ckEditorPlayAttemptsLimitInputField()
729
- .blur();
730
- },
731
-
732
709
  /**
733
710
  * Verify the playback limit help text in preview tab
734
711
  * @param {string|number} value - The value to set as the playback limit.
@@ -20,7 +20,7 @@ const selectors = {
20
20
  selectAManipulativeLabel: () => cy.get('[class*="SelectManipulativeWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
21
21
  enterAShareCodeLabel: () => cy.get('[class*="EnterShareCodeWrapper"] [class*="BrainingcampManipulativestyle__WrapperSubHeader"]'),
22
22
  enterAShareCodeInputField: () => cy.get('[class*="EnterShareCodeWrapper"] input'),
23
- previewTabCanvas: () => cy.get('.bcm-inner')
23
+ previewTabCanvas: () => cy.get('.canvas'),
24
24
  }
25
25
 
26
26
  const steps = {
@@ -9,7 +9,6 @@ const selectors = {
9
9
  equationEditorIcon: () => cy.get('.cke_button__nextgeneqneditor_icon:visible'),
10
10
  equationEditorLabel: () => cy.get('[class*="EquationEditorstyles__Heading"]'),
11
11
  okButton: () => cy.get('[title="OK"]'),
12
- audioPlayerOkButton: () => cy.get('.save-action-btn-wrapper button').eq(0),
13
12
  editorCancelButton: () => cy.get('[title="Cancel"]'),
14
13
  equationEditorPopUp: () => cy.get('[class*="EquationEditorstyles__EquationEditorContainer"]'),
15
14
  equationWrapper: () => cy.get('.cke_widget_ngie_equation [class*="NGMathJax"]'),
@@ -15,7 +15,7 @@ const selectors = {
15
15
  imageInfoButton: () => cy.get('[title="Image Info"]'),
16
16
  uploadButton: () => cy.get('[title="Upload"]'),
17
17
  //Image Info
18
- imageUrlLabel: () => cy.get('.dialog-input-label').eq(0),
18
+ urlLabel: () => cy.get('.dialog-input-label').eq(0),
19
19
  urlInputField: () => cy.get('.cke_dialog_ui_input_text').eq(1),
20
20
  alternateTextLabel: () => cy.get('.dialog-input-label').eq(1),
21
21
  alternateTextInputField: () => cy.get('.cke_dialog_ui_input_text').eq(3),
@@ -23,7 +23,7 @@ const selectors = {
23
23
  widthInputField: () => cy.get('.cke_dialog_ui_input_text').eq(5),
24
24
  heightLabel: () => cy.get('.dialog-input-label').eq(3),
25
25
  heightInputField: () => cy.get('.cke_dialog_ui_input_text').eq(7),
26
- borderLabel: () => cy.get('.dialog-input-label').eq(4),
26
+ borderLabel: () => cy.get('[class="cke_dialog_ui_html"]').eq(2),
27
27
  borderInputField: () => cy.get('.cke_dialog_ui_input_text').eq(9),
28
28
  hSpaceLabel: () => cy.get('.dialog-input-label').eq(5),
29
29
  hSpaceInputField: () => cy.get('.cke_dialog_ui_input_text').eq(11),
@@ -36,7 +36,7 @@ const selectors = {
36
36
  fixedRadioButton: () => cy.get('[class*="image-responsiveness-radio-wrapper"]').eq(3),
37
37
  fixedRadioLabel: () => cy.get('[class*="image-responsiveness-radio-wrapper"]').eq(4),
38
38
  //Alignment
39
- alignmentLabel: () => cy.get('.dialog-input-label').eq(7),
39
+ alignmentLabel: () => cy.get('.dialog-input-label').eq(9),
40
40
  alignmentDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(3),
41
41
  alignmentOptions: (alignment = null) => {
42
42
  if (alignment) {
@@ -12,7 +12,7 @@ const selectors = {
12
12
  linkLabel: () => cy.get('.dialog-header-label'),
13
13
  linkPopUpWrapper: () => cy.get('.custom-link-wrapper'),
14
14
  urlInQuestionInstruction: () => cy.get('[data-cke-saved-href*="https"]'),
15
- foxImageLinkUrlValueCheck: () => cy.get('[href*="https://cdn.pixabay.com/photo/2016/11/29/03/28/fox-1867062_960_720.jpg"]'),
15
+ foxImageLinkUrlValueCheck: () => cy.get('[src*="https://cdn.pixabay.com/photo/2016/11/29/03/28/fox-1867062_960_720.jpg"]'),
16
16
  urlInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]').eq(1),
17
17
  OkButton: () => cy.get('[title="OK"]'),
18
18
  //Link Info
@@ -24,8 +24,8 @@ const selectors = {
24
24
  linkTypeDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(0),
25
25
  protocolLabel: () => cy.get('.dialog-input-label').eq(2),
26
26
  protocolDropDown: () => cy.get('.cke_dialog_ui_input_select').eq(1),
27
- urlLabel: () => cy.get('.cke_dialog_ui_text .dialog-input-label').eq(1),
28
- urlInputField: () => cy.get('.cke_dialog_ui_input_text input').eq(1),
27
+ urlLabel: () => cy.get('.dialog-input-label').eq(0),
28
+ urlInputField: () => cy.get('.cke_dialog_ui_input_text').eq(0),
29
29
  //Protocol
30
30
  protocolDropDown: () => cy.get('.dialog-input-area').eq(2),
31
31
  selectProtocolOptionDropdown: (protocolType = null) => {
@@ -55,7 +55,8 @@ const steps = {
55
55
 
56
56
  addURLInLinkPopUp: (text) => {
57
57
  ckEditorLinkComponent.urlInputField()
58
- .type(text, { delay: 0 });
58
+ .type(text, { delay: 0 })
59
+ .blur();
59
60
  },
60
61
 
61
62
  addTextInDisplayText: (text) => {
@@ -71,7 +72,7 @@ const steps = {
71
72
 
72
73
  expandProtocolDropDown: () => {
73
74
  ckEditorLinkComponent.protocolDropDown()
74
- .click({ force: true });
75
+ .click({force: true});
75
76
  },
76
77
 
77
78
  selectProtocolType: (protocolType) => {
@@ -121,12 +122,12 @@ const steps = {
121
122
  doc.addEventListener('click', () => {
122
123
  setTimeout(function () { doc.location.reload() }, 5000);
123
124
  });
124
- ckEditorLinkComponent.foxImageLinkUrlValueCheckPreviewTab()
125
+ ckEditorLinkComponent.foxImageLinkUrlValueCheckPreviewTab()
125
126
  .click();
126
- cy.verifyDownload(fileName);
127
+ cy.verifyDownload(fileName);
127
128
  });
128
129
  },
129
-
130
+
130
131
 
131
132
  clickSendItToServerButton: () => {
132
133
  ckEditorLinkComponent.sendItToServerButton()
@@ -25,7 +25,6 @@ const selectors = {
25
25
  ...equationEditorSectionCommonComponent,
26
26
  ...styleAndLayoutCustomizationAccordionComponent,
27
27
  ...imageCanvasComponent,
28
- ...scoringSectionBaseEditTab,
29
28
  addStructureTab: () => cy.get('[data-ngie-testid="add-structure-tab"]'),
30
29
  responseToken: () => cy.get('.cke_button__addresponse'),
31
30
  penaltyPointsForEachIncorrectOptionInputField: () => cy.get('input[aria-label="Penalty points for each incorrect text container"]'),
@@ -940,8 +939,7 @@ const steps = {
940
939
 
941
940
  switchToGradingView: () => {
942
941
  autoScoredScoringPreviewTab.gradingViewRadioButton()
943
- .click({ force: true });
944
- autoScoredScoringPreviewTab.gradingViewRadioButton()
942
+ .click()
945
943
  .should('be.checked');
946
944
  cy.wait(1500);
947
945
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "itemengine-cypress-automation",
3
- "version": "1.0.347-miscellaneous-questions-r2-6a04041.0",
3
+ "version": "1.0.348-IEI-5944-and-IEI-5945-manualAndNonScoredScript-2983065.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {