itemengine-cypress-automation 1.0.150-migrationScripts-5e451b6.0 → 1.0.150

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +4 -4
  2. package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +3 -3
  3. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  4. package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +2 -1
  5. package/cypress/e2e/ILC/ContentBlocks/additionalSection.js +2 -2
  6. package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +6 -6
  7. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
  9. package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +3 -3
  10. package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +2 -2
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -1
  12. package/cypress/e2e/ILC/DrawingResponse/drawingResponseEditTabBasicSection.js +1 -1
  13. package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +1 -1
  14. package/cypress/e2e/ILC/GridFill/additionalSettings.js +52 -0
  15. package/cypress/e2e/ILC/GridFill/headerSection.js +74 -0
  16. package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +199 -0
  17. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -15
  18. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +3 -18
  19. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +4 -25
  20. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingPenaltyScoring.js +4 -7
  21. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +1 -14
  22. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +1 -1
  23. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +4 -4
  24. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +256 -0
  25. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +213 -0
  26. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +258 -0
  27. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +206 -0
  28. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +198 -0
  29. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +4 -6
  30. package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +10 -22
  31. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +421 -0
  32. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +247 -0
  33. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +219 -0
  34. package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +247 -0
  35. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsBasic.js +168 -0
  36. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +227 -0
  37. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +199 -0
  38. package/cypress/e2e/ILC/Matching/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +227 -0
  39. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +345 -0
  40. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +340 -0
  41. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +421 -0
  42. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabScoringSection.js +292 -0
  43. package/cypress/e2e/ILC/MultipleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  44. package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
  45. package/cypress/e2e/ILC/MultipleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
  46. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +189 -0
  47. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingPenaltyScoring.js +55 -0
  48. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsBasic.js +116 -0
  49. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +309 -0
  50. package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +163 -0
  51. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabScoringSection.js +292 -0
  52. package/cypress/e2e/ILC/SingleSelectionGridNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  53. package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +10 -2
  54. package/cypress/e2e/ILC/SingleSelectionGridNew/specifyCorrectAnswerSection.js +86 -0
  55. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +189 -0
  56. package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +1 -1
  57. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +1 -1
  58. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +1 -1
  59. package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
  60. package/cypress/pages/audioResponsePage.js +2 -2
  61. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  62. package/cypress/pages/components/commonComponents.js +2 -1
  63. package/cypress/pages/components/customizeSpecialCharacterComponent.js +5 -5
  64. package/cypress/pages/components/desmosToolComponent.js +1 -1
  65. package/cypress/pages/components/gridQuestionCommonComponent.js +388 -35
  66. package/cypress/pages/components/maximumRecorderLengthComponent.js +4 -4
  67. package/cypress/pages/components/playbackControlsBaseComponent.js +8 -2
  68. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  69. package/cypress/pages/contentBlocksPage.js +1 -1
  70. package/cypress/pages/drawingResponsePage.js +9 -10
  71. package/cypress/pages/geoGebraActivityPage.js +2 -1
  72. package/cypress/pages/geoGebraToolsPage.js +1 -1
  73. package/cypress/pages/gridFillPage.js +108 -13
  74. package/cypress/pages/matchingPage.js +154 -2
  75. package/cypress/pages/multipleSelectionGridPage.js +10 -2
  76. package/cypress/pages/rulerPage.js +2 -5
  77. package/cypress/pages/singleSelectionGridPage.js +18 -2
  78. package/package.json +2 -2
@@ -317,13 +317,13 @@ describe('Preview of Audio response for compact audio recorder style', () => {
317
317
  'font-size': css.fontSize.heading,
318
318
  'font-weight': css.fontWeight.bold
319
319
  });
