itemengine-cypress-automation 1.0.119 → 1.0.121
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/editTabBasicSection.js +13 -1
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +2 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.smoke.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingForAllViews.smoke.js +273 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/checkAnswerFunctionalityForAllViews.smoke.js +116 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/previewContentsForAllViews.smoke.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/allOrNothingForAllView.smoke.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +120 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/previewContentsForAllViews.smoke.js +158 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownAndDropdownMenuSection.js +246 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +332 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +409 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/headerSection.js +80 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/studentViewSettings.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/HeaderSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialDifferentWeightsBasic.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/allOrNothingForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +68 -68
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +6 -6
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +3 -289
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -23
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +190 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +284 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingPenaltyScoring.js +52 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/manuallyAndNonScored.js +113 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +234 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +217 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsBasic.js +136 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +169 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +197 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/allOrNothingForAllViews.smoke.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/checkAnswerFunctionalityForAllViews.smoke.js +115 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +142 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/previewContentsForAllViews.smoke.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +39 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +497 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +503 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +233 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +291 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +332 -0
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +2 -12
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +9 -8
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -2
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +5 -2
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +334 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +419 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/checkAnswerFunctionalityForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +166 -0
- package/cypress/e2e/ILC/UploadResponse/editTabScoringSection.js +51 -0
- package/cypress/e2e/ILC/UploadResponse/gradingViewAndCorrectAnswerViewContents.smoke.js +99 -0
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +71 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +155 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseHeaderSection.js +66 -0
- package/cypress/e2e/migration/migration.js +6 -5
- package/cypress/e2e/migration/migration2.js +4 -3
- package/cypress/e2e/migration/migration3.js +4 -3
- package/cypress/e2e/migration/migration4.js +4 -3
- package/cypress/e2e/migration/migration5.js +4 -3
- package/cypress/fixtures/theme/ilc.json +3 -1
- package/cypress/pages/audioResponsePage.js +2 -1
- package/cypress/pages/components/additionalSettingsPanel.js +27 -0
- package/cypress/pages/components/autoScoredPreviewBase.js +1 -1
- package/cypress/pages/components/autoScoredScoringSection.js +1 -1
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +1 -1
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +2 -2
- package/cypress/pages/components/autoScoredStudentViewSettings.js +8 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +5 -5
- package/cypress/pages/components/createQuestionBasePage.js +8 -2
- package/cypress/pages/components/essayResponseCommonComponents.js +6 -0
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +13 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +40 -0
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +422 -314
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +438 -710
- package/cypress/pages/components/{figOverImageCanvasComponent.js → imageCanvasComponent.js} +274 -272
- package/cypress/pages/components/index.js +3 -3
- package/cypress/pages/components/maximumRecorderLengthComponent.js +55 -11
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +49 -23
- package/cypress/pages/components/scoringSectionBase.js +1 -1
- package/cypress/pages/createItemPage.js +67 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +172 -711
- package/cypress/pages/fillInTheGapsDropdownPage.js +75 -72
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +4 -4
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +109 -273
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +49 -291
- package/cypress/pages/fillInTheGapsTextPage.js +52 -199
- package/cypress/pages/index.js +5 -5
- package/cypress/pages/multipleSelectionPage.js +1 -0
- package/cypress/pages/shortTextResponsePage.js +575 -33
- package/cypress/pages/singleSelectionGridPage.js +1 -2
- package/cypress/pages/singleSelectionPage.js +5 -6
- package/cypress/pages/textEntryMathPage.js +46 -22
- package/cypress/pages/textEntryMathWithImagePage.js +212 -0
- package/cypress/pages/uploadResponsePage.js +74 -21
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +73 -2
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +1 -0
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +49 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +0 -482
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +0 -412
- package/cypress/pages/components/figOverImageCommonComponent.js +0 -1113
- package/cypress/pages/dragAndDropIntoCategoriesAllOrNothingScoring.js +0 -1155
- package/cypress/pages/dragAndDropIntoCategoriesCellsScoring.js +0 -1561
- package/cypress/pages/dragAndDropIntoCategoriesResponseScoring.js +0 -1396
- package/cypress/pages/fillInTheGapsScoring.js +0 -5872
- package/cypress/pages/fillInTheGapsSetCorrectAnswerSection.js +0 -260
@@ -15,159 +15,7 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
15
15
|
cy.barsPreLoaderWait();
|
16
16
|
});
|
17
17
|
|
18
|
-
|
19
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.setLimitLabel(), 'Set limit');
|
20
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.setLimitLabel(), 'visible');
|
21
|
-
});
|
22
|
-
|
23
|
-
it('\'Character\' and \'None\' labels and radio buttons should be displayed and by default \'Character\' should be selected', () => {
|
24
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.characterLabel(), 'Character');
|
25
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.characterLabel(), 'visible');
|
26
|
-
fillInTheGapsOverImageTextPage.steps.verifyCharacterRadioButtonSelected();
|
27
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.noneLabel(), 'None');
|
28
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.noneLabel(), 'visible');
|
29
|
-
fillInTheGapsOverImageTextPage.steps.verifyNoneRadioButtonNotSelected();
|
30
|
-
});
|
31
|
-
|
32
|
-
it('\'Minimum character limit\' and \'Maximum character limit\' labels should be displayed', () => {
|
33
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.minimumCharacterLimitLabel(), 'Minimum character limit');
|
34
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.minimumCharacterLimitLabel(), 'visible');
|
35
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.maximumCharacterLimitLabel(), 'Maximum character limit');
|
36
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.maximumCharacterLimitLabel(), 'visible');
|
37
|
-
});
|
38
|
-
|
39
|
-
it('\'Minimum character limit\' and \'Maximum character limit\' input fields should be displayed and have 0 and 50 value by default', () => {
|
40
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.minimumCharacterLimitInputField(), 'visible');
|
41
|
-
fillInTheGapsOverImageTextPage.steps.verifyMinimumCharacterLimitInputField(0);
|
42
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.maximumCharacterLimitInputField(), 'visible');
|
43
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInputField(50);
|
44
|
-
});
|
45
|
-
|
46
|
-
it('User should be able to update values in both the input fields', () => {
|
47
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(10);
|
48
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(40);
|
49
|
-
});
|
50
|
-
|
51
|
-
it('When the user clears the minimum character limit input field and focuses out of it, then error message \'Error: Minimum character limit is required\' should be displayed below the input field', () => {
|
52
|
-
fillInTheGapsOverImageTextPage.steps.clearAndFocusOutOfMinimumCharacterLimitInputField();
|
53
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Minimum character limit is required.');
|
54
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'visible');
|
55
|
-
});
|
56
|
-
|
57
|
-
fillInTheGapsOverImageTextPage.tests.verifyErrorMessageCSSAndA11y();
|
58
|
-
|
59
|
-
it('When the user enters value in minimum character limit input field then the error message should disappear', () => {
|
60
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(0);
|
61
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
62
|
-
});
|
63
|
-
|
64
|
-
it('When the user clears the maximum character limit input field and focuses out of it, then error message \'Error: Maximum character limit is required.\' should be displayed below the input field', () => {
|
65
|
-
fillInTheGapsOverImageTextPage.steps.clearAndFocusOutOfMaximumCharacterLimitInputField();
|
66
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Maximum character limit is required.');
|
67
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'visible');
|
68
|
-
});
|
69
|
-
|
70
|
-
it('When the user enters value in maximum character limit input field then the error message should disappear', () => {
|
71
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(40);
|
72
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
73
|
-
});
|
74
|
-
|
75
|
-
it('When the user sets minimum limit input field value greater than maximum limit input field value then error message \'Error: Minimum limit must be less than or equal to maximum limit.\' and \'Error: Maximum limit must be greater than or equal to minimum limit.\'should be displayed below the minimum and maximum input field respectively', () => {
|
76
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(45);
|
77
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumLimitErrorMessage();
|
78
|
-
fillInTheGapsOverImageTextPage.steps.verifyMinimumLimitErrorMessage();
|
79
|
-
});
|
80
|
-
|
81
|
-
fillInTheGapsOverImageTextPage.tests.verifyErrorMessageCSSAndA11y();
|
82
|
-
|
83
|
-
it('When the user sets minimum limit input field value less than or equal to maximum limit input field value then error message should disappear', () => {
|
84
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(30);
|
85
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
86
|
-
});
|
87
|
-
|
88
|
-
it('When the user sets maximum limit input field value less than minimum limit input field value then error message \'Error: Minimum limit must be less than or equal to maximum limit.\' and \'Error: Maximum limit must be greater than or equal to minimum limit.\'should be displayed below the minimum and maximum input field respectively', () => {
|
89
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(26);
|
90
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumLimitErrorMessage();
|
91
|
-
fillInTheGapsOverImageTextPage.steps.verifyMinimumLimitErrorMessage();
|
92
|
-
});
|
93
|
-
|
94
|
-
it('When the user sets maximum limit input field value greater than or equal to minimum limit input field value then error message should disappear', () => {
|
95
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(45);
|
96
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
97
|
-
});
|
98
|
-
|
99
|
-
it('CSS of \'Set character limit\' sections', { tags: 'css' }, () => {
|
100
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.setLimitLabel(), {
|
101
|
-
'color': css.color.labels,
|
102
|
-
'font-size': css.fontSize.normal,
|
103
|
-
'font-weight': css.fontWeight.semibold
|
104
|
-
});
|
105
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.characterLabel(), {
|
106
|
-
'color': css.color.labelText,
|
107
|
-
'font-size': css.fontSize.normal,
|
108
|
-
'font-weight': css.fontWeight.regular
|
109
|
-
});
|
110
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.characterLabel(), {
|
111
|
-
'color': css.color.labelText,
|
112
|
-
'font-size': css.fontSize.normal,
|
113
|
-
'font-weight': css.fontWeight.regular
|
114
|
-
});
|
115
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.noneLabel(), {
|
116
|
-
'color': css.color.labelText,
|
117
|
-
'font-size': css.fontSize.normal,
|
118
|
-
'font-weight': css.fontWeight.regular
|
119
|
-
});
|
120
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.minimumCharacterLimitLabel(), {
|
121
|
-
'color': css.color.labels,
|
122
|
-
'font-size': css.fontSize.normal,
|
123
|
-
'font-weight': css.fontWeight.semibold
|
124
|
-
});
|
125
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.minimumCharacterLimitLabel(), {
|
126
|
-
'color': css.color.labels,
|
127
|
-
'font-size': css.fontSize.normal,
|
128
|
-
'font-weight': css.fontWeight.semibold
|
129
|
-
});
|
130
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.minimumCharacterLimitInputField(), {
|
131
|
-
'color': css.color.text,
|
132
|
-
'font-size': css.fontSize.default,
|
133
|
-
'font-weight': css.fontWeight.regular
|
134
|
-
});
|
135
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.maximumCharacterLimitInputField(), {
|
136
|
-
'color': css.color.text,
|
137
|
-
'font-size': css.fontSize.default,
|
138
|
-
'font-weight': css.fontWeight.regular
|
139
|
-
});
|
140
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.characterRadioButton().parent().find('svg'), {
|
141
|
-
'fill': css.color.activeButtons
|
142
|
-
});
|
143
|
-
});
|
144
|
-
|
145
|
-
it('Accessibility of \'Set limit\' section', { tags: 'a11y' }, () => {
|
146
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.setLimitLabel().parents('[class*="SetLimitWrapper"]'));
|
147
|
-
});
|
148
|
-
|
149
|
-
it('When user enters zero in maximum limit input field, then error message \'Error: Maximum limit must be greater than 0.\' should be displayed', () => {
|
150
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(0);
|
151
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.errorMessage(), 'Error: Maximum limit must be greater than 0.');
|
152
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.errorMessage(), 'visible');
|
153
|
-
});
|
154
|
-
|
155
|
-
it('When user enters limit more than zero in maximum limit input field, then error message should disappear', () => {
|
156
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(50);
|
157
|
-
fillInTheGapsOverImageTextPage.steps.verifyErrorMessageIsNotDisplayed();
|
158
|
-
});
|
159
|
-
|
160
|
-
it('When user should not be able to add limit more than 50 inside minimum and maximum limit input field', () => {
|
161
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(60);
|
162
|
-
fillInTheGapsOverImageTextPage.steps.verifyMinimumLimit(6);
|
163
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(60);
|
164
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumLimit(6);
|
165
|
-
});
|
166
|
-
|
167
|
-
it('When the user selects \'None\' radio button then the maximum and minimum character limit labels and input field should not be displayed', () => {
|
168
|
-
fillInTheGapsOverImageTextPage.steps.selectNoneRadioButton();
|
169
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.minMaxLabelAndInputFieldWrapper(), 'notExist');
|
170
|
-
});
|
18
|
+
fillInTheGapsOverImageTextPage.tests.verifySetLimitSectionContents();
|
171
19
|
});
|
172
20
|
|
173
21
|
// TODO after https://redmine.zeuslearning.com/issues/556897 gets resolved
|
@@ -181,71 +29,7 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
181
29
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(60);
|
182
30
|
});
|
183
31
|
|
184
|
-
|
185
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInputField(50);
|
186
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimit(0, 50);
|
187
|
-
});
|
188
|
-
|
189
|
-
it('When the user updates the maximum character limit input field value then maximum character limit should update in the specify correct answer section', () => {
|
190
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(10);
|
191
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimit(0, 10);
|
192
|
-
});
|
193
|
-
|
194
|
-
it('User should able to enter characters in the answer input field', () => {
|
195
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
|
196
|
-
});
|
197
|
-
|
198
|
-
it('When the user reaches the character limit, then the warning message \'Maximum 10 characters have been entered\' should be displayed', () => {
|
199
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'pots' }]);
|
200
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: 'Flowerpots' }])
|
201
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageExist('Maximum 10 words have been entered.');
|
202
|
-
});
|
203
|
-
|
204
|
-
it('CSS of error message', { tags: 'css' }, () => {
|
205
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessage(), {
|
206
|
-
'color': css.color.warningMessage,
|
207
|
-
'font-size': css.fontSize.normal,
|
208
|
-
'font-weight': css.fontWeight.regular
|
209
|
-
});
|
210
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer().find('svg'), {
|
211
|
-
'color': css.color.warningMessage,
|
212
|
-
});
|
213
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), {
|
214
|
-
'border': `1px solid ${css.color.warningContainerBorder}`
|
215
|
-
});
|
216
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), {
|
217
|
-
'background-color': css.color.warningContainerBackground
|
218
|
-
});
|
219
|
-
});
|
220
|
-
|
221
|
-
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
222
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.limitReachedWarningMessage());
|
223
|
-
});
|
224
|
-
|
225
|
-
it('When the user removes/deletes some characters to make the number of characters less than the set maximum limit, the warning message should disappear', () => {
|
226
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: '{backspace}' }]);
|
227
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: 'Flowerpot' }])
|
228
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageNotExist();
|
229
|
-
});
|
230
|
-
|
231
|
-
it('When the user updates minimum character limit and enters character less than the minimum character limit value set and focus out of response field, then the warning message \'Minimum 6 characters are required\' should be displayed in specify correct answer', () => {
|
232
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(6);
|
233
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Air' }]);
|
234
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageExist('Minimum 6 words are required.');
|
235
|
-
});
|
236
|
-
|
237
|
-
it('When the user enters the character greater than the minimum character limit value set by the user, then the warning message should disappear', () => {
|
238
|
-
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Airwater' }]);
|
239
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInResponseAccordionAnswerInputField([{ responseIndex: 0, responseText: 'Airwater' }])
|
240
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageNotExist();
|
241
|
-
});
|
242
|
-
|
243
|
-
it('When the user selects \'None\' radio button then maximum limit should not be displayed in the preview tab and when user types anything in the response field then error message should not be displayed', () => {
|
244
|
-
fillInTheGapsOverImageTextPage.steps.selectNoneRadioButton();
|
245
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitNotExistInPreviewTab(0);
|
246
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'water');
|
247
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageNotExist();
|
248
|
-
});
|
32
|
+
fillInTheGapsOverImageTextPage.tests.verifySetLimitSectionEditTabFunctionality();
|
249
33
|
});
|
250
34
|
|
251
35
|
describe('fill in the gaps over image with text: Set limit section : Preview tab functionality', () => {
|
@@ -256,79 +40,9 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
256
40
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
257
41
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
258
42
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(60);
|
259
|
-
});
|
260
|
-
|
261
|
-
it('When maximum character limit input field value is 50 then maximum character limit should be 50 in the preview tab', () => {
|
262
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInputField(50);
|
263
43
|
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
264
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 50);
|
265
44
|
});
|
266
45
|
|
267
|
-
|
268
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
269
|
-
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(10);
|
270
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
271
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 10);
|
272
|
-
});
|
273
|
-
|
274
|
-
it('User should able to enter characters in the response field', () => {
|
275
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Flower');
|
276
|
-
});
|
277
|
-
|
278
|
-
it('When the user reaches the character limit, then the warning message \'Maximum 10 characters have been entered\' should be displayed', () => {
|
279
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'pots');
|
280
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flowerpots' }])
|
281
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageExist('Maximum 10 words have been entered.');
|
282
|
-
});
|
283
|
-
|
284
|
-
it('CSS of error message', { tags: 'css' }, () => {
|
285
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessage(), {
|
286
|
-
'color': css.color.warningMessage,
|
287
|
-
'font-size': css.fontSize.normal,
|
288
|
-
'font-weight': css.fontWeight.regular
|
289
|
-
});
|
290
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer().find('svg'), {
|
291
|
-
'color': css.color.warningMessage,
|
292
|
-
});
|
293
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), {
|
294
|
-
'border': `1px solid ${css.color.warningContainerBorder}`
|
295
|
-
});
|
296
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), {
|
297
|
-
'background-color': css.color.warningContainerBackground
|
298
|
-
});
|
299
|
-
});
|
300
|
-
|
301
|
-
it('Accessibility of error message', { tags: 'a11y' }, () => {
|
302
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.limitReachedWarningMessage());
|
303
|
-
});
|
304
|
-
|
305
|
-
it('When the user removes/deletes some characters to make the number of characters less than the set maximum limit, the warning message should disappear', () => {
|
306
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, '{backspace}');
|
307
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flowerpot' }])
|
308
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageNotExist();
|
309
|
-
});
|
310
|
-
|
311
|
-
it('When the user updates minimum character limit in edit tab and enters character less than the minimum character limit value set and focus out of response field, then the warning message \'Minimum 6 characters are required\' should be displayed in preview tab', () => {
|
312
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
313
|
-
fillInTheGapsOverImageTextPage.steps.setMinimumLimit(6);
|
314
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
315
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Air');
|
316
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageExist('Minimum 6 words are required.');
|
317
|
-
});
|
318
|
-
|
319
|
-
it('When the user enters the character greater than the minimum character limit value set by the user, then the warning message should disappear', () => {
|
320
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'water');
|
321
|
-
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Airwater' }])
|
322
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageNotExist();
|
323
|
-
});
|
324
|
-
|
325
|
-
it('When the user selects \'None\' radio button then maximum limit should not be displayed in the preview tab and when user types anything in the response field then error message should not be displayed', () => {
|
326
|
-
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
327
|
-
fillInTheGapsOverImageTextPage.steps.selectNoneRadioButton();
|
328
|
-
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
329
|
-
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitNotExistInPreviewTab(0);
|
330
|
-
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'water');
|
331
|
-
fillInTheGapsOverImageTextPage.steps.verifyLimitReachedWarningMessageNotExist();
|
332
|
-
});
|
46
|
+
fillInTheGapsOverImageTextPage.tests.verifySetLimitSectionPreviewTabFunctionality();
|
333
47
|
});
|
334
48
|
});
|
@@ -213,7 +213,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
213
213
|
cy.barsPreLoaderWait();
|
214
214
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
215
215
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
216
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
216
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
|
217
217
|
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
218
218
|
});
|
219
219
|
|
@@ -14,7 +14,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
14
14
|
cy.barsPreLoaderWait();
|
15
15
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
16
16
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
17
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
17
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
|
18
18
|
});
|
19
19
|
|
20
20
|
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('fill in the gaps over image with text');
|
@@ -30,7 +30,7 @@ describe('Create Item page - Fill in the gaps over image - text: Specify correct
|
|
30
30
|
cy.barsPreLoaderWait();
|
31
31
|
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
32
32
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
33
|
-
fillInTheGapsOverImageTextPage.steps.insertResponseArea(
|
33
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(10);
|
34
34
|
});
|
35
35
|
|
36
36
|
fillInTheGapsOverImageTextPage.tests.verifyAutoScoredAddAlternativeAnswerButtonAndValidation('fill in the gaps over image text');
|
@@ -89,30 +89,9 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
89
89
|
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
90
90
|
});
|
91
91
|
|
92
|
-
|
93
|
-
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerLabel(), 'Allow student to check answer');
|
94
|
-
fillInTheGapsOverImageTextPage.steps.verifyAllowStudentsToCheckAnswerCheckboxUnchecked();
|
95
|
-
});
|
96
|
-
|
97
|
-
it('CSS of \'Allow student to check answer\' checkbox and label - unchecked state', { tags: 'css' }, () => {
|
98
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerLabel(), {
|
99
|
-
'color': css.color.labelText,
|
100
|
-
'font-size': css.fontSize.normal,
|
101
|
-
'font-weight': css.fontWeight.regular
|
102
|
-
});
|
103
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerCheckbox().parent().find('svg'), {
|
104
|
-
'fill': css.color.uncheckedCheckbox
|
105
|
-
});
|
106
|
-
});
|
92
|
+
fillInTheGapsOverImageTextPage.tests.verifyAllowStudentsToCheckAnswerLabelAndCheckboxCSS();
|
107
93
|
|
108
|
-
|
109
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.allowStudentToCheckAnswerCheckbox().parents('.student-view-settings-container'));
|
110
|
-
});
|
111
|
-
|
112
|
-
it('When the user checks the \'Allow student to check answer\' checkbox, then \'Maximum check answer attempts\' dropdown should be displayed', () => {
|
113
|
-
fillInTheGapsOverImageTextPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
114
|
-
utilities.verifyElementVisibilityState(fillInTheGapsOverImageTextPage.maximumCheckAnswerAttemptsDropdown(), 'visible');
|
115
|
-
});
|
94
|
+
fillInTheGapsOverImageTextPage.tests.verifyMaximumAttemptsDropdownDisplayedWhenAllowStudentsToCheckAnswerIsChecked();
|
116
95
|
|
117
96
|
fillInTheGapsOverImageTextPage.tests.verifyMaxCheckAnswerAttemptsDropdown();
|
118
97
|
|
@@ -0,0 +1,191 @@
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
const css = Cypress.env('css');
|
4
|
+
|
5
|
+
describe('Create item page - Fill in the gaps with text: All or nothing with alternative answers', () => {
|
6
|
+
before(() => {
|
7
|
+
cy.loginAs('admin');
|
8
|
+
});
|
9
|
+
|
10
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
11
|
+
abortEarlySetup();
|
12
|
+
before(() => {
|
13
|
+
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
14
|
+
cy.barsPreLoaderWait();
|
15
|
+
fillInTheGapsTextPage.steps.addResponseAreaInQuestionField();
|
16
|
+
fillInTheGapsTextPage.steps.allotPoints(10);
|
17
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
18
|
+
fillInTheGapsTextPage.steps.addAlternativeAnswerAccordion(1);
|
19
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Petals' }, { responseIndex: 1, responseText: 'Leaves' }, { responseIndex: 2, responseText: 'Stem' }]);
|
20
|
+
fillInTheGapsTextPage.steps.allotPoints(20);
|
21
|
+
fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
22
|
+
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
23
|
+
});
|
24
|
+
|
25
|
+
it('When the user selects \'Grading\' view without attempting the question, response area numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective response area numeration', () => {
|
26
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
27
|
+
fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
|
28
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than overall points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
32
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
33
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
34
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(10, 20);
|
35
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
36
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
37
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
38
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
39
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
40
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
41
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
42
|
+
cy.log('When the user has attempted the question with responses from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
43
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
44
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
45
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
46
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
47
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
48
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
49
|
+
});
|
50
|
+
|
51
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
52
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
53
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Petals' }, { responseIndex: 1, responseText: 'Leaves' }, { responseIndex: 2, responseText: 'Stem' }]);
|
54
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(20, 20);
|
55
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
56
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
57
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
58
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
59
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
60
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
61
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
62
|
+
cy.log('When the user has attempted the question with responses from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
63
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
64
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
65
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
66
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
67
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
68
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with response area numeration should be displayed', () => {
|
72
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
73
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
74
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 20);
|
75
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
76
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
77
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
78
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
79
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
80
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
81
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
82
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
83
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
84
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
85
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
86
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
87
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
88
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
89
|
+
});
|
90
|
+
|
91
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with response area numeration should be displayed', () => {
|
92
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
93
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Petals' }]);
|
94
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 20);
|
95
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
96
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
97
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
98
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
99
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
100
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
101
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
102
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
103
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
104
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
105
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
106
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
107
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
108
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
109
|
+
});
|
110
|
+
|
111
|
+
it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion and no icon should be displayed for unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with response area numeration should be displayed', () => {
|
112
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
113
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
114
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 20);
|
115
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
116
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
117
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
118
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
119
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
120
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
121
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
122
|
+
cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion and no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
123
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
124
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(0);
|
125
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
126
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
127
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
128
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be displayed besides alternative accordion responses, incorrect icon should be correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with response area numeration should be displayed', () => {
|
132
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
133
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaves' }]);
|
134
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 20);
|
135
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
136
|
+
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
|
137
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
138
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
139
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
140
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
141
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
142
|
+
cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
143
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
144
|
+
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
|
145
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
146
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
147
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
148
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
149
|
+
});
|
150
|
+
|
151
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, correct icon should be besides the common response, no icon should be displayed for unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with response area numeration should be displayed', () => {
|
152
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
153
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
154
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 20);
|
155
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
156
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
157
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
158
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
159
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
160
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
161
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
162
|
+
cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
163
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
164
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
165
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
166
|
+
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
167
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
168
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
169
|
+
});
|
170
|
+
|
171
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with response area numeration should be displayed', () => {
|
172
|
+
fillInTheGapsTextPage.steps.resetQuestionPreview();
|
173
|
+
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Roots' }]);
|
174
|
+
fillInTheGapsTextPage.steps.verifyPreviewScore(0, 20);
|
175
|
+
fillInTheGapsTextPage.steps.switchToGradingView();
|
176
|
+
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
|
177
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
178
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
179
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
180
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
181
|
+
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
182
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
183
|
+
fillInTheGapsTextPage.steps.checkAnswer();
|
184
|
+
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(0);
|
185
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
186
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
187
|
+
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
188
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionNotExists();
|
189
|
+
});
|
190
|
+
});
|
191
|
+
});
|