itemengine-cypress-automation 1.0.104 → 1.0.106

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
  2. package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
  3. package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
  4. package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
  5. package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
  6. package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
  7. package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
  8. package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
  9. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
  10. package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
  11. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
  12. package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
  13. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
  14. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
  15. package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
  16. package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
  17. package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
  18. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
  19. package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
  20. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
  21. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
  22. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
  23. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
  24. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
  25. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
  26. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
  27. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
  28. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
  29. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
  30. package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
  31. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
  32. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
  33. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
  34. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
  35. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
  36. package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
  37. package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
  38. package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
  39. package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
  40. package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
  41. package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
  42. package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
  43. package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
  44. package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
  45. package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
  46. package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
  47. package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
  48. package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
  49. package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
  50. package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
  51. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
  52. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
  53. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
  54. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
  55. package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
  56. package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +45 -0
  57. package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
  58. package/cypress/fixtures/specialAndMathCharacters.js +2 -0
  59. package/cypress/fixtures/theme/ilc.json +4 -2
  60. package/cypress/pages/audioResponsePage.js +326 -165
  61. package/cypress/pages/components/additionalSettingsPanel.js +1 -1
  62. package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
  63. package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
  64. package/cypress/pages/components/colorPopupComponent.js +115 -26
  65. package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
  66. package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
  67. package/cypress/pages/components/editCategoryFlyout.js +164 -2
  68. package/cypress/pages/components/equationEditorFlyout.js +36 -1
  69. package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
  70. package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
  71. package/cypress/pages/components/index.js +2 -1
  72. package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
  73. package/cypress/pages/correctAnswerViewPage.js +12 -1
  74. package/cypress/pages/drawingResponsePage.js +26 -151
  75. package/cypress/pages/essayResponseMathPage.js +28 -16
  76. package/cypress/pages/essayResponsePage.js +187 -7
  77. package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
  78. package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
  79. package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
  80. package/cypress/pages/multipleSelectionPage.js +1 -1
  81. package/cypress/pages/readingRulerPage.js +219 -104
  82. package/cypress/pages/singleSelectionPage.js +1 -0
  83. package/cypress/pages/textEntryMathPage.js +17 -6
  84. package/cypress/pages/videoResponsePage.js +0 -8
  85. package/deploy/smoke/run.sh +1 -1
  86. package/package.json +1 -1
  87. package/scripts/sorry-cypress.mjs +1 -1
@@ -8,6 +8,93 @@ describe('Create Item page - Reading ruler: Preview Tab', () => {
8
8
  cy.loginAs('admin');
9
9
  });
10
10
 
