itemengine-cypress-automation 1.0.205-8thJuneFixes-5ad148f.0 → 1.0.205

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/audioOverviewAndTranscript.js +2 -2
  2. package/cypress/e2e/ILC/ChartsBar/Scoring/addAndDeleteBarAllOrNothingScoring.js +302 -0
  3. package/cypress/e2e/ILC/ChartsBar/Scoring/manuallyAndNonScored.js +282 -0
  4. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +385 -0
  5. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +386 -0
  6. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +386 -0
  7. package/cypress/e2e/ILC/ChartsBar/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +337 -0
  8. package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +0 -1
  9. package/cypress/e2e/ILC/ChartsBar/chartFunctionalitySpecifyCorrectAnswerSection.js +258 -0
  10. package/cypress/e2e/ILC/ChartsBar/checkAnswerFunctionalityForAllViews.smoke.js +1 -1
  11. package/cypress/e2e/ILC/ChartsBar/gridSettings.js +439 -0
  12. package/cypress/e2e/ILC/ChartsBar/headerSection.js +105 -0
  13. package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +450 -0
  14. package/cypress/e2e/ILC/ChartsBar/specifyCorrectAnswerSection.js +91 -0
  15. package/cypress/e2e/ILC/ChartsBar/toolSettings.js +73 -0
  16. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/manuallyAndNonScoredScoring.js +1 -1
  17. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +3 -2
  18. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsEqualToAlternativePoints.js +1 -1
  19. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneCorrectPointsGreaterThanAlternativePoints.js +1 -1
  20. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneMinimumAndPenaltyScoring.js +6 -6
  21. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +169 -0
  22. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +1 -1
  23. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
  24. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDraggableOptionsPanel.js +119 -0
  25. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneBorderStyleProperties.js +113 -0
  26. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationDropzoneProperties.js +251 -0
  27. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationLayoutProperties.js +277 -0
  28. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +0 -2
  29. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +1 -5
  30. package/cypress/e2e/ILC/FeedbackScaleNew/editTabBasicSection.js +1 -0
  31. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +4 -4
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +1 -0
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +14 -1
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/styleAndLayoutCutomization.js +378 -0
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +3 -3
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
  37. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +479 -0
  38. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +3 -1
  39. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsCellShadeCountBasics.js +7 -7
  40. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/allOrNothingPenaltyScoring.js +1 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/manuallyAndNonScored.js +1 -0
  42. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +2 -2
  43. package/cypress/e2e/ILC/ListOrderingDropdown/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +2 -3
  44. package/cypress/e2e/ILC/ListOrderingDropdown/minimumScoringPenaltyPointsAndRoundingDropdown.js +7 -7
  45. package/cypress/e2e/ILC/ListOrderingDropdown/studentViewSettings.js +1 -1
  46. package/cypress/e2e/ILC/ListOrderingNew/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +3 -4
  47. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +10 -9
  48. package/cypress/e2e/ILC/Matching/toolSettings.js +1 -0
  49. package/cypress/e2e/ILC/MultipleSelection/additionalSettings.js +1 -0
  50. package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +36 -16
  51. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +326 -176
  52. package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
  53. package/cypress/e2e/ILC/MultipleSelection/manuallyAndNonScoredScoring.js +37 -15
  54. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsBasic.js +38 -17
  55. package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +441 -186
  56. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsBasic.js +33 -14
  57. package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +330 -164
  58. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +1 -1
  59. package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
  60. package/cypress/e2e/ILC/ShortTextResponseNew/manuallyAndNonScoredScoring.js +4 -4
  61. package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +20 -7
  62. package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +83 -66
  63. package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
  64. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +25 -17
  65. package/cypress/e2e/ILC/SingleSelection/trueOrFalseCreateItem.js +2 -2
  66. package/cypress/e2e/ILC/SingleSelectionGridNew/additionalSettings.js +89 -0
  67. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +3 -3
  68. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +2 -2
  69. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -2
  70. package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
  71. package/cypress/e2e/ILC/VideoResponseNew/studentViewSettingsCompactRecorderStyle.js +0 -2
  72. package/cypress/e2e/ILC/chartsDotsPlot/allOrNothingForAllViews.smoke.js +2 -2
  73. package/cypress/e2e/ILC/chartsDotsPlot/scoring/allOrNothingPenaltyScoring.js +1 -1
  74. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsBasic.js +15 -15
  75. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +21 -21
  76. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +17 -17
  77. package/cypress/e2e/ILC/chartsDotsPlot/scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +21 -21
  78. package/cypress/e2e/ILC/chartsDotsPlot/scoring/toleranceThresholdScoring.js +1 -1
  79. package/cypress/e2e/ILC/chartsDotsPlot/selectChartTypeSection.js +8 -4
  80. package/cypress/e2e/ILC/chartsDotsPlot/toolSettings.js +0 -1
  81. package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
  82. package/cypress/pages/audioResponsePage.js +1 -1
  83. package/cypress/pages/chartsBarPage.js +785 -5
  84. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -0
  85. package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
  86. package/cypress/pages/components/barAndLineChartComponent.js +180 -9
  87. package/cypress/pages/components/chartsCommonComponent.js +1 -0
  88. package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +77 -0
  89. package/cypress/pages/components/essayResponseCommonComponents.js +2 -3
  90. package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
  91. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +24 -7
  92. package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +8 -4
  93. package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
  94. package/cypress/pages/components/imageCanvasComponent.js +112 -2
  95. package/cypress/pages/components/index.js +1 -0
  96. package/cypress/pages/components/layoutSectionComponent.js +4 -3
  97. package/cypress/pages/dragAndDropIntoCategoriesPage.js +960 -3
  98. package/cypress/pages/drawingResponsePage.js +2 -2
  99. package/cypress/pages/fillInTheGapsDragAndDropPage.js +4 -3
  100. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +18 -3
  101. package/cypress/pages/fillInTheGapsOverImageTextPage.js +65 -3
  102. package/cypress/pages/listOrderingPage.js +3 -3
  103. package/cypress/pages/multipleSelectionPage.js +77 -25
  104. package/cypress/pages/rulerPage.js +5 -0
  105. package/cypress/pages/singleSelectionPage.js +40 -1
  106. package/cypress/pages/videoResponsePage.js +1 -1
  107. package/package.json +2 -2
