itemengine-cypress-automation 1.0.184-e2e-execution-crash-3b9d0d0.0 → 1.0.185-repoUpdate26April-b17eb46.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. package/cypress/e2e/ILC/AudioPlayerNew/allSupportedFileTypes.js +79 -0
  2. package/cypress/e2e/ILC/AudioPlayerNew/barAudioPlayerStyle.js +345 -0
  3. package/cypress/e2e/ILC/AudioPlayerNew/compactAudioPlayerStyle.js +429 -0
  4. package/cypress/e2e/ILC/AudioPlayerNew/previewContents.smoke.js +162 -0
  5. package/cypress/e2e/ILC/AudioPlayerNew/standardAudioPlayerStyle.js +489 -0
  6. package/cypress/e2e/ILC/AudioPlayerNew/uploadAndAddAudioFile.js +313 -0
  7. package/cypress/e2e/ILC/AudioResponseNew/barRecorderStyle.smoke.js +1 -1
  8. package/cypress/e2e/ILC/AudioResponseNew/compactRecorderStyle.smoke.js +1 -1
  9. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +1 -1
  10. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -1
  11. package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +5 -8
  12. package/cypress/e2e/ILC/EditTabSettingPage/itemPreviewSettingsTabFunctionality.js +417 -28
  13. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +1 -1
  14. package/cypress/e2e/ILC/FeedbackScaleNew/headerSection.js +29 -1
  15. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +2 -2
  16. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/studentViewSettings.js +1 -1
  17. package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +1 -1
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -0
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +2 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -1
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +1 -1
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +4 -4
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +1 -1
  25. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +5 -5
  26. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +3 -4
  27. package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
  28. package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +1 -0
  29. package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +1 -1
  30. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +2 -2
  31. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +2 -2
  32. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +2 -2
  33. package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +2 -2
  34. package/cypress/e2e/ILC/Graphing/studentViewSettings.js +1 -1
  35. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +2 -2
  36. package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +11 -3
  37. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +3 -3
  38. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
  39. package/cypress/e2e/ILC/ListOrderingDropdown/allOrNothingForAllViews.smoke.js +230 -0
  40. package/cypress/e2e/ILC/ListOrderingDropdown/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  41. package/cypress/e2e/ILC/ListOrderingDropdown/previewContentsForAllViews.smoke.js +201 -0
  42. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +216 -0
  43. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +214 -0
  44. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +251 -0
  45. package/cypress/e2e/ILC/ListOrderingNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
  46. package/cypress/e2e/ILC/ListOrderingNew/Scoring/manuallyAndNonScored.js +128 -0
  47. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +279 -0
  48. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsBasic.js +109 -0
  49. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +278 -0
  50. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +278 -0
  51. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +335 -0
  52. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +250 -0
  53. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsBasic.js +161 -0
  54. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +216 -0
  55. package/cypress/e2e/ILC/ListOrderingNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +252 -0
  56. package/cypress/e2e/ILC/ListOrderingNew/additionalSettings.js +118 -0
  57. package/cypress/e2e/ILC/ListOrderingNew/allOrNothingForAllViews.smoke.js +243 -0
  58. package/cypress/e2e/ILC/ListOrderingNew/checkAnswerFunctionalityForAllViews.smoke.js +128 -0
  59. package/cypress/e2e/ILC/ListOrderingNew/editTabBasicSection.js +155 -0
  60. package/cypress/e2e/ILC/ListOrderingNew/editTabScoring.js +195 -0
  61. package/cypress/e2e/ILC/ListOrderingNew/headerSection.js +78 -0
  62. package/cypress/e2e/ILC/ListOrderingNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
  63. package/cypress/e2e/ILC/ListOrderingNew/previewContentsForAllViews.smoke.js +176 -0
  64. package/cypress/e2e/ILC/ListOrderingNew/specifyCorrectAnswerSection.js +112 -0
  65. package/cypress/e2e/ILC/ListOrderingNew/studentViewSettings.js +244 -0
  66. package/cypress/e2e/ILC/Matching/studentViewSettings.js +1 -1
  67. package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +1 -0
  68. package/cypress/e2e/ILC/MultipleSelectionGridNew/studentViewSettings.js +1 -1
  69. package/cypress/e2e/ILC/NumberLine/LayoutSection.js +181 -0
  70. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +3 -3
  71. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +57 -1
  72. package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +33 -0
  73. package/cypress/e2e/ILC/NumberLine/numberLineSection.js +46 -0
  74. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +1 -1
  75. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +1 -1
  76. package/cypress/e2e/ILC/NumberLine/toolSettings.js +2 -1
  77. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/allOrNothingScoringForAllViews.smoke.js +696 -0
  78. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/gradingViewAndCorrectAnswerView.smoke.js +173 -0
  79. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/layoutSection.js +183 -0
  80. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +73 -0
  81. package/cypress/e2e/ILC/NumberLine/verticalNumberLine/previewTabContentsForAllViews.smoke.js +204 -0
  82. package/cypress/e2e/ILC/NumberLineLabel/allOrNothingForAllViews.smoke.js +288 -0
  83. package/cypress/e2e/ILC/NumberLineLabel/checkAnswerFunctionalityForAllViews.smoke.js +153 -0
  84. package/cypress/e2e/ILC/NumberLineLabel/gradingViewAndCorrectAnswerView.smoke.js +164 -0
  85. package/cypress/e2e/ILC/NumberLineLabel/previewContentsForAllViews.smoke.js +120 -0
  86. package/cypress/e2e/ILC/Protractor/protractorPreviewContents.smoke.js +1 -1
  87. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +49 -1
  88. package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -1
  89. package/cypress/e2e/ILC/SingleSelectionGridNew/studentViewSettings.js +1 -1
  90. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +2 -2
  91. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +0 -1
  92. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +0 -1
  93. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +0 -1
  94. package/cypress/e2e/ILC/TextSelection/Scoring/basicScoringForAllTextSelectionTypes.smoke.js +0 -1
  95. package/cypress/e2e/ILC/TextSelection/additionalSettings.js +125 -0
  96. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +0 -1
  97. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +1 -2
  98. package/cypress/e2e/ILC/TextSelection/editTabScoringSection.js +5 -4
  99. package/cypress/e2e/ILC/TextSelection/headerSection.js +73 -0
  100. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.smoke.js +6 -7
  101. package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +179 -0
  102. package/cypress/e2e/ILC/TextSelection/specifyCorrectAnswerSection.js +89 -0
  103. package/cypress/e2e/ILC/TextSelection/studentViewSettings.js +436 -0
  104. package/cypress/e2e/ILC/TextSelection/styleAndLayoutCustomizationAccordion.js +277 -0
  105. package/cypress/e2e/ILC/TextSelection/textSelectionModesInPreviewTab.js +222 -0
  106. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyCorrectAnswerSection.js +260 -0
  107. package/cypress/e2e/ILC/TextSelection/textSelectionModesInSpecifyPossibleOptionsSection.js +380 -0
  108. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +5 -5
  109. package/cypress/e2e/ILC/ToolSettings/toolSettingsPreviewContents.smoke.js +3 -3
  110. package/cypress/fixtures/constants.js +1 -1
  111. package/cypress/fixtures/equationEditorCategoriesAndSymbols .js +20 -20
  112. package/cypress/fixtures/theme/ilc.json +20 -18
  113. package/cypress/pages/audioPlayerPage.js +274 -504
  114. package/cypress/pages/brainingCampManipulativePage.js +1 -1
  115. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
  116. package/cypress/pages/components/autoScoredStudentViewSettings.js +5 -5
  117. package/cypress/pages/components/commonComponents.js +1 -0
  118. package/cypress/pages/components/draggableOptionContainer.js +1 -0
  119. package/cypress/pages/components/equationEditorFlyout.js +3 -2
  120. package/cypress/pages/components/essayResponseCommonComponents.js +8 -2
  121. package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +1 -0
  122. package/cypress/pages/components/imageCanvasComponent.js +2 -1
  123. package/cypress/pages/components/index.js +3 -0
  124. package/cypress/pages/components/layoutSectionComponent.js +1191 -0
  125. package/cypress/pages/components/numberLineCommonComponent.js +36 -0
  126. package/cypress/pages/components/optionsWrapperComponent.js +13 -2
  127. package/cypress/pages/components/playbackControlsBaseComponent.js +20 -13
  128. package/cypress/pages/components/styleAndLayoutCustomizationAccordionComponent.js +46 -0
  129. package/cypress/pages/components/toolSettingsComponent.js +6 -0
  130. package/cypress/pages/contentBlocksPage.js +18 -2
  131. package/cypress/pages/createItemPage.js +75 -8
  132. package/cypress/pages/dialogBoxBase.js +2 -2
  133. package/cypress/pages/drawingResponsePage.js +24 -4
  134. package/cypress/pages/feedbackScalePage.js +3 -0
  135. package/cypress/pages/graphingPage.js +19 -1
  136. package/cypress/pages/gridFillPage.js +25 -8
  137. package/cypress/pages/index.js +2 -1
  138. package/cypress/pages/itemPreviewSettingsPage.js +4 -0
  139. package/cypress/pages/listOrderingPage.js +435 -557
  140. package/cypress/pages/matchingPage.js +1 -1
  141. package/cypress/pages/multipleSelectionPage.js +23 -1
  142. package/cypress/pages/numberLineLabelPage.js +333 -0
  143. package/cypress/pages/numberLinePage.js +1370 -132
  144. package/cypress/pages/rulerPage.js +6 -2
  145. package/cypress/pages/textSelectionPage.js +461 -23
  146. package/package.json +1 -1
