itemengine-cypress-automation 1.0.238-deletedCypressRepeat-09cad14.0 → 1.0.239-20thAugustChanges-35a78fd.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 +3 -3
- package/cypress/e2e/ILC/ChartsBar/labelOptionsSection.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/Scoring/perDropzoneAlternativePointsGreaterThanCorrectPoints.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +14 -13
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/additionalSettingsBasic.js +1 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageDropdownNew/editTabBasicSection.js +5 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +4 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +1 -1
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/ImageHighlight/additionalSettingsBasic.js +2 -1
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +6 -3
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +2 -1
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/Matching/Scoring/partialDifferentWeightsScoringBasic.js +6 -6
- package/cypress/e2e/ILC/Matching/minimumScoringPenaltyPointsAndRoundingDropdown.js +8 -4
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithAlternativePointsGreaterThanCorrectPoints.js +144 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsEqualToAlternativePoints.js +144 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +214 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/manuallyAndNonScored.js +112 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsScoringBasic.js +397 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +179 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternatePoints.js +158 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternatePoints.js +179 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsBasic.js +143 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +167 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +145 -0
- package/cypress/e2e/ILC/MatchingDropdown/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +166 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +12 -10
- package/cypress/e2e/ILC/NumberLine/lineSettingsSection.js +3 -5
- package/cypress/e2e/ILC/NumberLine/verticalNumberLine/numberLineSection.js +3 -3
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +2 -2
- package/cypress/e2e/ILC/NumberLineLabel/editTabScoring.js +2 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +1 -1
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +2 -1
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +10 -2
- package/cypress/e2e/ILC/TextEntryMath/editTabScoringSection.js +13 -1
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodEquivalentStructures.js +10 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchExact.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodMatchValue.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodSymbolsAreEquivalent.js +4 -2
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodValueIsEquivalent.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +37 -5
- package/cypress/e2e/ILC/TextEntryMath/minimumScoringPenaltyPointsAndRoundingDropdown.js +6 -0
- package/cypress/e2e/ILC/TextEntryMath/previewContentsForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/TextEntryMath/responseEvaluationMethodsAndCustomSettings.js +1 -0
- package/cypress/e2e/ILC/TextEntryMath/specifyCorrectAnswerSection.js +4 -5
- package/cypress/e2e/ILC/TextEntryMathWithImage/allOrNothingScoringForAllViews.smoke.js +6 -0
- package/cypress/e2e/ILC/TextEntryMathWithImage/backgroundImageAndCanvasProperties.js +4 -1
- package/cypress/e2e/ILC/TextEntryMathWithImage/previewTabContentsForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/UploadResponse/uploadedFileProperties.js +1 -1
- package/cypress/pages/audioResponsePage.js +1 -0
- package/cypress/pages/components/createQuestionBasePage.js +49 -4
- package/cypress/pages/components/draggableOptionsStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +1 -1
- package/cypress/pages/components/fillInTheGapsDropdownCommonComponent.js +22 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +5 -2
- package/cypress/pages/components/imageCanvasComponent.js +6 -9
- package/cypress/pages/components/numberLineCommonComponent.js +6 -6
- package/cypress/pages/components/questionInstructionsComponent.js +3 -2
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +2 -2
- package/cypress/pages/feedbackScalePage.js +1 -1
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +0 -1
- package/cypress/pages/fillInTheGapsOverImageDropdownPage.js +2 -0
- package/cypress/pages/geoGebraActivityPage.js +13 -1
- package/cypress/pages/imageHighlightPage.js +1 -0
- package/cypress/pages/listOrderingPage.js +1 -1
- package/cypress/pages/matchingPage.js +21 -0
- package/cypress/pages/multipleSelectionGridPage.js +16 -0
- package/cypress/pages/numberLineLabelPage.js +16 -3
- package/cypress/pages/shortTextResponsePage.js +1 -0
- package/package.json +1 -1
- /package/cypress/e2e/ILC/NumberLineLabel/verticalNumberLine/{checkAnswerFunctionalityForAllViews.js → checkAnswerFunctionalityForAllViews.smoke.js} +0 -0
@@ -0,0 +1,144 @@
|
|
1
|
+
import { matchingPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
6
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
7
|
+
|
8
|
+
describe('Create item page - Matching: All or nothing with alternative answers', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are equal to \'Alternative answer\' points', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
19
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Options layout Dropdown menu');
|
20
|
+
matchingPage.steps.allotPoints(20);
|
21
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
22
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
23
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
24
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
25
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
26
|
+
matchingPage.steps.allotPoints(20);
|
27
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
28
|
+
matchingPage.steps.switchToPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
|
32
|
+
matchingPage.steps.switchToGradingView();
|
33
|
+
matchingPage.steps.verifyDropdownNumeration(0);
|
34
|
+
matchingPage.steps.verifyDropdownNumeration(1);
|
35
|
+
matchingPage.steps.verifyDropdownNumeration(2);
|
36
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
37
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
38
|
+
});
|
39
|
+
|
40
|
+
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', () => {
|
41
|
+
matchingPage.steps.resetQuestionPreview();
|
42
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
43
|
+
matchingPage.steps.verifyPreviewScore(20, 20);
|
44
|
+
matchingPage.steps.switchToGradingView();
|
45
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
46
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
47
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
48
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
49
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
50
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
51
|
+
});
|
52
|
+
|
53
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with full points and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
54
|
+
matchingPage.steps.resetQuestionPreview();
|
55
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
56
|
+
matchingPage.steps.verifyPreviewScore(20, 20);
|
57
|
+
matchingPage.steps.switchToGradingView();
|
58
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
59
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
60
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
61
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
62
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
63
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
64
|
+
});
|
65
|
+
|
66
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
|
67
|
+
matchingPage.steps.resetQuestionPreview();
|
68
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }]);
|
69
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
70
|
+
matchingPage.steps.switchToGradingView();
|
71
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
72
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
73
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
74
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
75
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
76
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
80
|
+
matchingPage.steps.resetQuestionPreview();
|
81
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }]);
|
82
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
83
|
+
matchingPage.steps.switchToGradingView();
|
84
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
85
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
86
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
87
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
88
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
89
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
90
|
+
});
|
91
|
+
|
92
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion and alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
93
|
+
matchingPage.steps.resetQuestionPreview();
|
94
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[0] }]);
|
95
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
96
|
+
matchingPage.steps.switchToGradingView();
|
97
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
98
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
99
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
100
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
101
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
102
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
106
|
+
matchingPage.steps.resetQuestionPreview();
|
107
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
108
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
109
|
+
matchingPage.steps.switchToGradingView();
|
110
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
111
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
112
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
113
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
114
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
115
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
116
|
+
});
|
117
|
+
|
118
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
119
|
+
matchingPage.steps.resetQuestionPreview();
|
120
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
121
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
122
|
+
matchingPage.steps.switchToGradingView();
|
123
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
124
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
125
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
126
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
127
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
128
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropdown cell numeration should be displayed', () => {
|
132
|
+
matchingPage.steps.resetQuestionPreview();
|
133
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[4] }]);
|
134
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
135
|
+
matchingPage.steps.switchToGradingView();
|
136
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
137
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
138
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
139
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
140
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
141
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
142
|
+
});
|
143
|
+
});
|
144
|
+
});
|
@@ -0,0 +1,214 @@
|
|
1
|
+
import { matchingPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
6
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
7
|
+
|
8
|
+
describe('Create item page - Matching: All or nothing with alternative answers', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question preview: Auto scored - All or nothing with alternative answer - When \'Correct answer\' points are more than \'Alternative answer\' points', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
19
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Options layout Dropdown menu');
|
20
|
+
matchingPage.steps.allotPoints(20);
|
21
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
22
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
23
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
24
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
25
|
+
matchingPage.steps.addAlternativeAnswerAccordion(1);
|
26
|
+
matchingPage.steps.allotPoints(10);
|
27
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
28
|
+
matchingPage.steps.switchToPreviewTab();
|
29
|
+
});
|
30
|
+
|
31
|
+
it('When the user selects \'Grading\' view without attempting the question, cell numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers from the correct accordion and respective dropdown numeration', () => {
|
32
|
+
matchingPage.steps.switchToGradingView();
|
33
|
+
matchingPage.steps.verifyDropdownNumeration(0);
|
34
|
+
matchingPage.steps.verifyDropdownNumeration(1);
|
35
|
+
matchingPage.steps.verifyDropdownNumeration(2);
|
36
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
37
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
38
|
+
});
|
39
|
+
|
40
|
+
it('CSS of correct answer section and dropzone numeration', { tags: 'css' }, () => {
|
41
|
+
utilities.verifyCSS(matchingPage.correctAnswersLabel(), {
|
42
|
+
'color': css.color.sectionHeading,
|
43
|
+
'font-size': css.fontSize.default,
|
44
|
+
'font-weight': css.fontWeight.bold
|
45
|
+
});
|
46
|
+
utilities.verifyCSS(matchingPage.dropdownNumeration(), {
|
47
|
+
'background-color': css.color.defaultBackground,
|
48
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
49
|
+
});
|
50
|
+
utilities.verifyCSS(matchingPage.correctAnswerContainer().find('[class*="GreenBlock"]'), {
|
51
|
+
'background-color': css.color.correctAnswer
|
52
|
+
});
|
53
|
+
utilities.verifyCSS(matchingPage.correctAnswerContainer().find('[class*="GreenBlock"] svg g'), {
|
54
|
+
'fill': css.color.defaultBackground
|
55
|
+
});
|
56
|
+
utilities.verifyCSS(matchingPage.correctAnswersOptions(), {
|
57
|
+
'color': css.color.text,
|
58
|
+
'font-size': css.fontSize.default,
|
59
|
+
'font-weight': css.fontWeight.regular,
|
60
|
+
});
|
61
|
+
utilities.verifyCSS(matchingPage.correctAnswersOptions().parents('[class*="__AnswerWrapper"]'), {
|
62
|
+
'border': `1px solid ${css.color.correctOptionBorder}`
|
63
|
+
});
|
64
|
+
});
|
65
|
+
|
66
|
+
it('Accessibility of correct answer section and dropzone numeration', { tags: 'a11y' }, () => {
|
67
|
+
cy.checkAccessibility(matchingPage.previewTabQuestionWrapper());
|
68
|
+
});
|
69
|
+
|
70
|
+
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', () => {
|
71
|
+
matchingPage.steps.resetQuestionPreview();
|
72
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
73
|
+
matchingPage.steps.verifyPreviewScore(20, 20);
|
74
|
+
matchingPage.steps.switchToGradingView();
|
75
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
76
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
77
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
78
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
79
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
80
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
81
|
+
});
|
82
|
+
|
83
|
+
it('CSS of Correct answer state', { tags: 'css' }, () => {
|
84
|
+
utilities.verifyCSS(matchingPage.previewScoreText(), {
|
85
|
+
'color': css.color.whiteText,
|
86
|
+
'background-color': css.color.correctAnswer
|
87
|
+
});
|
88
|
+
matchingPage.correctIcon()
|
89
|
+
.verifyPseudoClassBeforeProperty('color', css.color.correctAnswer);
|
90
|
+
utilities.verifyCSS(matchingPage.correctIncorrectAnswerBlock(), {
|
91
|
+
'background-color': css.color.correctAnswerLabelBg,
|
92
|
+
'border': `1px solid ${css.color.correctAnswer}`
|
93
|
+
});
|
94
|
+
utilities.verifyCSS(matchingPage.correctIncorrectStatusMessageText(), {
|
95
|
+
'color': css.color.text,
|
96
|
+
'font-size': css.fontSize.default,
|
97
|
+
'font-weight': css.fontWeight.regular
|
98
|
+
});
|
99
|
+
});
|
100
|
+
|
101
|
+
it('Accessibility of correct answer state', { tags: 'a11y' }, () => {
|
102
|
+
cy.checkAccessibility(matchingPage.previewTabQuestionWrapper());
|
103
|
+
});
|
104
|
+
|
105
|
+
it('When the user attempts the question with responses from the alternative accordion, then the user should be awarded with points specified for alternative accordion (less than full points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
106
|
+
matchingPage.steps.resetQuestionPreview();
|
107
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
108
|
+
matchingPage.steps.verifyPreviewScore(10, 20);
|
109
|
+
matchingPage.steps.switchToGradingView();
|
110
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
111
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
112
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
113
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
114
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
115
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
116
|
+
});
|
117
|
+
|
118
|
+
it('When the user attempts the question with partially correct options exclusively from the correct accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown numeration should be displayed', () => {
|
119
|
+
matchingPage.steps.resetQuestionPreview();
|
120
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }]);
|
121
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
122
|
+
matchingPage.steps.switchToGradingView();
|
123
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
124
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
125
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
126
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
127
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
128
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user attempts the question with partially correct options exclusively from the alternative accordion, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
132
|
+
matchingPage.steps.resetQuestionPreview();
|
133
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }]);
|
134
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
135
|
+
matchingPage.steps.switchToGradingView();
|
136
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
137
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
138
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
139
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
140
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
141
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
142
|
+
});
|
143
|
+
|
144
|
+
it('When the user attempts the question partially correct with all the responses correct as per the alternative accordion but one response incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the response from the correct accordion, incorrect icon should be displayed besides the responses from the alternative accordion and no icon should be displayed beside unattempted response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
145
|
+
matchingPage.steps.resetQuestionPreview();
|
146
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
147
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
148
|
+
matchingPage.steps.switchToGradingView();
|
149
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
150
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
151
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
152
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
153
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
154
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
155
|
+
});
|
156
|
+
|
157
|
+
it('When the user has attempted the question with equal number of correct responses from correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be displayed besides response field with correct answer responses, red cross-mark icon should be displayed beside responses from the alternative tab, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
158
|
+
matchingPage.steps.resetQuestionPreview();
|
159
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[5] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
160
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
161
|
+
matchingPage.steps.switchToGradingView();
|
162
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
163
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
164
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
165
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
166
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
167
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
168
|
+
});
|
169
|
+
|
170
|
+
it('Race condition : When the user attempts the question with the common response between correct and alternative accordion, then the user should be awarded with 0 points and on switching to \'Grading\' view, green check-mark icon should be besides the common response, no icon should be displayed beside unattempted response, \'Your answer is incorrect\' and correct answer section with all correct answers from the correct accordion along with dropdown cell numeration should be displayed', () => {
|
171
|
+
matchingPage.steps.resetQuestionPreview();
|
172
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
173
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
174
|
+
matchingPage.steps.switchToGradingView();
|
175
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
176
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
177
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
178
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
179
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
180
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
181
|
+
});
|
182
|
+
|
183
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, no icon should be displayed beside unattempted response a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with dropdown cell numeration should be displayed', () => {
|
184
|
+
matchingPage.steps.resetQuestionPreview();
|
185
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[4] }]);
|
186
|
+
matchingPage.steps.verifyPreviewScore(0, 20);
|
187
|
+
matchingPage.steps.switchToGradingView();
|
188
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
189
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
190
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
191
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
192
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
193
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
194
|
+
});
|
195
|
+
|
196
|
+
it('CSS of incorrect answer state', { tags: 'css' }, () => {
|
197
|
+
matchingPage.incorrectIcon()
|
198
|
+
.verifyPseudoClassBeforeProperty('color', css.color.incorrectAnswer);
|
199
|
+
utilities.verifyCSS(matchingPage.correctIncorrectAnswerBlock(), {
|
200
|
+
'background-color': css.color.incorrectAnswerLabelBg,
|
201
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
202
|
+
});
|
203
|
+
utilities.verifyCSS(matchingPage.correctIncorrectStatusMessageText(), {
|
204
|
+
'color': css.color.text,
|
205
|
+
'font-size': css.fontSize.default,
|
206
|
+
'font-weight': css.fontWeight.regular
|
207
|
+
});
|
208
|
+
});
|
209
|
+
|
210
|
+
it('Accessibility of incorrect answer state', { tags: 'a11y' }, () => {
|
211
|
+
cy.checkAccessibility(matchingPage.previewTabQuestionWrapper());
|
212
|
+
});
|
213
|
+
});
|
214
|
+
});
|
@@ -0,0 +1,112 @@
|
|
1
|
+
import { matchingPage } from "../../../../pages";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
|
+
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
5
|
+
const optionsArray = ['Cat', 'Elephant', 'Fish', 'Bear', 'Eagle', 'Penguin'];
|
6
|
+
|
7
|
+
describe('Create Item page - Matching: Manually and non scored', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Question Preview: Manually Scored', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
18
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
19
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
20
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
21
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
22
|
+
matchingPage.steps.expandScoringTypeDropdown();
|
23
|
+
matchingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored');
|
24
|
+
matchingPage.steps.switchToPreviewTab();
|
25
|
+
});
|
26
|
+
|
27
|
+
it('In Preview tab, question instructions and dropdowns should be displayed in the preview tab', () => {
|
28
|
+
matchingPage.steps.verifyQuestionInstructionsTextPreviewTab('Fill the categories with the right answer.');
|
29
|
+
utilities.verifyElementCount(matchingPage.dropdownPreviewTab(), 3);
|
30
|
+
matchingPage.steps.verifyDropdownIsEmptyPreviewTab(0);
|
31
|
+
matchingPage.steps.verifyDropdownIsEmptyPreviewTab(1);
|
32
|
+
matchingPage.steps.verifyDropdownIsEmptyPreviewTab(2);
|
33
|
+
});
|
34
|
+
|
35
|
+
matchingPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Manually scored');
|
36
|
+
});
|
37
|
+
|
38
|
+
describe('Question Preview: Non Scored', () => {
|
39
|
+
abortEarlySetup();
|
40
|
+
before(() => {
|
41
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('Fill the categories with the right answer.');
|
44
|
+
matchingPage.steps.selectOptionLayoutToggleButton('Dropdown menu');
|
45
|
+
matchingPage.steps.addMultipleOptionFields(3);
|
46
|
+
matchingPage.steps.enterTextInPromptInputField(promptTextArray);
|
47
|
+
matchingPage.steps.enterTextInOptionInputFieldDropdown(optionsArray);
|
48
|
+
matchingPage.steps.selectResponseFromDropdownInSpecifyCorrectAnswerSection([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
49
|
+
matchingPage.steps.expandScoringTypeDropdown();
|
50
|
+
matchingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
51
|
+
matchingPage.steps.switchToPreviewTab();
|
52
|
+
});
|
53
|
+
|
54
|
+
matchingPage.tests.verifyGradingStudentViewRadioButtonAndScoringTypeInPreviewTab('Non scored');
|
55
|
+
|
56
|
+
it('When the user selects \'Grading\' view without attempting the question, correct/incorrect icons should not be displayed and the correct answer section should be displayed with correct answers', () => {
|
57
|
+
matchingPage.steps.switchToGradingView();
|
58
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
59
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
60
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(2);
|
61
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
62
|
+
matchingPage.steps.switchToStudentView();
|
63
|
+
});
|
64
|
+
|
65
|
+
it('When the user attempts the question incorrectly and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
66
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[3] }, { dropdownIndex: 1, dropdownOption: optionsArray[4] }, { dropdownIndex: 2, dropdownOption: optionsArray[1] }]);
|
67
|
+
matchingPage.steps.switchToGradingView();
|
68
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(0);
|
69
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(1);
|
70
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
71
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
72
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
73
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
74
|
+
});
|
75
|
+
|
76
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
77
|
+
matchingPage.steps.resetQuestionPreview();
|
78
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 2, dropdownOption: optionsArray[4] }]);
|
79
|
+
matchingPage.steps.switchToGradingView();
|
80
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
81
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(1);
|
82
|
+
matchingPage.steps.verifyIncorrectOptionIconDropdown(2);
|
83
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
84
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
85
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
86
|
+
});
|
87
|
+
|
88
|
+
it('When the user attempts the question partially correct with all the dropdowns correctly attempted but one dropdown incomplete, then on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
89
|
+
matchingPage.steps.resetQuestionPreview();
|
90
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
91
|
+
matchingPage.steps.switchToGradingView();
|
92
|
+
matchingPage.steps.verifyCorrectIncorrectIconNotExistDropdown(0);
|
93
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
94
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
95
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
96
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount([['Elephant'], ['Fish'], ['Cat']]);
|
97
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
98
|
+
});
|
99
|
+
|
100
|
+
it('When user attempts the question correctly, on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
101
|
+
matchingPage.steps.resetQuestionPreview();
|
102
|
+
matchingPage.steps.selectResponseFromDropdownInPreviewTab([{ dropdownIndex: 0, dropdownOption: optionsArray[1] }, { dropdownIndex: 1, dropdownOption: optionsArray[2] }, { dropdownIndex: 2, dropdownOption: optionsArray[0] }]);
|
103
|
+
matchingPage.steps.switchToGradingView();
|
104
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(0);
|
105
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(1);
|
106
|
+
matchingPage.steps.verifyCorrectOptionIconDropdown(2);
|
107
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
108
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
109
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
110
|
+
});
|
111
|
+
});
|
112
|
+
});
|