@@ -119,7 +119,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
119
119
  dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
120
120
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectIconsForDropzone({ 'correct': 0, 'incorrect': 1, 'correct': 2, 'incorrect': 3, 'incorrect': 4, 'incorrect': 5 });
121
121
  dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
122
- dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Bat'], ['Eagle', 'Parrot'], ['Platypus'], ['Ostrich'], ['Whale']], ['1', '2', '3', '4', '5']);
122
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Flying squirrel'], ['Eagle', 'Peacock'], ['Ostrich'], ['Platypus'], ['Octopus']], ['1', '2', '4', '5', '6']);
123
123
  dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
124
124
  /*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, correct icons should be displayed for all correct dropzones, incorrect icon should be displayed for incorrect dropzones, correct/incorrect answer status message and correct answer section should not be displayed')
125
125
  dragAndDropIntoCategoriesPage.steps.checkAnswer();
@@ -192,7 +192,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone with al
192
192
  it('When the user attempts the question partially correct such that equal number of dropzones are correct according to correct accordion and alternative accordion mappings and points achieved from the correct accordion mapping is more than the points achieved from alternative accordion mapping, then the points achieved should be according to the correct accordion mapping and on switching to \'Grading\' view, correct icon should be displayed besides correct accordion responses, incorrect icon should be displayed besides alternative accordion responses, correct icon should be displayed for correct dropzone, incorrect icon should be displayed for incorrect dropzone. correct/incorrect answer status message and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
193
193
  dragAndDropIntoCategoriesPage.steps.resetQuestionPreview();
194
194
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flying squirrel': 0, 'Eagle': 1, 'Parrot': 1, 'Ostrich': 3 });
195
- dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(10, 30);
195
+ dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(15, 30);
196
196
  dragAndDropIntoCategoriesPage.steps.switchToGradingView();
197
197
  dragAndDropIntoCategoriesPage.steps.verifyIncorrectOptionIcon(0);
198
198
  dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
@@ -102,7 +102,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone scoring
102
102
  dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock']);
103
103
  dragAndDropIntoCategoriesPage.steps.expandMaxCapacityPerDropzoneDropdown();
104
104
  dragAndDropIntoCategoriesPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
105
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Platypus': 2, 'Ostrich': 3, 'Whale': 4 });
105
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Platypus': 2, 'Ostrich': 3, 'Whale': 4, 'Parrot': 5 });
106
106
  dragAndDropIntoCategoriesPage.steps.selectAutoScoredScoringSubtype('Per dropzone');
107
107
  dragAndDropIntoCategoriesPage.steps.allotPoints(1);
108
108
  });
@@ -164,10 +164,10 @@ describe('Create item page - Drag and drop into categories: Per dropzone scoring
164
164
  dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock']);
165
165
  dragAndDropIntoCategoriesPage.steps.expandMaxCapacityPerDropzoneDropdown();
166
166
  dragAndDropIntoCategoriesPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
167
- dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Platypus': 2, 'Ostrich': 3, 'Whale': 4 });
167
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Platypus': 2, 'Ostrich': 3, 'Whale': 4, 'Parrot': 5 });
168
168
  dragAndDropIntoCategoriesPage.steps.selectAutoScoredScoringSubtype('Per dropzone');
169
169
  dragAndDropIntoCategoriesPage.steps.allotPoints(1.65);
170
- //dragAndDropIntoCategoriesPage.steps.checkAllowStudentToCheckAnswerCheckbox();
170
+ //dragAndDropIntoCategoriesPage.steps.checkAllowStudentToCheckAnswerCheckbox();
171
171
  });
172
172
 
173
173
  it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an option such that points of the correctly attempted options has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
@@ -227,7 +227,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone scoring
227
227
  dragAndDropIntoCategoriesPage.steps.allotPoints(1.65);
228
228
  dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
229
229
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
230
- dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(2, 9);
230
+ dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(2, 9.9);
231
231
  });
232
232
 
233
233
  it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
@@ -238,7 +238,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone scoring
238
238
  dragAndDropIntoCategoriesPage.steps.allotPenaltyPoints(4);
239
239
  dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
240
240
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 2 });
241
- dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 9);
241
+ dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(0, 9.9);
242
242
  });
243
243
 
244
244
  it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
@@ -246,7 +246,7 @@ describe('Create item page - Drag and drop into categories: Per dropzone scoring
246
246
  dragAndDropIntoCategoriesPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
247
247
  dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
248
248
  dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 2 });
249
- dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(-4, 9);
249
+ dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(-4, 9.9);
250
250
  });
251
251
  });
252
252
  });
@@ -0,0 +1,169 @@
1
+ import { dragAndDropIntoCategoriesPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const enumerationOptions = {
5
+ 'Numerical': ['1', '2'],
6
+ 'Alphabet (uppercase)': ['A', 'B'],
7
+ 'Alphabet (lowercase)': ['a', 'b'],
8
+ 'Roman numeral (uppercase)': ['I', 'II'],
9
+ 'Roman numeral (lowercase)': ['i', 'ii'],
10
+ };
11
+
12
+ //Failing due to https://redmine.zeuslearning.com/issues/574098
13
+ describe('Drag and drop into categories - Additional settings', () => {
14
+ before(() => {
15
+ cy.loginAs('admin');
16
+ });
17
+
18
+ describe('Additional Settings: Grading view - Contents in edit tab', () => {
19
+ abortEarlySetup();
20
+ before(() => {
21
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
22
+ cy.barsPreLoaderWait();
23
+ dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
24
+ });
25
+
26
+ dragAndDropIntoCategoriesPage.tests.verifyGradingViewEnumerationSectionContents('Dropzone');
27
+
28
+ it('When the user selects "Without enumeration" radio button, the identifiers section should disappear', () => {
29
+ dragAndDropIntoCategoriesPage.steps.selectEnumerationType('without enumeration');
30
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.identifiersLabel(), 'notExist');
31
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.numericalToggleButton(), 'notExist');
32
+ });
33
+
34
+ it('When the user selects "With enumeration" radio button again, the identifiers section should appear again', () => {
35
+ dragAndDropIntoCategoriesPage.steps.selectEnumerationType('with enumeration');
36
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.identifiersLabel(), 'visible');
37
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.numericalToggleButton(), 'visible');
38
+ })
39
+ });
40
+
41
+ describe('Additional settings: Grading view - functionality in preview tab', () => {
42
+ abortEarlySetup();
43
+ before(() => {
44
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
45
+ cy.barsPreLoaderWait();
46
+ dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
47
+ dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(2);
48
+ dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale']);
49
+ dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Parrot': 1 });
50
+ dragAndDropIntoCategoriesPage.steps.allotPoints(20);
51
+ dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
52
+ });
53
+
54
+ Object.keys(enumerationOptions).forEach(option => {
55
+ it(`When "${option}" toggle button is selected in the dropzone identifiers section, then on switching to the preview tab dropzone numeration should not be displayed`, () => {
56
+ dragAndDropIntoCategoriesPage.steps.selectIdentifierToggleButton(option);
57
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
58
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.dropzoneCellNumeration(), 'notExist');
59
+ });
60
+
61
+ it(`When the user switches to the "Grading view", then the "${option}" numeration should be displayed in the dropzones as well as correct answer options in the correct answer section`, () => {
62
+ dragAndDropIntoCategoriesPage.steps.switchToGradingView();
63
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumerationPreviewTab(enumerationOptions[option]);
64
+ dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerContainerNumeration(enumerationOptions[option]);
65
+ cy.log('Post step: Switch to Edit tab')
66
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
67
+ });
68
+ });
69
+
70
+ it('When the user selects "without enumeration" radio button, then in the "Grading view", numeration should not be displayed for dropzones and in the correct answer section, the entire question preview should be displayed with correct answers', () => {
71
+ dragAndDropIntoCategoriesPage.steps.selectEnumerationType('without enumeration');
72
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
73
+ dragAndDropIntoCategoriesPage.steps.switchToGradingView();
74
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.dropzoneCellNumeration(), 'notExist');
75
+ });
76
+ });
77
+
78
+ describe('Additional settings: ARIA label for dropzones - Contents in edit tab', () => {
79
+ abortEarlySetup();
80
+ before(() => {
81
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
82
+ cy.barsPreLoaderWait();
83
+ dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
84
+ });
85
+
86
+ it(`"ARIA label for dropzones" label should be displayed`, () => {
87
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.ariaLabelSectionLabel(), `ARIA label for dropzones`);
88
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.ariaLabelSectionLabel(), 'visible');
89
+ });
90
+
91
+ it('Two input fields with numeration and "Enter aria label" placeholder should be displayed by default', () => {
92
+ utilities.verifyElementCount(dragAndDropIntoCategoriesPage.ariaLabelInputField(), 9);
93
+ dragAndDropIntoCategoriesPage.steps.verifyAriaLabelTextInputFields(0);
94
+ dragAndDropIntoCategoriesPage.steps.verifyAriaLabelTextInputFields(1);
95
+ });
96
+
97
+ it(`CSS of "ARIA label for dropzones" section`, { tags: 'css' }, () => {
98
+ utilities.verifyCSS(dragAndDropIntoCategoriesPage.ariaLabelSectionLabel(), {
99
+ 'color': css.color.labels,
100
+ 'font-size': css.fontSize.normal,
101
+ 'font-weight': css.fontWeight.semibold
102
+ });
103
+ utilities.verifyCSS(dragAndDropIntoCategoriesPage.ariaLabelInputField(), {
104
+ 'color': css.color.text,
105
+ 'font-size': css.fontSize.default,
106
+ 'font-weight': css.fontWeight.regular
107
+ });
108
+ });
109
+
110
+ it('When the users adds a new dropzone, the count of the aria label text input fields should update accordingly', () => {
111
+ dragAndDropIntoCategoriesPage.steps.increaseColumnInputStepperCount(1);
112
+ utilities.verifyElementCount(dragAndDropIntoCategoriesPage.ariaLabelInputField(), 12);
113
+ dragAndDropIntoCategoriesPage.steps.verifyAriaLabelTextInputFields(2);
114
+ });
115
+
116
+ it('When the user deletes any dropzone, the count of the aria label texts input fields should update accordingly', () => {
117
+ dragAndDropIntoCategoriesPage.steps.decreaseColumnInputStepperCount(1);
118
+ utilities.verifyElementCount(dragAndDropIntoCategoriesPage.ariaLabelInputField(), 9);
119
+ dragAndDropIntoCategoriesPage.steps.verifyAriaLabelTextInputFields(0);
120
+ dragAndDropIntoCategoriesPage.steps.verifyAriaLabelTextInputFields(1);
121
+ });
122
+
123
+ it('When the user has not set \'ARIA label\' input field, then default aria labels should be present for the dropzones of the specify correct answer section', () => {
124
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(0, 'dropzone-cell');
125
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(1, 'dropzone-cell');
126
+ });
127
+
128
+ it('When the user sets aria label, then in the dropzones of the specify correct answer section, the aria labels should also update', () => {
129
+ dragAndDropIntoCategoriesPage.steps.enterTextInAriaLabelInputField(0, 'Add answer for response 1');
130
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(0, 'Add answer for response 1');
131
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelSpecifyCorrectAnswerSection(1, 'dropzone-cell');
132
+ });
133
+ });
134
+
135
+ describe('Additional settings: ARIA label for dropzones - functionality in preview tab', () => {
136
+ abortEarlySetup();
137
+ before(() => {
138
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
139
+ cy.barsPreLoaderWait();
140
+ dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
141
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
142
+ });
143
+
144
+ it('When the user has not set \'ARIA label\' input field, then default aria labels should be present for the dropzones in the preview tab', () => {
145
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'dropzone-cell');
146
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone-cell');
147
+ });
148
+
149
+ it('When the user has set \'ARIA label\', then it should be present for the dropzones in the preview tab', () => {
150
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
151
+ dragAndDropIntoCategoriesPage.steps.enterTextInAriaLabelInputField(0, 'Correct response 1');
152
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
153
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'Correct response 1');
154
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone-cell');
155
+ });
156
+
157
+ it('Accessibility of input field in preview tab when custom \'ARIA label\' is set', { tags: 'a11y' }, () => {
158
+ cy.checkAccessibility(dragAndDropIntoCategoriesPage.previewTabQuestionWrapper());
159
+ });
160
+
161
+ it('When the user clears the set value in the \'ARIA label\' input field, then the default aria labels should be present for the dropzones in the preview tab', () => {
162
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
163
+ dragAndDropIntoCategoriesPage.steps.clearTextInAriaLabelInputField(0);
164
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
165
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(0, 'dropzone-cell');
166
+ dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone-cell');
167
+ });
168
+ });
169
+ });
@@ -165,7 +165,7 @@ describe('Create item page - Drag and drop into categories: Question instruction
165
165
  });
166
166
 
167
167
  it('When user has navigated to the rightmost column of the table, then the right arrow navigation button should be disabled', () => {
168
- for (let index = 9; index < 16; index++) {
168
+ for (let index = 9; index < 17; index++) {
169
169
  dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButton();
170
170
  }
171
171
  utilities.verifyElementDisabled(dragAndDropIntoCategoriesPage.rightArrowNavigationButton());
@@ -0,0 +1,223 @@
1
+ import { dragAndDropIntoCategoriesPage } from "../../../pages";
2
+ import { colorPopupComponent } from "../../../pages/components";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ const modifiedColor = 'rgb(121, 60, 60)'
7
+
8
+ describe('Drag and drop into categories - Style and layout customization', () => {
9
+ before(() => {
10
+ cy.loginAs('admin');
11
+ });
12
+
13
+ describe('Style and Layout customization accordion: Draggable options drag icon handle', () => {
14
+ abortEarlySetup();
15
+ before(() => {
16
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
17
+ cy.barsPreLoaderWait();
18
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
19
+ });
20
+
21
+ it('Draggable options label should be displayed', () => {
22
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.draggableOptionsLabel(), 'Draggable options');
23
+ });
24
+
25
+ it('Drag handle icon label should be displayed with 3 options and by default the first option should be selected draggable options', () => {
26
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.dragHandleIconLabel(), 'Drag handle icon');
27
+ utilities.verifyElementCount(dragAndDropIntoCategoriesPage.dragHandleOptions(), 3);
28
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleOptionSelected(0);
29
+ });
30
+
31
+ it('By default, the default selected drag handle should be displayed in the specify correct answer section draggable options', () => {
32
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('drag icon');
33
+ });
34
+
35
+ it('When user selects arrows drag handle icon then arrow icons should be displayed the specify correct answer section draggable options', () => {
36
+ dragAndDropIntoCategoriesPage.steps.selectDragHandleOption(1);
37
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('arrow icon');
38
+ });
39
+
40
+ it('When user selects none option then drag handles should not be displayed for the specify correct answer section draggable options', () => {
41
+ dragAndDropIntoCategoriesPage.steps.selectDragHandleOption(2);
42
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconSpecifyCorrectAnswer('none');
43
+ });
44
+ });
45
+
46
+ describe('Style and Layout customization accordion: Draggable options drag icon handle', () => {
47
+ abortEarlySetup();
48
+ before(() => {
49
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
50
+ cy.barsPreLoaderWait();
51
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
52
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
53
+ });
54
+
55
+ it('By default, the default selected drag handle should be displayed in the preview tab draggable options', () => {
56
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconPreviewTab('drag icon');
57
+ });
58
+
59
+ it('When user selects arrows drag handle icon then arrow icons should be displayed the preview tab draggable options', () => {
60
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
61
+ dragAndDropIntoCategoriesPage.steps.selectDragHandleOption(1);
62
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
63
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconPreviewTab('arrow icon');
64
+ });
65
+
66
+ it('When user selects none option then drag handles should not be displayed for the preview tab draggable options', () => {
67
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
68
+ dragAndDropIntoCategoriesPage.steps.selectDragHandleOption(2);
69
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
70
+ dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconPreviewTab('none');
71
+ });
72
+ });
73
+
74
+ describe('Style and Layout customization accordion: Draggable options Fill color edit tab contents and functionality', () => {
75
+ abortEarlySetup();
76
+ before(() => {
77
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
78
+ cy.barsPreLoaderWait();
79
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
80
+ });
81
+
82
+ it('\'Fill color\' label and two color blocks and an \'Edit color\' button should be displayed. The selected color block should be of color \'rgb(245, 248, 255)\' and the other color block should have \'No color\'', () => {
83
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.draggableOptionsFillColorLabel(), 'Fill color');
84
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockColor(4, css.color.defaultBackground);
85
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockSelectedState(0);
86
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockColor(5, css.color.none);
87
+ utilities.verifyInnerText(utilities.getNthElement(dragAndDropIntoCategoriesPage.editColorButton(), 2), 'Edit color');
88
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.editColorButton(), 'visible');
89
+ });
90
+
91
+ it('When the user hovers over the color blocks in the \'Fill color\' section, hex code of the selected color should be displayed in a tooltip', () => {
92
+ utilities.getNthElement(dragAndDropIntoCategoriesPage.colorBlock(), 4)
93
+ .verifyTooltip('#FFFFFF');
94
+ utilities.getNthElement(dragAndDropIntoCategoriesPage.colorBlock(), 5)
95
+ .verifyTooltip('None');
96
+ });
97
+
98
+ it('By default, the first color option should be in selected state', () => {
99
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockSelectedState(4);
100
+ });
101
+
102
+ it('When the default color block is in selected state in the \'Fill color\' section, then the background color of the grid in the specify correct answer section should be the default selected color', () => {
103
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(css.color.defaultBackground);
104
+ });
105
+
106
+ it('When the user selects the \'None\' color block, it should get in selected state and the no background color should be present for the grid in the specify correct answer section', () => {
107
+ dragAndDropIntoCategoriesPage.steps.selectColorBlock(5);
108
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(css.color.defaultBackground);
109
+ });
110
+
111
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the background color of the grid in the specify correct answer section should be the modified selected color', () => {
112
+ dragAndDropIntoCategoriesPage.steps.editColor(2);
113
+ colorPopupComponent.steps.clickInColorSaturationPalette();
114
+ colorPopupComponent.steps.clickOnOkButton();
115
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorSpecifyCorrectAnswerSection(modifiedColor);
116
+ });
117
+ });
118
+
119
+ describe('Style and Layout customization accordion: Draggable options Fill color preview tab functionality', () => {
120
+ abortEarlySetup();
121
+ before(() => {
122
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
123
+ cy.barsPreLoaderWait();
124
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
125
+ });
126
+
127
+ it('When the default color block is in selected state in the \'Fill color\' section, then the background color of the grid in the preview tab should be the default selected color', () => {
128
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
129
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
130
+ });
131
+
132
+ it('When the user selects the \'None\' color block, it should get in selected state and the no background color should be present for the grid in the preview tab', () => {
133
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
134
+ dragAndDropIntoCategoriesPage.steps.selectColorBlock(5);
135
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
136
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
137
+ });
138
+
139
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
140
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
141
+ dragAndDropIntoCategoriesPage.steps.editColor(2);
142
+ colorPopupComponent.steps.clickInColorSaturationPalette();
143
+ colorPopupComponent.steps.clickOnOkButton();
144
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
145
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorPreviewTab(modifiedColor);
146
+ });
147
+ });
148
+
149
+ describe('Style and Layout customization accordion: Draggable options Border color edit tab contents and functionality', () => {
150
+ abortEarlySetup();
151
+ before(() => {
152
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
153
+ cy.barsPreLoaderWait();
154
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
155
+ });
156
+
157
+ it('\'Border color\' label and two color blocks and an \'Edit color\' button should be displayed. The selected color block should be of color \'rgb(82, 0, 255) and the other color block should have \'No color\'', () => {
158
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.borderColorLabel(), 'Border color');
159
+ utilities.verifyInnerText(utilities.getNthElement(dragAndDropIntoCategoriesPage.editColorButton(), 3), 'Edit color');
160
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.editColorButton(), 'visible');
161
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockColor(6, css.color.figDefaultComponentBorder);
162
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockSelectedState(2);
163
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockColor(7, css.color.none);
164
+ });
165
+
166
+ it('When the user hovers over the color blocks in the \'Border color\' section, hex code of the selected color should be displayed in a tooltip', () => {
167
+ utilities.getNthElement(dragAndDropIntoCategoriesPage.colorBlock(), 6)
168
+ .verifyTooltip('#6B8BFF');
169
+ utilities.getNthElement(dragAndDropIntoCategoriesPage.colorBlock(), 7)
170
+ .verifyTooltip('None');
171
+ });
172
+
173
+ it('By default, the first color option should be in selected state', () => {
174
+ dragAndDropIntoCategoriesPage.steps.verifyColorBlockSelectedState(6);
175
+ });
176
+
177
+ it('When the default color block is in selected state in the \'Border color\' section, then the border color of the grid in the specify correct answer section should be the default selected color', () => {
178
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(css.color.figDefaultComponentBorder);
179
+ });
180
+
181
+ it('When the user selects the \'None\' color block, it should get in selected state and the no border color should be present for the grid in the specify correct answer section', () => {
182
+ dragAndDropIntoCategoriesPage.steps.selectColorBlock(7);
183
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(css.color.defaultBackground);
184
+ });
185
+
186
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the border color of the grid in the specify correct answer section should be the modified selected color', () => {
187
+ dragAndDropIntoCategoriesPage.steps.editColor(3);
188
+ colorPopupComponent.steps.clickInColorSaturationPalette();
189
+ colorPopupComponent.steps.clickOnOkButton();
190
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorSpecifyCorrectAnswer(modifiedColor);
191
+ });
192
+ });
193
+
194
+ describe('Style and Layout customization accordion: Draggable options Border color preview tab functionality', () => {
195
+ abortEarlySetup();
196
+ before(() => {
197
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
198
+ cy.barsPreLoaderWait();
199
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
200
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
201
+ });
202
+
203
+ it('When the default color block is in selected state in the \'Fill color\' section, then the border color of the grid in the preview tab should be the default selected color', () => {
204
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.figDefaultComponentBorder);
205
+ });
206
+
207
+ it('When the user selects the \'None\' color block, it should get in selected state and the no border color should be present for the grid in the preview tab', () => {
208
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
209
+ dragAndDropIntoCategoriesPage.steps.selectColorBlock(7);
210
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
211
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.defaultBackground);
212
+ });
213
+
214
+ it('When the user clicks on the \'Edit color\' button, modifies color for the selected color block, then the color block should get updated accordingly', () => {
215
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
216
+ dragAndDropIntoCategoriesPage.steps.editColor(3);
217
+ colorPopupComponent.steps.clickInColorSaturationPalette();
218
+ colorPopupComponent.steps.clickOnOkButton();
219
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
220
+ dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorPreviewTab(modifiedColor);
221
+ });
222
+ });
223
+ });
@@ -0,0 +1,119 @@
1
+ import { dragAndDropIntoCategoriesPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ const panelPlacement = ['Bottom', 'Top', 'Left', 'Right'];
6
+ const optionAlignment = ['Left', 'Center', 'Right'];
7
+
8
+ //Failing die to https://redmine.zeuslearning.com/issues/574098
9
+ describe('Drag and drop into categories - Style and layout customization', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Style and Layout customization accordion: Draggable options panel placement specify correct answer', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
18
+ cy.barsPreLoaderWait();
19
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
20
+ });
21
+
22
+ it('\'Draggable option panel\' label should be displayed', () => {
23
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.draggableOptionPanelPlacementLabel(), 'Draggable option panel');
24
+ });
25
+
26
+ it(`\'Panel placement\' label should be displayed along with ${panelPlacement} options should be displayed and by default \'Bottom\' should be selected`, () => {
27
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.panelPlacementLabel(), 'Panel placement');
28
+ panelPlacement.forEach((option) => {
29
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.panelPlacementOptions(option), 'exist');
30
+ });
31
+ dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementOptionSelected('Bottom');
32
+ });
33
+
34
+ it('By default the option panel placement should be at the bottom', () => {
35
+ dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementSpecifyCorrectAnswerSection('Bottom');
36
+ });
37
+
38
+ panelPlacement.forEach((option) => {
39
+ it(`When user selects ${option} option from the Panel placement options then panel placement should be at the ${option} in specify correct answer section`, () => {
40
+ dragAndDropIntoCategoriesPage.steps.selectPanelPlacementOption(option)
41
+ dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementSpecifyCorrectAnswerSection(option);
42
+ });
43
+ });
44
+ });
45
+
46
+ describe('Style and Layout customization accordion: Draggable options panel placement preview tab', () => {
47
+ abortEarlySetup();
48
+ before(() => {
49
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
50
+ cy.barsPreLoaderWait();
51
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
52
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
53
+ });
54
+
55
+ it('By default the option panel placement should be at the bottom', () => {
56
+ dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementPreviewTab('Bottom');
57
+ });
58
+
59
+ panelPlacement.forEach((option) => {
60
+ it(`When user selects ${option} option from the Panel placement options then panel placement should be at the ${option} in preview tab`, () => {
61
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
62
+ dragAndDropIntoCategoriesPage.steps.selectPanelPlacementOption(option)
63
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
64
+ dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementPreviewTab(option);
65
+ });
66
+ });
67
+ });
68
+
69
+ describe('Style and Layout customization accordion: Draggable Option alignment in panel specify correct answer', () => {
70
+ abortEarlySetup();
71
+ before(() => {
72
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
73
+ cy.barsPreLoaderWait();
74
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
75
+ });
76
+
77
+ it(`\'Option alignment in panel\' label should be displayed along with ${optionAlignment} options should be displayed and by default \'Left\' should be selected`, () => {
78
+ utilities.verifyInnerText(dragAndDropIntoCategoriesPage.optionAlignmentInPanelLabel(), 'Option alignment in panel');
79
+ optionAlignment.forEach((option) => {
80
+ utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.optionAlignmentInPanelOptions(option.toLowerCase()), 'exist');
81
+ });
82
+ dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelOptionSelected('left');
83
+ });
84
+
85
+ it('By default the option alignment in panel placement should be at the left', () => {
86
+ dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInSpecifyCorrectAnswer('Left');
87
+ });
88
+
89
+ optionAlignment.forEach((option) => {
90
+ it(`When user selects ${option} option from the option alignment in panel placement options then option alignment placement should be at the ${option} in specify correct answer section`, () => {
91
+ dragAndDropIntoCategoriesPage.steps.selectOptionAlignmentInPanelOption(option.toLowerCase());
92
+ dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInSpecifyCorrectAnswer(option);
93
+ });
94
+ });
95
+ });
96
+
97
+ describe('Style and Layout customization accordion: Draggable Option alignment in panel preview tab', () => {
98
+ abortEarlySetup();
99
+ before(() => {
100
+ dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
101
+ cy.barsPreLoaderWait();
102
+ dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
103
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
104
+ });
105
+
106
+ it('By default the option alignment in panel placement should be at the left', () => {
107
+ dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInPreviewTab('Left');
108
+ });
109
+
110
+ optionAlignment.forEach((option) => {
111
+ it(`When user selects ${option} option from the option alignment in panel placement options then option alignment placement should be at the ${option} in preview tab`, () => {
112
+ dragAndDropIntoCategoriesPage.steps.switchToEditTab();
113
+ dragAndDropIntoCategoriesPage.steps.selectOptionAlignmentInPanelOption(option.toLowerCase());
114
+ dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
115
+ dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInPreviewTab(option);
116
+ });
117
+ });
118
+ });
119
+ });