itemengine-cypress-automation 1.0.105 → 1.0.106
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/gradingViewAndCorrectAnswerViewContents.smoke.js +129 -0
- package/cypress/e2e/ILC/AudioResponseNew/minimalRecorderStyle.js +482 -0
- package/cypress/e2e/ILC/AudioResponseNew/previewContentsForAllViews.smoke.js +123 -0
- package/cypress/e2e/ILC/AudioResponseNew/standardRecorderStyle.js +554 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +1 -41
- package/cypress/e2e/ILC/EditTabSettingPage/ItemPreviewSettingsTabContent.js +5 -3
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +284 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +412 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories1.js +203 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditorCategories2.js +340 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +336 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +332 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +522 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +253 -0
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +266 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +57 -640
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/previewContentsForAllViews.smoke.js +1 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +209 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +209 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +303 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/allOrNothingPenaltyScoring.js +68 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsBasic.js +149 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +191 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +219 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +240 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +124 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/previewContentsForAllViews.smoke.js +107 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/manuallyAndNonScored.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +0 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +408 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/previewContentsForAllViews.smoke.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/headerSection.js +1 -0
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +0 -6
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
- package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
- package/cypress/e2e/ILC/ReadingRuler/readingRulerEditTabBasicsSection.js +138 -33
- package/cypress/e2e/ILC/ReadingRuler/readingRulerHeaderSection.js +30 -6
- package/cypress/e2e/ILC/ReadingRuler/readingRulerPreviewTab.js +167 -101
- package/cypress/e2e/ILC/ReadingRuler/readingrulerPreviewContents.smoke.js +1 -1
- package/cypress/e2e/ILC/SingleSelection/headerSection.js +20 -5
- package/cypress/e2e/ILC/SingleSelection/manuallyAndNonScoredScoring.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +12 -7
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +1336 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +419 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +443 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +411 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +411 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +45 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +3 -3
- package/cypress/fixtures/specialAndMathCharacters.js +2 -0
- package/cypress/fixtures/theme/ilc.json +4 -2
- package/cypress/pages/audioResponsePage.js +326 -165
- package/cypress/pages/components/additionalSettingsPanel.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +162 -2
- package/cypress/pages/components/colorPopupComponent.js +115 -26
- package/cypress/pages/components/customizeMathCharacterComponent.js +133 -0
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +74 -4
- package/cypress/pages/components/editCategoryFlyout.js +164 -2
- package/cypress/pages/components/equationEditorFlyout.js +36 -1
- package/cypress/pages/components/essayResponseCommonComponents.js +0 -2
- package/cypress/pages/components/figOverImageCanvasComponent.js +587 -134
- package/cypress/pages/components/index.js +2 -1
- package/cypress/pages/components/playbackControlsBaseComponent.js +137 -2
- package/cypress/pages/correctAnswerViewPage.js +12 -1
- package/cypress/pages/drawingResponsePage.js +26 -151
- package/cypress/pages/essayResponseMathPage.js +28 -16
- package/cypress/pages/essayResponsePage.js +187 -7
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +78 -14
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +178 -221
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +79 -0
- package/cypress/pages/multipleSelectionPage.js +1 -1
- package/cypress/pages/readingRulerPage.js +219 -104
- package/cypress/pages/singleSelectionPage.js +1 -0
- package/cypress/pages/textEntryMathPage.js +17 -6
- package/cypress/pages/videoResponsePage.js +0 -8
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +1 -1
@@ -0,0 +1,218 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
7
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
8
|
+
const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
|
9
|
+
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
10
|
+
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
11
|
+
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
12
|
+
|
13
|
+
describe('Create item page - Fill in the gaps over image with dropdown: Partial equal weights with alternative answers', () => {
|
14
|
+
before(() => {
|
15
|
+
cy.loginAs('admin');
|
16
|
+
});
|
17
|
+
|
18
|
+
describe('Question preview: Auto scored - Partial equal weights - When \'Alternative\' points are more than \'Correct\' points', () => {
|
19
|
+
abortEarlySetup();
|
20
|
+
before(() => {
|
21
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
22
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
23
|
+
cy.barsPreLoaderWait();
|
24
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
25
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
26
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
27
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(80);
|
29
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
31
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown3);
|
32
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(9);
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, correctAnswerArray[2]);
|
36
|
+
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
37
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
|
38
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
|
39
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, alternateAnswerArray[2]);
|
40
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(15);
|
41
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
42
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
44
|
+
});
|
45
|
+
|
46
|
+
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section should be displayed with correct answers from the alternative accordion and respective dropdown numeration', () => {
|
47
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
48
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
49
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
50
|
+
});
|
51
|
+
|
52
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
|
53
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(9, 15);
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
63
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
64
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
65
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
66
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
67
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
68
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
69
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
70
|
+
});
|
71
|
+
|
72
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
|
73
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
74
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
|
75
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(15, 15);
|
76
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
77
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
79
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
80
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
81
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
82
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
83
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
84
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
85
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
86
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
87
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
88
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
89
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
90
|
+
});
|
91
|
+
|
92
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
|
93
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
94
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }]);
|
95
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(3, 15);
|
96
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
97
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
98
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
99
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
100
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
101
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
102
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
103
|
+
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 dropdowns, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
104
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
105
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
106
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
107
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
108
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
109
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
110
|
+
});
|
111
|
+
|
112
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides the dropdowns with alternative accordion responses, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
|
113
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
114
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }]);
|
115
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
116
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
117
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
118
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
119
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
120
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
121
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
122
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
123
|
+
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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
124
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
130
|
+
});
|
131
|
+
|
132
|
+
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 points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be displayed besides alternate accordion responses, incorrect icon should be displayed beside correct accordion responses, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
|
133
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
134
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
135
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
136
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
137
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
138
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
139
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
140
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
141
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
142
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
143
|
+
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 alternate accordion responses, incorrect icon should be displayed beside correct accordion responses, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
144
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
145
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
146
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
147
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
148
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
149
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
150
|
+
});
|
151
|
+
|
152
|
+
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 points of the correctly attempted responses and on switching to \'Grading\' view, correct icon should be besides the common response, no icon should be displayed beside unattempted dropdown, \'Your answer is incorrect\' and correct answer section with all correct answers from the alternative accordion along with dropdown numeration should be displayed', () => {
|
153
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
154
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
|
155
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
156
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
162
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
163
|
+
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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
166
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
167
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
168
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
169
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
170
|
+
});
|
171
|
+
|
172
|
+
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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with dropdown numeration should be displayed', () => {
|
173
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
174
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
175
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 15);
|
176
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
177
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
178
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
179
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
180
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
181
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
182
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
183
|
+
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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section should not be displayed')
|
184
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
185
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
186
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
187
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
188
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
189
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
190
|
+
});
|
191
|
+
|
192
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers then on switching to the \'Grading view\', then points awarded should be of the correct accordion, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer label and its border should not be displayed and correct answer container should be displayed with alternative accordion answers', () => {
|
193
|
+
cy.log('Pre-step: Switching to Edit tab and allotting points to alternative accordion such that the difference between the points is substantial and the points per response are in decimal')
|
194
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToEditTab();
|
195
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(23);
|
196
|
+
fillInTheGapsOverImageDropdownPage.steps.expandCorrectAnswerAccordion();
|
197
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, optionsForDropdown3[3]);
|
198
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(5);
|
199
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
200
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
|
201
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(7.67, 23);
|
202
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
203
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
204
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
205
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
206
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
207
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
208
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
209
|
+
cy.log('When the user attempts the question with more number of correct responses from the alternative accordion than the correct accordion and clicks on the \'Check answer\' button, correct icons should be displayed for the dropdown with alternative accordion response, incorrect icon should be displayed for the dropdown with correct accordion responses, correct/incorrect answer label and its border, correct answer container should not be displayed')
|
210
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
211
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
212
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
213
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
214
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
215
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
216
|
+
});
|
217
|
+
});
|
218
|
+
});
|
@@ -0,0 +1,191 @@
|
|
1
|
+
import { fillInTheGapsOverImageDropdownPage } from "../../../../pages";
|
2
|
+
import { commonComponents } from "../../../../pages/components";
|
3
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
|
7
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
8
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
9
|
+
const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
|
10
|
+
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
11
|
+
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
12
|
+
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
13
|
+
|
14
|
+
describe('Create item page - Fill in the gaps over image with dropdown: Partial equal with alternative answers', () => {
|
15
|
+
before(() => {
|
16
|
+
cy.loginAs('admin');
|
17
|
+
});
|
18
|
+
|
19
|
+
describe('Question preview: Auto scored - Partial equal weights with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
20
|
+
abortEarlySetup();
|
21
|
+
before(() => {
|
22
|
+
cy.log('Navigate to fill in the gaps over image - dropdown question type');
|
23
|
+
fillInTheGapsOverImageDropdownPage.steps.navigateToCreateQuestion('fill in the gaps over image - dropdown');
|
24
|
+
cy.barsPreLoaderWait();
|
25
|
+
fillInTheGapsOverImageDropdownPage.steps.uploadFile('highlightImage.jpg');
|
26
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyImageIsUploaded();
|
27
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(10);
|
28
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(40);
|
29
|
+
fillInTheGapsOverImageDropdownPage.steps.insertResponseArea(80);
|
30
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
31
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
32
|
+
fillInTheGapsOverImageDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown3);
|
33
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(15);
|
34
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
35
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
36
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, correctAnswerArray[2]);
|
37
|
+
fillInTheGapsOverImageDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
38
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
|
39
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
|
40
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, alternateAnswerArray[2]);
|
41
|
+
fillInTheGapsOverImageDropdownPage.steps.allotPoints(15);
|
42
|
+
fillInTheGapsOverImageDropdownPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
43
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
44
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToPreviewTab();
|
45
|
+
});
|
46
|
+
|
47
|
+
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration should be displayed, correct answers section should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
|
48
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
49
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
50
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
|
54
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
55
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
|
56
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(15, 15);
|
57
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
58
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
59
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
60
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
61
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
62
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
63
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
64
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
65
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
66
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
67
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
68
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
69
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
70
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
71
|
+
});
|
72
|
+
|
73
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
|
74
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
75
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
|
76
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(15, 15);
|
77
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
78
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
79
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
80
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
81
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
82
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
83
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
84
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
85
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
86
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
87
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(1);
|
88
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
89
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
90
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
91
|
+
});
|
92
|
+
|
93
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded points of the correct accordion and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
|
94
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
95
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }]);
|
96
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
97
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
98
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
99
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
100
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
101
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
102
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
103
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
104
|
+
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 dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
105
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
106
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
107
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
108
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
109
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
110
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
|
114
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
115
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }]);
|
116
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
117
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
118
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
119
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
120
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
121
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
122
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
123
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
124
|
+
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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
|
125
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
126
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
127
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
128
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
129
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
130
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
131
|
+
});
|
132
|
+
|
133
|
+
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 points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be displayed besides dropdown with correct accordion response, incorrect icon should be displayed beside dropdown with the alternative accordion response, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
|
134
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
135
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }]);
|
136
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
137
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
138
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
139
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
140
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
141
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
142
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
143
|
+
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 dropdown with correct accordion response, incorrect icon should be displayed beside dropdown with the alternative accordion response, correct/incorrect status message and correct answer section should not be displayed')
|
144
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
145
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(0);
|
146
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
147
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
148
|
+
fillInTheGapsOverImageDropdownPage.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 points of the correctly attempted response and on switching to \'Grading\' view, correct icon should be besides the common response, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
|
152
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
153
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
|
154
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(5, 15);
|
155
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
156
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
157
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
158
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
159
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
160
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
161
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
162
|
+
cy.log('When the user has attempted the question with the common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct dropdown, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
|
163
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
164
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
165
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
166
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectOptionIcon(2);
|
167
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
168
|
+
fillInTheGapsOverImageDropdownPage.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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with dropdown numeration should be displayed', () => {
|
172
|
+
fillInTheGapsOverImageDropdownPage.steps.resetQuestionPreview();
|
173
|
+
fillInTheGapsOverImageDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
174
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyPreviewScore(0, 15);
|
175
|
+
fillInTheGapsOverImageDropdownPage.steps.switchToGradingView();
|
176
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
177
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
178
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
179
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
180
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
181
|
+
fillInTheGapsOverImageDropdownPage.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 dropdowns, no icon should be displayed beside unattempted dropdown, correct/incorrect status message and correct answer section should not be displayed')
|
183
|
+
fillInTheGapsOverImageDropdownPage.steps.checkAnswer();
|
184
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
185
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
186
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
187
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
188
|
+
fillInTheGapsOverImageDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
189
|
+
});
|
190
|
+
});
|
191
|
+
});
|