itemengine-cypress-automation 1.0.155-migrationScripts-86e4c95.0 → 1.0.156-01AprilFixes-fc21452.0
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,263 @@
|
|
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 more than \'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(10);
|
24
|
+
singleSelectionGridPage.steps.verifyPointsLabelAndPointsOnAnswerAccordion(1, '10');
|
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('CSS of correct answer section', { tags: 'css' }, () => {
|
36
|
+
singleSelectionGridPage.correctAnswerGrid()
|
37
|
+
.within(() => {
|
38
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell().parent(), 1), {
|
39
|
+
'background-color': css.color.matrixHeadingCellBg,
|
40
|
+
'border-color': `${css.color.matrixCellBorder}`
|
41
|
+
});
|
42
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell().parent(), 4), {
|
43
|
+
'background-color': css.color.defaultBackground,
|
44
|
+
'border-color': `${css.color.matrixCellBorder}`
|
45
|
+
});
|
46
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell().parent(), 9), {
|
47
|
+
'background-color': css.color.defaultBackground,
|
48
|
+
'border-color': `${css.color.matrixCellBorder}`
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 1).find('.question-text-wrapper'), {
|
51
|
+
'color': css.color.text,
|
52
|
+
'font-size': css.fontSize.heading,
|
53
|
+
'font-weight': css.fontWeight.bold
|
54
|
+
});
|
55
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.tableCell(), 4).find('.question-text-wrapper'), {
|
56
|
+
'color': css.color.text,
|
57
|
+
'font-size': css.fontSize.default,
|
58
|
+
'font-weight': css.fontWeight.regular
|
59
|
+
});
|
60
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.optionsButton(), 0), {
|
61
|
+
'background-color': css.color.correctAnswerLabelBg,
|
62
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
63
|
+
});
|
64
|
+
utilities.verifyCSS(utilities.getNthElement(singleSelectionGridPage.optionsButton(), 0).find('svg').eq(1).find('g g'), {
|
65
|
+
'color': css.color.activeButtons,
|
66
|
+
});
|
67
|
+
});
|
68
|
+
});
|
69
|
+
|
70
|
+
it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
|
71
|
+
cy.checkAccessibility(singleSelectionGridPage.gridPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
72
|
+
});
|
73
|
+
|
74
|
+
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', () => {
|
75
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
76
|
+
singleSelectionGridPage.steps.verifyPreviewScore(20, 20);
|
77
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
78
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForCorrectAnswer();
|
79
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
80
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
81
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
82
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
83
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
84
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
85
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
86
|
+
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')
|
87
|
+
singleSelectionGridPage.steps.checkAnswer();
|
88
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
89
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
90
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
91
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
92
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
93
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
94
|
+
});
|
95
|
+
|
96
|
+
it('CSS of correct answer state', { tags: 'css' }, () => {
|
97
|
+
utilities.verifyCSS(singleSelectionGridPage.previewScoreText(), {
|
98
|
+
'color': css.color.whiteText,
|
99
|
+
'background-color': css.color.correctAnswer
|
100
|
+
});
|
101
|
+
singleSelectionGridPage.correctIcon()
|
102
|
+
.verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
|
103
|
+
utilities.verifyCSS(singleSelectionGridPage.correctIncorrectAnswerBlock(), {
|
104
|
+
'background-color': css.color.correctAnswerLabelBg,
|
105
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
106
|
+
});
|
107
|
+
utilities.verifyCSS(singleSelectionGridPage.correctIncorrectStatusMessageText(), {
|
108
|
+
'color': css.color.text,
|
109
|
+
'font-size': css.fontSize.default,
|
110
|
+
'font-weight': css.fontWeight.regular
|
111
|
+
});
|
112
|
+
});
|
113
|
+
|
114
|
+
it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
|
115
|
+
cy.checkAccessibility(singleSelectionGridPage.gridPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user attempts the question with alternative accordion responses, 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', () => {
|
119
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
120
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }, { row: 4, column: 1 }]);
|
121
|
+
singleSelectionGridPage.steps.verifyPreviewScore(10, 20);
|
122
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
123
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
124
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
125
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
126
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
127
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
128
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
129
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
130
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
131
|
+
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')
|
132
|
+
singleSelectionGridPage.steps.checkAnswer();
|
133
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
134
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
135
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
136
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
137
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
138
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
139
|
+
});
|
140
|
+
|
141
|
+
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', () => {
|
142
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
143
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 1 }, { row: 3, column: 0 }]);
|
144
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
145
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
146
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
147
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
148
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
149
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
150
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
151
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
152
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
153
|
+
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')
|
154
|
+
singleSelectionGridPage.steps.checkAnswer();
|
155
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
156
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
157
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
158
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
159
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
160
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
161
|
+
});
|
162
|
+
|
163
|
+
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', () => {
|
164
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
165
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 2, column: 2 }, { row: 3, column: 2 }]);
|
166
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
167
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
168
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
169
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
170
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
171
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
172
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
173
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
174
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
175
|
+
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')
|
176
|
+
singleSelectionGridPage.steps.checkAnswer();
|
177
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 1, column: 0 });
|
178
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
179
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
180
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
181
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
182
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
183
|
+
});
|
184
|
+
|
185
|
+
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, incorrect icon 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', () => {
|
186
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
187
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 2 }]);
|
188
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
189
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
190
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
191
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
192
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
193
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
194
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
195
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
196
|
+
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, incorrect icon should be displayed besides alternative accordion responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
197
|
+
singleSelectionGridPage.steps.checkAnswer();
|
198
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
199
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
200
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 2 });
|
201
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
202
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
203
|
+
});
|
204
|
+
|
205
|
+
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 icon should be displayed besides the 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', () => {
|
206
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
207
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 2 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
208
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
209
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
210
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
211
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
212
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
213
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
214
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
215
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
216
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
217
|
+
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')
|
218
|
+
singleSelectionGridPage.steps.checkAnswer();
|
219
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
220
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 2 });
|
221
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
222
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
223
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
224
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
225
|
+
});
|
226
|
+
|
227
|
+
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', () => {
|
228
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
229
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 2 }, { row: 4, column: 2 }]);
|
230
|
+
singleSelectionGridPage.steps.verifyPreviewScore(0, 20);
|
231
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
232
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
233
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
234
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
235
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
236
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
237
|
+
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')
|
238
|
+
singleSelectionGridPage.steps.checkAnswer();
|
239
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 2 });
|
240
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 2 });
|
241
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
242
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
243
|
+
});
|
244
|
+
|
245
|
+
it('CSS of incorrect answer state', { tags: 'css' }, () => {
|
246
|
+
singleSelectionGridPage.incorrectIcon()
|
247
|
+
.verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
|
248
|
+
utilities.verifyCSS(singleSelectionGridPage.correctIncorrectAnswerBlock(), {
|
249
|
+
'background-color': css.color.incorrectAnswerLabelBg,
|
250
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
251
|
+
});
|
252
|
+
utilities.verifyCSS(singleSelectionGridPage.correctIncorrectStatusMessageText(), {
|
253
|
+
'color': css.color.text,
|
254
|
+
'font-size': css.fontSize.default,
|
255
|
+
'font-weight': css.fontWeight.regular
|
256
|
+
});
|
257
|
+
});
|
258
|
+
|
259
|
+
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|
260
|
+
cy.checkAccessibility(singleSelectionGridPage.gridPreviewTab().parents('[class*="question-preview-wrapper"]'));
|
261
|
+
});
|
262
|
+
});
|
263
|
+
});
|
@@ -0,0 +1,140 @@
|
|
1
|
+
import { singleSelectionGridPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
describe('Create Item page - Single selection grid: Manually and non scored', () => {
|
5
|
+
before(() => {
|
6
|
+
cy.loginAs('admin');
|
7
|
+
});
|
8
|
+
|
9
|
+
describe('Question Preview: Manually Scored', () => {
|
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.setRowsAndColumnsForBasicQuestion();
|
16
|
+
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
17
|
+
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
18
|
+
singleSelectionGridPage.steps.expandScoringTypeDropdown();
|
19
|
+
singleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
20
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
21
|
+
});
|
22
|
+
|
23
|
+
it('In Preview tab, question instructions and the question grid as set by the user should be displayed in the preview tab', () => {
|
24
|
+
singleSelectionGridPage.steps.verifyQuestionInstructionsTextPreviewTab('Please select following animals facts are correct or not');
|
25
|
+
singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
26
|
+
singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 1, column: 0 }, 'Heading');
|
27
|
+
singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 2, column: 0 }, 'Subheading');
|
28
|
+
singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 1, column: 0 }, 'Elephants are the only mammals that can\'t jump');
|
29
|
+
singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 2, column: 0 }, 'Bats are blind and navigate by using echolocation');
|
30
|
+
singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 3, column: 0 }, 'Whale are mammals');
|
31
|
+
singleSelectionGridPage.steps.verifyTextInGridCellPreviewTab({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
32
|
+
});
|
33
|
+
|
34
|
+
singleSelectionGridPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
|
35
|
+
});
|
36
|
+
|
37
|
+
describe('Question Preview: Non Scored', () => {
|
38
|
+
abortEarlySetup();
|
39
|
+
before(() => {
|
40
|
+
singleSelectionGridPage.steps.navigateToCreateQuestion('single selection grid');
|
41
|
+
cy.barsPreLoaderWait();
|
42
|
+
singleSelectionGridPage.steps.addTextInQuestionInstructionsInputField('Please select following animals facts are correct or not');
|
43
|
+
singleSelectionGridPage.steps.setRowsAndColumnsForBasicQuestion();
|
44
|
+
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 3, column: 0 }, 'Whale are mammals');
|
45
|
+
singleSelectionGridPage.steps.enterTextInCellPropertyInputField({ row: 4, column: 0 }, 'Tigers can jump upto 3 metres');
|
46
|
+
singleSelectionGridPage.steps.setAnswersForAllQuestionStemsInSpecifyCorrectAnswerSection([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
47
|
+
singleSelectionGridPage.steps.expandScoringTypeDropdown();
|
48
|
+
singleSelectionGridPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
49
|
+
singleSelectionGridPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
50
|
+
singleSelectionGridPage.steps.switchToPreviewTab();
|
51
|
+
});
|
52
|
+
|
53
|
+
singleSelectionGridPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
54
|
+
|
55
|
+
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', () => {
|
56
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
57
|
+
singleSelectionGridPage.steps.verifyPreviewTabPointsBackgroundForIncorrectOrPartiallyCorrectAnswer();
|
58
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
62
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 1 }, { row: 2, column: 0 }]);
|
63
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
64
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
65
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
66
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
67
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
68
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
69
|
+
cy.log('When the user attempts 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\' should be displayed and correct answer section should not be displayed')
|
70
|
+
singleSelectionGridPage.steps.checkAnswer();
|
71
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 1, column: 1 });
|
72
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 2, column: 0 });
|
73
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
74
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
75
|
+
});
|
76
|
+
|
77
|
+
it('When the user attempts the question partially correct with incorrect responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
78
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
79
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 1 }, { row: 4, column: 0 }]);
|
80
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
81
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
82
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
83
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
84
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
85
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
86
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
87
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
88
|
+
cy.log('When the user attempts the question partially correct with incorrect responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
89
|
+
singleSelectionGridPage.steps.checkAnswer();
|
90
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
91
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
92
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 3, column: 1 });
|
93
|
+
singleSelectionGridPage.steps.verifyIncorrectOptionBackgroundAndIcon({ row: 4, column: 0 });
|
94
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
95
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
96
|
+
});
|
97
|
+
|
98
|
+
it('When the user attempts the question partially correct with incomplete responses and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with a preview of the entire grid with correct answers should be displayed', () => {
|
99
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
100
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }]);
|
101
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
102
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
103
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
104
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
105
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
106
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
107
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerResponses([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
108
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
109
|
+
cy.log('When the user attempts the question partially correct with incomplete responses and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' should be displayed and correct answer section should not be displayed')
|
110
|
+
singleSelectionGridPage.steps.checkAnswer();
|
111
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
112
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
113
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 3, column: 0 });
|
114
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectIconNotExists({ row: 4, column: 1 });
|
115
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
116
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
117
|
+
});
|
118
|
+
|
119
|
+
it('When user attempts the question correctly and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed', () => {
|
120
|
+
singleSelectionGridPage.steps.resetQuestionPreview();
|
121
|
+
singleSelectionGridPage.steps.selectOptionsForAllQuestionStemsInPreviewTab([{ row: 1, column: 0 }, { row: 2, column: 1 }, { row: 3, column: 0 }, { row: 4, column: 1 }]);
|
122
|
+
singleSelectionGridPage.steps.switchToGradingView();
|
123
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
124
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
125
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
126
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
127
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
128
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
129
|
+
singleSelectionGridPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
130
|
+
cy.log('When user clicks on Check answer button after he attempts the question correctly, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' should be displayed and correct answer section should not be displayed')
|
131
|
+
singleSelectionGridPage.steps.checkAnswer();
|
132
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 1, column: 0 });
|
133
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 2, column: 1 });
|
134
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 3, column: 0 });
|
135
|
+
singleSelectionGridPage.steps.verifyCorrectOptionBackgroundAndIcon({ row: 4, column: 1 });
|
136
|
+
singleSelectionGridPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
137
|
+
singleSelectionGridPage.steps.verifyCorrectAnswerSectionNotExists();
|
138
|
+
});
|
139
|
+
});
|
140
|
+
});
|