@@ -0,0 +1,120 @@
1
+ import { itemPreviewPage, numberLineLabelPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
5
+ const views = utilities.getViews(previewContentViews);
6
+ const css = Cypress.env('css');
7
+ var itemReferenceID = "";
8
+ const range = 20.75;
9
+
10
+ describe('Create item page: Number line label - Preview contents in all views', () => {
11
+ before(() => {
12
+ cy.loginAs('admin');
13
+ });
14
+
15
+ views.forEach((view) => {
16
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ switch (view) {
20
+ case 'Question preview':
21
+ numberLineLabelPage.steps.navigateToCreateQuestion('Number line');
22
+ cy.barsPreLoaderWait();
23
+ numberLineLabelPage.steps.navigateToLabelNumberLineTab();
24
+ numberLineLabelPage.steps.addTextInQuestionInstructionsInputField('Label the number line');
25
+ numberLineLabelPage.steps.addLabel();
26
+ cy.log('Add image to label input field')
27
+ numberLineLabelPage.steps.focusInLabelInputField(0);
28
+ numberLineLabelPage.steps.selectImageOptionFromCKEditorToolbar()
29
+ numberLineLabelPage.steps.addImageToInputField();
30
+ numberLineLabelPage.steps.enterTextInLabelInputField(0, 'Fox image');
31
+ cy.log('Add bold text to label input field')
32
+ numberLineLabelPage.steps.focusInLabelInputField(1);
33
+ numberLineLabelPage.steps.selectBoldOptionFromCKEditorToolbar();
34
+ numberLineLabelPage.steps.enterTextInLabelInputField(1, 'This is a bold option');
35
+ cy.log('Add equation to label input field')
36
+ numberLineLabelPage.steps.enterTextInLabelInputField(2, 'Solve the following');
37
+ numberLineLabelPage.steps.focusInLabelInputField(2);
38
+ numberLineLabelPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
39
+ numberLineLabelPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
40
+ numberLineLabelPage.steps.enterTextInLabelInputField(3, 'This is a normal text');
41
+ numberLineLabelPage.steps.allotPoints(10);
42
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Fox image', 'horizontal', range, 0);
43
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [0]);
44
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('Solve the following', 'horizontal', range, 9);
45
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [9]);
46
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLineSpecifyCorrectAnswer('This is a bold option', 'horizontal', range, -9);
47
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLineSpecifyCorrectAnswer(range, [-9]);
48
+ numberLineLabelPage.steps.switchToPreviewTab();
49
+ break;
50
+ case 'Item view':
51
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
52
+ break;
53
+ case 'Item preview':
54
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
55
+ numberLineLabelPage.steps.switchToPreviewTab();
56
+ break;
57
+ case 'Student view':
58
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
59
+ cy.log('Adding wait because number line wasn\'t loaded properly')
60
+ cy.wait(4000);
61
+ break;
62
+ default:
63
+ throw new Error('Invalid view');
64
+ }
65
+ });
66
+
67
+ after(() => {
68
+ if (view === 'Question preview') {
69
+ numberLineLabelPage.steps.clickOnSaveQuestionButton();
70
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
71
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
72
+ }
73
+ });
74
+
75
+ it('Question instructions should be visible and number line should be displayed', () => {
76
+ utilities.verifyInnerText(numberLineLabelPage.questionInstructionsText(), 'Label the number line');
77
+ utilities.verifyElementVisibilityState(numberLineLabelPage.questionInstructionsText(), 'visible');
78
+ utilities.verifyElementVisibilityState(numberLineLabelPage.numberLinePreviewTab(), 'visible');
79
+ });
80
+
81
+ it(`When the user has added image, bold text and equation to the label input they should be displayed in the ${view}`, () => {
82
+ numberLineLabelPage.steps.verifyImageInPreviewTab(0);
83
+ numberLineLabelPage.steps.verifyBoldTextInPreviewTab(1);
84
+ numberLineLabelPage.steps.verifyEquationTextInPreviewTab(2);
85
+ numberLineLabelPage.steps.verifyLabelTextContentPreviewTab(3, 'This is a normal text');
86
+ });
87
+
88
+ it('User should be able to drag and drop image, bold text and equation options on the number line', () => {
89
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('Fox image', 'horizontal', range, 0);
90
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('Solve the following', 'horizontal', range, 9);
91
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('This is a bold option', 'horizontal', range, -9);
92
+ });
93
+
94
+ it('The labels on the plotted points should be displayed on the number line', () => {
95
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [0]);
96
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [9]);
97
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [-9]);
98
+ });
99
+
100
+ it('The user should be able to change the plotted label on the number line', () => {
101
+ numberLineLabelPage.steps.clickAndDropLabelOnNumberLinePreviewTab('Solve the following', 'horizontal', range, 7);
102
+ numberLineLabelPage.steps.verifyPointsPlottedOnNumberLinePreviewTab(range, [7]);
103
+ numberLineLabelPage.steps.verifyPointsNotExistOnNumberLinePreviewTab(range, [9]);
104
+ });
105
+
106
+ it('CSS of number line label', { tags: 'css' }, () => {
107
+ utilities.verifyCSS(numberLineLabelPage.draggableLabelsPreviewTab(), {
108
+ 'color': css.color.primaryBtn,
109
+ 'background-color': css.color.primaryBtnBg,
110
+ 'font-size': css.fontSize.default,
111
+ 'font-weight': css.fontWeight.regular
112
+ });
113
+ });
114
+
115
+ it('Accessibility of number line label', { tags: 'a11y' }, () => {
116
+ cy.checkAccessibility(numberLineLabelPage.numberLinePreviewTab().parents('.ngie-jxgbox'));
117
+ });
118
+ });
119
+ });
120
+ });
@@ -54,7 +54,7 @@ describe('Preview tab contents for all views', () => {
54
54
  }
55
55
  if (view === 'Student view') {
56
56
  studentViewPage.steps.submitResponse();
57
- utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
57
+ utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'exist');
58
58
  }