11
+ describe('Ruler style - Preview tab', () => {
12
+ abortEarlySetup();
13
+ before(() => {
14
+ cy.log('Navigating to \'Reading ruler\' resource tool');
15
+ readingRulerPage.steps.navigateToCreateResource('reading ruler');
16
+ });
17
+
18
+ it('When \'Display button to student\' and \'Allow student to resize\' checkbox are checked and \'Line focus\' ruler style is selected by default then \'Show reading ruler\' button should be displayed in preview tab', () => {
19
+ readingRulerPage.steps.verifyDisplayButtonToStudentCheckboxIsChecked();
20
+ readingRulerPage.steps.verifyAllowStudentToResizeCheckboxIsChecked();
21
+ readingRulerPage.steps.verifyRulerStyleSelectedState('Line focus');
22
+ cy.log('Switching to Preview Tab')
23
+ readingRulerPage.steps.switchToPreviewTab();
24
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Show');
25
+ });
26
+
27
+ it('CSS of active and default state of \'ReadingRuler\' button in Preview tab', { tags: 'css' }, () => {
28
+ readingRulerPage.steps.hoverAwayFromReadingRulerButtonInPreviewTab();
29
+ utilities.verifyCSS(readingRulerPage.readingRulerButton(), {
30
+ 'border': `1px solid ${css.color.activeButtons}`,
31
+ 'background-color': css.color.defaultBackground
32
+ });
33
+ });
34
+
35
+ it('When user clicks on the reading ruler button, Line focus ruler should be displayed in Preview Tab and Show reading ruler button should change to \'Hide reading ruler\'', () => {
36
+ readingRulerPage.steps.clickOnReadingRulerButtonInPreviewTab();
37
+ readingRulerPage.steps.verifyReadingRulerExistInPreviewTab();
38
+ readingRulerPage.steps.verifyRulerStyleInPreviewTab('Line focus');
39
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Hide');
40
+ });
41
+
42
+ it('Resize buttons, and close button should be visible and displayed in enabled state in Preview tab ', () => {
43
+ readingRulerPage.steps.verifyRulerButtonsInPreviewTab('Line focus');
44
+ });
45
+
46
+ it('When user selects \'Overlay mask\' ruler style and checks \'Visible on landing\' checkbox in edit tab and \'Hide reading ruler\' button and overlay reading ruler should be displayed in preview tab', () => {
47
+ readingRulerPage.steps.switchToEditTab();
48
+ readingRulerPage.steps.checkVisibleOnLandingCheckbox();
49
+ readingRulerPage.steps.verifyVisibleOnLandingCheckboxChecked();
50
+ readingRulerPage.steps.selectRulerStyle('Overlay mask');
51
+ cy.log('Switching to Preview Tab');
52
+ readingRulerPage.steps.switchToPreviewTab();
53
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Hide');
54
+ readingRulerPage.steps.verifyRulerStyleInPreviewTab('Overlay mask');
55
+ });
56
+
57
+ it('Resize buttons should not be visible and only close button should be visible and displayed in enabled state in Preview tab ', () => {
58
+ readingRulerPage.steps.verifyRulerButtonsInPreviewTab('Overlay mask');
59
+ });
60
+
61
+ it('When user selects \'Drag handle\' ruler style in edit tab, then drag handle reading ruler button should be displayed in preview tab', () => {
62
+ readingRulerPage.steps.switchToEditTab();
63
+ readingRulerPage.steps.verifyDisplayButtonToStudentCheckboxIsChecked();
64
+ readingRulerPage.steps.verifyAllowStudentToResizeCheckboxIsChecked();
65
+ readingRulerPage.steps.selectRulerStyle('Drag handle');
66
+ cy.log('Switching to Preview Tab')
67
+ readingRulerPage.steps.switchToPreviewTab();
68
+ readingRulerPage.steps.verifyReadingRulerExistInPreviewTab();
69
+ readingRulerPage.steps.verifyRulerStyleInPreviewTab('Drag handle');
70
+ });
71
+
72
+ it('Drag handle button, resize buttons, and close button should be visible and displayed in enabled state in Preview tab ', () => {
73
+ readingRulerPage.steps.verifyRulerButtonsInPreviewTab('Drag handle');
74
+ });
75
+
76
+ it('CSS of Drag handle button, resize buttons, and close button in default state', { tags: 'css' }, () => {
77
+ const buttons = [readingRulerPage.dragButton, readingRulerPage.topResizeButton, readingRulerPage.bottomResizeButton, readingRulerPage.closeButton, readingRulerPage.resizeButton]
78
+ buttons.forEach(button => {
79
+ utilities.verifyCSS(button(), {
80
+ 'color': css.color.primaryBtn,
81
+ 'font-weight': css.fontWeight.medium
82
+ });
83
+ });
84
+ });
85
+
86
+ it('CSS of Drag handle button, resize buttons, and close button in hover state', { tags: 'css' }, () => {
87
+ const buttons = [readingRulerPage.dragButton, readingRulerPage.topResizeButton, readingRulerPage.bottomResizeButton, readingRulerPage.closeButton, readingRulerPage.resizeButton]
88
+ buttons.forEach(button => {
89
+ button()
90
+ .realHover()
91
+ utilities.verifyCSS(button(), {
92
+ 'background-color': css.color.activeButtons
93
+ });
94
+ });
95
+ });
96
+ });
97
+
11
98
  describe('\'Conditional checkboxes\'- Preview Tab', () => {
12
99
  abortEarlySetup();
13
100
  before(() => {
@@ -19,7 +106,7 @@ describe('Create Item page - Reading ruler: Preview Tab', () => {
19
106
  readingRulerPage.steps.verifyDisplayButtonToStudentCheckboxIsChecked();
20
107
  cy.log('Switching to Preview Tab')
21
108
  readingRulerPage.steps.switchToPreviewTab();
22
- utilities.verifyElementVisibilityState(readingRulerPage.readingRulerButton(), 'visible')
109
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Show');
23
110
  });
24
111
 
25
112
  it('When user unchecks the \'Display button to student\' checkbox then reading ruler button should not be displayed in Preview tab', () => {
@@ -28,143 +115,88 @@ describe('Create Item page - Reading ruler: Preview Tab', () => {
28
115
  readingRulerPage.steps.uncheckDisplayButtonToStudentCheckbox();
29
116
  cy.log('Switching to Preview Tab')
30
117
  readingRulerPage.steps.switchToPreviewTab();
31
- utilities.verifyElementVisibilityState(readingRulerPage.readingRulerButton(), 'notExist')
118
+ readingRulerPage.steps.verifyReadingRulerButtonNotExistInPreviewTab();
32
119
  });
33
120
 
34
121
  it('Accessibility of preview tab when reading ruler button is not displayed', { tags: 'a11y' }, () => {
35
122
  cy.checkAccessibility(readingRulerPage.previewWrapper());
36
123
  });
37
124
 
38
- it('When \'Allow student to resize\' checkbox is checked by default and user selects \'Drag handle\' ruler style then the resize buttons on the reading ruler should be displayed in enabled state in Preview tab', () => {
125
+ it('When \'Allow student to resize\' checkbox is checked and \'Line focus\' ruler style is selected by default then the resize buttons on the reading ruler should be displayed in enabled state in Preview tab', () => {
39
126
  cy.log('Switching to Edit Tab');
40
127
  readingRulerPage.steps.switchToEditTab();
41
128
  readingRulerPage.steps.checkDisplayButtonToStudentCheckbox();
42
129
  readingRulerPage.steps.verifyAllowStudentToResizeCheckboxIsChecked();
43
- readingRulerPage.steps.selectRulerStyle('Drag handle');
130
+ readingRulerPage.steps.verifyRulerStyleSelectedState('Line focus');
131
+ readingRulerPage.steps.uncheckVisibleOnLandingCheckbox();
44
132
  cy.log('Switching to Preview Tab');
45
133
  readingRulerPage.steps.switchToPreviewTab();
46
- readingRulerPage.steps.clickOnReadingRulerButton();
47
- readingRulerPage.steps.verifyResizeButtonsEnabled();
134
+ readingRulerPage.steps.clickOnReadingRulerButtonInPreviewTab();
135
+ readingRulerPage.steps.verifyRulerButtonsInPreviewTab('Line focus');
48
136
  });
49
137
 
50
- // Failing due to https://redmine.zeuslearning.com/issues/528044
51
- it('Accessbility of reading ruler and reading ruler button', { tags: 'a11y' }, () => {
138
+ it('Accessibility of reading ruler and reading ruler button', { tags: 'a11y' }, () => {
52
139
  cy.checkAccessibility(readingRulerPage.readingRulerButton());
53
140
  cy.checkAccessibility(readingRulerPage.readingRuler());
54
141
  });
55
142
 
143
+ it('When \'Allow student to resize\' checkbox is checked and user selects \'Overlay mask\' ruler style in edit tab then the resize buttons on the reading ruler should not be displayed in Preview tab', () => {
144
+ cy.log('Switching to Edit Tab');
145
+ readingRulerPage.steps.switchToEditTab();
146
+ readingRulerPage.steps.selectRulerStyle('Overlay mask');
147
+ cy.log('Switching to Preview Tab');
148
+ readingRulerPage.steps.switchToPreviewTab();
149
+ readingRulerPage.steps.clickOnReadingRulerButtonInPreviewTab();
150
+ readingRulerPage.steps.verifyRulerButtonsInPreviewTab('Overlay mask');
151
+ });
152
+
153
+ it('When \'Allow student to resize\' checkbox is checked and user selects \'Drag handle\' ruler style in edit tab then the resize buttons on the reading ruler should be displayed in enabled state in Preview tab', () => {
154
+ cy.log('Switching to Edit Tab');
155
+ readingRulerPage.steps.switchToEditTab();
156
+ readingRulerPage.steps.selectRulerStyle('Drag handle');
157
+ cy.log('Switching to Preview Tab');
158
+ readingRulerPage.steps.switchToPreviewTab();
159
+ readingRulerPage.steps.clickOnReadingRulerButtonInPreviewTab();
160
+ readingRulerPage.steps.verifyRulerButtonsInPreviewTab('Drag handle');
161
+ });
162
+
56
163
  it('When user unchecks the \'Allow student to resize\' checkbox then the resize buttons on the reading ruler should be displayed in disabled state in Preview tab', () => {
57
164
  cy.log('Switching to Edit Tab')
58
165
  readingRulerPage.steps.switchToEditTab();
59
166
  readingRulerPage.steps.uncheckAllowStudentToResizeCheckbox();
60
167
  cy.log('Switching to Preview Tab')
61
168
  readingRulerPage.steps.switchToPreviewTab();
62
- readingRulerPage.steps.clickOnReadingRulerButton();
63
- readingRulerPage.steps.verifyResizeButtonDisabled();
169
+ readingRulerPage.steps.clickOnReadingRulerButtonInPreviewTab();
170
+ readingRulerPage.steps.verifyResizeButtonNotExistInPreviewTab();
64
171
  });
65
172
 
66
- // Failing due to https://redmine.zeuslearning.com/issues/528044
67
- it('Accessbility of reading ruler when \'Allow student to resize\' checkbox is unchecked', { tags: 'a11y' }, () => {
173
+ it('Accessibility of reading ruler when \'Allow student to resize\' checkbox is unchecked', { tags: 'a11y' }, () => {
68
174
  cy.checkAccessibility(readingRulerPage.readingRuler());
69
175
  });
70
176
 
71
- it('When user checks the \'Visible on landing\' checkbox then switches to Preview tab, reading ruler button should be in selected state and reading ruler should be displayed in the preview tab', () => {
177
+ it('When user checks the \'Visible on landing\' checkbox then switches to Preview tab, \'Hide reading ruler\' button and reading ruler should be displayed in the preview tab', () => {
72
178
  cy.log('Switching to Edit Tab')
73
179
  readingRulerPage.steps.switchToEditTab();
74
180
  readingRulerPage.steps.checkVisibleOnLandingCheckbox();
75
181
  cy.log('Switching to Preview Tab')
76
182
  readingRulerPage.steps.switchToPreviewTab();
77
- readingRulerPage.steps.verifySelectedStateOfReadingRulerButton();
78
- utilities.verifyElementVisibilityState(readingRulerPage.readingRuler(), 'visible');
183
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Hide');
184
+ readingRulerPage.steps.verifyReadingRulerExistInPreviewTab();
79
185
  });
80
186
 
81
- it('When user clicks on the \'Close\' button on the reading ruler then the reading ruler should close and reading ruler button should be in unselected state in the Preview tab', () => {
82
- readingRulerPage.steps.clickOnCloseButtonInReadingRuler();
187
+ it('When user clicks on the \'Close\' button on the reading ruler then the reading ruler should close and \'Show reading ruler\' button should be displayed in the Preview tab', () => {
188
+ readingRulerPage.steps.clickOnCloseButtonInReadingRulerInPreviewTab();
83
189
  utilities.verifyElementVisibilityState(readingRulerPage.readingRuler(), 'notExist');
84
- readingRulerPage.steps.verifyUnselectedStateOfReadingRulerButton();
190
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Show')
85
191
  });
86
192
 
87
- it('When user unchecks the \'Visible on landing\' checkbox then the reading ruler should not be visible and reading ruler button should be in unselected state in the Preview tab', () => {
193
+ it('When user unchecks the \'Visible on landing\' checkbox then the reading ruler should not be visible and \'Show reading ruler\' button should be displayed in the Preview tab', () => {
88
194
  cy.log('Switching to Edit Tab')
89
195
  readingRulerPage.steps.switchToEditTab();
90
196
  readingRulerPage.steps.uncheckVisibleOnLandingCheckbox();
91
197
  cy.log('Switching to Preview Tab')
92
198
  readingRulerPage.steps.switchToPreviewTab();
93
- readingRulerPage.steps.verifyUnselectedStateOfReadingRulerButton();
94
- utilities.verifyElementVisibilityState(readingRulerPage.readingRuler(), 'notExist');
95
- });
96
- });
97
-
98
- describe('Preview Tab contents', () => {
99
- abortEarlySetup();
100
- before(() => {
101
- cy.log('Navigating to \'Reading ruler\' resource tool');
102
- readingRulerPage.steps.navigateToCreateResource('reading ruler');
103
- });
104
-
105
- it('When \'Display button to student\' and \'Allow student to resize\' checkbox are checked and user selects \'Drag handle\' ruler style and when user switches to preview tab, reading ruler button should be displayed in unselected state', () => {
106
- readingRulerPage.steps.verifyDisplayButtonToStudentCheckboxIsChecked();
107
- readingRulerPage.steps.verifyAllowStudentToResizeCheckboxIsChecked();
108
- readingRulerPage.steps.selectRulerStyle('Drag handle');
109
- cy.log('Switching to Preview Tab')
110
- readingRulerPage.steps.switchToPreviewTab();
111
- utilities.verifyElementVisibilityState(readingRulerPage.readingRulerButton(), 'visible');
112
- readingRulerPage.steps.verifyUnselectedStateOfReadingRulerButton();
113
- });
114
-
115
- it('CSS of active and default state of \'ReadingRuler\' button in Preview tab', { tags: 'css' }, () => {
116
- readingRulerPage.steps.hoverOnReadingRulerButton();
117
- utilities.verifyCSS(readingRulerPage.readingRulerButton(), {
118
- 'border': `1px solid ${css.color.activeButtons}`,
119
- 'background-color': css.color.figActiveComponentBg
120
- });
121
- readingRulerPage.steps.hoverAwayFromReadingRulerButton();
122
- utilities.verifyCSS(readingRulerPage.readingRulerButton(), {
123
- 'border': `1px solid ${css.color.secondaryBtnBorder}`,
124
- 'background-color': css.color.defaultBackground
125
- });
126
- });
127
-
128
- it('When user clicks on the reading ruler button, reading ruler should be displayed in Preview Tab and reading ruler button should be in selected state', () => {
129
- readingRulerPage.steps.clickOnReadingRulerButton();
130
- utilities.verifyElementVisibilityState(readingRulerPage.readingRuler(), 'visible');
131
- readingRulerPage.steps.verifySelectedStateOfReadingRulerButton();
132
- });
133
-
134
- it('Drag handle button, resize buttons, and close button should be visible and displayed in enabled state in Preview tab ', () => {
135
- const buttons = [readingRulerPage.dragButton, readingRulerPage.topResizeButton, readingRulerPage.bottomResizeButton, readingRulerPage.closeButton, readingRulerPage.resizeButton]
136
- buttons.forEach(button => {
137
- utilities.verifyElementVisibilityState(button(), 'visible');
138
- });
139
- readingRulerPage.steps.verifyResizeButtonsEnabled();
140
- readingRulerPage.steps.verifyCloseButtonEnabled();
141
- readingRulerPage.steps.verifyDragButtonEnabled();
142
- });
143
-
144
- it('CSS of Drag handle button, resize buttons, and close button in default state', { tags: 'css' }, () => {
145
- const buttons = [readingRulerPage.dragButton, readingRulerPage.topResizeButton, readingRulerPage.bottomResizeButton, readingRulerPage.closeButton, readingRulerPage.resizeButton]
146
- buttons.forEach(button => {
147
- utilities.verifyCSS(button(), {
148
- 'color': css.color.primaryBtn,
149
- 'font-weight': css.fontWeight.medium
150
- });
151
- });
152
- });
153
-
154
- it('CSS of Drag handle button, resize buttons, and close button in hover state', { tags: 'css' }, () => {
155
- const buttons = [readingRulerPage.dragButton, readingRulerPage.topResizeButton, readingRulerPage.bottomResizeButton, readingRulerPage.closeButton, readingRulerPage.resizeButton]
156
- buttons.forEach(button => {
157
- button()
158
- .realHover()
159
- utilities.verifyCSS(button(), {
160
- 'background-color': css.color.activeButtons
161
- });
162
- });
163
- });
164
-
165
- it('When user deselects the reading ruler button then the button should be displayed in unselected state and the reading ruler should not display in Preview tab', () => {
166
- readingRulerPage.steps.clickOnReadingRulerButton();
167
- readingRulerPage.steps.verifyUnselectedStateOfReadingRulerButton();
199
+ readingRulerPage.steps.verifyReadingRulerVisibilityButtonLabelPreviewTab('Show');
168
200
  utilities.verifyElementVisibilityState(readingRulerPage.readingRuler(), 'notExist');
169
201
  });
170
202
  });
@@ -235,23 +267,57 @@ describe('Create Item page - Reading ruler: Preview Tab', () => {
235
267
  cy.log('Navigating to \'Reading ruler\' resource tool');
236
268
  readingRulerPage.steps.navigateToCreateResource('reading ruler');
237
269
  cy.log('Checking visible on landing checkbox');
238
- readingRulerPage.steps.selectRulerStyle('Drag handle');
239
270
  readingRulerPage.steps.checkVisibleOnLandingCheckbox();
240
271
  cy.log('Switching to Preview Tab')
241
272
  readingRulerPage.steps.switchToPreviewTab();
242
273
  });
243
274
 
244
- it('When the default number of lines value is set to 4 by default and user has selected \'Drag handle\' in ruler style section then the height and size of the ruler should be set to 168px and 68px respectively in the preview tab', () => {
245
- readingRulerPage.steps.verifyHeightAndSizeOfReadingRuler(208, 108);
275
+ it('When the default number of lines value is set to 4 by default and \'Line focus\' is selected in ruler style section then the size of the ruler should be appropriate in the preview tab', () => {
276
+ readingRulerPage.steps.verifyDefaultNumberOfLinesInputFieldValue(4);
277
+ readingRulerPage.steps.verifyRulerStyleSelectedState('Line focus');
278
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Line focus', 4);
246
279
  });
247
280
 
248
281
  it('When user changes the value of default number of lines value in the edit tab then the height and size of ruler should also change accordingly in the preview tab', () => {
249
- cy.log('Switching to Edit Tab')
282
+ cy.log('Switching to Edit Tab');
250
283
  readingRulerPage.steps.switchToEditTab();
251
- readingRulerPage.steps.addInputToDefaultNumberOfLinesInputField('5');
252
- cy.log('Switching to Preview Tab')
284
+ readingRulerPage.steps.addInputToDefaultNumberOfLinesInputField(3);
285
+ cy.log('Switching to Preview Tab');
286
+ readingRulerPage.steps.switchToPreviewTab();
287
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Line focus', 3);
288
+ });
289
+
290
+ it('When the default number of lines value is set to 3 and \'Overlay mask\' is selected in ruler style section then the size of the ruler also change accordingly in the preview tab', () => {
291
+ readingRulerPage.steps.switchToEditTab();
292
+ readingRulerPage.steps.verifyDefaultNumberOfLinesInputFieldValue(3);
293
+ readingRulerPage.steps.selectRulerStyle('Overlay mask');
294
+ readingRulerPage.steps.switchToPreviewTab();
295
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Overlay mask', 3);
296
+ });
297
+
298
+ it('When user changes the value of default number of lines value in the edit tab then the size of ruler should also change accordingly in the preview tab', () => {
299
+ cy.log('Switching to Edit Tab');
300
+ readingRulerPage.steps.switchToEditTab();
301
+ readingRulerPage.steps.addInputToDefaultNumberOfLinesInputField(5);
302
+ cy.log('Switching to Preview Tab');
303
+ readingRulerPage.steps.switchToPreviewTab();
304
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Overlay mask', 5);
305
+ });
306
+
307
+ it('When the default number of lines value is set to 5 and user has selected \'Drag handle\' in ruler style section then the size of the ruler also change accordingly in the preview tab', () => {
308
+ readingRulerPage.steps.switchToEditTab();
309
+ readingRulerPage.steps.selectRulerStyle('Drag handle');
310
+ readingRulerPage.steps.switchToPreviewTab();
311
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Drag handle', 5);
312
+ });
313
+
314
+ it('When user changes the value of default number of lines value in the edit tab then the size of ruler should also change accordingly in the preview tab', () => {
315
+ cy.log('Switching to Edit Tab');
316
+ readingRulerPage.steps.switchToEditTab();
317
+ readingRulerPage.steps.addInputToDefaultNumberOfLinesInputField(6);
318
+ cy.log('Switching to Preview Tab');
253
319
  readingRulerPage.steps.switchToPreviewTab();
254
- readingRulerPage.steps.verifyHeightAndSizeOfReadingRuler(230, 130);
320
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Drag handle', 6);
255
321
  });
256
322
  });
257
323
  });
@@ -61,7 +61,7 @@ describe('Preview tab contents for all views', () => {
61
61
  readingRulerPage.steps.verifyReadingRulerExistInPreviewTab();
62
62
  readingRulerPage.steps.verifyReadingRulerOpacityInPreviewTab('0.3');
63
63
  readingRulerPage.steps.verifyReadingRulerColorInPreviewTab(2);
64
- readingRulerPage.steps.verifyHeightAndSizeOfReadingRuler(510, 130);
64
+ readingRulerPage.steps.verifySizeOfReadingRulerInPreviewTab('Line focus', 5);
65
65
  });
66
66
  });
67
67
  });
@@ -1,6 +1,7 @@
1
1
  import { dialogBoxBase } from "../../../pages";
2
2
  import { singleSelectionPage } from "../../../pages/singleSelectionPage";
3
3
  import abortEarlySetup from "../../../support/helpers/abortEarly";
4
+ const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
4
5
 
5
6
  describe('Create Item page - Single Selection: Header section and Saving question', () => {
6
7
  before(() => {
@@ -42,11 +43,25 @@ describe('Create Item page - Single Selection: Header section and Saving questio
42
43
 
43
44
  describe('Validation error messages', () => {
44
45
  dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton();
45
- singleSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
46
- singleSelectionPage.steps.verifyPointsFieldErrorMessage();
47
- singleSelectionPage.steps.verifyOptionsInputFieldErrorMessage(0);
48
- singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
49
- singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
46
+
47
+ it('Validation error messages should be displayed below required input fields', () => {
48
+ singleSelectionPage.steps.verifyQuestionInstructionsErrorMessage();
49
+ singleSelectionPage.steps.verifyPointsFieldErrorMessage();
50
+ singleSelectionPage.steps.verifyOptionsInputFieldErrorMessage(0);
51
+ singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconIsVisible();
52
+ singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorMessage();
53
+ });
54
+
55
+ it('Validation error messages should disappear when required input fields are filled', () => {
56
+ singleSelectionPage.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.');
57
+ singleSelectionPage.steps.addInputToOptionsInputField(options)
58
+ singleSelectionPage.steps.allotPoints(10);
59
+ singleSelectionPage.steps.checkOptionInSpecifyCorrectAnswerSection(0);
60
+ singleSelectionPage.steps.verifyErrorMessageIsNotDisplayed();
61
+ singleSelectionPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
62
+ });
63
+
64
+ singleSelectionPage.tests.verifyCreateItemWrapperContentsA11y();
50
65
  });
51
66
 
52
67
  describe('Saving a question', () => {
@@ -78,6 +78,7 @@ describe('Question Preview: Non Scored', () => {
78
78
  singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleGradingView(2);
79
79
  singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleGradingView(3);
80
80
  singleSelectionPage.steps.verifyCorrectIncorrectBorderNotExists();
81
+ singleSelectionPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
81
82
  cy.log('When the user has attempted the question with correct responses and clicks on \'Check answer\' button, then correct icon should be displayed besides correct response, correct answer border and a label should not be displayed below the question preview')
82
83
  singleSelectionPage.steps.checkAnswer();
83
84
  singleSelectionPage.steps.verifyCorrectIncorrectIconNotVisibleStudentView(0);
@@ -41,22 +41,23 @@ describe('Create item page - Text entry math: Question instructions, Add structu
41
41
  textEntryMathPage.steps.verifyAddStructureTabIsSelected();
42
42
  });
43
43
 
44
- it('In in \'Add structure\' tab, \'Question\' label and input field should be displayed and by default in the question input field, sample text along with two response tokens with text \'Response\' should be present', () => {
44
+ it('In in \'Add structure\' tab, \'Question\' label and input field should be displayed and by default the question input field should be empty', () => {
45
45
  utilities.verifyInnerText(textEntryMathPage.questionLabel(), 'Question');
46
46
  utilities.verifyElementVisibilityState(textEntryMathPage.questionLabel(), 'visible');
47
- utilities.verifyInnerText(textEntryMathPage.questionInputField(), 'This is Dummy 1Response\nclose\nand2Response\nclose\n.');
47
+ utilities.verifyInnerText(textEntryMathPage.questionInputField(), '\n');
48
48
  utilities.verifyElementVisibilityState(textEntryMathPage.questionInputField(), 'visible');
49
- utilities.verifyElementCount(textEntryMathPage.responseToken(), 2);
50
49
  });
51
50
 
52
- it('The response tokens should be displayed with a numeric count along with a close button in the question input field', () => {
51
+ it('When user adds response tokens to the question input field, then the response tokens should be displayed with a numeric count along with a close button in the question input field', () => {
52
+ textEntryMathPage.steps.addResponseToken();
53
+ textEntryMathPage.steps.addResponseToken();
53
54
  textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(0);
54
55
  textEntryMathPage.steps.verifyResponseTokenNumerationAndCloseButton(1);
55
56
  });
56
57
 
57
58
  it('The user should be able to edit text in the question input field', () => {
58
59
  textEntryMathPage.steps.addInputToQuestionInputField('Lorem Ipsum');
59
- utilities.verifyInnerText(textEntryMathPage.questionInputField(), 'This is Dummy 1Response\nclose\nand2Response\nclose\n.Lorem Ipsum');
60
+ utilities.verifyInnerText(textEntryMathPage.questionInputField(), '1Responseclose2Responseclose​​​​​​​Lorem Ipsum');
60
61
  });
61
62
 
62
63
  it('When the user focuses in the question input field, the CKEditor toolbar should be displayed with a \'+Response\' button and when the user clicks on \'+Response\' button, then a response token should be added in the question input field', () => {
@@ -119,9 +120,11 @@ describe('Create item page - Text entry math: Question instructions, Add structu
119
120
  before(() => {
120
121
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
121
122
  cy.barsPreLoaderWait();
123
+ textEntryMathPage.steps.addResponseToken();
124
+ textEntryMathPage.steps.addResponseToken();
122
125
  });
123
126
 
124
- it('By default, for the two response token in question input field, two response accordions \'Response 1\' and \'Response 2\' should be present in collapsed state in the \'Specify correct answer section\'', () => {
127
+ it('For the two response token in question input field, two response accordions \'Response 1\' and \'Response 2\' should be present in collapsed state in the \'Specify correct answer section\'', () => {
125
128
  utilities.verifyElementCount(textEntryMathPage.responseAccordion(), 2);
126
129
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(0);
127
130
  textEntryMathPage.steps.verifyResponseAccordionIsCollapsed(1);
@@ -150,9 +153,11 @@ describe('Create item page - Text entry math: Question instructions, Add structu
150
153
  before(() => {
151
154
  textEntryMathPage.steps.navigateToCreateQuestion('Text Entry Math');
152
155
  cy.barsPreLoaderWait();
156
+ textEntryMathPage.steps.addResponseToken();
157
+ textEntryMathPage.steps.addResponseToken();
153
158
  });
154
159
 
155
- it('By default, for the two response token in question input field, in additional settings accordion, two \'ARIA label for text containers\'input fields should be displayed', () => {
160
+ it('For the two response token in question input field, in additional settings accordion, two \'ARIA label for text containers\'input fields should be displayed', () => {
156
161
  textEntryMathPage.steps.expandAdditionalSettings();
157
162
  utilities.verifyElementCount(textEntryMathPage.textContainersAriaLabelInputField(), 2);
158
163
  });