320
- utilities.verifyCSS(audioResponsePage.compactPreviewPausePlaybackButton(), {
320
+ utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton().parents('.play-back-button'), {
321
321
  'background-color': css.color.secondaryBtnBg,
322
322
  'color': css.color.secondaryBtn,
323
323
  'font-size': css.fontSize.default,
324
324
  'font-weight': css.fontWeight.semibold
325
325
  });
326
- utilities.verifyCSS(audioResponsePage.compactPreviewPausePlaybackButton().find('svg path'), {
326
+ utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton().parents('.play-back-button').find('svg path'), {
327
327
  'fill': css.color.secondaryBtn
328
328
  });
329
329
  utilities.verifyCSS(audioResponsePage.compactPreviewRetakeButton(), {
@@ -354,13 +354,13 @@ describe('Preview of Audio response for compact audio recorder style', () => {
354
354
  });
355
355
 
356
356
  it('CSS of \'Preview\' section if playback is paused', { tags: 'css' }, () => {
357
- utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton(), {
357
+ utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton().parents('.play-back-button'), {
358
358
  'background-color': css.color.secondaryBtnBg,
359
359
  'color': css.color.secondaryBtn,
360
360
  'font-size': css.fontSize.default,
361
361
  'font-weight': css.fontWeight.semibold
362
362
  });
363
- utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton().find('svg path'), {
363
+ utilities.verifyCSS(audioResponsePage.compactPreviewPlayPlaybackButton().parents('.play-back-button').find('svg path'), {
364
364
  'stroke': css.color.secondaryBtnActive
365
365
  });
366
366
  });
@@ -192,7 +192,7 @@ describe('Create Item page - Audio response: Question instructions, Audio record
192
192
  utilities.verifyInnerText(audioResponsePage.errorMessage(), 'Error: Value must be greater than 0 secs.');
193
193
  });
194
194
 
195
- it('CSS of error message \'Error: Value must be greater than 0 secs.\'', () => {
195
+ it('CSS of error message \'Error: Value must be greater than 0 secs.\'', { tags: 'css' }, () => {
196
196
  utilities.verifyCSS(audioResponsePage.errorMessage(), {
197
197
  'color': css.color.errorText,
198
198
  'font-size': css.fontSize.small,
@@ -200,13 +200,13 @@ describe('Create Item page - Audio response: Question instructions, Audio record
200
200
  });
201
201
  });
202
202
 
203
- it('Accessibility of \'Error: Value must be greater than 0 secs.\' is displayed', () => {
203
+ it('Accessibility of \'Error: Value must be greater than 0 secs.\' is displayed', { tags: 'a11y' }, () => {
204
204
  cy.checkAccessibility(audioResponsePage.errorMessage());
205
205
  });
206
206
 
207
207
  it('When the user updates the \'Stop recording if silence is detected after\' value the validation text should disappear. User should be able to add only numeric values and should not able to add decimal points', () => {
208
208
  audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('150');
209
- utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'hidden');
209
+ utilities.verifyElementVisibilityState(audioResponsePage.errorMessage(), 'notExist');
210
210
  audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('.10.0');
211
211
  audioResponsePage.steps.verifyStopRecordingIfSilenceIsDetectedInputFieldValue('100');
212
212
  audioResponsePage.steps.setStopRecordingIfSilenceIsDetectedAfter('!@#abcde236');
@@ -471,7 +471,7 @@ describe('Preview of Audio response for standard audio recorder style', () => {
471
471
  it(`When the user selects playback speed option ${playbackSpeedOptions[index]}x, the audio playback speed should be changed accordingly`, () => {
472
472
  audioResponsePage.steps.resetQuestionPreview();
473
473
  audioResponsePage.steps.recordAndSaveAudioStandardPreview(12000);
474
- utilities.hoverOverElement(audioResponsePage.playbackSpeedButton());
474
+ audioResponsePage.steps.hoverOnPlaybackSpeedButton();
475
475
  audioResponsePage.steps.selectPlaybackSpeed(`${playbackSpeedOptions[index]}x`);
476
476
  audioResponsePage.steps.startPlayback();
477
477
  audioResponsePage.steps.waitForPlaybackToBeginStandardPreview();
@@ -484,13 +484,14 @@ describe('Create item page - Audio response: Student view settings', () => {
484
484
  audioResponsePage.steps.retakeRecordingCompactPreview();
485
485
  audioResponsePage.steps.confirmRetake();
486
486
  utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
487
- utilities.verifyInnerText(audioResponsePage.recordingStatusText(), 'Recording...');
487
+ utilities.verifyInnerText(audioResponsePage.compactPreviewRecordingStatusText(), 'Recording...');
488
488
  audioResponsePage.steps.waitForRecordingToStartCompactPreview();
489
489
  audioResponsePage.steps.stopRecordingCompactPreview();
490
490
  audioResponsePage.steps.verifyResponseIsRecordedHelpText();
491
491
  utilities.verifyElementDisabled(audioResponsePage.compactPreviewRetakeButton());
492
492
  });
493
493
 
494
+ ///Bug
494
495
  it('For "Compact" mode, When the user checks the "Show students the retake limits on tooltip" checkbox and has set a retake limit and switches to the preview tab, then on hovering over the retake recording button, Retake recording (# retakes remaining) should be displayed on a tooltip', () => {
495
496
  audioResponsePage.steps.switchToEditTab();
496
497
  audioResponsePage.steps.checkShowStudentsTheRetakeLimitsOnTooltipCheckbox();
@@ -40,7 +40,7 @@ describe('Content blocks - Edit tab', () => {
40
40
  it('Acknowledgements and references label and input field should be displayed', () => {
41
41
  utilities.verifyInnerText(contentBlocksPage.acknowledgementsAndReferencesLabel(), 'Acknowledgements and references');
42
42
  utilities.verifyElementVisibilityState(contentBlocksPage.acknowledgementsAndReferencesLabel(), 'visible');
43
- utilities.verifyInnerText(contentBlocksPage.acknowledgementsAndReferencesInputField(), '');
43
+ utilities.verifyTextContent(contentBlocksPage.acknowledgementsAndReferencesInputField(), '');
44
44
  });
45
45
 
46
46
  it('User should be able to enter text in Acknowledgements and references input field', () => {
@@ -50,7 +50,7 @@ describe('Content blocks - Edit tab', () => {
50
50
  it('Teacher scoring guidelines label and input field should be displayed', () => {
51
51
  utilities.verifyInnerText(contentBlocksPage.teacherScoringGuidelinesLabel(), 'Teacher scoring guidelines');
52
52
  utilities.verifyElementVisibilityState(contentBlocksPage.teacherScoringGuidelinesLabel(), 'visible');
53
- utilities.verifyInnerText(contentBlocksPage.teacherScoringGuidelinesInputField(), '');
53
+ utilities.verifyTextContent(contentBlocksPage.teacherScoringGuidelinesInputField(), '');
54
54
  });
55
55
 
56
56
  it('User should be able to enter text in Teacher scoring guidelines input field', () => {
@@ -115,13 +115,13 @@ describe('Content blocks - Edit tab', () => {
115
115
 
116
116
  it('When user clears text and focuses out of text block input field, then error message \'Error: Text block is required.\' should be displayed', () => {
117
117
  contentBlocksPage.steps.clearAndFocusOutOfTextBlockInputField();
118
- utilities.verifyInnerText(utilities.getNthElement(contentBlocksPage.errorMessage(), 2), 'Error: Text block is required.');
118
+ utilities.verifyInnerText(contentBlocksPage.errorMessage(), 'Error: Text block is required.');
119
119
  utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'visible');
120
120
  });
121
121
 
122
122
  it('When user enters text again then error message should disappear', () => {
123
123
  contentBlocksPage.steps.enterTextInTextBlockInputField(0, '​​​​​​​​​​​​​​​​​​​​​Text block');
124
- utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'hidden');
124
+ utilities.verifyElementVisibilityState(contentBlocksPage.errorMessage(), 'notExist');
125
125
  });
126
126
 
127
127
  it('When body input fields are less than 2 then drag handle and Delete page button should be in disabled state', () => {
@@ -201,14 +201,14 @@ describe('Content blocks - Edit tab', () => {
201
201
 
202
202
  it('When the user hovers over the drag handle of the body field, \'Drag to reorder\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the drag handle', () => {
203
203
  utilities.hoverOverElement(utilities.getNthElement(contentBlocksPage.dragHandleButton(), 0));
204
- utilities.verifyElementVisibilityState(utilities.getNthElement(contentBlocksPage.tooltipText(), 1), 'visible');
205
- utilities.verifyInnerText(utilities.getNthElement(contentBlocksPage.tooltipText(), 1), 'Drag to reorder');
204
+ utilities.verifyElementVisibilityState(contentBlocksPage.tooltipText(), 'visible');
205
+ utilities.verifyInnerText(contentBlocksPage.tooltipText(), 'Drag to reorder');
206
206
  });
207
207
 
208
208
  it('When the user hovers over the enabled \'Delete\' icon buttons then, \'Delete page\' message should be displayed on a tooltip and the tooltip should disappear if focus is removed from the \'Delete\' icon button', () => {
209
209
  utilities.hoverOverElement(utilities.getNthElement(contentBlocksPage.deleteButton(), 0));
210
- utilities.verifyElementVisibilityState(utilities.getNthElement(contentBlocksPage.tooltipText(), 1), 'visible');
211
- utilities.verifyInnerText(utilities.getNthElement(contentBlocksPage.tooltipText(), 1), 'Delete page');
210
+ utilities.verifyElementVisibilityState(contentBlocksPage.tooltipText(), 'visible');
211
+ utilities.verifyInnerText(contentBlocksPage.tooltipText(), 'Delete page');
212
212
  });
213
213
 
214
214
  it('When user clicks on the \'Delete\' page button then the respective body input field should get deleted, body numeration should change accordingly', () => {
@@ -657,7 +657,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
657
657
  });
658
658
 
659
659
  it('When user has dropped all the options from a group in the response areas, then empty group should be displayed in the options container', () => {
660
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Whale': 0, 'Platypus': 0 });
660
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Whale': 0, 'Platypus': 1 });
661
661
  dragAndDropIntoCategoriesPage.steps.verifyGroupedOptionsTitlePreviewTab(0, 'Group A')
662
662
  dragAndDropIntoCategoriesPage.steps.verifyEmptyGroupInPreviewTab(0);
663
663
  });
@@ -105,7 +105,7 @@ describe('Create item page - Drag and drop into categories: Question instruction
105
105
  dragAndDropIntoCategoriesPage.steps.addInputToRowInputStepper(5);
106
106
  dragAndDropIntoCategoriesPage.steps.addInputToColumnInputStepper(5);
107
107
  dragAndDropIntoCategoriesPage.steps.increaseColumnInputStepperCount(1);
108
- dragAndDropIntoCategoriesPage.steps.verifySpecifyColumnsAndRowsSectionCellProperty(5, 'Heading');
108
+ dragAndDropIntoCategoriesPage.steps.verifySpecifyColumnsAndRowsSectionCellProperty(4, 'Heading');
109
109
  for (let cellIndex = 11; cellIndex < 30; cellIndex += 6) {
110
110
  dragAndDropIntoCategoriesPage.steps.verifySpecifyColumnsAndRowsSectionCellProperty(cellIndex, 'Dropzone');
111
111
  };
@@ -23,7 +23,7 @@ describe('Drawing response - Additional settings', () => {
23
23
  cy.barsPreLoaderWait();
24
24
  });
25
25
 
26
- drawingResponsePage.tests.verifyAdditonalSettingsAccordionProperties();
26
+ drawingResponsePage.tests.verifyAdditionalSettingsAccordionProperties();
27
27
  });
28
28
 
29
29
  describe('Additional settings: Default stroke/line thickness - Contents', () => {
@@ -230,7 +230,7 @@ describe('Drawing response - Additional settings', () => {
230
230
  before(() => {
231
231
  drawingResponsePage.steps.navigateToCreateQuestion('Drawing Response');
232
232
  cy.barsPreLoaderWait();
233
- drawingResponsePage.steps.expandAdditonalSettings();
233
+ drawingResponsePage.steps.expandAdditionalSettings();
234
234
  });
235
235
 
236
236
  it('\'Spell check\' functionality label and checkbox should be displayed and by default it should be unchecked', () => {
@@ -293,7 +293,7 @@ describe('Drawing response - Additional settings', () => {
293
293
 
294
294
  fontSizeDropdownOptions.forEach((option, fontsIndex) => {
295
295
  it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
296
- drawingResponsePage.steps.selectFontSizeOptionFromFontSizeDropdown(fontsIndex);
296
+ drawingResponsePage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
297
297
  utilities.verifyInnerText(drawingResponsePage.fontSizeDropdown(), `${option}`);
298
298
  drawingResponsePage.steps.switchToPreviewTab();
299
299
  utilities.verifyCSS(drawingResponsePage.questionInstructionsText(), {
@@ -307,12 +307,12 @@ describe('Create item page - Drawing response: Background: Blank canvas, Image,
307
307
 
308
308
  it('When the user uploads supported format of image file, error message should disappear', () => {
309
309
  drawingResponsePage.steps.uploadFile('uploads/sample2.jpg');
310
- utilities.verifyElementVisibilityState(drawingResponsePage.errorMessage(), 'hidden');
310
+ utilities.verifyElementVisibilityState(drawingResponsePage.errorMessage(), 'notExist');
311
311
  });
312
312
 
313
313
  //Failing due to https://redmine.zeuslearning.com/issues/555227
314
314
  it('When the user has uploaded an image, an \'Image properties\' section should be displayed with title \'Image properties\'', () => {
315
- utilities.verifyInnerText(drawingResponsePage.imagePropertiesLabel(), 'Image properties');
315
+ utilities.verifyTextContent(drawingResponsePage.imagePropertiesLabel(), 'Image propertiesFill image to canvas');
316
316
  utilities.verifyElementVisibilityState(drawingResponsePage.imagePropertiesLabel(), 'visible');
317
317
  });
318
318
 
@@ -34,7 +34,7 @@ describe('Create item page - Drawing response: Customize special characters, Cus
34
34
  drawingResponsePage.steps.switchToPreviewTab();
35
35
  drawingResponsePage.steps.selectPreviewTabToolbarOption('Text');
36
36
  drawingResponsePage.steps.selectPreviewTabSecondaryToolbarOption('Special characters');
37
- drawingResponsePage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
37
+ // drawingResponsePage.steps.verifySpecialCharactersPopupCategorySymbols(specialCharacters);
38
38
  //Add this verification once https://redmine.zeuslearning.com/issues/555008 is resolved
39
39
  cy.log('Post-step: Switching to edit tab');
40
40
  drawingResponsePage.steps.switchToEditTab();
@@ -97,7 +97,7 @@ describe('Create item page - Drawing response: Question instructions, Customize
97
97
  });
98
98
 
99
99
  it('When user deselects all toolbar options, then an error message should be displayed - \'Error: Please select a Toolbar option.\'', () => {
100
- toolbarOptions.forEach((toolbarOption) => {
100
+ defaultSelectedToolbarOptions.forEach((toolbarOption) => {
101
101
  drawingResponsePage.steps.deselectToolbarOptionsAndControlsFormattingOptionsTiles(toolbarOption.displayName);
102
102
  });
103
103
  utilities.verifyInnerText(commonComponents.errorMessage(), 'Error: Please select a Toolbar option.');
@@ -69,7 +69,7 @@ describe('Create item page - Graphing: Grading view, Correct answer view content
69
69
  });
70
70
 
71
71
  it('Correct answer label should be displayed', () => {
72
- utilities.verifyInnerText(graphingPage.correctAnswerLabel(), 'Correct answer');
72
+ utilities.verifyInnerText(graphingPage.correctAnswerLabel(), 'Correct answers');
73
73
  utilities.verifyElementVisibilityState(graphingPage.correctAnswerLabel(), 'visible');
74
74
  });
75
75
 
@@ -0,0 +1,52 @@
1
+ import { gridFillPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ const css = Cypress.env('css');
4
+
5
+ describe('Create Item page - Grid fill : Additional settings', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Additional Settings accordion', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
14
+ cy.barsPreLoaderWait();
15
+ });
16
+
17
+ gridFillPage.tests.verifyAdditionalSettingsAccordionProperties();
18
+ });
19
+
20
+ describe('Additional settings: Font size contents', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
24
+ cy.barsPreLoaderWait();
25
+ gridFillPage.steps.expandAdditionalSettings();
26
+ });
27
+
28
+ gridFillPage.tests.verifyFontSizeSectionContents();
29
+ });
30
+
31
+ describe('Setting tab: Accessibility section', () => {
32
+ abortEarlySetup();
33
+ before(() => {
34
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
35
+ cy.barsPreLoaderWait();
36
+ gridFillPage.steps.expandAdditionalSettings();
37
+ });
38
+
39
+ gridFillPage.tests.verifyAdditionalSettingsAccessibilitySection();
40
+ });
41
+
42
+ describe('Additional Settings: Details section', () => {
43
+ abortEarlySetup();
44
+ before(() => {
45
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
46
+ cy.barsPreLoaderWait();
47
+ gridFillPage.steps.expandAdditionalSettings();
48
+ });
49
+
50
+ gridFillPage.tests.verifyDetailsSection();
51
+ });
52
+ });
@@ -0,0 +1,74 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { dialogBoxBase, gridFillPage } from "../../../pages";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ describe('Create item page - Grid fill: Header section and Saving question', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Header section contents', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
14
+ });
15
+
16
+ gridFillPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Grid fill');
17
+ });
18
+
19
+ describe('Tabs section', () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
23
+ });
24
+
25
+ gridFillPage.tests.verifyTabsSection();
26
+ });
27
+
28
+ describe('Cancel button', () => {
29
+ abortEarlySetup();
30
+ before(() => {
31
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
32
+ });
33
+
34
+ gridFillPage.tests.verifyCancelButton('grid fill')
35
+ });
36
+
37
+ describe('Save Question button', () => {
38
+ abortEarlySetup();
39
+ before(() => {
40
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
41
+ cy.barsPreLoaderWait();
42
+ });
43
+
44
+ describe('Validation error messages', () => {
45
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
46
+
47
+ it('Validation error messages should be displayed below required input fields', () => {
48
+ gridFillPage.steps.verifyQuestionInstructionsErrorMessage();
49
+ utilities.verifyInnerText(utilities.getNthElement(gridFillPage.errorMessage(), -1), 'Error: Please set a correct answer.');
50
+ gridFillPage.steps.verifyPointsFieldErrorMessage();
51
+ gridFillPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
+ gridFillPage.steps.verifySpecifyCorrectAnswerErrorMessage();
53
+ });
54
+
55
+ //failed due to https://redmine.zeuslearning.com/issues/564243
56
+ it('Validation error messages should disappear when required input fields are filled', () => {
57
+ gridFillPage.steps.addTextInQuestionInstructionsInputField('Grid');
58
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 0);
59
+ gridFillPage.steps.allotPoints(10);
60
+ gridFillPage.steps.verifyErrorMessageIsNotDisplayed();
61
+ gridFillPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
62
+ });
63
+
64
+ gridFillPage.tests.verifyCreateItemWrapperContentsA11y();
65
+ });
66
+
67
+ describe('Saving a question', () => {
68
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
69
+ gridFillPage.steps.saveAQuestionAndVerifySnackbar();
70
+ });
71
+ gridFillPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
72
+ });
73
+ });
74
+ });
@@ -0,0 +1,199 @@
1
+ import { gridFillPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ const penaltyScoringTypeArray = ['No penalty points', 'Penalty points for the entire question', 'Penalty points for each incorrect cell'];
6
+
7
+ describe('Create item page - Grid fill: Minimum scoring, Penalty scoring, Rounding - Edit tab', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Scoring section: Minimum scoring - Edit tab', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
16
+ cy.barsPreLoaderWait();
17
+ gridFillPage.steps.allotPoints(10);
18
+ });
19
+
20
+ gridFillPage.tests.verifyMinimumScoringDropdown();
21
+
22
+ gridFillPage.tests.verifyMinimumPointsLabelAndInputField();
23
+
24
+ gridFillPage.tests.verifyMinimumPointsFieldErrorState();
25
+ });
26
+
27
+ describe('Scoring section: Penalty scoring - Edit tab', () => {
28
+ abortEarlySetup();
29
+ before(() => {
30
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
31
+ cy.barsPreLoaderWait();
32
+ gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
33
+ gridFillPage.steps.allotPoints(10);
34
+ });
35
+
36
+ gridFillPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
37
+
38
+ gridFillPage.tests.verifyPenaltyPointsLabelAndInputField();
39
+
40
+ gridFillPage.tests.verifyPenaltyPointsErrorState();
41
+
42
+ it('When the user selects \'Penalty points for each incorrect cell\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect cell to total points / no. of incorrect cells\' label and checkbox should be displayed, by default the checkbox should be unchecked. Two radio buttons with labels - \'Specify total penalty points\' and \'Specify points for each incorrect cell\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
43
+ gridFillPage.steps.expandPenaltyScoringDropdown();
44
+ gridFillPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect cell');
45
+ utilities.verifyInnerText(gridFillPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect cell to total points / no. of incorrect cells');
46
+ utilities.verifyInnerText(gridFillPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
47
+ utilities.verifyInnerText(gridFillPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect cell');
48
+ gridFillPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
49
+ gridFillPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
50
+ gridFillPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonUncheckedState();
51
+ });
52
+
53
+ it('When \'Specify total penalty points\' is selected, a penalty points detail section with \'Total penalty points\' label and empty input field, \'Penalty points for each incorrect cell: -\' label should be displayed', () => {
54
+ utilities.verifyInnerText(gridFillPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
55
+ gridFillPage.steps.verifyTotalPenaltyPointsValue('');
56
+ utilities.verifyInnerText(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect cell: -');
57
+ });
58
+
59
+ //Failed due to https://redmine.zeuslearning.com/issues/565332
60
+ it('When the user allots total penalty points, then \'Points for each incorrect cell\' should get updated as per the count of incorrect cells available', () => {
61
+ gridFillPage.steps.allotTotalPenaltyPoints(5);
62
+ gridFillPage.steps.verifyPenaltyPointsForEachIncorrectCell(2.5);
63
+ });
64
+
65
+ it('When the user adds a new cell, then \'Points for each incorrect cell\' should get updated accordingly', () => {
66
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 4)
67
+ gridFillPage.steps.verifyPenaltyPointsForEachIncorrectCell(1.67);
68
+ });
69
+
70
+ it('When the user deletes an cell, then \'Points for each incorrect cell\' should get updated accordingly', () => {
71
+ gridFillPage.steps.deselectCellSpecifyCorrectAnswerSection(0, 4);
72
+ gridFillPage.steps.verifyPenaltyPointsForEachIncorrectCell(2.5);
73
+ });
74
+
75
+ it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
76
+ utilities.verifyCSS(gridFillPage.automaticallySetPenaltyPointsCheckboxLabel(), {
77
+ 'color': css.color.labelText,
78
+ 'font-size': css.fontSize.normal,
79
+ 'font-weight': css.fontWeight.regular
80
+ });
81
+ utilities.verifyCSS(gridFillPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
82
+ 'fill': css.color.uncheckedCheckbox
83
+ });
84
+ utilities.verifyCSS(gridFillPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
85
+ 'fill': css.color.activeButtons
86
+ });
87
+ utilities.verifyCSS(gridFillPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg path'), {
88
+ 'fill': css.color.uncheckedCheckbox
89
+ });
90
+ utilities.verifyCSS(gridFillPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
91
+ 'color': css.color.labelText,
92
+ 'font-size': css.fontSize.normal,
93
+ 'font-weight': css.fontWeight.regular
94
+ });
95
+ utilities.verifyCSS(gridFillPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
96
+ 'color': css.color.labelText,
97
+ 'font-size': css.fontSize.normal,
98
+ 'font-weight': css.fontWeight.regular
99
+ });
100
+ utilities.verifyCSS(gridFillPage.penaltyPointsDetailsSectionInputFieldLabel(), {
101
+ 'color': css.color.labels,
102
+ 'font-size': css.fontSize.normal,
103
+ 'font-weight': css.fontWeight.regular
104
+ });
105
+ utilities.verifyCSS(gridFillPage.totalPenaltyPointsInputField(), {
106
+ 'color': css.color.text,
107
+ 'font-size': css.fontSize.default,
108
+ 'font-weight': css.fontWeight.regular
109
+ });
110
+ utilities.verifyCSS(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
111
+ 'color': css.color.labels,
112
+ 'font-size': css.fontSize.normal,
113
+ 'font-weight': css.fontWeight.regular
114
+ });
115
+ });
116
+
117
+ it('Accessibility of the penalty points section - Total penalty points', { tags: 'a11y' }, () => {
118
+ cy.checkAccessibility(gridFillPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
119
+ });
120
+
121
+ it('When the user selects \'Specify points for each incorrect answer\', a penalty points detail section with \'Penalty points for each incorrect cell:\' label and empty input field, \'Total penalty points: -\' label should be displayed', () => {
122
+ cy.log('Pre-step: Clearing the total penalty points input field')
123
+ gridFillPage.steps.clearTotalPenaltyPointsInputField();
124
+ gridFillPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
125
+ utilities.verifyInnerText(gridFillPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect cell');
126
+ gridFillPage.steps.verifyPenaltyPointsForEachIncorrectCellValue('');
127
+ utilities.verifyInnerText(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
128
+ });
129
+
130
+ //Failed due to https://redmine.zeuslearning.com/issues/565332
131
+ it('When the user allots Penalty points for each incorrect cell, then \'Total penalty points\' should get updated as per the count of incorrect cells available', () => {
132
+ gridFillPage.steps.allotPenaltyPointsForEachIncorrectCell(1);
133
+ gridFillPage.steps.verifyTotalPenaltyPoints(2);
134
+ });
135
+
136
+ //Failed due to https://redmine.zeuslearning.com/issues/565332
137
+ it('When the user adds a new cell, then \'Total penalty points\' should get updated accordingly', () => {
138
+ gridFillPage.steps.selectCellSpecifyCorrectAnswerSection(0, 4);
139
+ gridFillPage.steps.verifyTotalPenaltyPoints(3);
140
+ });
141
+
142
+ //Failed due to https://redmine.zeuslearning.com/issues/565332
143
+ it('When the user deletes an cell, then \'points for each incorrect cell\' should get updated accordingly', () => {
144
+ gridFillPage.steps.deselectCellSpecifyCorrectAnswerSection(0, 4);
145
+ gridFillPage.steps.verifyTotalPenaltyPoints(2);
146
+ });
147
+
148
+ it('CSS of the penalty points section - Penalty points for each incorrect cell', { tags: 'css' }, () => {
149
+ utilities.verifyCSS(gridFillPage.penaltyPointsDetailsSectionInputFieldLabel(), {
150
+ 'color': css.color.labels,
151
+ 'font-size': css.fontSize.normal,
152
+ 'font-weight': css.fontWeight.regular
153
+ });
154
+ utilities.verifyCSS(gridFillPage.penaltyPointsForEachIncorrectCellInputField(), {
155
+ 'color': css.color.text,
156
+ 'font-size': css.fontSize.default,
157
+ 'font-weight': css.fontWeight.regular
158
+ });
159
+ utilities.verifyCSS(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
160
+ 'color': css.color.labels,
161
+ 'font-size': css.fontSize.normal,
162
+ 'font-weight': css.fontWeight.regular
163
+ });
164
+ });
165
+
166
+ it('Accessibility of the penalty points section - Penalty points for each incorrect cell', { tags: 'a11y' }, () => {
167
+ cy.checkAccessibility(gridFillPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
168
+ });
169
+
170
+ //Failed due to https://redmine.zeuslearning.com/issues/565332
171
+ it('When the user switches to the \'Specify total penalty points\' option, the total penalty points input field should be filled as per the total penalty points in \'Specify points for each incorrect cell\'', () => {
172
+ gridFillPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
173
+ gridFillPage.steps.verifyTotalPenaltyPointsValue(2);
174
+ utilities.verifyInnerText(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect cell: 1');
175
+ });
176
+
177
+ it('When the user checks the \'Automatically set penalty for each incorrect cell to total points / no. of incorrect cells\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect cell\' should get checked, in the penalty points details section, \'Penalty points for each incorrect cell: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect cells', () => {
178
+ gridFillPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
179
+ gridFillPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
180
+ gridFillPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
181
+ utilities.verifyInnerText(utilities.getNthElement(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect cell: 5');
182
+ utilities.verifyInnerText(utilities.getNthElement(gridFillPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 10');
183
+ });
184
+ });
185
+
186
+ describe('Scoring section: Rounding - Edit tab', () => {
187
+ abortEarlySetup();
188
+ before(() => {
189
+ gridFillPage.steps.navigateToCreateQuestion('grid fill');
190
+ cy.barsPreLoaderWait();
191
+ gridFillPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
192
+ gridFillPage.steps.allotPoints(10);
193
+ });
194
+
195
+ gridFillPage.tests.verifyRoundingDropdown();
196
+
197
+ gridFillPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
198
+ });
199
+ });