59
59
  });
60
60
 
@@ -195,7 +195,55 @@ describe('Create Item page - Reading ruler: Edit Tab', () => {
195
195
  readingRulerPage.steps.verifyColorPopupIsDisplayed();
196
196
  });
197
197
 
198
- readingRulerPage.tests.verifyColorPopupSelectColorTitle();
198
+ it('A title \'Select color\' should be displayed on the color popup', () => {
199
+ readingRulerPage.steps.verifyColorPopupSelectColorTitle();
200
+ });
201
+
202
+ it('A \'Selected color\' label and color block displaying the selected color should be displayed', () => {
203
+ readingRulerPage.steps.verifySelectedColorLabelAndSelectedColorBlock();
204
+ });
205
+
206
+ it('\'Cancel\' and \'Ok\' buttons should be displayed', () => {
207
+ utilities.verifyInnerText(readingRulerPage.cancelButton(), 'Cancel');
208
+ utilities.verifyElementVisibilityState(readingRulerPage.cancelButton(), 'visible');
209
+ utilities.verifyInnerText(readingRulerPage.okButton(), 'OK');
210
+ utilities.verifyElementVisibilityState(readingRulerPage.okButton(), 'visible');
211
+ });
212
+
213
+ it('CSS of color popup contents', { tags: 'css' }, () => {
214
+ const labels = [readingRulerPage.selectedColorLabel, readingRulerPage.hexLabel]
215
+ const inputFields = [readingRulerPage.hexInputField];
216
+ labels.forEach(label => {
217
+ utilities.verifyCSS(label(), {
218
+ 'color': css.color.labels,
219
+ 'font-size': css.fontSize.normal,
220
+ 'font-weight': css.fontWeight.semibold
221
+ });
222
+ });
223
+ inputFields.forEach(inputField => {
224
+ utilities.verifyCSS(inputField(), {
225
+ 'color': css.color.text,
226
+ 'font-size': css.fontSize.default,
227
+ 'font-weight': css.fontWeight.regular
228
+ });
229
+ });
230
+ utilities.verifyCSS(readingRulerPage.okButton(), {
231
+ 'color': css.color.primaryBtn,
232
+ 'font-size': css.fontSize.default,
233
+ 'font-weight': css.fontWeight.semibold,
234
+ 'background-color': css.color.primaryBtnBg
235
+ });
236
+ utilities.verifyCSS(readingRulerPage.cancelButton(), {
237
+ 'color': css.color.secondaryBtn,
238
+ 'font-size': css.fontSize.default,
239
+ 'font-weight': css.fontWeight.semibold,
240
+ 'background-color': css.color.transparent
241
+ });
242
+ });
243
+
244
+ it('Accessibility of color popup contents', { tags: 'a11y' }, () => {
245
+ cy.checkAccessibility(readingRulerPage.dialogBoxContent());
246
+ });
199
247
 
