itemengine-cypress-automation 1.0.169-uploadResponseMigration-83ab996.0 → 1.0.169

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
  2. package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
  3. package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
  4. package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
  5. package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
  6. package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
  7. package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
  8. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
  9. package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
  10. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  12. package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
  13. package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
  14. package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
  15. package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
  16. package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
  17. package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
  18. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
  19. package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
  20. package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
  22. package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
  23. package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
  24. package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
  25. package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
  26. package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
  27. package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
  28. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
  29. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
  30. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
  31. package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
  32. package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
  33. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
  34. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
  35. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
  36. package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
  37. package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
  38. package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
  39. package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
  40. package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
  41. package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
  42. package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
  43. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
  44. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
  45. package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
  46. package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
  47. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
  48. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
  49. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
  50. package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
  51. package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
  52. package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
  53. package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
  54. package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
  55. package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
  56. package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
  57. package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
  58. package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
  59. package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
  60. package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
  61. package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
  62. package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
  63. package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
  64. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
  65. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
  66. package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
  67. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
  68. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
  69. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
  70. package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
  71. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
  72. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
  73. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
  74. package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
  75. package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
  76. package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
  77. package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
  78. package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
  79. package/cypress/fixtures/theme/ilc.json +14 -26
  80. package/cypress/pages/brainingCampManipulativePage.js +122 -0
  81. package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
  82. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
  83. package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
  84. package/cypress/pages/components/colorPopupComponent.js +2 -2
  85. package/cypress/pages/components/defaultToolDropdown.js +77 -0
  86. package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
  87. package/cypress/pages/components/index.js +3 -0
  88. package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
  89. package/cypress/pages/components/measuringToolComponent.js +2 -2
  90. package/cypress/pages/components/resetPopupComponent.js +74 -0
  91. package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
  92. package/cypress/pages/components/setPointsPopupBase.js +6 -4
  93. package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
  94. package/cypress/pages/components/toolSettingsComponent.js +80 -12
  95. package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
  96. package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
  97. package/cypress/pages/feedbackScalePage copy.js +716 -0
  98. package/cypress/pages/feedbackScalePage.js +591 -449
  99. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
  100. package/cypress/pages/graphingPage.js +9 -145
  101. package/cypress/pages/gridFillPage.js +135 -120
  102. package/cypress/pages/highlightPage.js +0 -394
  103. package/cypress/pages/index.js +5 -2
  104. package/cypress/pages/matchingPage.js +78 -20
  105. package/cypress/pages/multipleSelectionGridPage.js +88 -1
  106. package/cypress/pages/numberLinePage.js +723 -0
  107. package/cypress/pages/singleSelectionGridPage.js +86 -0
  108. package/cypress/pages/textSelectionPage.js +582 -0
  109. package/cypress/support/migrationHelpers/extractLrnQuestionData.js +1 -38
  110. package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
  111. package/cypress/support/migrationHelpers/migrationScript.js +0 -4
  112. package/cypress/support/migrationHelpers/verifyIeQuestionData.js +2 -34
  113. package/package.json +2 -2
