itemengine-cypress-automation 1.0.72 → 1.0.73
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponse/{audioResponseMinimalPreviewSection.js → audioResponseMinimalPreviewSection.smoke.js} +263 -254
- package/cypress/e2e/ILC/AudioResponse/{audioResponseStandardPreviewSection.js → audioResponseStandardPreviewSection.smoke.js} +100 -97
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.smoke.js +121 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachCell.js → groupedOptionsPartialScoreForEachCell.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{groupedOptionsPartialScoreForEachResponse.js → groupedOptionsPartialScoreForEachResponse.smoke.js} +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.smoke.js +164 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/{standardTotalScoreDividedBetweenResponse.js → standardTotalScoreDividedBetweenResponse.smoke.js} +21 -18
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +753 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.smoke.js +943 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponseCustomizeFormattingOptions1.js → essayResponseCustomizeFormattingOptions1.smoke.js} +113 -110
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.smoke.js +581 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.smoke.js +111 -0
- package/cypress/e2e/ILC/EssayResponse/{essayResponsePreviewContentsForAllViews.js → essayResponsePreviewContentsForAllViews.smoke.js} +6 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.smoke.js +81 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/{fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.js → fillInTheGapsDragAndDropGroupedOptionsAllOrNothingScoring.smoke.js} +25 -22
- package/cypress/e2e/ILC/FillInTheGapsDropdown/{fillInTheGapsDropdownAllOrNothingScoring.js → fillInTheGapsDropdownAllOrNothingScoring.smoke.js} +16 -14
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAddResponseContainer.smoke.js} +80 -74
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.smoke.js +361 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.smoke.js +171 -0
- package/cypress/e2e/ILC/{fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.js → FillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextAllOrNothingScoring.js → fillInTheGapsOverImageTextAllOrNothingScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextCheckAnswerForAllViews.js → fillInTheGapsOverImageTextCheckAnswerForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.smoke.js +137 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.smoke.js +146 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewContentsForAllViews.js → fillInTheGapsOverImageTextPreviewContentsForAllViews.smoke.js} +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextPreviewTab.js → fillInTheGapsOverImageTextPreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/{fillInTheGapsOverImageTextShowCorrectAnswerForAllView.js → fillInTheGapsOverImageTextShowCorrectAnswerForAllView.smoke.js} +6 -4
- package/cypress/e2e/ILC/FillInTheGapsText/{fillInTheGapsTextAutoScoredScoring.js → fillInTheGapsTextAutoScoredScoring.smoke.js} +12 -9
- package/cypress/e2e/ILC/Highlight/HighlightScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.smoke.js +462 -0
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.smoke.js +148 -0
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.smoke.js +185 -0
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.smoke.js +138 -0
- package/cypress/e2e/ILC/HighlightImage/{highlightImagePreviewTab.js → highlightImagePreviewTab.smoke.js} +1 -1
- package/cypress/e2e/ILC/HighlightImage/{highlightImageToolsFunctionalityPreviewTab.js → highlightImageToolsFunctionalityPreviewTab.smoke.js} +4 -4
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.smoke.js +122 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingAlternateAnswer.js → listMatchingAlternateAnswer.smoke.js} +47 -43
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.smoke.js +211 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.smoke.js +254 -0
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.smoke.js +191 -0
- package/cypress/e2e/ILC/ListOrdering/ListOrderingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +34 -32
- package/cypress/e2e/ILC/ListSorting/ListSortingScoring/{allOrNothingScoring.js → allOrNothingScoring.smoke.js} +41 -38
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.smoke.js +269 -0
- package/cypress/e2e/ILC/MultipleSelectionGrid/{multipleSelectionGridAutoScoredScoring.js → multipleSelectionGridAutoScoredScoring.smoke.js} +36 -34
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.smoke.js +407 -0
- package/cypress/e2e/ILC/SingleSelectionGrid/{singleSelectionGridAutoScoredScoring.js → singleSelectionGridAutoScoredScoring.smoke.js} +32 -29
- package/cypress/e2e/ILC/UploadResponse/{uploadResponsePreview.js → uploadResponsePreview.smoke.js} +64 -59
- package/cypress/e2e/ILC/VideoResponse/{videoResponsePreviewTab.js → videoResponsePreviewTab.smoke.js} +290 -281
- package/cypress/pages/components/additionalSettingsPanel.js +0 -27
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +321 -0
- package/cypress/pages/components/createQuestionBasePage.js +1 -7
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -6
- package/cypress/pages/components/fillInTheGapsCommonComponents.js +0 -13
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/mcqAdditionalSettingsBase.js +0 -10
- package/cypress/pages/components/scoringSectionBase.js +3 -2
- package/cypress/pages/createItemPage.js +3 -79
- package/cypress/pages/dialogBoxBase.js +8 -23
- package/cypress/pages/index.js +1 -4
- package/cypress/pages/itemPreviewSettingsPage.js +446 -0
- package/cypress/pages/multipleSelectionPage.js +113 -64
- package/cypress/pages/selectQuestionResourceToolPage.js +0 -5
- package/cypress/pages/shortTextResponsePage.js +0 -6
- package/cypress/pages/singleSelectionPage.js +0 -1
- package/package.json +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/groupedOptionsAllOrNothing.js +0 -116
- package/cypress/e2e/ILC/DragAndDropIntoCategories/dragAndDropIntoCategoriesScoring/standardAllOrNothing.js +0 -160
- package/cypress/e2e/ILC/EssayResponse/essayResponseCreateCustomCategory.js +0 -932
- package/cypress/e2e/ILC/EssayResponse/essayResponseEquationEditor.js +0 -572
- package/cypress/e2e/ILC/EssayResponse/essayResponseGradingViewAndCorrectAnswerViewContents.js +0 -106
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropGroupedEditTab.js +0 -76
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/FillInTheGapsOverImageText/fillInTheGapsOverImageTextEditTabBasicSection.js +0 -133
- package/cypress/e2e/ILC/Highlight/HighlightScoring/highlightBasicScoringForTextSelectionTypes.js +0 -457
- package/cypress/e2e/ILC/Highlight/highlightColorLibraryFlyout.js +0 -143
- package/cypress/e2e/ILC/Highlight/highlightQuestionInstructionsAndQuestion.js +0 -178
- package/cypress/e2e/ILC/HighlightImage/highlightImageEditTabBasic.js +0 -125
- package/cypress/e2e/ILC/ListMatching/ListMatchingScoring/groupedOptionsAllOrNothingScoring.js +0 -117
- package/cypress/e2e/ILC/ListMatching/listMatchingGroupedOptionsSection.js +0 -207
- package/cypress/e2e/ILC/ListMatching/listMatchingQuestionInstructionsAndStemsSection.js +0 -246
- package/cypress/e2e/ILC/ListMatching/listMatchingStandardOptionsSetCorrectAnswerCheckboxesPreviewTab.js +0 -185
- package/cypress/e2e/ILC/ListSorting/listSortingAdditionalSettings.js +0 -820
- package/cypress/e2e/ILC/ListSorting/listSortingAutoScoredScoring.js +0 -936
- package/cypress/e2e/ILC/ListSorting/listSortingSetCorrectAnswerCheckboxes.js +0 -263
- package/cypress/e2e/ILC/ShortTextResponse/shortTextResponseAutoScoredScoring.js +0 -402
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownAllOrNothingScoring.js +0 -356
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownEditAriaLabelCheckbox.js +0 -134
- package/cypress/e2e/ILC/fillInTheGapsOverImageDropdown/fillInTheGapsOverImageDropdownImageProperties.js +0 -156
@@ -1,402 +0,0 @@
|
|
1
|
-
import { shortTextResponsePage } from "../../../pages";
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
-
const css = Cypress.env('css');
|
4
|
-
|
5
|
-
describe('Create Item page - Short text response: Scoring Section', () => {
|
6
|
-
before(() => {
|
7
|
-
cy.loginAs('admin');
|
8
|
-
});
|
9
|
-
|
10
|
-
describe('Show correct answer', () => {
|
11
|
-
abortEarlySetup();
|
12
|
-
before(() => {
|
13
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
14
|
-
});
|
15
|
-
|
16
|
-
shortTextResponsePage.tests.verifyShowCorrectAnswerAndPointsInPreviewTabWhenNoCorrectAnswerIsSet();
|
17
|
-
|
18
|
-
it('When the user has set correct answer response and alloted points \'Show correct answer\' checkbox should be displayed and it should be unchecked by default and points for the question should be displayed beside it', () => {
|
19
|
-
shortTextResponsePage.steps.switchToEditTab();
|
20
|
-
shortTextResponsePage.setCorrectAnswerResponseField()
|
21
|
-
.type('Response');
|
22
|
-
shortTextResponsePage.steps.allotPoints(20);
|
23
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
24
|
-
shortTextResponsePage.steps.uncheckShowCorrectAnswerCheckbox();
|
25
|
-
shortTextResponsePage.previewScoreLabel()
|
26
|
-
.verifyInnerText('Score:');
|
27
|
-
cy.log('Checking total points displayed')
|
28
|
-
shortTextResponsePage.previewScoreText()
|
29
|
-
.verifyInnerText('0/20');
|
30
|
-
});
|
31
|
-
|
32
|
-
it('When the user attempts question in preview tab and switches to edit tab, then on re-switching to the preview tab users response should not persist', () => {
|
33
|
-
cy.log('Attempting the question in preview tab to verify')
|
34
|
-
shortTextResponsePage.previewTabResponseField()
|
35
|
-
.type('Response')
|
36
|
-
.should('have.value', 'Response');
|
37
|
-
cy.log('Re-switching to Preview tab and checking response field')
|
38
|
-
shortTextResponsePage.steps.switchToEditTab();
|
39
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
40
|
-
shortTextResponsePage.previewTabResponseField()
|
41
|
-
.should('have.value', '');
|
42
|
-
});
|
43
|
-
|
44
|
-
it('When the user selects \'Show correct answer\' checkbox without attempting the question, correct/Incorrect answer label and border should not be displayed, correct answer container along with correct response should be displayed below the question field', () => {
|
45
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
46
|
-
shortTextResponsePage.correctIcon()
|
47
|
-
.should('not.exist');
|
48
|
-
shortTextResponsePage.incorrectIcon()
|
49
|
-
.should('not.exist');
|
50
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
51
|
-
.should('not.exist');
|
52
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
53
|
-
.should('not.exist');
|
54
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
55
|
-
.should('not.exist');
|
56
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
57
|
-
.should('be.visible');
|
58
|
-
shortTextResponsePage.previewTabCorrectAnswerLabel()
|
59
|
-
.verifyInnerText('Correct answer:');
|
60
|
-
shortTextResponsePage.previewTabCorrectAnswerResponse()
|
61
|
-
.verifyInnerText('Response');
|
62
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
63
|
-
});
|
64
|
-
});
|
65
|
-
|
66
|
-
describe('Question Preview: AutoScored - All or Nothing', () => {
|
67
|
-
abortEarlySetup();
|
68
|
-
before(() => {
|
69
|
-
cy.log('Navigating to Short text response question type, adding correct answer response and points, and switching to Preview tab');
|
70
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
71
|
-
shortTextResponsePage.setCorrectAnswerResponseField()
|
72
|
-
.type('Response');
|
73
|
-
shortTextResponsePage.steps.allotPoints(20);
|
74
|
-
shortTextResponsePage.steps.expandAdditonalSettings();
|
75
|
-
shortTextResponsePage.allowStudentsToCheckAnswerCheckbox()
|
76
|
-
.click();
|
77
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
78
|
-
});
|
79
|
-
|
80
|
-
it('Case: When user adds incorrect response', () => {
|
81
|
-
shortTextResponsePage.previewTabResponseField()
|
82
|
-
.type('Incorrect');
|
83
|
-
cy.log('User should be awarded 0 points');
|
84
|
-
shortTextResponsePage.previewScoreText()
|
85
|
-
.verifyInnerText('0/20');
|
86
|
-
cy.log('When the user selects \'Show correct answer\' checkbox, red cross-mark icon should be displayed besides the incorrect answer input field, incorrect answer label and border should not be displayed below the question field and the correct answer container with the correct answer should be displayed');
|
87
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
88
|
-
shortTextResponsePage.steps.verifyIncorrectOptionCrossmarkIcon();
|
89
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
90
|
-
.should('not.exist');
|
91
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
92
|
-
.should('not.exist');
|
93
|
-
cy.log('The correct answer container with the correct answer should be displayed')
|
94
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
95
|
-
.should('be.visible');
|
96
|
-
shortTextResponsePage.previewTabCorrectAnswerResponse()
|
97
|
-
.verifyInnerText('Response');
|
98
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
99
|
-
cy.log('When the user clicks on \'Check answer\' button, red cross-mark icon should be displayed besides the response fields, Incorrect answer label and border should not be displayed and no correct answer container should be displayed')
|
100
|
-
shortTextResponsePage.checkAnswerButton()
|
101
|
-
.click();
|
102
|
-
shortTextResponsePage.steps.verifyIncorrectOptionCrossmarkIcon();
|
103
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
104
|
-
.should('not.exist');
|
105
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
106
|
-
.should('not.exist');
|
107
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
108
|
-
.should('not.exist');
|
109
|
-
});
|
110
|
-
|
111
|
-
shortTextResponsePage.tests.verifyCSSAndA11yOfIncorrectAnswerLabel('short text response');
|
112
|
-
|
113
|
-
it('Case: When user adds correct response', () => {
|
114
|
-
cy.log('Adding correct response')
|
115
|
-
shortTextResponsePage.previewTabResponseField()
|
116
|
-
.clear()
|
117
|
-
.type('Response');
|
118
|
-
cy.log('User should be awarded with full points')
|
119
|
-
shortTextResponsePage.previewScoreText()
|
120
|
-
.verifyInnerText('20/20');
|
121
|
-
cy.log('When the user selects the \'Show correct answer\' checkbox, green check-mark icon should be displayed besides the response field, correct answer label and border should not be displayed below the question field, correct answer container should not be displayed and user should be awarded with full points');
|
122
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
123
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
124
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
125
|
-
.should('not.exist');
|
126
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
127
|
-
.should('not.exist');
|
128
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
129
|
-
.should('not.exist');
|
130
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
131
|
-
cy.log('When the user clicks on \'Check answer\' button, green check-mark icon should be displayed besides the response fields, Incorrect answer label and border should not be displayed and no correct answer container should be displayed')
|
132
|
-
shortTextResponsePage.checkAnswerButton()
|
133
|
-
.click();
|
134
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
135
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
136
|
-
.should('not.exist');
|
137
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
138
|
-
.should('not.exist');
|
139
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
140
|
-
.should('not.exist');
|
141
|
-
});
|
142
|
-
|
143
|
-
shortTextResponsePage.tests.verifyCSSAndA11yOfCorrectAnswerIcon();
|
144
|
-
|
145
|
-
shortTextResponsePage.tests.verifyCSSAndA11yOfFullScoreTextAndCorrectAnswerLabel('short text response');
|
146
|
-
|
147
|
-
shortTextResponsePage.tests.verifyMinimumScoreAwardedForIncorrectAnswer('20');
|
148
|
-
});
|
149
|
-
|
150
|
-
describe('Question Preview: AutoScored - All or Nothing with alternate answer', () => {
|
151
|
-
abortEarlySetup();
|
152
|
-
before(() => {
|
153
|
-
cy.log('Navigating to Short text response question type, adding correct answer response and alternate answer response for autoscored - all or nothing scoring, adding points and switching to Preview tab');
|
154
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
155
|
-
shortTextResponsePage.setCorrectAnswerResponseField()
|
156
|
-
.type('Response 1');
|
157
|
-
shortTextResponsePage.steps.allotPoints(7);
|
158
|
-
shortTextResponsePage.alternateAnswerButton()
|
159
|
-
.click();
|
160
|
-
shortTextResponsePage.setCorrectAnswerResponseField()
|
161
|
-
.type('Response 2');
|
162
|
-
shortTextResponsePage.steps.allotPoints(3);
|
163
|
-
shortTextResponsePage.steps.expandAdditonalSettings();
|
164
|
-
shortTextResponsePage.allowStudentsToCheckAnswerCheckbox()
|
165
|
-
.click();
|
166
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
167
|
-
});
|
168
|
-
|
169
|
-
it('Alternate answer case: When Alternate Answer points are less than Correct Answer points', () => {
|
170
|
-
cy.log('The points displayed should be equal to correct answer points');
|
171
|
-
shortTextResponsePage.previewScoreText()
|
172
|
-
.verifyInnerText('0/7');
|
173
|
-
cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct response from the correct tab');
|
174
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
175
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('Response 1');
|
176
|
-
shortTextResponsePage.correctIcon()
|
177
|
-
.should('not.exist');
|
178
|
-
shortTextResponsePage.incorrectIcon()
|
179
|
-
.should('not.exist');
|
180
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
181
|
-
.should('not.exist');
|
182
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
183
|
-
.should('not.exist');
|
184
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
185
|
-
|
186
|
-
cy.log('When the user enters correct answer set response, points specified for correct answer set (full points) should be provided and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed')
|
187
|
-
shortTextResponsePage.previewTabResponseField()
|
188
|
-
.type('Response 1');
|
189
|
-
cy.log('User should be awarded with full points')
|
190
|
-
shortTextResponsePage.previewScoreText()
|
191
|
-
.verifyInnerText('7/7');
|
192
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
193
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
194
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
195
|
-
.should('not.exist');
|
196
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
197
|
-
.should('not.exist');
|
198
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
199
|
-
.should('not.exist');
|
200
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
201
|
-
|
202
|
-
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response fields, correct answer label and border should not be displayed, correct answer container should not be displayed')
|
203
|
-
shortTextResponsePage.checkAnswerButton()
|
204
|
-
.click();
|
205
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
206
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
207
|
-
.should('not.exist');
|
208
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
209
|
-
.should('not.exist');
|
210
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
211
|
-
.should('not.exist');
|
212
|
-
|
213
|
-
cy.log('When the user enters alternate correct answer response, points specified for alternate correct answers (less than overall points) should be provided and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides response fields, correct answer label and border should not be displayed below the question field and correct answer container should not be displayed');
|
214
|
-
shortTextResponsePage.previewTabResponseField()
|
215
|
-
.clear()
|
216
|
-
.type('Response 2');
|
217
|
-
cy.log('User should be awarded points (less than overall) allocated for the Alternate correct answer tab');
|
218
|
-
shortTextResponsePage.previewScoreText()
|
219
|
-
.verifyInnerText('3/7');
|
220
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
221
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
222
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
223
|
-
.should('not.exist');
|
224
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
225
|
-
.should('not.exist');
|
226
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
227
|
-
.should('not.exist');
|
228
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
229
|
-
|
230
|
-
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed below the below the question field and correct answer container should not be displayed');
|
231
|
-
shortTextResponsePage.checkAnswerButton()
|
232
|
-
.click();
|
233
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
234
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
235
|
-
.should('not.exist');
|
236
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
237
|
-
.should('not.exist');
|
238
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
239
|
-
.should('not.exist');
|
240
|
-
});
|
241
|
-
|
242
|
-
it('Alternate answer case: When Alternate answer points are more than correct answer points', () => {
|
243
|
-
cy.log('Pre step: Switching to Edit tab and adding Alternate answer points more than correct answer points')
|
244
|
-
shortTextResponsePage.steps.switchToEditTab();
|
245
|
-
shortTextResponsePage.pointsInputField()
|
246
|
-
.clear();
|
247
|
-
shortTextResponsePage.steps.allotPoints(10);
|
248
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
249
|
-
cy.log('Total points displayed besides Show correct answer checkbox should be of Alternate answer points')
|
250
|
-
shortTextResponsePage.previewScoreText()
|
251
|
-
.verifyInnerText('0/10')
|
252
|
-
cy.log('When the user selects \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct response from the Alternate tab')
|
253
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
254
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('Response 2');
|
255
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
256
|
-
.should('not.exist');
|
257
|
-
shortTextResponsePage.correctIcon()
|
258
|
-
.should('not.exist');
|
259
|
-
shortTextResponsePage.incorrectIcon()
|
260
|
-
.should('not.exist');
|
261
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
262
|
-
.should('not.exist');
|
263
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
264
|
-
.should('not.exist');
|
265
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
266
|
-
|
267
|
-
cy.log('When the user enters correct answer set response, points specified for correct answer set should be provided and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed')
|
268
|
-
shortTextResponsePage.previewTabResponseField()
|
269
|
-
.type('Response 1');
|
270
|
-
shortTextResponsePage.previewScoreText()
|
271
|
-
.verifyInnerText('7/10');
|
272
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
273
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
274
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
275
|
-
.should('not.exist');
|
276
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
277
|
-
.should('not.exist');
|
278
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
279
|
-
.should('not.exist')
|
280
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
281
|
-
|
282
|
-
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed')
|
283
|
-
shortTextResponsePage.checkAnswerButton()
|
284
|
-
.click();
|
285
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
286
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
287
|
-
.should('not.exist');
|
288
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
289
|
-
.should('not.exist');
|
290
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
291
|
-
.should('not.exist');
|
292
|
-
|
293
|
-
cy.log('When the user enters alternate correct answer response, points specified for alternate correct answers (more than overall points) should be provided and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed');
|
294
|
-
shortTextResponsePage.previewTabResponseField()
|
295
|
-
.clear()
|
296
|
-
.type('Response 2');
|
297
|
-
cy.log('User should be awarded with full points');
|
298
|
-
shortTextResponsePage.previewScoreText()
|
299
|
-
.verifyInnerText('10/10');
|
300
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
301
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
302
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
303
|
-
.should('not.exist');
|
304
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
305
|
-
.should('not.exist');
|
306
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
307
|
-
.should('not.exist')
|
308
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
309
|
-
|
310
|
-
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed');
|
311
|
-
shortTextResponsePage.checkAnswerButton()
|
312
|
-
.click();
|
313
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
314
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
315
|
-
.should('not.exist');
|
316
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
317
|
-
.should('not.exist');
|
318
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
319
|
-
.should('not.exist');
|
320
|
-
});
|
321
|
-
|
322
|
-
it('Alternate answer case: When Alternate Answer points and Correct Answer points both are equal', () => {
|
323
|
-
cy.log('Pre step: Switching to Edit tab and alloting points of Alternate answer equal to correct answer')
|
324
|
-
shortTextResponsePage.steps.switchToEditTab();
|
325
|
-
shortTextResponsePage.pointsInputField()
|
326
|
-
.clear();
|
327
|
-
shortTextResponsePage.steps.allotPoints(7);
|
328
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
329
|
-
cy.log('Checking total points displayed')
|
330
|
-
shortTextResponsePage.previewScoreText()
|
331
|
-
.verifyInnerText('0/7');
|
332
|
-
|
333
|
-
cy.log('When the user selects the \'Show correct answer\' checkbox without attempting the question, correct answer container should be displayed with the correct response from the correct tab and Correct/Incorrect answer label and border should not be displayed')
|
334
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
335
|
-
shortTextResponsePage.steps.verifyCorrectAnswerResponsesInCorrectAnswerContainerAndCount('Response 1');
|
336
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
337
|
-
.should('not.exist');
|
338
|
-
shortTextResponsePage.correctIcon()
|
339
|
-
.should('not.exist');
|
340
|
-
shortTextResponsePage.incorrectIcon()
|
341
|
-
.should('not.exist');
|
342
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
343
|
-
.should('not.exist');
|
344
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
345
|
-
.should('not.exist');
|
346
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
347
|
-
|
348
|
-
cy.log('When the user enters correct answer response, points specified for correct answer set (full points) should be provided and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed');
|
349
|
-
shortTextResponsePage.previewTabResponseField()
|
350
|
-
.type('Response 1');
|
351
|
-
cy.log('User should be awarded with full points')
|
352
|
-
shortTextResponsePage.previewScoreText()
|
353
|
-
.verifyInnerText('7/7');
|
354
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
355
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
356
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
357
|
-
.should('not.exist');
|
358
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
359
|
-
|
360
|
-
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed');
|
361
|
-
shortTextResponsePage.checkAnswerButton()
|
362
|
-
.click();
|
363
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
364
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
365
|
-
.should('not.exist');
|
366
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
367
|
-
.should('not.exist');
|
368
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
369
|
-
.should('not.exist');
|
370
|
-
|
371
|
-
cy.log('When the user enters alternate correct answer response, points specified for alternate correct answers (full points) should be provided and on selecting \'Show correct answer\' checkbox green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed');
|
372
|
-
shortTextResponsePage.previewTabResponseField()
|
373
|
-
.clear()
|
374
|
-
.type('Response 2');
|
375
|
-
cy.log('User should be awarded with full points')
|
376
|
-
shortTextResponsePage.previewScoreText()
|
377
|
-
.verifyInnerText('7/7');
|
378
|
-
shortTextResponsePage.steps.checkShowCorrectAnswerCheckbox();
|
379
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
380
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
381
|
-
.should('not.exist');
|
382
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
383
|
-
.should('not.exist');
|
384
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
385
|
-
.should('not.exist');
|
386
|
-
shortTextResponsePage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
387
|
-
|
388
|
-
cy.log('When the user clicks on \'Check answer\' button, then green check-mark icon should be displayed besides response field, correct answer label and border should not be displayed and correct answer container should not be displayed');
|
389
|
-
shortTextResponsePage.checkAnswerButton()
|
390
|
-
.click();
|
391
|
-
shortTextResponsePage.steps.verifyCorrectOptionCheckmarkIcon();
|
392
|
-
shortTextResponsePage.correctIncorrectAnswerBorder()
|
393
|
-
.should('not.exist');
|
394
|
-
shortTextResponsePage.correctIncorrectAnswerLabel()
|
395
|
-
.should('not.exist');
|
396
|
-
shortTextResponsePage.previewTabCorrectAnswerContainer()
|
397
|
-
.should('not.exist');
|
398
|
-
});
|
399
|
-
|
400
|
-
shortTextResponsePage.tests.verifyMinimumScoreAwardedForIncorrectAnswer('7');
|
401
|
-
});
|
402
|
-
});
|