200
248
  readingRulerPage.tests.verifySaturationAndOpacityGradientPalette('rgb(255, 255, 255)');
201
249
 
@@ -318,7 +318,7 @@ describe('Create Item page - Short text response : Student view settings', () =>
318
318
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer multiple times', () => {
319
319
  shortTextResponsePage.steps.switchToEditTab();
320
320
  shortTextResponsePage.steps.expandMaxCheckAnswerAttemptsDropdown();
321
- shortTextResponsePage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
321
+ shortTextResponsePage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
322
322
  shortTextResponsePage.steps.switchToPreviewTab();
323
323
  shortTextResponsePage.steps.verifyCheckAnswerButtonEnabled();
324
324
  shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower');
@@ -172,7 +172,7 @@ describe('Create item page - single selection grid: Student view settings', () =
172
172
  it('When the user selects \'No limit\' option from the dropdown then user should be able to check answer single times', () => {
173
173
  singleSelectionGridPage.steps.switchToEditTab();
174
174
  singleSelectionGridPage.steps.expandMaxCheckAnswerAttemptsDropdown();
175
- singleSelectionGridPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('no limit');
175
+ singleSelectionGridPage.steps.selectMaxCheckAnswerAttemptsDropdownListOption('0');
176
176
  singleSelectionGridPage.steps.switchToPreviewTab();
177
177
  singleSelectionGridPage.steps.verifyCheckAnswerButtonEnabled();
178
178
  singleSelectionGridPage.steps.selectOptionsInPreviewTab({ row: 1, column: 0 });
@@ -353,10 +353,10 @@ describe('Create Item page - Text entry math: Response evaluation methods and cu
353
353
  } else {
354
354
  utilities.verifyElementVisibilityState(textEntryMathPage.customSettingsCheckboxContainer(customSettingsIds.ignoreUnitCoefficient), 'notExist');
355
355
  }
356
- if (evaluationMethod.customSettings.includes('Check for parenthesis grouping')) {
356
+ if (evaluationMethod.customSettings.includes('Check for parenthesis groups')) {
357
357
  utilities.verifyElementVisibilityState(textEntryMathPage.customSettingsCheckboxContainer(customSettingsIds.checkForParenthesisGrouping), 'visible');
358
358
  textEntryMathPage.steps.verifyCustomSettingsCheckboxIsUnchecked(customSettingsIds.checkForParenthesisGrouping);
359
- textEntryMathPage.steps.verifyCustomSettingsCheckboxLabel(customSettingsIds.checkForParenthesisGrouping, 'Check for parenthesis grouping');
359
+ textEntryMathPage.steps.verifyCustomSettingsCheckboxLabel(customSettingsIds.checkForParenthesisGrouping, 'Check for parenthesis groups');
360
360
  } else {
361
361
  utilities.verifyElementVisibilityState(textEntryMathPage.customSettingsCheckboxContainer(customSettingsIds.checkForParenthesisGrouping), 'notExist');
362
362
  }
@@ -10,7 +10,6 @@ describe('Create Item page - Text selection: Preview tab Scoring Section - All o
10
10
  describe('Question Preview: AutoScored - All or Nothing with alternate answer: When Alternate Answer points are more than Correct Answer points', () => {
11
11
  abortEarlySetup();
12
12
  before(() => {
13
- cy.log('Navigating to Text selection question type');
14
13
  textSelectionPage.steps.navigateToCreateQuestion('text selection');
15
14
  cy.barsPreLoaderWait();
16
15
  textSelectionPage.steps.setQuestionAndOptionsInEditTab();
@@ -10,7 +10,6 @@ describe('Create Item page - Text selection: Preview tab Scoring Section - All o
10
10
  describe('Question Preview: AutoScored - All or Nothing with alternate answer: When Correct Answer points are equal to Alternate Answer points', () => {
11
11
  abortEarlySetup();
12
12
  before(() => {
13
- cy.log('Navigating to Text selection question type');
14
13
  textSelectionPage.steps.navigateToCreateQuestion('text selection');
15
14
  cy.barsPreLoaderWait();
16
15
  textSelectionPage.steps.setQuestionAndOptionsInEditTab();
@@ -10,7 +10,6 @@ describe('Create Item page - Text selection: Preview tab Scoring Section - All o
10
10
  describe('Question Preview: AutoScored - All or Nothing with alternate answer: When Correct Answer points are more than Alternate Answer points', () => {
11
11
  abortEarlySetup();
12
12
  before(() => {
13
- cy.log('Navigating to Text selection question type');
14
13
  textSelectionPage.steps.navigateToCreateQuestion('text selection');
15
14
  cy.barsPreLoaderWait();
16
15
  textSelectionPage.steps.setQuestionAndOptionsInEditTab();
@@ -16,7 +16,6 @@ describe('Create Item page - Text selection - Basic scoring for all text selecti
16
16
  describe('Question Preview: Custom text selection type with All or nothing scoring', () => {
17
17
  abortEarlySetup();
18
18
  before(() => {
19
- cy.log('Navigate to question, add input to stems and options, set correct answer and allot points and switch to preview tab');
20
19
  textSelectionPage.steps.navigateToCreateQuestion('text selection');
21
20
  cy.barsPreLoaderWait();
22
21
  textSelectionPage.steps.addQuestionInstructions();
@@ -0,0 +1,125 @@
1
+ import { textSelectionPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
6
+ const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
7
+ const paragraphTextArray = ['All animals have a unique role to play in maintaining the balance of nature.', 'A lot of animal species exist in both, land and water. As a result, each of them has a purpose for their existence.', 'The animals divide into specific groups in biology. Amphibians are those which can live on both, land and water.', 'Mammals are ones which give birth to their offspring in the womb and have mammary glands.'];
8
+
9
+ describe('Create Item page - Text selection : Additional settings', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Additional Settings accordion', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
18
+ cy.barsPreLoaderWait();
19
+ });
20
+
21
+ textSelectionPage.tests.verifyAdditionalSettingsAccordionProperties();
22
+ });
23
+
24
+ describe('Additional settings: Font size contents', () => {
25
+ abortEarlySetup();
26
+ before(() => {
27
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
28
+ cy.barsPreLoaderWait();
29
+ textSelectionPage.steps.expandAdditionalSettings();
30
+ });
31
+
32
+ textSelectionPage.tests.verifyFontSizeSectionContents();
33
+ });
34
+
35
+ describe('Additional settings: Font size functionality edit tab', () => {
36
+ abortEarlySetup();
37
+ before(() => {
38
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
39
+ cy.barsPreLoaderWait();
40
+ textSelectionPage.steps.expandAdditionalSettings();
41
+ textSelectionPage.steps.clearQuestionInputField();
42
+ paragraphTextArray.forEach((paragraphText) => {
43
+ textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
44
+ });
45
+ textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
46
+ });
47
+
48
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
49
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the edit tab should change to ${option} accordingly`, () => {
50
+ textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
51
+ utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
52
+ utilities.verifyCSS(textSelectionPage.specifyCorrectAnswerTextParagraphs(), {
53
+ 'font-size': fontSizes[fontsIndex]
54
+ });
55
+ });
56
+ });
57
+ });
58
+
59
+ describe('Additional settings: Font size functionality preview tab', () => {
60
+ abortEarlySetup();
61
+ before(() => {
62
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
63
+ cy.barsPreLoaderWait();
64
+ textSelectionPage.steps.expandAdditionalSettings();
65
+ textSelectionPage.steps.clearQuestionInputField();
66
+ paragraphTextArray.forEach((paragraphText) => {
67
+ textSelectionPage.steps.addInputToQuestionInputField(`${paragraphText}{enter}`);
68
+ });
69
+ textSelectionPage.steps.addInputToQuestionInputField('{backspace}');
70
+ textSelectionPage.steps.switchTextSelectionMode('Paragraph');
71
+ textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[0]);
72
+ textSelectionPage.steps.clickOnOptionInSpecifyPossibleOptionsSection(paragraphTextArray[1]);
73
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
74
+ textSelectionPage.steps.allotPoints(5);
75
+ });
76
+
77
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
78
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
79
+ textSelectionPage.steps.selectFontSizeOptionFromFontSizeDropdown(fontSizeDropdownOptions[fontsIndex]);
80
+ utilities.verifyInnerText(textSelectionPage.fontSizeDropdown(), `${option}`);
81
+ textSelectionPage.steps.switchToPreviewTab();
82
+ utilities.verifyCSS(textSelectionPage.questionInstructionsText(), {
83
+ 'font-size': fontSizes[fontsIndex]
84
+ });
85
+ utilities.verifyCSS(textSelectionPage.previewTabQuestionTextParagraphs(), {
86
+ 'font-size': fontSizes[fontsIndex]
87
+ });
88
+ textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[1]);
89
+ textSelectionPage.steps.switchToGradingView();
90
+ utilities.verifyCSS(textSelectionPage.correctAnswersLabel(), {
91
+ 'font-size': fontSizes[fontsIndex]
92
+ });
93
+ utilities.verifyCSS(textSelectionPage.optionCorrectAnswerSection(), {
94
+ 'font-size': fontSizes[fontsIndex]
95
+ });
96
+ utilities.verifyCSS(textSelectionPage.correctIncorrectAnswerLabel(), {
97
+ 'font-size': fontSizes[fontsIndex]
98
+ });
99
+ textSelectionPage.steps.switchToEditTab();
100
+ });
101
+ });
102
+ });
103
+
104
+ describe('Additional settings: Accessibility section', () => {
105
+ abortEarlySetup();
106
+ before(() => {
107
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
108
+ cy.barsPreLoaderWait();
109
+ textSelectionPage.steps.expandAdditionalSettings();
110
+ });
111
+
112
+ textSelectionPage.tests.verifyAdditionalSettingsAccessibilitySection();
113
+ });
114
+
115
+ describe('Additional Settings: Details section', () => {
116
+ abortEarlySetup();
117
+ before(() => {
118
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
119
+ cy.barsPreLoaderWait();
120
+ textSelectionPage.steps.expandAdditionalSettings();
121
+ });
122
+
123
+ textSelectionPage.tests.verifyDetailsSection();
124
+ });
125
+ });
@@ -232,7 +232,6 @@ describe('Create item page - Text selection: All or nothing ', () => {
232
232
  describe('Question preview: Auto scored - All or nothing: Minimum scoring', () => {
233
233
  abortEarlySetup();
234
234
  before(() => {
235
- cy.log('Navigating to Highlight question type');
236
235
  textSelectionPage.steps.navigateToCreateQuestion('text selection');
237
236
  cy.barsPreLoaderWait();
238
237
  textSelectionPage.steps.addTextInQuestionInstructionsInputField('Highlight the correct statements.');
@@ -93,12 +93,11 @@ describe('Create item page - Matching - Check answer functionality', () => {
93
93
 
94
94
  it('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' should be displayed. Correct answer section should not be displayed', () => {
95
95
  textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[2]);
96
- textSelectionPage.steps.selectOptionInPreviewTab(paragraphTextArray[3]);
97
96
  checkAnswer(view);
98
97
  textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[0]);
99
98
  textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[1]);
100
99
  textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[2]);
101
- textSelectionPage.steps.verifyIncorrectIconForOption(paragraphTextArray[3]);
100
+ textSelectionPage.steps.verifyCorrectIncorrectIconForOptionNotExist(paragraphTextArray[3]);
102
101
  textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
103
102
  textSelectionPage.steps.verifyCorrectAnswerSectionNotExists();
104
103
  });
@@ -98,8 +98,9 @@ describe('Create item page - Text selection: Scoring section', () => {
98
98
 
99
99
  textSelectionPage.tests.verifyContentsOfSpecifyCorrectAnswerSection();
100
100
 
101
- it('\'Points per response\' label should be displayed and a \'-\' should be displayed besides each response in the \'Specify correct answer\' section', () => {
102
- textSelectionPage.steps.verifyPointsPerResponseLabel();
101
+ it('\'Points per response:\' label should be displayed in the \'Specify correct answer\' section', () => {
102
+ utilities.verifyInnerText(textSelectionPage.pointsPerResponseLabel(), 'Points per response:');
103
+ utilities.verifyElementVisibilityState(textSelectionPage.pointsPerResponseLabel(), 'visible');
103
104
  });
104
105
 
105
106
  it('When the user gives a score input to \'Points\' input field, then the score should be equally divided among the dropzone \'Points per response\' label', () => {
@@ -187,12 +188,12 @@ describe('Create item page - Text selection: Scoring section', () => {
187
188
  it('When user has not selected an option in specify correct answer section, then the \'Set points\' button should be disabled', () => {
188
189
  utilities.verifyElementDisabled(textSelectionPage.setPointsButton());
189
190
  });
190
-
191
+
191
192
  it('When user selects an option in set correct answer section, then the \'Set points\' button should be enabled', () => {
192
193
  textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection(paragraphTextArray[0]);
193
194
  textSelectionPage.steps.verifySetPointsButtonLabelAndEnabledState();
194
195
  });
195
-
196
+
196
197
  it('CSS of \'Set points\' button', { tags: 'css' }, () => {
197
198
  utilities.verifyCSS(textSelectionPage.setPointsButton(), {
198
199
  'color': css.color.activeButtons,
@@ -0,0 +1,73 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import { dialogBoxBase, textSelectionPage } from "../../../pages";
3
+ const options = ['Bat', 'Eagle'];
4
+
5
+ describe('Create item page - Text selection: Header section and Saving question', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Header section contents', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
14
+ });
15
+
16
+ textSelectionPage.tests.verifyCreateQuestionPageQuestionTypeHeader('Text selection');
17
+ });
18
+
19
+ describe('Tabs section', () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
23
+ });
24
+
25
+ textSelectionPage.tests.verifyTabsSection();
26
+ });
27
+
28
+ describe('Cancel button', () => {
29
+ abortEarlySetup();
30
+ before(() => {
31
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
32
+ });
33
+
34
+ textSelectionPage.tests.verifyCancelButton('text selection')
35
+ });
36
+
37
+ describe('Save Question button', () => {
38
+ abortEarlySetup();
39
+ before(() => {
40
+ textSelectionPage.steps.navigateToCreateQuestion('text selection');
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
+ textSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
49
+ textSelectionPage.steps.verifyPointsFieldErrorMessage();
50
+ textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
51
+ textSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
52
+ });
53
+
54
+ it('Validation error messages should disappear when required input fields are filled', () => {
55
+ textSelectionPage.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.');
56
+ textSelectionPage.steps.selectOptionInSpecifyPossibleOptionsSection('Custom', 'Lorem');
57
+ textSelectionPage.steps.selectOptionInSpecifyCorrectAnswerSection('Lorem');
58
+ textSelectionPage.steps.allotPoints(10);
59
+ textSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
60
+ textSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
61
+ });
62
+
63
+ textSelectionPage.tests.verifyCreateItemWrapperContentsA11y();
64
+ });
65
+
66
+ describe('Saving a question', () => {
67
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
68
+ textSelectionPage.steps.saveAQuestionAndVerifySnackbar();
69
+ });
70
+ textSelectionPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
71
+ });
72
+ });
73
+ });
@@ -70,7 +70,7 @@ describe('Create item page - Text selection : Preview contents', () => {
70
70
  });
71
71
 
72
72
  it('Question instructions should be visible', () => {
73
- utilities.verifyInnerText(textSelectionPage.questionInstructionsText(), 'Highlight the correct statements.');
73
+ utilities.verifyInnerText(textSelectionPage.questionInstructionsText(), 'Select the correct statements.');
74
74
  utilities.verifyElementVisibilityState(textSelectionPage.questionInstructionsText(), 'visible');
75
75
  });
76
76
 
@@ -109,18 +109,17 @@ describe('Create item page - Text selection : Preview contents', () => {
109
109
 
110
110
  it('When user clicks on a selected option, then that option should be deselected', () => {
111
111
  textSelectionPage.steps.deselectOptionInPreviewTab(paragraphTextArray[0]);
112
- textSelectionPage.steps.verifyDeselectedStateOptionInPreviewTab(paragraphTextArray[0]);
112
+ textSelectionPage.steps.verifyStandardStateOptionInPreviewTab(paragraphTextArray[0]);
113
113
  });
114
114
  } else if (view === 'Grading view') {
115
- it('The question text should be displayed with the selected correct options and status message \' Your answer is correct\' should be displayed', () => {
116
- textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[0]);
115
+ it('The question text should be displayed with the selected correct options and status message \' Your answer is incorrect\' should be displayed', () => {
117
116
  textSelectionPage.steps.verifyCorrectIconForOption(paragraphTextArray[1]);
118
- textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
117
+ textSelectionPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
119
118
  });
120
119
 
121
120
  it('The submitted answer options should not be editable', () => {
122
- textSelectionPage.steps.clickOnOptionInPreviewTab(paragraphTextArray[0]);
123
- textSelectionPage.steps.verifyOptionIsSelectedInPreviewTab(paragraphTextArray[0]);
121
+ textSelectionPage.steps.clickOnOptionInPreviewTab(paragraphTextArray[1]);
122
+ textSelectionPage.steps.verifyOptionIsSelectedInPreviewTab(paragraphTextArray[1]);
124
123
  textSelectionPage.steps.clickOnOptionInPreviewTab(paragraphTextArray[2]);
125
124
  textSelectionPage.steps.verifyOptionIsNotSelectedInPreviewTab(paragraphTextArray[2]);
126
125
  });