itemengine-cypress-automation 1.0.48 → 1.0.51
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ListMatching/Scoring/groupedOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +28 -0
- package/cypress/e2e/ILC/ListMatching/Scoring/groupedOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsAllOrNothingScoringWithAlternateAnswer.js → Scoring/groupedOptionsAllOrNothingCorrectPointsGreaterThanAlternatePoints.js} +5 -7
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsAllOrNothingScoring.js → Scoring/groupedOptionsAllOrNothingScoring.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsManualAndNonScoredScoring.js → Scoring/groupedOptionsManualAndNonScoredScoring.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsPartialDifferentScorings.js → Scoring/groupedOptionsPartialDifferentWeightsScoring.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/Scoring/groupedOptionsPartialDifferrentWeightsAlternatePointsGreaterThanCorrectPoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsPartialDifferentScoringWithAlternateTab.js → Scoring/groupedOptionsPartialDifferrentWeightsCorrectPointsEqualToAlternatePoints.js} +6 -6
- package/cypress/e2e/ILC/ListMatching/Scoring/groupedOptionsPartialDifferrentWeightsCorrectPointsGreaterThanAlternatePoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/Scoring/groupedOptionsPartialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsPartialEqualWeightsScoringWithAlternateTab.js → Scoring/groupedOptionsPartialEqualWeightsCorrectPointsEqualToAlternatePoints.js} +6 -6
- package/cypress/e2e/ILC/ListMatching/Scoring/groupedOptionsPartialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingGroupedOptionsPartialEqualWeightsScoring.js → Scoring/groupedOptionsPartialEqualWeightsScorings.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/Scoring/standardOptionsAllOrNothingAlternatePointsGreaterThanCorrectPoints.js +28 -0
- package/cypress/e2e/ILC/ListMatching/Scoring/standardOptionsAllOrNothingCorrectPointsEqualToAlternatePoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsAllOrNothingScoringWithAlternateAnswer.js → Scoring/standardOptionsAllOrNothingCorrectPointsGreaterThanAlternatePoints.js} +5 -7
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsAllOrNothingScoring.js → Scoring/standardOptionsAllOrNothingScoring.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsManualAndNonScoredScoring.js → Scoring/standardOptionsManualAndNonScoredScoring.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/Scoring/standardOptionsPartialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsPartialDifferentScoringWithAlternateAnswer.js → Scoring/standardOptionsPartialDifferentWeightsCorrectPointsEqualToAlternatePoints.js} +6 -6
- package/cypress/e2e/ILC/ListMatching/Scoring/standardOptionsPartialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +30 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsPartialDIfferentScoring.js → Scoring/standardOptionsPartialDifferentWeightsScoring.js} +2 -2
- package/cypress/e2e/ILC/ListMatching/Scoring/standardOptionsPartialEqualWeightsAlternatePointsMoreThanCorrectPoints.js +29 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsPartialEqualScoringWithAlternateAnswer.js → Scoring/standardOptionsPartialEqualWeightsCorrectPointsEqualToAlternatePoints.js} +6 -6
- package/cypress/e2e/ILC/ListMatching/Scoring/standardOptionsPartialEqualWeightsCorrectPointsMoreThanAlternatePoints.js +29 -0
- package/cypress/e2e/ILC/ListMatching/{listMatchingStandardOptionsPartialEqualScoring.js → Scoring/standardOptionsPartialEqualWeightsScoring.js} +2 -2
- package/cypress/e2e/ILC/ListOrdering/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +246 -0
- package/cypress/e2e/ILC/ListOrdering/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +246 -0
- package/cypress/e2e/ILC/ListOrdering/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +246 -0
- package/cypress/e2e/ILC/ListOrdering/{listOrderingAllOrNothingScoring.js → Scoring/allOrNothingScoring.js} +3 -3
- package/cypress/e2e/ILC/ListOrdering/{listOrderingManuallyAndNonScoredScoring.js → Scoring/manuallyAndNonScoredScoring.js} +3 -3
- package/cypress/e2e/ILC/ListOrdering/Scoring/partialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +316 -0
- package/cypress/e2e/ILC/ListOrdering/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +287 -0
- package/cypress/e2e/ILC/ListOrdering/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +316 -0
- package/cypress/e2e/ILC/ListOrdering/{listOrderingPartialDifferentWeightsScoring.js → Scoring/partialDifferentWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/ListOrdering/Scoring/partialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +286 -0
- package/cypress/e2e/ILC/ListOrdering/Scoring/partialEqualWeightsCorrectPointsEqualToAlternatePoints.js +258 -0
- package/cypress/e2e/ILC/ListOrdering/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +287 -0
- package/cypress/e2e/ILC/ListOrdering/{listOrderingPartialEqualWeightsScoring.js → Scoring/partialEqualWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +261 -0
- package/cypress/e2e/ILC/ListSorting/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +261 -0
- package/cypress/e2e/ILC/ListSorting/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +261 -0
- package/cypress/e2e/ILC/ListSorting/{listSortingAllOrNothingScoring.js → Scoring/allOrNothingScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/{listSortingManuallyAndNonScoredScoring.js → Scoring/manuallyAndNonScoredScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/Scoring/partialDifferentWeightsAlternatePointsGreaterThanCorrectPoints.js +338 -0
- package/cypress/e2e/ILC/ListSorting/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternatePoints.js +303 -0
- package/cypress/e2e/ILC/ListSorting/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternatePoints.js +337 -0
- package/cypress/e2e/ILC/ListSorting/{listSortingPartialDifferentWeightsScoring.js → Scoring/partialDifferentWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/ListSorting/Scoring/partialEqualWeightsAlternatePointsGreaterThanCorrectPoints.js +307 -0
- package/cypress/e2e/ILC/ListSorting/Scoring/partialEqualWeightsCorrectPointsEqualToAlternatePoints.js +272 -0
- package/cypress/e2e/ILC/ListSorting/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternatePoints.js +307 -0
- package/cypress/e2e/ILC/ListSorting/{listSortingPartialEqualWeightsScoring.js → Scoring/partialEqualWeightsScoring.js} +3 -3
- package/cypress/e2e/ILC/Passage/multipageContentEditTab.js +242 -0
- package/cypress/e2e/ILC/Passage/passageAdditionalSettings.js +99 -0
- package/cypress/e2e/ILC/Passage/passageEditTab.js +241 -0
- package/cypress/e2e/ILC/Passage/passageHeaderSection.js +73 -0
- package/cypress/e2e/ILC/Passage/passagePreviewTab.js +246 -0
- package/cypress/pages/listMatchingScoring.js +16 -105
- package/package.json +1 -1
- package/cypress/e2e/ILC/ListOrdering/listOrderingAllOrNothingScoringWithAlternateAnswer.js +0 -712
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialDifferentWeightsScoringWithAlternateAnswer.js +0 -895
- package/cypress/e2e/ILC/ListOrdering/listOrderingPartialEqualWeightsScoringWithAlternateAnswer.js +0 -807
- package/cypress/e2e/ILC/ListSorting/listSortingAllOrNothingScoringWithAlternateAnswer.js +0 -759
- package/cypress/e2e/ILC/ListSorting/listSortingPartialDifferentWeightsScoringWithAlternateTab.js +0 -952
- package/cypress/e2e/ILC/ListSorting/listSortingPartialEqualWeightsScoringWithAlternateAnswer.js +0 -860
@@ -0,0 +1,316 @@
|
|
1
|
+
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
|
4
|
+
let options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
+
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|
6
|
+
let alternateCorrectAnswerArray = ['seed', 'flower', 'sprout', 'plant'];
|
7
|
+
|
8
|
+
describe('Create Item page - List ordering: Partial different weights scoring with alternate answer - When correct answer points are more than alternate answer points', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Question Preview: AutoScored - Partial equal weights with alternate answer: When correct answer points are more than alternate answer points', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
cy.log('Navigating to list ordering question type');
|
17
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
18
|
+
cy.log('Adding question instructions, setting correct answer order and adding points for Partial equal weights scoring type and switching to Preview tab');
|
19
|
+
cy.barsPreLoaderWait();
|
20
|
+
listOrderingPage.steps.addQuestionInstructions();
|
21
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
22
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('seed', 0);
|
23
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('sprout', 1);
|
24
|
+
listOrderingPage.steps.selectPartialDifferentWeightsCheckbox();
|
25
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(correctAnswerArray);
|
26
|
+
listOrderingPage.steps.allotPartialDifferentWeightsToAllPointsFields([7, 5, 4, 8]);
|
27
|
+
listOrderingPage.steps.clickOnAddAlternateAnswerButton();
|
28
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('seed', 0);
|
29
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('plant', 3);
|
30
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('flower', 1);
|
31
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(alternateCorrectAnswerArray);
|
32
|
+
listOrderingPage.steps.allotPartialDifferentWeightsToAllPointsFields([6, 3, 2, 9]);
|
33
|
+
listOrderingPage.steps.uncheckRoundDownScoreCheckbox();
|
34
|
+
listOrderingPage.steps.expandAdditonalSettings();
|
35
|
+
listOrderingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
36
|
+
listOrderingPage.steps.switchToPreviewTab();
|
37
|
+
});
|
38
|
+
|
39
|
+
//Failing due to https://redmine.zeuslearning.com/issues/538081
|
40
|
+
it('When the user selects \'Show correct answer\' checkbox without attempting the question then correct/incorrect icons should not be displayed, correct/incorrect answer label and border should not be displayed and the correct tab order should be displayed in the \'Correct answers:\' container', () => {
|
41
|
+
cy.log('Total points displayed besides Show correct answer checkbox should be of Correct Answer points')
|
42
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(0, 24);
|
43
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
44
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
45
|
+
listOrderingPage.steps.verifyCorrectIncorrectIconsDoesNotExist();
|
46
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(correctAnswerArray, ['1', '2', '3', '4']);
|
47
|
+
cy.log('Post step: Unchecking the show correct answer checkbox')
|
48
|
+
listOrderingPage.steps.uncheckShowCorrectAnswerCheckbox();
|
49
|
+
});
|
50
|
+
|
51
|
+
it('When the user attempts the question according to the correct tab then user should be awarded with full points and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside all the options, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
52
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
53
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
54
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 1);
|
55
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(correctAnswerArray);
|
56
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(24, 24);
|
57
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
58
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
59
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
60
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
61
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
62
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
63
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
64
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
65
|
+
|
66
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
67
|
+
|
68
|
+
cy.log('When the user attempts the question according to the correct tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside all the options, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
69
|
+
listOrderingPage.steps.checkAnswer()
|
70
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
71
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
72
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
73
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
74
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
75
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
76
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When the user attempts the question according to the alternate tab then user should be awarded with points of the alternate tab(less than full points) and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside all the options, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
80
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
81
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
82
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 3);
|
83
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 1);
|
84
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(alternateCorrectAnswerArray);
|
85
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(20, 24);
|
86
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
87
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
88
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
89
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
90
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
91
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
92
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
93
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
94
|
+
|
95
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
96
|
+
|
97
|
+
cy.log('When the user attempts the question according to the alternate tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside all the options, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
98
|
+
listOrderingPage.steps.checkAnswer()
|
99
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
100
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
101
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
102
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
103
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
104
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
105
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
106
|
+
});
|
107
|
+
|
108
|
+
it('When the user attempts the question partially correct exclusively according to the correct tab then points of the correctly ordered options should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside the options at the correct position with respect to the correct tab and red cross-mark icons should be displayed beside the incorrectly attempted options, the \'Correct answers:\' container should contain the correct answers of the incorrectly attempted options from the correct tab with numeration and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
109
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
110
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 0);
|
111
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 1);
|
112
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['flower', 'sprout', 'plant', 'seed']);
|
113
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(9, 24);
|
114
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
115
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
116
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
117
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
118
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
119
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(['seed', 'flower'], ['1', '4']);
|
120
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
121
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
122
|
+
|
123
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
124
|
+
|
125
|
+
cy.log('When the user attempts the question partially correct exclusively according to the correct tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside the options at the correct position with respect to the correct tab and red cross-mark icons should be displayed beside the incorrectly attempted options,the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
126
|
+
listOrderingPage.steps.checkAnswer()
|
127
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
128
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
129
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
130
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
131
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
132
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
133
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
134
|
+
});
|
135
|
+
|
136
|
+
it('When the user attempts the question partially correct exclusively according to the alternate tab then points of the correctly ordered options should be awarded and on selecting \'Show correct answer\' checkbox green check-mark icons should be displayed beside the options at the correct position with respect to the alternate tab and red cross-mark icons should be displayed beside the incorrectly attempted options, the \'Correct answers:\' container should contain the correct answers of the incorrectly attempted options from the correct tab with numeration and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
137
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
138
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 1);
|
139
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['plant', 'flower', 'sprout', 'seed']);
|
140
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(5, 24);
|
141
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
142
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
143
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
144
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
145
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
146
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(['seed', 'plant'], ['1', '4']);
|
147
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
148
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
149
|
+
|
150
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
151
|
+
|
152
|
+
cy.log('When the user attempts the question partially correct exclusively according to the alternate tab then on selecting \'Check answer\' button green check-mark icons should be displayed beside the options at the correct position with respect to the alternate tab and red cross-mark icons should be displayed beside the incorrectly attempted options, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
153
|
+
listOrderingPage.steps.checkAnswer()
|
154
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
155
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('flower');
|
156
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('sprout');
|
157
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
158
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
159
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
160
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
161
|
+
});
|
162
|
+
|
163
|
+
it('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then user should be awarded with points of the tab that awards more points i.e. in this case correct tab and on selecting the \'Show correct answer\' checkbox the green check-mark icons should be displayed beside the options ordered according to the correct tab and red cross-mark icons should be displayed beside the options ordered according to the alternate tab, the \'Correct answers:\' container should have correct options of the incorrectly ordered options from the correct tab with numeration and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
164
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
165
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
166
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 1);
|
167
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 2);
|
168
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'flower', 'plant', 'sprout']);
|
169
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(11, 24);
|
170
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
171
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
172
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
173
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
174
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
175
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(['sprout', 'flower'], ['2', '4']);
|
176
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
177
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
178
|
+
|
179
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
180
|
+
|
181
|
+
cy.log('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then on selecting the \'Check answer\' button the green check-mark icons should be displayed beside the options ordered according to the correct tab and red cross-mark icons should be displayed beside the options ordered according to the alternate tab, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
182
|
+
listOrderingPage.steps.checkAnswer()
|
183
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
184
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
185
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
186
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
187
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
188
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
189
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
190
|
+
});
|
191
|
+
|
192
|
+
it('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then user should be awarded with points of the tab that awards more points i.e. in this case alternate tab and on selecting the \'Show correct answer\' checkbox the green check-mark icons should be displayed beside the options ordered according to the alternate tab and red cross-mark icons should be displayed beside the options ordered according to the correct tab, the \'Correct answers:\' container should have correct options of the incorrectly ordered options from the alternate tab with numeration and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
193
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
194
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
195
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 1);
|
196
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('plant', 3);
|
197
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'sprout', 'flower', 'plant']);
|
198
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(15, 24);
|
199
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
200
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
201
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
202
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
203
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
204
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(['flower', 'sprout'], ['2', '3']);
|
205
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
206
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
207
|
+
|
208
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
209
|
+
|
210
|
+
cy.log('When the user attempts the question partially correct with equal number of correct options order form the correct and alternate tab then on selecting the \'Check answer\' button the green check-mark icons should be displayed beside the options ordered according to the correct tab and red cross-mark icons should be displayed beside the options ordered according to the alternate tab, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
211
|
+
listOrderingPage.steps.checkAnswer()
|
212
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
213
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
214
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
215
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('plant');
|
216
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
217
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
218
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
219
|
+
});
|
220
|
+
|
221
|
+
it('Race condition: When the user attempts the question with the common option between correct tab and alternate tab then user should be awarded with points of the tab with more points i.e. in this case correct tab and on selecting the \'Show correct answer\' checkbox the green check-mark icon should be displayed beside the common option and red cross-marks should be displayed beside the incorrectly ordered options, the \'Correct answers:\' container should have correct options of the incorrectly ordered options from the correct tab with numeration and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
222
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
223
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
224
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 3);
|
225
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'plant', 'flower', 'sprout']);
|
226
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(7, 24);
|
227
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
228
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
229
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
230
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
231
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
232
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(['sprout', 'plant', 'flower'], ['2', '3', '4']);
|
233
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
234
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
235
|
+
|
236
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
237
|
+
|
238
|
+
cy.log('Race condition: When the user attempts the question with the common option between correct tab and alternate tab then on selecting the \'Check answer\' button the green check-mark icon should be displayed beside the common option and red cross-marks should be displayed beside the incorrectly ordered options, the \'Correct answers:\' container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
239
|
+
listOrderingPage.steps.checkAnswer();
|
240
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
241
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
242
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
243
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
244
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
245
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
246
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
247
|
+
});
|
248
|
+
|
249
|
+
it('When user attempts the question incorrectly then user should be awarded 0 points and on selecting \'Show correct answer\' checkbox, red cross-mark icons should be displayed beside all the options, the correct answer container with all correct answers from the correct tab along with numeration should be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview', () => {
|
250
|
+
listOrderingPage.steps.resetQuestionPreview(options);
|
251
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 3);
|
252
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 0);
|
253
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['flower', 'plant', 'seed', 'sprout']);
|
254
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(0, 24);
|
255
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
256
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
257
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
258
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
259
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
260
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(correctAnswerArray, ['1', '2', '3', '4']);
|
261
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
262
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
263
|
+
|
264
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
265
|
+
|
266
|
+
cy.log('When user attempts the question incorrectly and clicks on the \'Check Answer\' button, then red cross-mark icons should be displayed beside all the options, the correct answer container should not be displayed and correct/incorrect answer label and border for the question should not be displayed below the question preview')
|
267
|
+
listOrderingPage.steps.checkAnswer();
|
268
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
269
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
270
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('seed');
|
271
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
272
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
273
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
274
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
275
|
+
});
|
276
|
+
|
277
|
+
it('Overachiever case: When the user attempts the question with more number of correct options from the alternate tab than the correct tab but the score of the individual response selected from the correct tab overpowers the combined score of the alternate tab answers then green checkmark icons should be displayed for the correct tab option, red crossmark icon should be displayed for the alternate tab options and points awarded should be of the correct tab, the \'Correct answers:\' container should have answers of the correct tab for the incorrectly ordered options and correct/incorrect answer label and its border should not be displayed', () => {
|
278
|
+
cy.log('(Overachiever case) Prestep: Switching to Edit tab and alloting points to correct and alternate tab such that the difference between the points is substantial and the points per response are in decimal')
|
279
|
+
listOrderingPage.steps.switchToEditTab();
|
280
|
+
listOrderingPage.steps.deleteAlternateTab();
|
281
|
+
listOrderingPage.steps.addAlternateTab(1);
|
282
|
+
listOrderingPage.steps.clickAndReorderOptionInSetCorrectAnswerSection('flower', 1)
|
283
|
+
listOrderingPage.steps.verifyOptionsTextContentInSetCorrectAnswerSection(['plant', 'flower', 'sprout', 'seed']);
|
284
|
+
listOrderingPage.steps.allotPartialDifferentWeightsToAllPointsFields([4.5, 1.5, 2.5, 3.5]);
|
285
|
+
listOrderingPage.steps.navigateToCorrectTab();
|
286
|
+
listOrderingPage.steps.allotPartialDifferentWeightsToAllPointsFields([12.5, 14.5, 17.5, 5.5]);
|
287
|
+
listOrderingPage.steps.switchToPreviewTab();
|
288
|
+
|
289
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('seed', 0);
|
290
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('flower', 1);
|
291
|
+
listOrderingPage.steps.clickAndReorderOptionInPrevewTab('sprout', 2);
|
292
|
+
listOrderingPage.steps.verifyTextContentOfOptionsInPreviewTab(['seed', 'flower', 'sprout', 'plant']);
|
293
|
+
listOrderingPage.steps.verifyPreviewTabScoreText(12.5, 50);
|
294
|
+
listOrderingPage.steps.checkShowCorrectAnswerCheckbox();
|
295
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
296
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
297
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
298
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
299
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerContents(['sprout', 'plant', 'flower'], ['2', '3', '4']);
|
300
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
301
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
302
|
+
|
303
|
+
listOrderingPage.steps.verifyQuestionPreviewStateWhenShowCorrectAnswerIsUnchecked();
|
304
|
+
|
305
|
+
cy.log('Overachiever case: When the user clicks on \'Check answer\' button, green checkmark icons should be displayed for the correct tab option, red crossmark icon should be displayed for the alternate tab options, \'Correct answers:\' container should not be displayed and correct/incorrect answer label and its border should not be displayed')
|
306
|
+
listOrderingPage.steps.checkAnswer()
|
307
|
+
listOrderingPage.steps.verifyCorrectOptionsCheckmarkIcon('seed');
|
308
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('flower');
|
309
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('sprout');
|
310
|
+
listOrderingPage.steps.verifyIncorrectOptionsCrossmarkIcon('plant');
|
311
|
+
listOrderingPage.steps.verifyCorrectIncorrectBorderNotVisible();
|
312
|
+
listOrderingPage.steps.verifyCorrectIncorrectAnswerLabelNotExists();
|
313
|
+
listOrderingPage.steps.verifyCorrectAnswerContainerDoesNotExist();
|
314
|
+
});
|
315
|
+
});
|
316
|
+
});
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { listOrderingPage } from "
|
2
|
-
import abortEarlySetup from "
|
3
|
-
import utilities from "
|
1
|
+
import { listOrderingPage } from "../../../../pages/listOrderingPage";
|
2
|
+
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../../support/helpers/utilities";
|
4
4
|
|
5
5
|
let options = ['sprout', 'plant', 'flower', 'seed'];
|
6
6
|
let correctAnswerArray = ['seed', 'sprout', 'plant', 'flower'];
|