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,231 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
5
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
6
|
+
const optionsForDropdown3 = ['Flower', 'Leaf', 'Stem', 'Roots']; //Common answer
|
7
|
+
const correctAnswerArray = ['Flower', 'Leaf', 'Stem'];
|
8
|
+
const alternateAnswerArray = ['Petal', 'Leaves', 'Stem'];
|
9
|
+
const incorrectAnswerArray = ['Branch', 'Seed', 'Roots'];
|
10
|
+
|
11
|
+
describe('Create item page - Fill in the gaps with dropdown: Partial different weights', () => {
|
12
|
+
before(() => {
|
13
|
+
cy.loginAs('admin');
|
14
|
+
});
|
15
|
+
|
16
|
+
describe('Question preview: Auto scored - Partial different weights - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
17
|
+
abortEarlySetup();
|
18
|
+
before(() => {
|
19
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
20
|
+
cy.barsPreLoaderWait();
|
21
|
+
fillInTheGapsDropdownPage.steps.addResponseAreaInQuestionField();
|
22
|
+
fillInTheGapsDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
23
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
24
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
25
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(2, optionsForDropdown3);
|
26
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
27
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
28
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, correctAnswerArray[2]);
|
29
|
+
fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 7, 1: 1, 2: 5 });
|
30
|
+
fillInTheGapsDropdownPage.steps.addAlternativeAnswerAccordion(1);
|
31
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, alternateAnswerArray[0]);
|
32
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, alternateAnswerArray[1]);
|
33
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, alternateAnswerArray[2]);
|
34
|
+
fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 6, 1: 4, 2: 5 });
|
35
|
+
fillInTheGapsDropdownPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
36
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
37
|
+
});
|
38
|
+
|
39
|
+
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', () => {
|
40
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
41
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
42
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
43
|
+
});
|
44
|
+
|
45
|
+
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, status message and correct answer section should not be displayed', () => {
|
46
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
47
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: correctAnswerArray[2] }]);
|
48
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(13, 15);
|
49
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
50
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
51
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
52
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
53
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
54
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
55
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
56
|
+
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, status message and correct answer section should not be displayed')
|
57
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
58
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
59
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
60
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
61
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
62
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
63
|
+
});
|
64
|
+
|
65
|
+
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, status message and correct answer section should not be displayed', () => {
|
66
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
67
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
|
68
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(15, 15);
|
69
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
70
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
71
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
72
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
73
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
74
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
75
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
76
|
+
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, status message and correct answer section should not be displayed')
|
77
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
78
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
79
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
80
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
81
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
82
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
83
|
+
});
|
84
|
+
|
85
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded with points of the correctly attempted responses according to 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, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropdown numeration should be displayed', () => {
|
86
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
87
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
88
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(8, 15);
|
89
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
90
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
91
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
92
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
93
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
94
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
95
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
96
|
+
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, status message and correct answer section should not be displayed')
|
97
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
98
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
99
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
100
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
101
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
102
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded with points of the correctly attempted responses from the alternative accordion and on switching to \'Grading\' view, correct icon should be displayed besides the correct dropdowns, no icon should be displayed beside unattempted dropdown, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropdown numeration should be displayed', () => {
|
106
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
107
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }]);
|
108
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(6, 15);
|
109
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
110
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
111
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
112
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
113
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
114
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
115
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
116
|
+
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, status message and correct answer section should not be displayed')
|
117
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
118
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
119
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
120
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
121
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
122
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
123
|
+
});
|
124
|
+
|
125
|
+
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 alternative accordion as points from the alternative accordion are more than the correct accordion and on switching to \'Grading\' view, correct icon icon should be displayed besides dropdown with alternative answer responses, incorrect icon should be displayed beside dropdown with correct accordion responses as score achieved from the alternative responses is more than correct responses, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropdown numeration should be displayed', () => {
|
126
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
127
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: alternateAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
128
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(6, 15);
|
129
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
130
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
131
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
132
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
133
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
134
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
135
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
136
|
+
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 dropdown with alternative answer responses, incorrect icon should be displayed beside dropdown with correct accordion response, status message and correct answer section should not be displayed')
|
137
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
138
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
139
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
140
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
141
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
142
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
143
|
+
});
|
144
|
+
|
145
|
+
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 correct accordion as points from the correct accordion are more than the alternative accordion and on switching to \'Grading\' view, correct icon icon should be displayed besides the correct dropdowns, incorrect icon should be displayed beside dropdown with alternative accordion response as points achieved from the correct accordion is more, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropdown numeration should be displayed', () => {
|
146
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
147
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: alternateAnswerArray[1] }]);
|
148
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(7, 15);
|
149
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
150
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
151
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
152
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
153
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
154
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
155
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
156
|
+
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 icon should be displayed besides the correct dropdowns, incorrect icon should be displayed beside dropdown with alternative accordion response, status message and correct answer section should not be displayed')
|
157
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
158
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
159
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
160
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
161
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
162
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
163
|
+
});
|
164
|
+
|
165
|
+
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 with points of the correctly attempted responses from the tab that has more points alloted for the response and on switching to \'Grading\' view, correct icon icon should be besides the common response, no icons should be displayed beside unattempted dropdowns, status message should not be displayed and correct answer section with all correct answers from the alternate accordion along with dropdown numeration should be displayed', () => {
|
166
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
167
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
|
168
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(5, 15);
|
169
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
170
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
171
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
172
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
173
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
174
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
175
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
176
|
+
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 dropdown, no icon should be displayed beside unattempted dropdown, status message and correct answer section should not be displayed')
|
177
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
178
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
179
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
180
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
181
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
182
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
183
|
+
});
|
184
|
+
|
185
|
+
it('When the user attempts the question incorrectly, then the user should be awarded with 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown, status message should not be displayed and correct answer section with all alternative answers along with dropdown numeration should be displayed', () => {
|
186
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
187
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
188
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 15);
|
189
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
190
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
191
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
192
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
193
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
194
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
195
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
196
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides all incorrect dropdowns, no icon should be displayed beside unattempted dropdown, status message and correct answer section should not be displayed')
|
197
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
198
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
199
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
200
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
201
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
202
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
203
|
+
});
|
204
|
+
|
205
|
+
it('Overachiever case: When the user attempts the question with more number of correct responses from the correct accordion than the alternative 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 alternative accordion, correct icon icons should be displayed besides alternative accordion responses, incorrect icon should be displayed besides correct accordion responses, correct/incorrect answer 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', () => {
|
206
|
+
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')
|
207
|
+
fillInTheGapsDropdownPage.steps.switchToEditTab();
|
208
|
+
fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 10.4, 1: 1.2, 2: 11.4 });
|
209
|
+
fillInTheGapsDropdownPage.steps.expandCorrectAnswerAccordion();
|
210
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(2, optionsForDropdown3[3]);
|
211
|
+
fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 1.2, 1: 2.2, 2: 1.6 });
|
212
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
213
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }, { dropdownIndex: 2, dropdownOption: alternateAnswerArray[2] }]);
|
214
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(11.4, 23);
|
215
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
216
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
217
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
218
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
219
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
220
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(alternateAnswerArray);
|
221
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
222
|
+
cy.log('When the user attempts the question with more number of correct responses from the correct accordion than the alternative accordion but the score of the individual response selected from the alternative accordion overpowers the combined score of the correct accordion answers and clicks on the \'Check answer\' button, correct icon icons should be displayed beside the correct dropdowns from the correct accordion, incorrect icons should be displayed beside the incorrectly answered dropdowns, correct/incorrect answer status message, correct answer container should not be displayed')
|
223
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
224
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
225
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
226
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(2);
|
227
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
228
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
229
|
+
});
|
230
|
+
});
|
231
|
+
});
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { fillInTheGapsDropdownPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
const optionsForDropdown1 = ['Flower', 'Petal', 'Stem', 'Branch'];
|
5
|
+
const optionsForDropdown2 = ['Leaf', 'Leaves', 'Stem', 'Seed'];
|
6
|
+
const correctAnswerArray = ['Flower', 'Leaf'];
|
7
|
+
const incorrectAnswerArray = ['Branch', 'Seed'];
|
8
|
+
|
9
|
+
describe('Create item page - Fill in the gaps with dropdown: Partial different weights', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Auto scored - Partial different weights', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
fillInTheGapsDropdownPage.steps.navigateToCreateQuestion('fill in the gaps with dropdown');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(0, optionsForDropdown1);
|
20
|
+
fillInTheGapsDropdownPage.steps.addInputToDropdownOptionFields(1, optionsForDropdown2);
|
21
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(0, correctAnswerArray[0]);
|
22
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownSpecifyCorrectAnswerSection(1, correctAnswerArray[1]);
|
23
|
+
fillInTheGapsDropdownPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
24
|
+
fillInTheGapsDropdownPage.steps.allotPartialDifferentWeightsPoints({ 0: 9, 1: 6 });
|
25
|
+
fillInTheGapsDropdownPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
26
|
+
fillInTheGapsDropdownPage.steps.switchToPreviewTab();
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When the user selects \'Grading\' view without attempting the question, dropdown numeration, correct answers with correct answers and respective dropdown numeration section should be displayed ', () => {
|
30
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 15);
|
31
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
32
|
+
fillInTheGapsDropdownPage.steps.verifyDropdownNumerationPreviewTab();
|
33
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icon should be displayed besides all incorrect dropdowns, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
37
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: incorrectAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
38
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(0, 15);
|
39
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
40
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
41
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
42
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
43
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
44
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
45
|
+
cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' incorrect icon should be displayed besides all incorrect dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
46
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
47
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(0);
|
48
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
49
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
50
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When the user attempts the question partially correct, 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, incorrect icon should be displayed besides incorrect dropdown, correct/incorrect status message should not be displayed and correct answer section with all correct answers along with numeration should be displayed', () => {
|
54
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
55
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: incorrectAnswerArray[1] }]);
|
56
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(9, 15);
|
57
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
58
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
59
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
60
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
61
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(correctAnswerArray);
|
62
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
63
|
+
cy.log('When the user attempts the question partially correct with all the responses correctly attempted but one response incomplete and clicks on \'Check answer\' correct icon should be displayed besides the correct dropdowns, incorrect icon should be displayed besides incorrect dropdown, correct/incorrect status message and correct answer section should not be displayed')
|
64
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
65
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
66
|
+
fillInTheGapsDropdownPage.steps.verifyIncorrectOptionIcon(1);
|
67
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
68
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed', () => {
|
72
|
+
fillInTheGapsDropdownPage.steps.resetQuestionPreview();
|
73
|
+
fillInTheGapsDropdownPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: correctAnswerArray[0] }, { dropdownIndex: 1, dropdownOption: correctAnswerArray[1] }]);
|
74
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewScore(15, 15);
|
75
|
+
fillInTheGapsDropdownPage.steps.switchToGradingView();
|
76
|
+
fillInTheGapsDropdownPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
77
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
78
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
79
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
80
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
81
|
+
fillInTheGapsDropdownPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
82
|
+
cy.log('When the user attempts the question correctly and clicks on \'Check answer\' correct icon should be displayed besides the correct dropdowns, correct/incorrect status message and correct answer section should not be displayed')
|
83
|
+
fillInTheGapsDropdownPage.steps.checkAnswer();
|
84
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(0);
|
85
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectOptionIcon(1);
|
86
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
87
|
+
fillInTheGapsDropdownPage.steps.verifyCorrectAnswerSectionNotExists();
|
88
|
+
});
|
89
|
+
});
|
90
|
+
});
|