itemengine-cypress-automation 1.0.128 → 1.0.130
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ContentBlocks/editTabBasics.js +210 -0
- package/cypress/e2e/ILC/ContentBlocks/previewContents.smoke.js +91 -0
- package/cypress/e2e/ILC/ContentBlocks/styleAndLayoutCustomizationSection.js +392 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseAdditionalSettings.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseBackground.js +1 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseCustomizeAdditionalOptions.js +2 -1
- package/cypress/e2e/ILC/DrawingResponse/drawingResponseGradingViewAndCorrectAnswerViewContents.smoke.js +2 -1
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingGroupedScoring.js +152 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +195 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +288 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/manuallyAndNonScored.js +141 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +413 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +218 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +245 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsBasic.js +163 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +196 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +224 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/responseLevelAlternateAnswerBasicScoring.js +83 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +653 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +180 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabScoringSection.js +229 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/specifyCorrectAnswerSection.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/switchingCasesBetweenOptionsLayout.js +50 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +204 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +298 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingPenaltyScoring.js +63 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/manuallyAndNonScored.js +111 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsBasic.js +90 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +232 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +231 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsBasic.js +138 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +213 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +186 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownAndDropdownMenuSection.js +161 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +328 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +144 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabScoringSection.js +250 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +74 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/studentViewSettings.js +188 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +8 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +0 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +1 -52
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +3 -211
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +39 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +1 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specifyCorrectAnswerSection.js +3 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +2 -50
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/conditionalCheckboxScoring.js +325 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsBasic.js +1 -146
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsMinimumAndPenaltyScoring.js +300 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +78 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +265 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/headerSection.js +75 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +194 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/responseAnswersAndAcceptedStudentInput.js +56 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +40 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +249 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specifyCorrectAnswerSection.js +64 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +128 -0
- package/cypress/e2e/ILC/Graphing/allOrNothingForAllViews.smoke.js +889 -0
- package/cypress/e2e/ILC/Graphing/checkAnswerFunctionalityForAllViews.smoke.js +168 -0
- package/cypress/e2e/ILC/Graphing/gradingViewAndCorrectAnswerView.smoke.js +203 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +222 -0
- package/cypress/e2e/ILC/SimpleCalculator/calculatorFunctionality.js +349 -0
- package/cypress/e2e/ILC/SimpleCalculator/previewContents.smoke.js +132 -0
- package/cypress/e2e/ILC/UploadResponse/previewContentsForAllViews.smoke.js +35 -7
- package/cypress/e2e/ILC/UploadResponse/studentViewSettingsSection.js +213 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +41 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponseEditTabBasicSections.js +377 -0
- package/cypress/e2e/ILC/UploadResponse/uploadResponsePreview.js +161 -0
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +250 -0
- package/cypress/e2e/migration/migration.js +4 -41
- package/cypress/e2e/migration/migration10.js +6 -43
- package/cypress/e2e/migration/migration2.js +6 -43
- package/cypress/e2e/migration/migration3.js +6 -43
- package/cypress/e2e/migration/migration4.js +6 -43
- package/cypress/e2e/migration/migration5.js +6 -43
- package/cypress/e2e/migration/migration6.js +6 -43
- package/cypress/e2e/migration/migration7.js +6 -43
- package/cypress/e2e/migration/migration8.js +6 -43
- package/cypress/e2e/migration/migration9.js +6 -43
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/fixtures/theme/ilc.json +6 -1
- package/cypress/fixtures/uploadResponseFileType.js +5 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +13 -13
- package/cypress/pages/components/customizeSpecialCharacterComponent.js +24 -6
- package/cypress/pages/components/draggableOptionContainer.js +1 -0
- package/cypress/pages/components/fillInTheGapsDragAndDropCommonComponents.js +42 -4
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +149 -5
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +954 -77
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +2 -1
- package/cypress/pages/contentBlocksPage.js +515 -0
- package/cypress/pages/drawingResponsePage.js +2 -2
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +359 -3
- package/cypress/pages/fillInTheGapsDropdownPage.js +21 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +5 -57
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +3 -24
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +1 -435
- package/cypress/pages/fillInTheGapsTextPage.js +9 -2
- package/cypress/pages/graphingPage.js +484 -0
- package/cypress/pages/index.js +4 -1
- package/cypress/pages/simpleCalculatorPage.js +310 -0
- package/cypress/pages/uploadResponsePage.js +260 -92
- package/cypress/support/commands.js +33 -1
- package/package.json +1 -1
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +0 -242
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +0 -99
- package/cypress/e2e/ILC/Passage/passageEditTab.js +0 -241
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +0 -73
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +0 -246
@@ -0,0 +1,288 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
describe('Create item page - Fill in the gaps with drag and drop: All or nothing with alternative answers', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
//Failing due to https://redmine.zeuslearning.com/issues/557273
|
12
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
18
|
+
fillInTheGapsDragAndDropPage.steps.addMultipleOptionFields(4);
|
19
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Petals', 'Leaves', 'Roots', 'Stem', 'Flower', 'Seed']);
|
20
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(20);
|
21
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Flower': 1, 'Leaves': 2 });
|
22
|
+
fillInTheGapsDragAndDropPage.steps.addAlternativeAnswerAccordion(1);
|
23
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Stem': 1, 'Seed': 2 });
|
24
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(10);
|
25
|
+
fillInTheGapsDragAndDropPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
26
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective cell numeration', () => {
|
30
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
31
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
32
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
33
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('CSS of correct answer section and dropzone cell numeration', { tags: 'css' }, () => {
|
37
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswersLabel(), {
|
38
|
+
'color': css.color.sectionHeading,
|
39
|
+
'font-size': css.fontSize.default,
|
40
|
+
'font-weight': css.fontWeight.bold
|
41
|
+
});
|
42
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzoneNumeration(), {
|
43
|
+
'background-color': css.color.defaultBackground,
|
44
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
45
|
+
});
|
46
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswerContainer().find('[class*="GreenBlock"]'), {
|
47
|
+
'background-color': css.color.correctAnswer
|
48
|
+
});
|
49
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswerContainer().find('[class*="GreenBlock"] svg g'), {
|
50
|
+
'fill': css.color.defaultBackground
|
51
|
+
});
|
52
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswersOptions(), {
|
53
|
+
'color': css.color.text,
|
54
|
+
'font-size': css.fontSize.default,
|
55
|
+
'font-weight': css.fontWeight.regular,
|
56
|
+
});
|
57
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctAnswersOptions().parents('[class*="__AnswerWrapper"]'), {
|
58
|
+
'border': `1px solid ${css.color.correctOptionBorder}`
|
59
|
+
});
|
60
|
+
});
|
61
|
+
|
62
|
+
//Failing due to https://redmine.zeuslearning.com/issues/557256
|
63
|
+
it('Accessibility of correct answer section and dropzone cell numeration', { tags: 'a11y' }, () => {
|
64
|
+
cy.checkAccessibility(fillInTheGapsDragAndDropPage.previewTabQuestionWrapper());
|
65
|
+
});
|
66
|
+
|
67
|
+
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 responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
68
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
69
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1, 'Leaves': 2 });
|
70
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(20, 20);
|
71
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
72
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
73
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
74
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
75
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
76
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
77
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
78
|
+
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')
|
79
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
80
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
81
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
82
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
83
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
84
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
85
|
+
});
|
86
|
+
|
87
|
+
//Failing due to https://redmine.zeuslearning.com/issues/557259
|
88
|
+
it('CSS of Correct answer state', { tags: 'css' }, () => {
|
89
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.previewScoreText(), {
|
90
|
+
'color': css.color.whiteText,
|
91
|
+
'background-color': css.color.correctAnswer
|
92
|
+
});
|
93
|
+
fillInTheGapsDragAndDropPage.correctIcon()
|
94
|
+
.verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
|
95
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctIncorrectAnswerBlock(), {
|
96
|
+
'background-color': css.color.correctAnswerLabelBg,
|
97
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
98
|
+
});
|
99
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctIncorrectStatusMessageText(), {
|
100
|
+
'color': css.color.text,
|
101
|
+
'font-size': css.fontSize.default,
|
102
|
+
'font-weight': css.fontWeight.regular
|
103
|
+
});
|
104
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctIncorrectAnswerLabel(), {
|
105
|
+
'color': css.color.text,
|
106
|
+
'font-size': css.fontSize.default,
|
107
|
+
'font-weight': css.fontWeight.bold
|
108
|
+
});
|
109
|
+
cy.log('Verifying css of an correct option')
|
110
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzonePreviewTab().parents('.cell'), {
|
111
|
+
'background-color': css.color.optionsBg,
|
112
|
+
'border': `2px dashed ${css.color.correctAnswer}`
|
113
|
+
});
|
114
|
+
});
|
115
|
+
|
116
|
+
it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
|
117
|
+
cy.checkAccessibility(fillInTheGapsDragAndDropPage.previewTabQuestionWrapper());
|
118
|
+
});
|
119
|
+
|
120
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than 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', () => {
|
121
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
122
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Stem': 1, 'Seed': 2 });
|
123
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(10, 20);
|
124
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
125
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
126
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
127
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
128
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
129
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
130
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
131
|
+
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')
|
132
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
133
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
134
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
135
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
136
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
138
|
+
});
|
139
|
+
|
140
|
+
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 a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone numeration should be displayed', () => {
|
141
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
142
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 2 });
|
143
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
144
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
145
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
146
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
147
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
148
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
149
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
150
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
151
|
+
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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
152
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
153
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
154
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
155
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
156
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
157
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
158
|
+
});
|
159
|
+
|
160
|
+
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 beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
161
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
162
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Stem': 1, 'Seed': 2 });
|
163
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
164
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
165
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
166
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
167
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
168
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
169
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
170
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
171
|
+
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 beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
172
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
173
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
174
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
175
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
176
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
177
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
178
|
+
});
|
179
|
+
|
180
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative 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, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
181
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
182
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Stem': 1 });
|
183
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
184
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
185
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
186
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
187
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
188
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
189
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
190
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
191
|
+
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, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
192
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
193
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
194
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
195
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
196
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
197
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
198
|
+
});
|
199
|
+
|
200
|
+
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, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
201
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
202
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1, 'Seed': 2 });
|
203
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
204
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
205
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
206
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
207
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
208
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
209
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
210
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
211
|
+
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')
|
212
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
213
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
214
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
215
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
216
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
217
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
218
|
+
});
|
219
|
+
|
220
|
+
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, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
221
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
222
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
|
223
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
224
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
225
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
226
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
227
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
228
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
229
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
230
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
231
|
+
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, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
232
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
233
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
234
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
235
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
236
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
237
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
238
|
+
});
|
239
|
+
|
240
|
+
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 beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropzone cell numeration should be displayed', () => {
|
241
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
242
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
|
243
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
244
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
245
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
246
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
247
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
248
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
249
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
250
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
251
|
+
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 beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
252
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
253
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
254
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
255
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
256
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
257
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
258
|
+
});
|
259
|
+
|
260
|
+
it('CSS of incorrect answer state', { tags: 'css' }, () => {
|
261
|
+
fillInTheGapsDragAndDropPage.incorrectIcon()
|
262
|
+
.verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
|
263
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctIncorrectAnswerBlock(), {
|
264
|
+
'background-color': css.color.incorrectAnswerLabelBg,
|
265
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
266
|
+
});
|
267
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctIncorrectStatusMessageText(), {
|
268
|
+
'color': css.color.text,
|
269
|
+
'font-size': css.fontSize.default,
|
270
|
+
'font-weight': css.fontWeight.regular
|
271
|
+
});
|
272
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.correctIncorrectAnswerLabel(), {
|
273
|
+
'color': css.color.text,
|
274
|
+
'font-size': css.fontSize.default,
|
275
|
+
'font-weight': css.fontWeight.bold
|
276
|
+
});
|
277
|
+
cy.log('Verifying css of an incorrect option')
|
278
|
+
utilities.verifyCSS(fillInTheGapsDragAndDropPage.dropzonePreviewTab().parents('.cell'), {
|
279
|
+
'background-color': css.color.optionsBg,
|
280
|
+
'border': `2px dashed ${css.color.incorrectAnswer}`
|
281
|
+
});
|
282
|
+
});
|
283
|
+
|
284
|
+
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|
285
|
+
cy.checkAccessibility(fillInTheGapsDragAndDropPage.previewTabQuestionWrapper());
|
286
|
+
});
|
287
|
+
});
|
288
|
+
});
|
@@ -0,0 +1,141 @@
|
|
1
|
+
import { fillInTheGapsDragAndDropPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
|
5
|
+
let options = ['Petals', 'Leaves', 'Roots', 'Stem'];
|
6
|
+
|
7
|
+
describe('Create Item page - Fill in the gaps with drag and drop: Manually and non scored', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question Preview: Manually Scored', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
fillInTheGapsDragAndDropPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options into correct dropzone');
|
18
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
19
|
+
fillInTheGapsDragAndDropPage.steps.addMultipleOptionFields(2);
|
20
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
21
|
+
fillInTheGapsDragAndDropPage.steps.expandScoringTypeDropdown();
|
22
|
+
fillInTheGapsDragAndDropPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
23
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
24
|
+
});
|
25
|
+
|
26
|
+
it('In Preview tab, question instructions, uploaded image, dropzone and options container should be displayed in the preview tab', () => {
|
27
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionInstructionsTextPreviewTab('Drag and drop options into correct dropzone');
|
28
|
+
utilities.verifyElementCount(fillInTheGapsDragAndDropPage.dropzonePreviewTab(), 3);
|
29
|
+
for (let index = 0; index < fillInTheGapsDragAndDropPage.dropzonePreviewTab(); index++) {
|
30
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneTextPreviewTab(index, '');
|
31
|
+
}
|
32
|
+
options.forEach((optionText, index) => {
|
33
|
+
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsDragAndDropPage.optionContainerOptionsPreviewTab(), index), optionText);
|
34
|
+
});
|
35
|
+
});
|
36
|
+
|
37
|
+
fillInTheGapsDragAndDropPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
|
38
|
+
});
|
39
|
+
|
40
|
+
describe('Question Preview: Non Scored', () => {
|
41
|
+
abortEarlySetup();
|
42
|
+
before(() => {
|
43
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
44
|
+
cy.barsPreLoaderWait();
|
45
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
46
|
+
fillInTheGapsDragAndDropPage.steps.addMultipleOptionFields(2);
|
47
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(options);
|
48
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
|
49
|
+
fillInTheGapsDragAndDropPage.steps.expandScoringTypeDropdown();
|
50
|
+
fillInTheGapsDragAndDropPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
51
|
+
fillInTheGapsDragAndDropPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
52
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
53
|
+
});
|
54
|
+
|
55
|
+
fillInTheGapsDragAndDropPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
56
|
+
|
57
|
+
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and the correct answer section should be displayed with correct answers', () => {
|
58
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
59
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
60
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
61
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
62
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
63
|
+
fillInTheGapsDragAndDropPage.steps.switchToStudentView();
|
64
|
+
});
|
65
|
+
|
66
|
+
it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
67
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 0, 'Petals': 1, 'Roots': 2 });
|
68
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
69
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
70
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
71
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
72
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
73
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
74
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
75
|
+
cy.log('When user clicks on Check answer button after he attempts the question incorrectly incorrect icons should be displayed besides all incorrect responses, status message \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
76
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
77
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
78
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
79
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
80
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
81
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
82
|
+
});
|
83
|
+
|
84
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
85
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
86
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Roots': 2 });
|
87
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
88
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
89
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
90
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
91
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
92
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
93
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
94
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with some correct, some incomplete, some incorrect options, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, status message \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
95
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
96
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
97
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
98
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
99
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
100
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete, then on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
104
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
105
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Leaves': 1, 'Stem': 2 });
|
106
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
107
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
108
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
109
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
110
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
111
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Leaves'], ['Stem']]);
|
112
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
113
|
+
cy.log('When user clicks on Check answer button after he attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, status message \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
114
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
115
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
116
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
117
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
118
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
119
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When user attempts the question correctly, on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, 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', () => {
|
123
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
124
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Leaves': 1, 'Stem': 2 });
|
125
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
126
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
127
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
128
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
129
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
130
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
131
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
132
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, status message \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
133
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
134
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
135
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
136
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
137
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
138
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
139
|
+
});
|
140
|
+
});
|
141
|
+
});
|