itemengine-cypress-automation 1.0.154 → 1.0.155
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/AudioResponseNew/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/DesmosGraphing/additionalSettings.js +5 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingBasicForGroupedOptionsLayout.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionAlternativePointsGreaterThanCorrectPoints.js +4 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionCorrectPointsEqualToAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perCorrectOptionMinimumAndPenaltyScoring.js +1 -1
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +6 -6
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +2 -3
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/Scoring/partialDifferentWeightsBasic.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +34 -29
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/draggableOptions.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/dropdownOptionsSection.js +4 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/headerSection.js +2 -0
- package/cypress/e2e/ILC/FillInTheGapsDropdownNew/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/editTabScoring.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/studentViewSettings.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsForDropdowns.js +7 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/allOrNothingForAllView.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/checkAnswerFunctionalityForAllViews.smoke.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/dropdownOptionsSection.js +20 -8
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/specifyCorrectAnswerSection.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +3 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/editTabScoringSection.js +5 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +5 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +2 -2
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabBasicSection.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsTextNew/editTabScoringSection.js +4 -3
- package/cypress/e2e/ILC/FillInTheGapsTextNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +0 -8
- package/cypress/e2e/ILC/GeogebraActivity/additionalSettings.js +1 -1
- package/cypress/e2e/ILC/Graphing/addBackgroundShapesSection.js +39 -35
- package/cypress/e2e/ILC/Graphing/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/Graphing/layoutAndGridOptions.js +8 -6
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillColor.js +475 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutFillImageBackgroundImage.js +669 -0
- package/cypress/e2e/ILC/GridFill/customizeLayoutSectionShadeCellsGridBorders.js +1 -1
- package/cypress/e2e/ILC/GridFill/editTabScoringSection.js +0 -11
- package/cypress/e2e/ILC/GridFill/gridLayoutContents.js +204 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutEditTabFunctionality.js +229 -0
- package/cypress/e2e/ILC/GridFill/gridLayoutPreviewTabFunctionality.js +219 -0
- package/cypress/e2e/ILC/GridFill/minimumScoringPenaltyPointsAndRoundingDropdown.js +2 -0
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/GridFill/specifyCorrectAnswerSection.js +0 -2
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +1 -1
- package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
- package/cypress/e2e/ILC/Matching/headerSection.js +82 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +93 -0
- package/cypress/e2e/ILC/MultipleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/MultipleSelection/editTabScoringSection.js +3 -0
- package/cypress/e2e/ILC/MultipleSelection/minimumScoringPenaltyPointsAndRoundingDropdown.js +1 -1
- package/cypress/e2e/ILC/MultipleSelection/multipleSelectionBasicAccessibility.js +8 -10
- package/cypress/e2e/ILC/MultipleSelection/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/MultipleSelection/studentViewSettings.js +16 -25
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +403 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +363 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +393 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +377 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +341 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +373 -0
- package/cypress/e2e/ILC/Ruler/rulerEditTabBasicsSection.js +0 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/conditionalCheckboxes.js +27 -8
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +15 -34
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +13 -15
- package/cypress/e2e/ILC/ShortTextResponseNew/specifyCorrectAnswerSection.js +4 -4
- package/cypress/e2e/ILC/SimpleCalculator/editTabFunctionality.js +4 -2
- package/cypress/e2e/ILC/SingleSelection/blockCreateItem.js +2 -2
- package/cypress/e2e/ILC/SingleSelection/specifyCorrectAnswerSection.js +3 -3
- package/cypress/e2e/ILC/SingleSelection/studentViewSettings.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +183 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +185 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +263 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/manuallyAndNonScored.js +140 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +233 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +205 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +233 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +214 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsBasic.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +183 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +213 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +21 -17
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +1 -1
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +25 -25
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +20 -17
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +2 -2
- package/cypress/e2e/ILC/UploadResponse/manuallyAndNonScoredScoring.js +2 -3
- package/cypress/e2e/ILC/UploadResponse/uploadResponseAdditionalSettings.js +3 -3
- package/cypress/e2e/ILC/UploadResponse/uplodResponsePreviewUploadedFileProperties.js +2 -2
- package/cypress/fixtures/fillColorDefaultProperties.js +35 -0
- package/cypress/fixtures/theme/ilc.json +2 -1
- package/cypress/fixtures/uploads/sampleVirus.zip +0 -0
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -3
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/backgroundImageUploadComponent.js +4 -1
- package/cypress/pages/components/colorPopupComponent.js +6 -3
- package/cypress/pages/components/commonComponents.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +4 -3
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +47 -12
- package/cypress/pages/components/gridQuestionCommonComponent.js +0 -81
- package/cypress/pages/components/imageCanvasComponent.js +10 -8
- package/cypress/pages/components/listSortingAndOrderingBase.js +1 -1
- package/cypress/pages/components/questionInputFieldComponent.js +1 -1
- package/cypress/pages/components/questionInstructionsComponent.js +1 -1
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponsePage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +34 -23
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +26 -4
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +0 -29
- package/cypress/pages/graphingPage.js +26 -16
- package/cypress/pages/gridFillPage.js +1610 -90
- package/cypress/pages/matchingPage.js +164 -20
- package/cypress/pages/multipleSelectionGridPage.js +82 -2
- package/cypress/pages/multipleSelectionPage.js +7 -2
- package/cypress/pages/rulerPage.js +3 -8
- package/cypress/pages/shortTextResponsePage.js +13 -0
- package/cypress/pages/simpleCalculatorPage.js +8 -0
- package/cypress/pages/singleSelectionGridPage.js +58 -2
- package/cypress/pages/textEntryMathPage.js +58 -11
- package/cypress/pages/uploadResponsePage.js +4 -2
- package/package.json +1 -1
- package/cypress/e2e/ILC/MultipleSelection/multipleSelectionAdditionalSettings.js +0 -835
- package/cypress/e2e/ILC/SingleSelection/singleSelectionAdditionalSettings.js +0 -469
@@ -0,0 +1,183 @@
|
|
1
|
+
import { singleSelectionGridPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create item page - Single selection grid: All or nothing with alternative answers', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Alternative answer\' points are more than \'Correct answer\' points', () => {
|
10
|
+
abortEarlySetup();
|
11
|
+
before(() => {
|
12
|
+
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
13
|
+
cy.barsPreLoaderWait();
|
14
|
+
singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
15
|
+
singleSelectionGridPage.steps.addInputToColumnInputStepper(4);
|
16
|
+
singleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
|
17
|
+
singleSelectionGridPage.steps.allotPoints(10);
|
18
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
19
|
+
singleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
|
20
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
21
|
+
singleSelectionGridPage.steps.allotPoints(20);
|
22
|
+
singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '20');
|
23
|
+
singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
24
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
28
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
29
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
30
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
31
|
+
});
|
32
|
+
|
33
|
+
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct 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', () => {
|
34
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
35
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
36
|
+
singleSelectionGridPage.steps.verifyPreviewScore(10, 20);
|
37
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
38
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
39
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
40
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
41
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
42
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
43
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
44
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
45
|
+
singleSelectionGridPage.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
|
+
singleSelectionGridPage.steps.checkAnswer();
|
48
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
49
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
50
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
51
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
52
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
53
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
54
|
+
});
|
55
|
+
|
56
|
+
it('When the user attempts the question with alternative accordion responses, 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
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
58
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
59
|
+
singleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
60
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
61
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
62
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
63
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
64
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
65
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
66
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
67
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
68
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
69
|
+
cy.log('When the user has attempted the question with alternative accordion responses 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')
|
70
|
+
singleSelectionGridPage.steps.checkAnswer();
|
71
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
72
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
73
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
74
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
75
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
76
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
77
|
+
});
|
78
|
+
|
79
|
+
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 icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
80
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
81
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 1 }, { row: 3, column: 0 }]);
|
82
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
83
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
84
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
85
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
86
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
87
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
88
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
89
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
90
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
91
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
92
|
+
singleSelectionGridPage.steps.checkAnswer();
|
93
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
94
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
95
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
96
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
97
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
98
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
99
|
+
});
|
100
|
+
|
101
|
+
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 icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
102
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
103
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 2 }, { row: 3, column: 2 }]);
|
104
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
105
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
106
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
107
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
108
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
109
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
110
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
111
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
112
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
113
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
114
|
+
singleSelectionGridPage.steps.checkAnswer();
|
115
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
116
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
117
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
118
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
119
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
120
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
121
|
+
});
|
122
|
+
|
123
|
+
it('When the user attempts the question partially correct with more number of questions exclusively from the correct accordion but with one question response common across both accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response common across both accordions, incorrect icon should be displayed besides correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
124
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
125
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }]);
|
126
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
127
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
128
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
129
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
130
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
131
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
132
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
133
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
134
|
+
cy.log('When the user has attempted the question partially correct with more number of questions exclusively from the correct accordion but with one question response common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the response common across both accordions, incorrect icon should be displayed besides correct accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
135
|
+
singleSelectionGridPage.steps.checkAnswer();
|
136
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
137
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
138
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
139
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
140
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
141
|
+
});
|
142
|
+
|
143
|
+
it('When the user attempts the question such that equal number of options are correct from the both accordions, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
144
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
145
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
146
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
147
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
148
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
149
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
150
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
151
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
152
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
153
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
154
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
155
|
+
cy.log('When the user has attempted the question such that equal number of options are correct from the both accordions and clicks on \'Check answer\' button, correct icon should be displayed besides the alternative accordion responses, incorrect icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
156
|
+
singleSelectionGridPage.steps.checkAnswer();
|
157
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
158
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
159
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
160
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
161
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
162
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
163
|
+
});
|
164
|
+
|
165
|
+
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, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the alternative accordion should be displayed', () => {
|
166
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
167
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 3, column: 1 }, { row: 4, column: 0 }]);
|
168
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
169
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
170
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
171
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
172
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
173
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
174
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
175
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, 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')
|
176
|
+
singleSelectionGridPage.steps.checkAnswer();
|
177
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
178
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
179
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
180
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
181
|
+
});
|
182
|
+
});
|
183
|
+
});
|
@@ -0,0 +1,185 @@
|
|
1
|
+
import { singleSelectionGridPage } 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 - Single selection grid: 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
|
+
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
17
|
+
singleSelectionGridPage.steps.addInputToColumnInputStepper(4);
|
18
|
+
singleSelectionGridPage.steps.setQuestionGridLayoutForScoringFunctionalityTest();
|
19
|
+
singleSelectionGridPage.steps.allotPoints(20);
|
20
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
21
|
+
singleSelectionGridPage.steps.addAlternativeAnswerAccordion(1);
|
22
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
23
|
+
singleSelectionGridPage.steps.allotPoints(20);
|
24
|
+
singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '20');
|
25
|
+
singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
26
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When the user selects \'Grading\' view without attempting the question, correct answers section should be displayed with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
30
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
31
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
32
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
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
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
37
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
38
|
+
singleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
39
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
40
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
41
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
42
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
43
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
44
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
45
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
46
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
47
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
48
|
+
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')
|
49
|
+
singleSelectionGridPage.steps.checkAnswer();
|
50
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
51
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
52
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
53
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
54
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
55
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
56
|
+
});
|
57
|
+
|
58
|
+
it('When the user attempts the question with alternative accordion responses, 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', () => {
|
59
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
60
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
61
|
+
singleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
62
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
63
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
64
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
65
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
66
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
67
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
68
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
69
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
70
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
71
|
+
cy.log('When the user has attempted the question with alternative accordion responses 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')
|
72
|
+
singleSelectionGridPage.steps.checkAnswer();
|
73
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
74
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
75
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
76
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
77
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
78
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
79
|
+
});
|
80
|
+
|
81
|
+
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 icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
82
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
83
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 1 }, { row: 3, column: 0 }]);
|
84
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
85
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
86
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
87
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
88
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
89
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
90
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
91
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
92
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
93
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
94
|
+
singleSelectionGridPage.steps.checkAnswer();
|
95
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
96
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
97
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
98
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
99
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
100
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
101
|
+
});
|
102
|
+
|
103
|
+
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 icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
104
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
105
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 2 }, { row: 3, column: 2 }]);
|
106
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
107
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
108
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
109
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
110
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
111
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
112
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
113
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
114
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
115
|
+
cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion, and clicks on \'Check answer\' button, correct icons should be displayed besides the correct answer responses, no icons should be displayed for unattempted responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
116
|
+
singleSelectionGridPage.steps.checkAnswer();
|
117
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
118
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
119
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
120
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
121
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
122
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
123
|
+
});
|
124
|
+
|
125
|
+
it('When the user attempts the question partially correct with more number of questions exclusively from the alternative accordion but with one question response common across both accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response common across both accordions as well as alternative accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
126
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
127
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }]);
|
128
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
129
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
130
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
131
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
132
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
133
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
134
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
135
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
136
|
+
cy.log('When the user has attempted the question partially correct with more number of questions exclusively from the alternative accordion but with one question response common across both accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the response common across both accordions as well as alternative accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
137
|
+
singleSelectionGridPage.steps.checkAnswer();
|
138
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
139
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
140
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
141
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
142
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
143
|
+
});
|
144
|
+
|
145
|
+
it('When the user attempts the question such that equal number of options are correct from the both accordions, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct accordion responses, incorrect icons should be displayed besides alternative accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
146
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
147
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
148
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
149
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
150
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
151
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
152
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
153
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
154
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
155
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
156
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
157
|
+
cy.log('When the user has attempted the question such that equal number of options are correct from the both accordions and clicks on \'Check answer\' button, correct icon should be displayed besides the correct accordion responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
158
|
+
singleSelectionGridPage.steps.checkAnswer();
|
159
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
160
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
161
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
162
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
163
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
164
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
165
|
+
});
|
166
|
+
|
167
|
+
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, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers from the correct accordion should be displayed', () => {
|
168
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
169
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 2 }, { row: 4, column: 2 }]);
|
170
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
171
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
172
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
173
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
174
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
175
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
176
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
177
|
+
cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, 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')
|
178
|
+
singleSelectionGridPage.steps.checkAnswer();
|
179
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
180
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
181
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
182
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
183
|
+
});
|
184
|
+
});
|
185
|
+
});
|