itemengine-cypress-automation 1.0.128 → 1.0.131-updateILCrepo6March-02c78d1.0
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 +2 -2
- 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,196 @@
|
|
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/557262
|
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(10);
|
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(20);
|
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'], ['Stem'], ['Seed']]);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded points of the correct tab 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', () => {
|
37
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
38
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1, 'Leaves': 2 });
|
39
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(10, 20);
|
40
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
41
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
42
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
43
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
44
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
45
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
46
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
47
|
+
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')
|
48
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
49
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
50
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
51
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
52
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
53
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
54
|
+
});
|
55
|
+
|
56
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
57
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
58
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Stem': 1, 'Seed': 2 });
|
59
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(20, 20);
|
60
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
61
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
62
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
63
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
64
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
65
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
66
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
67
|
+
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')
|
68
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
69
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
70
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
71
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
72
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
73
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
74
|
+
});
|
75
|
+
|
76
|
+
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 alternate accordion along with dropzone numeration should be displayed', () => {
|
77
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
78
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 2 });
|
79
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
80
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
81
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
82
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
83
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
84
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
85
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
86
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
87
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
88
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
89
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
90
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
91
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
92
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
93
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
94
|
+
});
|
95
|
+
|
96
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the alternate accordion along with dropzone cell numeration should be displayed', () => {
|
97
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
98
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Stem': 1, 'Seed': 2 });
|
99
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
100
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
101
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
102
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
103
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
104
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
105
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
106
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
107
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
108
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
109
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
110
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
111
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
112
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
113
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
114
|
+
});
|
115
|
+
|
116
|
+
it('When the user attempts the question partially correct with all the responses correct as per the correct accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed for unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropzone cell numeration should be displayed', () => {
|
117
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
118
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1 });
|
119
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
120
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
121
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
122
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
123
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
124
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
125
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
126
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
127
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
128
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
129
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
130
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
131
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
132
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
133
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
134
|
+
});
|
135
|
+
|
136
|
+
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 alternative answer responses, red cross-mark icon should be displayed beside responses from the correct accordion, 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', () => {
|
137
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
138
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1, 'Seed': 2 });
|
139
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
140
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
141
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
142
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
143
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
144
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
145
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
146
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
147
|
+
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')
|
148
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
149
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
150
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(1);
|
151
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
152
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
153
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
154
|
+
});
|
155
|
+
|
156
|
+
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 for 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', () => {
|
157
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
158
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
|
159
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
160
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
161
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
162
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
163
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
164
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
165
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
166
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
167
|
+
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 for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
168
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
169
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
170
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
171
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
172
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
173
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
174
|
+
});
|
175
|
+
|
176
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icon should be displayed for unattempted response 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', () => {
|
177
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
178
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
|
179
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
180
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
181
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
182
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
183
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
184
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
185
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Stem'], ['Seed']]);
|
186
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
187
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed for unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
188
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
189
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
190
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
191
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
192
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
193
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
194
|
+
});
|
195
|
+
});
|
196
|
+
});
|
@@ -0,0 +1,195 @@
|
|
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
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
fillInTheGapsDragAndDropPage.steps.navigateToCreateQuestion('fill in the gaps with drag and drop');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
fillInTheGapsDragAndDropPage.steps.addResponseArea();
|
17
|
+
fillInTheGapsDragAndDropPage.steps.addMultipleOptionFields(4);
|
18
|
+
fillInTheGapsDragAndDropPage.steps.addInputToOptionsInputField(['Petals', 'Leaves', 'Roots', 'Stem', 'Flower', 'Seed']);
|
19
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(20);
|
20
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Flower': 1, 'Leaves': 2 });
|
21
|
+
fillInTheGapsDragAndDropPage.steps.addAlternativeAnswerAccordion(1);
|
22
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Petals': 0, 'Stem': 1, 'Seed': 2 });
|
23
|
+
fillInTheGapsDragAndDropPage.steps.allotPoints(20);
|
24
|
+
fillInTheGapsDragAndDropPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
25
|
+
fillInTheGapsDragAndDropPage.steps.switchToPreviewTab();
|
26
|
+
});
|
27
|
+
|
28
|
+
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', () => {
|
29
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
30
|
+
fillInTheGapsDragAndDropPage.steps.verifyDropzoneNumeration();
|
31
|
+
utilities.verifyInnerText(fillInTheGapsDragAndDropPage.correctAnswersLabel(), 'Correct answers');
|
32
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
33
|
+
});
|
34
|
+
|
35
|
+
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', () => {
|
36
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
37
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1, 'Leaves': 2 });
|
38
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(20, 20);
|
39
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
40
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
41
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
42
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
43
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
44
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
45
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
46
|
+
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')
|
47
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
48
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
49
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
50
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
51
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
52
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
53
|
+
});
|
54
|
+
|
55
|
+
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', () => {
|
56
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
57
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Stem': 1, 'Seed': 2 });
|
58
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(20, 20);
|
59
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
60
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
61
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
62
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
63
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
64
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
65
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
66
|
+
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')
|
67
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
68
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
69
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
70
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
71
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
72
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
73
|
+
});
|
74
|
+
|
75
|
+
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', () => {
|
76
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
77
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Flower': 1, 'Leaves': 2 });
|
78
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
79
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
80
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
81
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
82
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
83
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
84
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
85
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
86
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
87
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
88
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
89
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
90
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
91
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
92
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
93
|
+
});
|
94
|
+
|
95
|
+
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', () => {
|
96
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
97
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Stem': 1, 'Seed': 2 });
|
98
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
99
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
100
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
101
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
102
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
103
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
104
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
105
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
106
|
+
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')
|
107
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
108
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(0);
|
109
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
110
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(2);
|
111
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
112
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
113
|
+
});
|
114
|
+
|
115
|
+
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 alternative accordion, 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', () => {
|
116
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
117
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Stem': 1 });
|
118
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
119
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
120
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
121
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
122
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
123
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
124
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
125
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
126
|
+
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 alternative accordion, incorrect icon should be displayed besides the empty response, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
127
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
128
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
129
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
130
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
131
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
132
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
133
|
+
});
|
134
|
+
|
135
|
+
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 accordion, 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', () => {
|
136
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
137
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0, 'Flower': 1, 'Seed': 2 });
|
138
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
139
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
140
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
141
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
142
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
143
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
144
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
145
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
146
|
+
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, red cross-mark should be displayed beside option from the alternative accordion a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
147
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
148
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
149
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(1);
|
150
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(2);
|
151
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
152
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
153
|
+
});
|
154
|
+
|
155
|
+
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', () => {
|
156
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
157
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Petals': 0 });
|
158
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
159
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
160
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
161
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
162
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
163
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
164
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
165
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
166
|
+
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')
|
167
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
168
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectOptionIcon(0);
|
169
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
170
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
171
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
172
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
173
|
+
});
|
174
|
+
|
175
|
+
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', () => {
|
176
|
+
fillInTheGapsDragAndDropPage.steps.resetQuestionPreview();
|
177
|
+
fillInTheGapsDragAndDropPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Roots': 0 });
|
178
|
+
fillInTheGapsDragAndDropPage.steps.verifyPreviewScore(0, 20);
|
179
|
+
fillInTheGapsDragAndDropPage.steps.switchToGradingView();
|
180
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
181
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
182
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
183
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
184
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Petals'], ['Flower'], ['Leaves']]);
|
185
|
+
fillInTheGapsDragAndDropPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
186
|
+
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, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
187
|
+
fillInTheGapsDragAndDropPage.steps.checkAnswer();
|
188
|
+
fillInTheGapsDragAndDropPage.steps.verifyIncorrectOptionIcon(0);
|
189
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(1);
|
190
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectIconNotExist(2);
|
191
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
192
|
+
fillInTheGapsDragAndDropPage.steps.verifyCorrectAnswerSectionNotExists();
|
193
|
+
});
|
194
|
+
});
|
195
|
+
});
|