@@ -0,0 +1,83 @@
1
+ import { brainingCampManipulativePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ const fontSizeDropdownOptions = ['Tiny', 'Small', 'Default', 'Normal', 'Big', 'Huge'];
7
+ const fontSizes = ['12px', '14px', '16px', '18px', '22px', '26px'];
8
+
9
+ describe('Desmos graphing: Additional Settings accordion', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ describe('Additional Settings accordion', () => {
15
+ abortEarlySetup();
16
+ before(() => {
17
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
18
+ cy.barsPreLoaderWait();
19
+ });
20
+
21
+ brainingCampManipulativePage.tests.verifyAdditionalSettingsAccordionProperties();
22
+ });
23
+
24
+ //Failing due to https://redmine.zeuslearning.com/issues/554758
25
+ describe('Additional settings: Font size contents', () => {
26
+ abortEarlySetup();
27
+ before(() => {
28
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
29
+ cy.barsPreLoaderWait();
30
+ brainingCampManipulativePage.steps.expandAdditionalSettings();
31
+ });
32
+
33
+ brainingCampManipulativePage.tests.verifyFontSizeSectionContents();
34
+ });
35
+
36
+ describe('Additional settings: Font size functionality preview tab', () => {
37
+ abortEarlySetup();
38
+ before(() => {
39
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
40
+ cy.barsPreLoaderWait();
41
+ brainingCampManipulativePage.steps.addQuestionInstructions();
42
+ brainingCampManipulativePage.steps.expandAdditionalSettings();
43
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.fontSizeDropdown(), 'visible');
44
+ });
45
+
46
+ fontSizeDropdownOptions.forEach((option, fontsIndex) => {
47
+ it(`When the user selects \'${option}\' option from the Font Size dropdown, then font size of the preview tab should change to ${option} accordingly`, () => {
48
+ brainingCampManipulativePage.steps.selectFontSizeOptionFromFontSizeDropdown(option);
49
+ utilities.verifyInnerText(brainingCampManipulativePage.fontSizeDropdown(), `${option}`);
50
+ brainingCampManipulativePage.steps.switchToPreviewTab();
51
+ utilities.verifyCSS(brainingCampManipulativePage.questionInstructionsText(), {
52
+ 'font-size': fontSizes[fontsIndex]
53
+ });
54
+ utilities.verifyCSS(brainingCampManipulativePage.previewTabCanvas(), {
55
+ 'font-size': fontSizes[fontsIndex]
56
+ });
57
+ brainingCampManipulativePage.steps.switchToEditTab();
58
+ });
59
+ });
60
+ });
61
+
62
+ describe('Additional settings: Accessibility section', () => {
63
+ abortEarlySetup();
64
+ before(() => {
65
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
66
+ cy.barsPreLoaderWait();
67
+ brainingCampManipulativePage.steps.expandAdditionalSettings();
68
+ });
69
+
70
+ brainingCampManipulativePage.tests.verifyAdditionalSettingsAccessibilitySection();
71
+ });
72
+
73
+ describe('Additional Settings: Details section', () => {
74
+ abortEarlySetup();
75
+ before(() => {
76
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
77
+ cy.barsPreLoaderWait();
78
+ brainingCampManipulativePage.steps.expandAdditionalSettings();
79
+ });
80
+
81
+ brainingCampManipulativePage.tests.verifyDetailsSection();
82
+ });
83
+ });
@@ -0,0 +1,200 @@
1
+ import { brainingCampManipulativePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+
5
+ const manipulativeToggleButton = ['Algebra tiles', 'Base ten blocks', 'Clock', 'Color tiles', 'Cuisenaire® rods', 'Fraction circles', 'Fraction tiles', 'Geoboard', 'Hundred boards', 'Linking cubes', 'Money', 'Number lines', 'Pattern blocks', 'Place value disks', 'Rekenreks', 'Two - color counters', 'XY coordinate board'];
6
+
7
+ describe('Create item : Brainingcamp manipulative - Edit tab basics', () => {
8
+
9
+ describe('Question Instructions input field - Edit tab', () => {
10
+ abortEarlySetup();
11
+ before(() => {
12
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
13
+ cy.barsPreLoaderWait();
14
+ });
15
+
16
+ brainingCampManipulativePage.tests.verifyQuestionInstructionsInputFieldEditTab();
17
+ });
18
+
19
+ describe('Question Instructions input field - Preview tab', () => {
20
+ abortEarlySetup();
21
+ before(() => {
22
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
23
+ cy.barsPreLoaderWait();
24
+ });
25
+
26
+ brainingCampManipulativePage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
27
+ });
28
+
29
+ describe('Add manipulative and Select a manipulative section - Contents and edit tab functionality', () => {
30
+ abortEarlySetup();
31
+ before(() => {
32
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
33
+ cy.barsPreLoaderWait();
34
+ });
35
+
36
+ it('Add manipulative label and two toggle buttons \'Select a manipulative\' and \'Enter share code\' should be displayed', () => {
37
+ utilities.verifyInnerText(brainingCampManipulativePage.addManipulativeLabel(), 'Add manipulative');
38
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.addManipulativeLabel(), 'visible');
39
+ utilities.verifyInnerText(brainingCampManipulativePage.selectAManipulativeToggleButtonLabel(), 'Select a manipulative');
40
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.selectAManipulativeToggleButton(), 'visible');
41
+ utilities.verifyInnerText(brainingCampManipulativePage.enterShareCodeToggleButtonLabel(), 'Enter share code');
42
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.enterShareCodeToggleButton(), 'visible');
43
+ });
44
+
45
+ it('By default, \'Select a manipulative\' should be selected', () => {
46
+ brainingCampManipulativePage.steps.verifySelectAManipulativeToggleButtonIsSelected();
47
+ });
48
+
49
+ it(`When \'Select a manipulative\' is selected, then \'Select a manipulative\' label and 17 options ${manipulativeToggleButton} should be displayed`, () => {
50
+ manipulativeToggleButton.forEach((manipulativeOption) => {
51
+ utilities.verifyInnerText(brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeOption), `${manipulativeOption}`);
52
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeOption), 'visible');
53
+ });
54
+ });
55
+
56
+ it(`By default, ${manipulativeToggleButton[3]} should be in selected state and rest all should be in deselected state`, () => {
57
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsSelected(manipulativeToggleButton[3]);
58
+ manipulativeToggleButton.forEach((manipulativeOption) => {
59
+ if (manipulativeOption !== manipulativeToggleButton[3]) {
60
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsNotSelected(manipulativeOption);
61
+ };
62
+ });
63
+ });
64
+
65
+ it('User should be able to select all the toggle buttons but only one at a time', () => {
66
+ manipulativeToggleButton.forEach((manipulativeOption, index) => {
67
+ if (index === 0) {
68
+ brainingCampManipulativePage.steps.selectAManipulative(manipulativeOption);
69
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsNotSelected(manipulativeToggleButton[index + 1]);
70
+ } else if (index === manipulativeToggleButton.lastIndexOf('XY coordinate board')) {
71
+ brainingCampManipulativePage.steps.selectAManipulative(manipulativeOption);
72
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsNotSelected(manipulativeToggleButton[index - 1]);
73
+ } else {
74
+ brainingCampManipulativePage.steps.selectAManipulative(manipulativeOption);
75
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsNotSelected(manipulativeToggleButton[index - 1]);
76
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsNotSelected(manipulativeToggleButton[index + 1]);
77
+ }
78
+ });
79
+ });
80
+
81
+ it('When user selects \'Enter share code\' toggle button, then \'Enter a share code\' label and input field should be displayed', () => {
82
+ brainingCampManipulativePage.steps.selectEnterShareCodeToggleButton();
83
+ utilities.verifyInnerText(brainingCampManipulativePage.enterAShareCodeLabel(), 'Enter a share code');
84
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.enterAShareCodeLabel(), 'visible');
85
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.enterAShareCodeInputField(), 'visible');
86
+ utilities.verifyInputFieldValue(brainingCampManipulativePage.enterAShareCodeInputField(), '');
87
+ });
88
+
89
+ it('When user focuses in and out of \'Enter a share code\' input field, then error message \'Error: Please enter share code.\' should be displayed', () => {
90
+ brainingCampManipulativePage.steps.focusInAndFocusOutOfEnterAShareCodeInputField();
91
+ utilities.verifyInnerText(brainingCampManipulativePage.errorMessage(), 'Error: Please enter share code.');
92
+ });
93
+
94
+ brainingCampManipulativePage.tests.verifyErrorMessageCSSAndA11y();
95
+
96
+ it('User should be able to enter alphanumeric code in \'Enter a share code\' input field', () => {
97
+ brainingCampManipulativePage.steps.addShareCodeInEnterAShareCodeInputField('E98SY56N');
98
+ });
99
+
100
+ it('When user has added sharecode in sharecode input field, then its error message should not be displayed', () => {
101
+ brainingCampManipulativePage.steps.verifyErrorMessageIsNotDisplayed();
102
+ });
103
+
104
+ it('When user switched back to \'Select a manipulative\', then previously selected manipulative option should be selected', () => {
105
+ brainingCampManipulativePage.steps.selectSelectAManipulativeToggleButton();
106
+ brainingCampManipulativePage.steps.verifyAManipulativeOptionIsSelected(manipulativeToggleButton[16]);
107
+ });
108
+
109
+ it('CSS of \'Add a manipulative\', \'Enter a share code\' and \'Select a manipulative\' sections', { tags: 'css' }, () => {
110
+ utilities.verifyCSS(brainingCampManipulativePage.addManipulativeLabel(), {
111
+ 'color': css.color.labels,
112
+ 'font-size': css.fontSize.normal,
113
+ 'font-weight': css.fontWeight.semibold
114
+ });
115
+ utilities.verifyCSS(brainingCampManipulativePage.selectAManipulativeToggleButtonLabel(), {
116
+ 'color': css.color.whiteText,
117
+ 'font-size': css.fontSize.normal,
118
+ 'font-weight': css.fontWeight.bold
119
+ });
120
+ utilities.verifyCSS(brainingCampManipulativePage.selectAManipulativeToggleButton(), {
121
+ 'background-color': css.color.toggleButtonSelectedBg
122
+ });
123
+ utilities.verifyCSS(brainingCampManipulativePage.enterAShareCodeLabel(), {
124
+ 'color': css.color.UnselectedToggleButton,
125
+ 'font-size': css.fontSize.normal,
126
+ 'font-weight': css.fontWeight.bold
127
+ });
128
+ utilities.verifyCSS(brainingCampManipulativePage.enterShareCodeToggleButton(), {
129
+ 'background-color': css.color.defaultBackground
130
+ });
131
+ utilities.verifyCSS(brainingCampManipulativePage.selectAManipulativeLabel(), {
132
+ 'color': css.color.labels,
133
+ 'font-size': css.fontSize.normal,
134
+ 'font-weight': css.fontWeight.semibold
135
+ });
136
+ utilities.verifyCSS(brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeToggleButton[0]), {
137
+ 'color': css.color.activeButtons,
138
+ 'font-size': css.fontSize.default,
139
+ 'font-weight': css.fontWeight.semibold,
140
+ 'background-color': css.color.defaultBackground,
141
+ 'border': `1px solid ${css.color.manipulativeOptionContainerBorder}`
142
+ });
143
+ utilities.verifyCSS(brainingCampManipulativePage.manipulativeOptionToggleButton(manipulativeToggleButton[16]), {
144
+ 'color': css.color.whiteText,
145
+ 'font-size': css.fontSize.default,
146
+ 'font-weight': css.fontWeight.semibold,
147
+ 'background-color': css.color.activeButtons,
148
+ 'border': `1px solid ${css.color.manipulativeOptionContainerBorder}`
149
+ });
150
+ brainingCampManipulativePage.steps.selectEnterShareCodeToggleButton();
151
+ utilities.verifyCSS(brainingCampManipulativePage.enterAShareCodeLabel(), {
152
+ 'color': css.color.labels,
153
+ 'font-size': css.fontSize.normal,
154
+ 'font-weight': css.fontWeight.semibold
155
+ });
156
+ utilities.verifyCSS(brainingCampManipulativePage.enterAShareCodeInputField(), {
157
+ 'color': css.color.text,
158
+ 'font-size': css.fontSize.default,
159
+ 'font-weight': css.fontWeight.normal
160
+ });
161
+ });
162
+
163
+ it('Accessibility of \'Add a manipulative\', \'Enter a share code\' and \'Select a manipulative\' sections', { tags: 'a11y' }, () => {
164
+ cy.checkAccessibility(brainingCampManipulativePage.selectAManipulativeLabel().parents('[class*="BrainingcampManipulativestyle__Wrapper"]'));
165
+ brainingCampManipulativePage.steps.selectSelectAManipulativeToggleButton();
166
+ cy.checkAccessibility(brainingCampManipulativePage.selectAManipulativeLabel().parents('[class*="BrainingcampManipulativestyle__Wrapper"]'));
167
+ });
168
+ });
169
+
170
+ describe('Add manipulative and Select a manipulative section - Preview tab functionality', () => {
171
+ abortEarlySetup();
172
+ before(() => {
173
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
174
+ cy.barsPreLoaderWait();
175
+ brainingCampManipulativePage.steps.switchToPreviewTab();
176
+ });
177
+
178
+ it('By default canvas with \'Color tiles\' resource should be displayed in preview tab', () => {
179
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.previewTabCanvas(), 'visible');
180
+ cy.log('Post-step: Switching to edit tab');
181
+ brainingCampManipulativePage.steps.switchToEditTab();
182
+ });
183
+
184
+ manipulativeToggleButton.forEach((manipulativeOption) => {
185
+ it(`When the user selects \'${manipulativeOption}\' manipulative from \'Select a manipulative\' section, then in preview tab the \'${manipulativeOption}\' manipulative should be displayed in the canvas`, () => {
186
+ brainingCampManipulativePage.steps.selectAManipulative(manipulativeOption);
187
+ brainingCampManipulativePage.steps.switchToPreviewTab();
188
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.previewTabCanvas(), 'visible');
189
+ brainingCampManipulativePage.steps.switchToEditTab();
190
+ });
191
+ });
192
+
193
+ it('User gives input in \'Enter a share code\' input field, then the corresponding manipulative resource should be displayed in preview tab canvas', () => {
194
+ brainingCampManipulativePage.steps.selectEnterShareCodeToggleButton();
195
+ brainingCampManipulativePage.steps.addShareCodeInEnterAShareCodeInputField('G5DWYWQY');
196
+ brainingCampManipulativePage.steps.switchToPreviewTab();
197
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.previewTabCanvas(), 'visible');
198
+ });
199
+ });
200
+ });
@@ -0,0 +1,56 @@
1
+ import { brainingCampManipulativePage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+
6
+ describe('Create Item page - Braining camp manipulative: Scoring section', () => {
7
+ before(() => {
8
+ cy.loginAs('admin');
9
+ });
10
+
11
+ describe('Scoring section contents', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
15
+ cy.barsPreLoaderWait();
16
+ });
17
+
18
+ brainingCampManipulativePage.tests.verifyScoringTypeLabelAndDropdown('manuallyScored');
19
+ });
20
+
21
+ describe('Manually scored scoring type - Scoring section', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
25
+ });
26
+
27
+ it('When the user selects \'Manually scored\' option from the Scoring Type dropdown, then the \'Points\' label and input field should be displayed and and \'Minimum score awarded (if attempted)\' should not be displayed', () => {
28
+ brainingCampManipulativePage.steps.expandScoringTypeDropdown();
29
+ brainingCampManipulativePage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
30
+ brainingCampManipulativePage.steps.verifyDefaultPointsLabelAndInputField();
31
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.minimumPointsLabel(), 'notExist');
32
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.minimumPointsInputField(), 'notExist');
33
+ });
34
+
35
+ brainingCampManipulativePage.tests.verifyPointsFieldErrorState();
36
+ });
37
+
38
+ describe('Non scored scoring - Scoring section', () => {
39
+ abortEarlySetup();
40
+ before(() => {
41
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
42
+ cy.barsPreLoaderWait();
43
+ });
44
+
45
+ it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
46
+ brainingCampManipulativePage.steps.expandScoringTypeDropdown();
47
+ brainingCampManipulativePage.steps.selectOptionFromScoringTypeDropdown('Non scored');
48
+ });
49
+
50
+ brainingCampManipulativePage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
51
+
52
+ brainingCampManipulativePage.tests.verifyScoringSectionContentsForNonScoredScoringType();
53
+
54
+ brainingCampManipulativePage.tests.verifyCSSAndA11yOfDisabledPointsInputField();
55
+ });
56
+ });
@@ -0,0 +1,95 @@
1
+ import constants from "../../../fixtures/constants";
2
+ import { correctAnswerViewPage, brainingCampManipulativePage, itemPreviewPage, studentViewPage, gradingViewPage } from "../../../pages";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ import utilities from "../../../support/helpers/utilities";
5
+ const css = Cypress.env('css');
6
+ let gradingAndCorrectAnsView = ['Grading view', 'Correct answer view']
7
+ const views = utilities.getViews(gradingAndCorrectAnsView);
8
+ var itemReferenceID = "";
9
+
10
+ describe('Create item page - Brainingcamp manipulative: Grading view, Correct answer view contents', () => {
11
+ before(() => {
12
+ cy.loginAs('admin');
13
+ });
14
+
15
+ if (views.includes('Grading view')) {
16
+ describe('Grading view contents', { tags: 'smoke' }, () => {
17
+ abortEarlySetup();
18
+ before(() => {
19
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
20
+ cy.barsPreLoaderWait();
21
+ brainingCampManipulativePage.steps.addQuestionInstructions();
22
+ brainingCampManipulativePage.steps.selectAManipulative('Fraction circles');
23
+ brainingCampManipulativePage.steps.allotPoints(10);
24
+ brainingCampManipulativePage.steps.clickOnSaveQuestionButton();
25
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
26
+ //Global variable issue, not working inside before
27
+ itemPreviewPage.referenceID()
28
+ .invoke('text')
29
+ .then(($refID) => {
30
+ itemReferenceID = $refID;
31
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
32
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.previewTabCanvas(), 'visible');
33
+ studentViewPage.steps.submitResponse();
34
+ studentViewPage.steps.clickOnGoToGradingViewButton();
35
+ });
36
+ });
37
+
38
+ it('Question instructions should be visible', () => {
39
+ utilities.verifyInnerText(brainingCampManipulativePage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
40
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.questionInstructionsText(), 'visible');
41
+ });
42
+
43
+ it('The brainingcamp manipulative resource should be displayed', () => {
44
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.previewTabCanvas(), 'visible');
45
+ });
46
+
47
+ it('Empty score input field and total score should be displayed', () => {
48
+ gradingViewPage.steps.verifyGradingViewScore('', 10);
49
+ });
50
+
51
+ it('Accessibility of contents in preview tab', { tags: 'a11y' }, () => {
52
+ cy.checkAccessibility(brainingCampManipulativePage.previewTabCanvas().parents('[class*="ContentWrapper"]'));
53
+ });
54
+ });
55
+ }
56
+
57
+ //Need to re-visit once https://redmine.zeuslearning.com/issues/555456 is resolved
58
+ if (views.includes('Correct answer view')) {
59
+ describe('Correct answer view contents', { tags: 'smoke' }, () => {
60
+ abortEarlySetup();
61
+ before(() => {
62
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
63
+ cy.barsPreLoaderWait();
64
+ brainingCampManipulativePage.steps.addQuestionInstructions();
65
+ brainingCampManipulativePage.steps.selectAManipulative('Number lines');
66
+ brainingCampManipulativePage.steps.allotPoints(10);
67
+ brainingCampManipulativePage.steps.clickOnSaveQuestionButton();
68
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
69
+ //Global variable issue, not working inside before
70
+ itemPreviewPage.referenceID()
71
+ .invoke('text')
72
+ .then(($refID) => {
73
+ itemReferenceID = $refID
74
+ cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
75
+ });
76
+ });
77
+
78
+ it('Question instructions should be visible', () => {
79
+ utilities.verifyTextContent(correctAnswerViewPage.correctAnswerViewQuestionInstructions(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
80
+ utilities.verifyElementVisibilityState(correctAnswerViewPage.correctAnswerViewQuestionInstructions(), 'visible');
81
+ });
82
+
83
+ it('\'This is a manual scored question\' help text should be displayed in the correct answer view', () => {
84
+ utilities.verifyTextContent(correctAnswerViewPage.manualScoredQuestionHelpText(), 'This is a manual scored question.');
85
+ utilities.verifyElementVisibilityState(correctAnswerViewPage.manualScoredQuestionHelpText(), 'visible');
86
+ });
87
+
88
+ it('The points alloted to the question should be displayed', () => {
89
+ correctAnswerViewPage.steps.verifyAvailablePoints(10);
90
+ });
91
+
92
+ //Need to add CSS and A11y here once updated designs are available for correct answer
93
+ });
94
+ }
95
+ });
@@ -0,0 +1,71 @@
1
+ import constants from "../../../fixtures/constants";
2
+ import { dialogBoxBase, brainingCampManipulativePage } from "../../../pages";
3
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+
5
+ describe('Create item page - Brainingcamp manipulative: Question instructions', () => {
6
+ before(() => {
7
+ cy.loginAs('admin');
8
+ });
9
+
10
+ describe('Header section contents', () => {
11
+ abortEarlySetup();
12
+ before(() => {
13
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
14
+ cy.barsPreLoaderWait();
15
+ });
16
+
17
+ brainingCampManipulativePage.tests.verifyCreateQuestionPageQuestionTypeHeader('Brainingcamp manipulative');
18
+ });
19
+
20
+ describe('Tabs section', () => {
21
+ abortEarlySetup();
22
+ before(() => {
23
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
24
+ cy.barsPreLoaderWait();
25
+ });
26
+
27
+ brainingCampManipulativePage.tests.verifyTabsSection();
28
+ });
29
+
30
+ describe('Cancel button', () => {
31
+ abortEarlySetup();
32
+ before(() => {
33
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
34
+ cy.barsPreLoaderWait();
35
+ });
36
+
37
+ brainingCampManipulativePage.tests.verifyCancelButton('brainingcamp manipulative')
38
+ });
39
+
40
+ describe('Save Question button', () => {
41
+ abortEarlySetup();
42
+ before(() => {
43
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
44
+ cy.barsPreLoaderWait();
45
+ });
46
+
47
+ describe('Validation error messages', () => {
48
+ dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
49
+
50
+ it('Validation error messages should be displayed below required input fields', () => {
51
+ brainingCampManipulativePage.steps.verifyQuestionInstructionsErrorMessage();
52
+ brainingCampManipulativePage.steps.verifyPointsFieldErrorMessage();
53
+ });
54
+
55
+ it('Validation error messages should disappear when required input fields are filled', () => {
56
+ brainingCampManipulativePage.steps.addTextInQuestionInstructionsInputField('Select correct option from dropdown');
57
+ brainingCampManipulativePage.steps.allotPoints(10);
58
+ brainingCampManipulativePage.steps.verifyErrorMessageIsNotDisplayed();
59
+ });
60
+
61
+ brainingCampManipulativePage.tests.verifyCreateItemWrapperContentsA11y();
62
+ });
63
+
64
+ describe('Saving a question', () => {
65
+ it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
66
+ brainingCampManipulativePage.steps.saveAQuestionAndVerifySnackbar();
67
+ });
68
+ brainingCampManipulativePage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
69
+ });
70
+ });
71
+ });
@@ -0,0 +1,72 @@
1
+ import { brainingCampManipulativePage, itemPreviewPage } from "../../../pages";
2
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
3
+ import utilities from "../../../support/helpers/utilities";
4
+ const css = Cypress.env('css');
5
+ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view'];
6
+ const views = utilities.getViews(previewContentViews);
7
+ var itemReferenceID = "";
8
+
9
+ describe('Create item page - Brainingcamp manipulative: Preview contents', () => {
10
+ before(() => {
11
+ cy.loginAs('admin');
12
+ });
13
+
14
+ views.forEach((view) => {
15
+ describe(`Preview tab contents - ${view}`, { tags: 'smoke' }, () => {
16
+ abortEarlySetup();
17
+ before(() => {
18
+ switch (view) {
19
+ case 'Question preview':
20
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
21
+ cy.barsPreLoaderWait();
22
+ brainingCampManipulativePage.steps.addQuestionInstructions();
23
+ brainingCampManipulativePage.steps.selectAManipulative('Hundred boards');
24
+ brainingCampManipulativePage.steps.allotPoints(10);
25
+ brainingCampManipulativePage.steps.switchToPreviewTab();
26
+ break;
27
+ case 'Item view':
28
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
29
+ break;
30
+ case 'Item preview':
31
+ cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
32
+ brainingCampManipulativePage.steps.switchToPreviewTab();
33
+ break;
34
+ case 'Student view':
35
+ cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
36
+ break;
37
+ default:
38
+ throw new Error('Invalid view');
39
+ }
40
+ });
41
+
42
+ after(() => {
43
+ if (view === 'Question preview') {
44
+ brainingCampManipulativePage.steps.clickOnSaveQuestionButton();
45
+ utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
46
+ itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
47
+ }
48
+ });
49
+
50
+ it('Question instructions should be visible', () => {
51
+ utilities.verifyInnerText(brainingCampManipulativePage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
52
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.questionInstructionsText(), 'visible');
53
+ });
54
+
55
+ it('The brainingcamp manipulative resource should be displayed', () => {
56
+ utilities.verifyElementVisibilityState(brainingCampManipulativePage.previewTabCanvas(), 'visible');
57
+ });
58
+
59
+ it('CSS of preview tab contents', { tags: 'css' }, () => {
60
+ utilities.verifyCSS(brainingCampManipulativePage.questionInstructionsText(), {
61
+ 'color': css.color.text,
62
+ 'font-size': css.fontSize.default,
63
+ 'font-weight': css.fontWeight.regular
64
+ });
65
+ });
66
+
67
+ it('Accessibility of preview tab contents', { tags: 'a11y' }, () => {
68
+ cy.checkAccessibility(brainingCampManipulativePage.previewTabCanvas().parents('[class*="ContentWrapper"]'));
69
+ });
70
+ });
71
+ });
72
+ });
@@ -0,0 +1,71 @@
1
+ import abortEarlySetup from "../../../support/helpers/abortEarly";
2
+ import utilities from "../../../support/helpers/utilities";
3
+ import { dialogBoxBase, brainingCampManipulativePage, rulerPage } from "../../../pages";
4
+
5
+ const css = Cypress.env('css');
6
+
7
+ describe('Create Item page: Tool settings', () => {
8
+ before(() => {
9
+ cy.loginAs('admin');
10
+ });
11
+
12
+ describe('Tool settings: Contents', () => {
13
+ abortEarlySetup();
14
+ before(() => {
15
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
16
+ });
17
+
18
+ brainingCampManipulativePage.tests.verifyToolSettingsContent();
19
+ });
20
+
21
+ describe('Tool settings: Edit tool settings', () => {
22
+ abortEarlySetup();
23
+ before(() => {
24
+ brainingCampManipulativePage.steps.navigateToCreateQuestion('brainingcamp manipulative');
25
+ brainingCampManipulativePage.steps.expandToolSettingsAccordion();
26
+ });
27
+
28
+ it('When user clicks on edit icon for ruler tool, then popup for ruler tool settings should be displayed', () => {
29
+ brainingCampManipulativePage.steps.clickOnToolEditIcon(0);
30
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
31
+ });
32
+
33
+ it('When user modifies the settings for the ruler tool and clicks the \'Ok\' button, then ruler tool should enter selected state.', () => {
34
+ rulerPage.steps.expandUnitOfMeasurementDropdown();
35
+ rulerPage.steps.selectOptionFromUnitOfMeasurementDropdown('Inch');
36
+ rulerPage.steps.selectOptionFromLengthOfRulerOptions('12 in');
37
+ rulerPage.steps.selectColorBlock(1);
38
+ rulerPage.steps.expandRotationDropdown();
39
+ rulerPage.steps.selectOptionFromRotationDropdown('Allow rotation and display angle');
40
+ rulerPage.steps.enterInputToOpacityInputField(60);
41
+ dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
42
+ utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
43
+ brainingCampManipulativePage.steps.verifyToolSelectedState(0);
44
+ });
45
+
46
+ it('When user has made changes for ruler tool in edit tab then changes should be reflected in the ruler tool in the preview tab', () => {
47
+ cy.log('Switching to Preview Tab');
48
+ rulerPage.steps.switchToPreviewTab();
49
+ rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
50
+ rulerPage.steps.clickOnRulerVisibilityButton();
51
+ utilities.verifyElementVisibilityState(rulerPage.rulerPreviewTab(), 'visible');
52
+ rulerPage.steps.verifyLengthOfRulerInPreview('12in');
53
+ rulerPage.steps.verifyColorOfRulerInPreview(1);
54
+ rulerPage.steps.verifyRulerOpacityInPreview('0.6');
55
+ rulerPage.steps.verifyRotationButtonWithDegreeVisible();
56
+ });
57
+
58
+ it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
59
+ utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
60
+ 'border': `1px solid ${css.color.activeButtons}`,
61
+ 'background-color': css.color.defaultBackground,
62
+ 'font-size': css.fontSize.normal,
63
+ 'font-weight': css.fontWeight.semibold
64
+ });
65
+ });
66
+
67
+ it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
68
+ cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
69
+ });
70
+ });
71
+ });