itemengine-cypress-automation 1.0.247-06SeptUpdates-b1623d7.0 → 1.0.247
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +1 -1
- package/cypress/e2e/ILC/ChartsBar/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +1 -1
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +349 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +348 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +415 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/allOrNothingPenaltyScoring.js +54 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialDifferentWeightBasic.js +254 -0
- package/cypress/e2e/ILC/ChartsLine/Scoring/partialEqualWeightBasic.js +255 -0
- package/cypress/e2e/ILC/DrawingResponse/drawingResponsePreviewTabContents.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/editCategoryFlyout.js +3 -0
- package/cypress/e2e/ILC/EssayResponse/equationEditor.smoke.js +4 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions1.smoke.js +2 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +2 -0
- package/cypress/e2e/ILC/EssayResponseBasic/essayResponseBasicCustomizeFormattingOptions.js +2 -0
- package/cypress/e2e/ILC/ImageHighlight/toolsFunctionalityEditTab.js +2 -2
- package/cypress/e2e/ILC/ListOrderingNew/styleAndLayoutCustomizationSameList.js +270 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsBasic.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +236 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/partialEqualWeightsBasic.js +150 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/setPointsPopup.js +88 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/specifyCorrectAnswerSection.js +97 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/HorizontalOrientation/studentViewSettings.js +134 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/additionalSettings.js +131 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabBasicSection.js +167 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/editTabScoring.js +202 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/headerSection.js +76 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/manuallyAndNonScoredEditTab.js +72 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/minimumScoringPenaltyPointsAndRoundingDropdown.js +197 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/optionsOrientationSection.js +180 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/specifyCorrectAnswerSection.js +95 -0
- package/cypress/e2e/ILC/ListOrderingReorderAsASeperateList/studentViewSettings.js +130 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionProperties.js +223 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDraggableOptionsPanel.js +121 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationDropzoneConnectorStyle.js +68 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionAlignment.js +71 -0
- package/cypress/e2e/ILC/Matching/styleAndLayoutCustomizationOptionPlacement.js +64 -0
- package/cypress/e2e/ILC/MatchingDropdown/styleAndLayoutCustomization.js +270 -0
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingAlternatePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/allOrNothingCorrectPointsGreaterThanAlternatePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialDifferentWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsAlternativePointsGreaterThanCorrectPoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsEqualToAlternativePoints.js +7 -7
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsCorrectPointsGreaterThanAlternativePoints.js +8 -8
- package/cypress/e2e/ILC/TextEntryMath/Scoring/partialEqualWeightsScoringBasic.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViews.smoke.js +4 -4
- package/cypress/e2e/ILC/TextEntryMath/allOrNothingBasicForAllViewsFormulaTemplate.smoke.js +272 -0
- package/cypress/e2e/ILC/TextEntryMath/evaluationMethodsWithoutSetResponse.js +6 -6
- package/cypress/fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters.js +2 -2
- package/cypress/pages/audioPlayerPage.js +4 -4
- package/cypress/pages/audioResponsePage.js +9 -1
- package/cypress/pages/chartsBarPage.js +3 -3
- package/cypress/pages/components/connectorStyleStyleAndLayoutCustomizationComponent.js +51 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +1 -1
- package/cypress/pages/components/index.js +1 -10
- package/cypress/pages/components/listOrderingCommonStyleAndLayoutComponent.js +604 -0
- package/cypress/pages/components/optionsWrapperComponent.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -6
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/cypress/pages/essayResponseBasicPage.js +4 -4
- package/cypress/pages/essayResponseMathPage.js +4 -4
- package/cypress/pages/fillInTheGapsDragAndDropPage.js +2 -2
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +2 -2
- package/cypress/pages/index.js +0 -1
- package/cypress/pages/itemPreviewPage.js +1 -2
- package/cypress/pages/itemPreviewSettingsPage.js +3 -3
- package/cypress/pages/listOrderingPage.js +384 -10
- package/cypress/pages/matchingPage.js +512 -13
- package/cypress/pages/multipleSelectionPage.js +2 -2
- package/cypress/pages/numberLineLabelPage.js +3 -3
- package/cypress/pages/shortTextResponsePage.js +0 -37
- package/cypress/pages/singleSelectionPage.js +2 -2
- package/cypress/pages/textEntryMathPage.js +41 -9
- package/cypress/pages/textSelectionPage.js +2 -2
- package/cypress/pages/uploadResponsePage.js +2 -3
- package/cypress/pages/videoResponsePage.js +9 -2
- package/package.json +1 -1
- package/cypress/fixtures/specialAndMathCharacters.js +0 -120
- package/cypress/pages/components/autoScoredAdditionalSettings.js +0 -183
- package/cypress/pages/components/autoScoredPreviewBase.js +0 -92
- package/cypress/pages/components/autoScoredScoringSection.js +0 -199
- package/cypress/pages/components/autoScoredScoringSectionMultipleResponsesType.js +0 -377
- package/cypress/pages/components/autoScoredSetCorrectAnswerSection.js +0 -297
- package/cypress/pages/components/autoScoredStudentViewSettingsForPredefinedOptions.js +0 -84
- package/cypress/pages/components/listSortingAndOrderingBase.js +0 -401
- package/cypress/pages/components/previewScoringAndShowCorrectAnswerComponent.js +0 -91
- package/cypress/pages/components/scoringSectionBase.js +0 -354
- package/cypress/pages/components/specialAndCustomSpecialCharactersComponent.js +0 -80
- package/cypress/pages/components/specialCharactersFlyoutComponent.js +0 -59
- package/cypress/pages/listSortingPage.js +0 -1198
@@ -0,0 +1,197 @@
|
|
1
|
+
import { listOrderingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
const penaltyScoringTypeArray = ['No penalty points', 'Penalty points for the entire question', 'Penalty points for each incorrect option'];
|
6
|
+
|
7
|
+
describe('Create item page - List ordering: Minimum scoring, Penalty scoring, Rounding - Edit tab', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Scoring section: Minimum scoring - Edit tab', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
18
|
+
listOrderingPage.steps.allotPoints(10);
|
19
|
+
});
|
20
|
+
|
21
|
+
listOrderingPage.tests.verifyMinimumScoringDropdown();
|
22
|
+
|
23
|
+
listOrderingPage.tests.verifyMinimumPointsLabelAndInputField();
|
24
|
+
|
25
|
+
listOrderingPage.tests.verifyMinimumPointsFieldErrorState();
|
26
|
+
});
|
27
|
+
|
28
|
+
describe('Scoring section: Penalty scoring - Edit tab', () => {
|
29
|
+
abortEarlySetup();
|
30
|
+
before(() => {
|
31
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
32
|
+
cy.barsPreLoaderWait();
|
33
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
34
|
+
listOrderingPage.steps.allotPoints(10);
|
35
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
36
|
+
});
|
37
|
+
|
38
|
+
listOrderingPage.tests.verifyPenaltyScoringDropdown(penaltyScoringTypeArray);
|
39
|
+
|
40
|
+
listOrderingPage.tests.verifyPenaltyPointsLabelAndInputField();
|
41
|
+
|
42
|
+
listOrderingPage.tests.verifyPenaltyPointsErrorState();
|
43
|
+
|
44
|
+
it('When the user selects \'Penalty points for each incorrect option\' from the penalty scoring dropdown, \'Automatically set penalty for each incorrect option to total points / no. of incorrect options\' label and checkbox should be displayed, by default the checkbox should be unchecked. Two radio buttons with labels - \'Specify total penalty points\' and \'Specify points for each incorrect option\' should be displayed. By default, \'Specify total penalty points\' radio button should be checked', () => {
|
45
|
+
listOrderingPage.steps.expandPenaltyScoringDropdown();
|
46
|
+
listOrderingPage.steps.selectOptionFromPenaltyScoringDropdown('enalty points for each incorrect option');
|
47
|
+
utilities.verifyInnerText(listOrderingPage.automaticallySetPenaltyPointsCheckboxLabel(), 'Automatically set penalty for each incorrect option to total points / no. of incorrect options');
|
48
|
+
utilities.verifyInnerText(listOrderingPage.specifyTotalPenaltyPointsRadioButtonLabel(), 'Specify total penalty points');
|
49
|
+
utilities.verifyInnerText(listOrderingPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), 'Specify points for each incorrect option');
|
50
|
+
listOrderingPage.steps.verifyAutomaticallySetPenaltyPointsCheckboxUncheckedState();
|
51
|
+
listOrderingPage.steps.verifySpecifyTotalPenaltyPointsRadioButtonCheckedState();
|
52
|
+
listOrderingPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonUncheckedState();
|
53
|
+
});
|
54
|
+
|
55
|
+
it('When \'Specify total penalty points\' is selected, a penalty points detail section with \'Total penalty points\' label and empty input field, \'Penalty points for each incorrect option: -\' label should be displayed', () => {
|
56
|
+
utilities.verifyInnerText(listOrderingPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Total penalty points');
|
57
|
+
listOrderingPage.steps.verifyTotalPenaltyPointsValue('');
|
58
|
+
utilities.verifyInnerText(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect option: -');
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When the user allots total penalty points, then \'points for each incorrect option\' should get updated as per the count of incorrect options available', () => {
|
62
|
+
listOrderingPage.steps.allotTotalPenaltyPoints(5);
|
63
|
+
listOrderingPage.steps.verifyPenaltyPointsForEachIncorrectOption(1.25);
|
64
|
+
});
|
65
|
+
|
66
|
+
it('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
|
67
|
+
listOrderingPage.steps.deleteOption(0);
|
68
|
+
listOrderingPage.steps.verifyPenaltyPointsForEachIncorrectOption(1.6667);
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user adds a new option, then \'points for each incorrect option\' should get updated accordingly', () => {
|
72
|
+
listOrderingPage.steps.addOption();
|
73
|
+
listOrderingPage.steps.verifyPenaltyPointsForEachIncorrectOption(1.25);
|
74
|
+
});
|
75
|
+
|
76
|
+
it('CSS of the penalty points section - Total penalty points', { tags: 'css' }, () => {
|
77
|
+
utilities.verifyCSS(listOrderingPage.automaticallySetPenaltyPointsCheckboxLabel(), {
|
78
|
+
'color': css.color.labelText,
|
79
|
+
'font-size': css.fontSize.default,
|
80
|
+
'font-weight': css.fontWeight.regular
|
81
|
+
});
|
82
|
+
utilities.verifyCSS(listOrderingPage.automaticallySetPenaltyPointsCheckbox().parent().find('svg'), {
|
83
|
+
'fill': css.color.uncheckedCheckbox
|
84
|
+
});
|
85
|
+
utilities.verifyCSS(listOrderingPage.specifyTotalPenaltyPointsRadioButton().parent().find('svg'), {
|
86
|
+
'fill': css.color.activeButtons
|
87
|
+
});
|
88
|
+
utilities.verifyCSS(listOrderingPage.specifyPointsForEachIncorrectOptionRadioButton().parent().find('svg path'), {
|
89
|
+
'fill': css.color.uncheckedCheckbox
|
90
|
+
});
|
91
|
+
utilities.verifyCSS(listOrderingPage.specifyTotalPenaltyPointsRadioButtonLabel(), {
|
92
|
+
'color': css.color.labelText,
|
93
|
+
'font-size': css.fontSize.default,
|
94
|
+
'font-weight': css.fontWeight.regular
|
95
|
+
});
|
96
|
+
utilities.verifyCSS(listOrderingPage.specifyPointsForEachIncorrectOptionRadioButtonLabel(), {
|
97
|
+
'color': css.color.labelText,
|
98
|
+
'font-size': css.fontSize.default,
|
99
|
+
'font-weight': css.fontWeight.regular
|
100
|
+
});
|
101
|
+
utilities.verifyCSS(listOrderingPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
102
|
+
'color': css.color.labelText,
|
103
|
+
'font-size': css.fontSize.default,
|
104
|
+
'font-weight': css.fontWeight.regular
|
105
|
+
});
|
106
|
+
utilities.verifyCSS(listOrderingPage.totalPenaltyPointsInputField(), {
|
107
|
+
'color': css.color.text,
|
108
|
+
'font-size': css.fontSize.default,
|
109
|
+
'font-weight': css.fontWeight.regular
|
110
|
+
});
|
111
|
+
utilities.verifyCSS(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
112
|
+
'color': css.color.labelText,
|
113
|
+
'font-size': css.fontSize.default,
|
114
|
+
'font-weight': css.fontWeight.regular
|
115
|
+
});
|
116
|
+
});
|
117
|
+
|
118
|
+
it('Accessibility of the penalty points section - Total penalty points', { tags: 'a11y' }, () => {
|
119
|
+
cy.checkAccessibility(listOrderingPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user selects \'Specify points for each incorrect answer\', a penalty points detail section with \'Penalty points for each incorrect option:\' label and empty input field, \'Total penalty points: -\' label should be displayed', () => {
|
123
|
+
cy.log('Pre-step: Clearing the total penalty points input field')
|
124
|
+
listOrderingPage.steps.clearTotalPenaltyPointsInputField();
|
125
|
+
listOrderingPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify points for each incorrect option');
|
126
|
+
utilities.verifyInnerText(listOrderingPage.penaltyPointsDetailsSectionInputFieldLabel(), 'Penalty points for each incorrect option');
|
127
|
+
listOrderingPage.steps.verifyPenaltyPointsForEachIncorrectOptionValue('');
|
128
|
+
utilities.verifyInnerText(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Total penalty points: -');
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user allots Penalty points for each incorrect option, then \'Total penalty points\' should get updated as per the count of incorrect options available', () => {
|
132
|
+
listOrderingPage.steps.allotPenaltyPointsForEachIncorrectOption(1);
|
133
|
+
listOrderingPage.steps.verifyTotalPenaltyPoints(4);
|
134
|
+
});
|
135
|
+
|
136
|
+
it('When the user adds a new option, then \'Total penalty points\' should get updated accordingly', () => {
|
137
|
+
listOrderingPage.steps.addOption();
|
138
|
+
listOrderingPage.steps.verifyTotalPenaltyPoints(5);
|
139
|
+
});
|
140
|
+
|
141
|
+
it('When the user deletes an option, then \'points for each incorrect option\' should get updated accordingly', () => {
|
142
|
+
listOrderingPage.steps.deleteOption(0);
|
143
|
+
listOrderingPage.steps.verifyTotalPenaltyPoints(4);
|
144
|
+
});
|
145
|
+
|
146
|
+
it('CSS of the penalty points section - Penalty points for each incorrect option', { tags: 'css' }, () => {
|
147
|
+
utilities.verifyCSS(listOrderingPage.penaltyPointsDetailsSectionInputFieldLabel(), {
|
148
|
+
'color': css.color.labelText,
|
149
|
+
'font-size': css.fontSize.default,
|
150
|
+
'font-weight': css.fontWeight.regular
|
151
|
+
});
|
152
|
+
utilities.verifyCSS(listOrderingPage.penaltyPointsForEachIncorrectOptionInputField(), {
|
153
|
+
'color': css.color.text,
|
154
|
+
'font-size': css.fontSize.default,
|
155
|
+
'font-weight': css.fontWeight.regular
|
156
|
+
});
|
157
|
+
utilities.verifyCSS(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), {
|
158
|
+
'color': css.color.labelText,
|
159
|
+
'font-size': css.fontSize.default,
|
160
|
+
'font-weight': css.fontWeight.regular
|
161
|
+
});
|
162
|
+
});
|
163
|
+
|
164
|
+
it('Accessibility of the penalty points section - Penalty points for each incorrect option', { tags: 'a11y' }, () => {
|
165
|
+
cy.checkAccessibility(listOrderingPage.automaticallySetPenaltyPointsCheckboxLabel().parents('.penalty-score-for-each-incorrect-wrapper'));
|
166
|
+
});
|
167
|
+
|
168
|
+
it('When the user switches to the \'Specify total penalty points\' option, the total penalty points input field should be filled as per the total penalty points in \'Specify points for each incorrect option\'', () => {
|
169
|
+
listOrderingPage.steps.selectPenaltyPointsForEachIncorrectOptionType('Specify total penalty points');
|
170
|
+
listOrderingPage.steps.verifyTotalPenaltyPointsValue(4);
|
171
|
+
utilities.verifyInnerText(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 'Penalty points for each incorrect option: 1');
|
172
|
+
});
|
173
|
+
|
174
|
+
it('When the user checks the \'Automatically set penalty for each incorrect option to total points / no. of incorrect options\' checkbox, both radio buttons should get disabled, \'Specify points for each incorrect option\' should get checked, in the penalty points details section, \'Penalty points for each incorrect option: #\' and \'Total penalty points: #\' should be displayed as per the alloted points and available incorrect options', () => {
|
175
|
+
listOrderingPage.steps.checkAutomaticallySetPenaltyPointsCheckbox();
|
176
|
+
listOrderingPage.steps.verifySpecifyTotalPenaltyPointsDisabledState();
|
177
|
+
listOrderingPage.steps.verifySpecifyPointsForEachIncorrectOptionRadioButtonSelectedAndDisabledState();
|
178
|
+
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 0), 'Penalty points for each incorrect option: 2.5');
|
179
|
+
utilities.verifyInnerText(utilities.getNthElement(listOrderingPage.penaltyPointsDetailsSectionAllottedPointsLabel(), 1), 'Total penalty points: 10');
|
180
|
+
});
|
181
|
+
});
|
182
|
+
|
183
|
+
describe('Scoring section: Rounding - Edit tab', () => {
|
184
|
+
abortEarlySetup();
|
185
|
+
before(() => {
|
186
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
187
|
+
cy.barsPreLoaderWait();
|
188
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
189
|
+
listOrderingPage.steps.allotPoints(10);
|
190
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights')
|
191
|
+
});
|
192
|
+
|
193
|
+
listOrderingPage.tests.verifyRoundingDropdown();
|
194
|
+
|
195
|
+
listOrderingPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
196
|
+
});
|
197
|
+
});
|
@@ -0,0 +1,180 @@
|
|
1
|
+
import { listOrderingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
+
|
6
|
+
describe('Create item page - List ordering: Options orientation Section', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Options orientation section: Edit tab contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
17
|
+
});
|
18
|
+
|
19
|
+
it('The \"Option orientation\" label should be displayed', () => {
|
20
|
+
utilities.verifyInnerText(listOrderingPage.optionOrientationSectionLabel(), 'Option orientation');
|
21
|
+
});
|
22
|
+
|
23
|
+
it('The \'Vertical\' toggle button and \'Horizontal\' toggle should be displayed, by default vertical toggle button should be selected', () => {
|
24
|
+
utilities.verifyInnerText(listOrderingPage.verticalButton(), 'Vertical');
|
25
|
+
utilities.verifyInnerText(listOrderingPage.horizontalButton(), 'Horizontal');
|
26
|
+
listOrderingPage.steps.verifySelectedStateOfOptionOrientationToggle('Vertical');
|
27
|
+
});
|
28
|
+
|
29
|
+
it('User should be able to select horizontal orientation button', () => {
|
30
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
31
|
+
listOrderingPage.steps.verifySelectedStateOfOptionOrientationToggle('Horizontal');
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When user selects horizontal orientation, then \"Enable wrapping\" label should be displayed', () => {
|
35
|
+
listOrderingPage.steps.verifyEnableWrappingCheckboxChecked();
|
36
|
+
utilities.verifyInnerText(listOrderingPage.enableWrappingLabel(), 'Enable wrapping');
|
37
|
+
});
|
38
|
+
|
39
|
+
it('When horizontal orientation is selected, then \"Enable wrapping\" checkbox should be selected by default ', () => {
|
40
|
+
listOrderingPage.steps.verifyEnableWrappingCheckboxChecked();
|
41
|
+
});
|
42
|
+
|
43
|
+
it('User should be able to uncheck the \"Enable wrapping\" checkbox', () => {
|
44
|
+
listOrderingPage.steps.uncheckEnableWrappingCheckbox();
|
45
|
+
listOrderingPage.steps.verifyEnableWrappingCheckboxUnchecked();
|
46
|
+
});
|
47
|
+
|
48
|
+
it('User should be able to re-select vertical orientation button', () => {
|
49
|
+
listOrderingPage.steps.selectOptionOrientation('Vertical');
|
50
|
+
listOrderingPage.steps.verifySelectedStateOfOptionOrientationToggle('Vertical');
|
51
|
+
});
|
52
|
+
});
|
53
|
+
|
54
|
+
describe('Functionality - Specify correct answer section', () => {
|
55
|
+
abortEarlySetup();
|
56
|
+
before(() => {
|
57
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
58
|
+
cy.barsPreLoaderWait();
|
59
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
60
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
61
|
+
});
|
62
|
+
|
63
|
+
it('When vertical orientation is selected, then the options should be displayed vertically', () => {
|
64
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Vertical');
|
65
|
+
});
|
66
|
+
|
67
|
+
it('User should be able to drop the options when vertical orientation is selected', () => {
|
68
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
69
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
70
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
71
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
72
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'flower', 'seed']);
|
73
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('plant');
|
74
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('sprout');
|
75
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('flower');
|
76
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('seed');
|
77
|
+
});
|
78
|
+
|
79
|
+
it('When user selects horizontal orientation, then the options should be displayed horizontally', () => {
|
80
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
81
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Horizontal');
|
82
|
+
});
|
83
|
+
|
84
|
+
it('User should be able to drop the options when horizontal orientation is selected', () => {
|
85
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
86
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
87
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
88
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
89
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'flower', 'seed']);
|
90
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('plant');
|
91
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('sprout');
|
92
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('flower');
|
93
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('seed');
|
94
|
+
});
|
95
|
+
|
96
|
+
|
97
|
+
it('When the horizontal orientation is selected and \"Enable wrapping\" is enabled, then the text within the options should be wrapped', () => {
|
98
|
+
listOrderingPage.steps.verifyHorizontalWrappingSeparateList('enabled');
|
99
|
+
});
|
100
|
+
|
101
|
+
it('When user unchecks the \'Enable wrapping\' checkbox then the text within the options should not be wrapped', () => {
|
102
|
+
listOrderingPage.steps.uncheckEnableWrappingCheckbox();
|
103
|
+
listOrderingPage.steps.verifyEnableWrappingCheckboxUnchecked();
|
104
|
+
listOrderingPage.steps.verifyHorizontalWrappingSeparateList('disabled');
|
105
|
+
});
|
106
|
+
|
107
|
+
it('When user re-selects the vertical orientation option then, then the changes should be reflected in the \"Specify correct answer\" section', () => {
|
108
|
+
listOrderingPage.steps.selectOptionOrientation('Vertical');
|
109
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Vertical');
|
110
|
+
});
|
111
|
+
});
|
112
|
+
|
113
|
+
describe('Functionality - Preview tab', () => {
|
114
|
+
abortEarlySetup();
|
115
|
+
before(() => {
|
116
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
117
|
+
cy.barsPreLoaderWait();
|
118
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
119
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When user selects vertical orientation, then the options should be displayed vertically', () => {
|
123
|
+
listOrderingPage.steps.switchToPreviewTab();
|
124
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Vertical');
|
125
|
+
});
|
126
|
+
|
127
|
+
it('User should be able to drop the options when vertical orientation is selected', () => {
|
128
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
129
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
130
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
131
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
132
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'flower', 'seed']);
|
133
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('plant');
|
134
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('sprout');
|
135
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('flower');
|
136
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('seed');
|
137
|
+
});
|
138
|
+
|
139
|
+
it('When user selects horizontal orientation, then the options should be displayed horizontally', () => {
|
140
|
+
listOrderingPage.steps.switchToEditTab();
|
141
|
+
listOrderingPage.steps.selectOptionOrientation('Horizontal');
|
142
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Horizontal');
|
143
|
+
listOrderingPage.steps.switchToPreviewTab();
|
144
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Horizontal');
|
145
|
+
});
|
146
|
+
|
147
|
+
it('User should be able to drop the options when horizontal orientation is selected', () => {
|
148
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
149
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
150
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
151
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
152
|
+
listOrderingPage.steps.verifyOptionsInDropzoneOrderAsSeperateList(['plant', 'sprout', 'flower', 'seed']);
|
153
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('plant');
|
154
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('sprout');
|
155
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('flower');
|
156
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('seed');
|
157
|
+
});
|
158
|
+
|
159
|
+
|
160
|
+
it('When the horizontal orientation is selected and \"Enable wrapping\" is enabled, then the text within the options should be wrapped', () => {
|
161
|
+
listOrderingPage.steps.verifyHorizontalWrappingSeparateList('enabled');
|
162
|
+
});
|
163
|
+
|
164
|
+
it('When user unchecks the \'Enable wrapping\' checkbox then the text within the options should not be wrapped', () => {
|
165
|
+
listOrderingPage.steps.switchToEditTab();
|
166
|
+
listOrderingPage.steps.uncheckEnableWrappingCheckbox();
|
167
|
+
listOrderingPage.steps.verifyEnableWrappingCheckboxUnchecked();
|
168
|
+
listOrderingPage.steps.switchToPreviewTab();
|
169
|
+
listOrderingPage.steps.verifyHorizontalWrappingSeparateList('disabled');
|
170
|
+
});
|
171
|
+
|
172
|
+
it('When user re-selects the vertical orientation option then, then the changes should be reflected in the \"Preview Tab\" section', () => {
|
173
|
+
listOrderingPage.steps.switchToEditTab();
|
174
|
+
listOrderingPage.steps.selectOptionOrientation('Vertical');
|
175
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Vertical');
|
176
|
+
listOrderingPage.steps.switchToPreviewTab();
|
177
|
+
listOrderingPage.steps.verifyOptionOrientationSeparateList('Vertical');
|
178
|
+
});
|
179
|
+
});
|
180
|
+
});
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import { dialogBoxBase, listOrderingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
+
|
6
|
+
describe('Create item page - List ordering: Specify correct answer, Alternative correct answer', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Specify correct answer section - Header and \'Correct\' accordion', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
15
|
+
cy.barsPreLoaderWait();
|
16
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
17
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
18
|
+
});
|
19
|
+
|
20
|
+
listOrderingPage.tests.verifyAutoScoredSpecifyCorrectAnswerHeaderSectionContents('list ordering');
|
21
|
+
|
22
|
+
it('By default, 4 options should be displayed with Drag handle in the correct accordion', () => {
|
23
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
|
24
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
25
|
+
});
|
26
|
+
|
27
|
+
listOrderingPage.tests.verifyAutoScoredPointsErrorMessageWhenPointsFieldIsEmpty('Correct');
|
28
|
+
});
|
29
|
+
|
30
|
+
describe('Specify correct answer section - \'Alternative\' accordion', () => {
|
31
|
+
abortEarlySetup();
|
32
|
+
before(() => {
|
33
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
34
|
+
cy.barsPreLoaderWait();
|
35
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
36
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
37
|
+
});
|
38
|
+
|
39
|
+
it('The Specify answer section should contain 4 options and a dropzone with a title \'My list\', the user should be able to drop the options in the dropzone', () => {
|
40
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
41
|
+
utilities.verifyInnerText(listOrderingPage.specifyCorrectAnswerSectionMyListLabel(), 'My list');
|
42
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
43
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
44
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('seed');
|
45
|
+
listOrderingPage.steps.clickAndUnDropOptionSeperateList('sprout');
|
46
|
+
});
|
47
|
+
|
48
|
+
it('When the user has allotted points to the \'Correct accordion\' and has dropped the options in the dropzone, then the user should be able to add alternative answer for the question using \'Add alternative answer\' button', () => {
|
49
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
50
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
51
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
52
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
53
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(1);
|
54
|
+
});
|
55
|
+
|
56
|
+
it('When user has added an alternative answer accordion, then the newly added alternative answer accordion should be in expanded state and the correct answer accordion should be in collapsed state', () => {
|
57
|
+
listOrderingPage.steps.verifyCorrectAnswerAccordionIsCollapsed();
|
58
|
+
listOrderingPage.steps.verifyAlternateAnswerAccordionIsExpanded(0);
|
59
|
+
});
|
60
|
+
|
61
|
+
it('By default, 4 options should be displayed with Drag handle in the correct accordion', () => {
|
62
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
|
63
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
64
|
+
});
|
65
|
+
|
66
|
+
it('User should be able to add another alternative answer for the question using \'Add alternative answer\' button and the name for this new accordion should be \'Alternative 2\'', () => {
|
67
|
+
cy.log('Set correct answer and points in alternative 1 accordion');
|
68
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
69
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
70
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
71
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
72
|
+
listOrderingPage.steps.allotPoints(5);
|
73
|
+
listOrderingPage.steps.addAlternativeAnswerAccordion(2);
|
74
|
+
});
|
75
|
+
|
76
|
+
listOrderingPage.tests.verifyWarningPopupAndAccordionNavigationWhenNoPointsAddedInAlternativeAccordionSeparateList();
|
77
|
+
|
78
|
+
it('User should be able to remove alternative correct answer by clicking on the \'Delete\' icon button alongside alternative answer accordion and the name of the alternative answer accordions should get updated accordingly', () => {
|
79
|
+
cy.log('Set correct answer and points in alternative 2 accordion, then switch to alternative 1 accordion and click delete icon button');
|
80
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
81
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
82
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
83
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
84
|
+
listOrderingPage.steps.allotPoints(5);
|
85
|
+
listOrderingPage.steps.deleteAlternativeAnswerAccordion(1);
|
86
|
+
listOrderingPage.steps.verifyAlternativeAnswerAccordionNotExists(2);
|
87
|
+
listOrderingPage.steps.verifyAlternativeAnswerAccordionLabel(0);
|
88
|
+
});
|
89
|
+
|
90
|
+
it('When correct answers and points are set in alternative answer and user clicks on correct answer accordion, then correct answer accordion should be expanded and the alternative answer accordion should be collapsed', () => {
|
91
|
+
listOrderingPage.steps.expandCorrectAnswerAccordion();
|
92
|
+
listOrderingPage.steps.verifyAlternateAnswerAccordionIsCollapsed(0);
|
93
|
+
});
|
94
|
+
});
|
95
|
+
});
|
@@ -0,0 +1,130 @@
|
|
1
|
+
|
2
|
+
import { listOrderingPage } from "../../../pages";
|
3
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
|
+
import utilities from "../../../support/helpers/utilities";
|
5
|
+
const css = Cypress.env('css');
|
6
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
7
|
+
|
8
|
+
describe('Create Item page - List ordering : Student view settings', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Randomize options : Edit tab', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
17
|
+
cy.barsPreLoaderWait();
|
18
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
19
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
|
20
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
21
|
+
listOrderingPage.steps.allotPoints(5);
|
22
|
+
});
|
23
|
+
|
24
|
+
listOrderingPage.tests.verifyStudentViewSettingsLabelAndCSS();
|
25
|
+
|
26
|
+
listOrderingPage.tests.verifyAllowStudentsToCheckAnswerNotExist();
|
27
|
+
|
28
|
+
it('\'Randomize options\' checkbox and label should be displayed and by default it should be unchecked', () => {
|
29
|
+
utilities.verifyInnerText(listOrderingPage.randomizeOptionsLabel(), 'Randomize options');
|
30
|
+
utilities.verifyElementVisibilityState(listOrderingPage.randomizeOptionsCheckbox(), 'exist');
|
31
|
+
listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
32
|
+
});
|
33
|
+
|
34
|
+
listOrderingPage.tests.verifyRandomizeOptionsCheckboxAndLabelUncheckedCSS();
|
35
|
+
|
36
|
+
it('When the \'Randomize options\' functionality is disabled, the options in the specify correct answer section should be displayed in the order in which the user has set them in the \'Options\' section', () => {
|
37
|
+
listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
38
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
39
|
+
});
|
40
|
+
|
41
|
+
it('When the user enables the \'Randomize options\' functionality, then the options in the specify correct answer section should be in the order in which the user has set them in the \'Options\' section', () => {
|
42
|
+
listOrderingPage.steps.checkRandomizeOptionsCheckbox();
|
43
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
44
|
+
});
|
45
|
+
|
46
|
+
listOrderingPage.tests.verifyRandomizeOptionsCheckboxCheckedCSSAndA11y();
|
47
|
+
});
|
48
|
+
|
49
|
+
describe('Randomize options : Preview tab', () => {
|
50
|
+
let optionsArray = [];
|
51
|
+
abortEarlySetup();
|
52
|
+
before(() => {
|
53
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
54
|
+
cy.barsPreLoaderWait();
|
55
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
56
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
57
|
+
listOrderingPage.steps.allotPoints(5);
|
58
|
+
});
|
59
|
+
|
60
|
+
it('When the \'Randomize options\' functionality is disabled, options in the preview tab should be displayed in the order in which the user has set them in the \'Draggable options\' section', () => {
|
61
|
+
listOrderingPage.steps.verifyRandomizeOptionsCheckboxUnchecked();
|
62
|
+
listOrderingPage.steps.switchToPreviewTab();
|
63
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
64
|
+
});
|
65
|
+
|
66
|
+
it('When the user enables the \'Randomize options\' functionality, then options in preview tab should be displayed in a random order', () => {
|
67
|
+
listOrderingPage.steps.switchToEditTab();
|
68
|
+
listOrderingPage.steps.checkRandomizeOptionsCheckbox();
|
69
|
+
listOrderingPage.steps.switchToPreviewTab();
|
70
|
+
listOrderingPage.steps.verifyRandomizeOptionOrderSeparateList(options);
|
71
|
+
optionsArray = listOrderingPage.steps.getOptionsArraySeparateList();
|
72
|
+
});
|
73
|
+
|
74
|
+
it('When the user switches to \'Edit tab\' and modifies any of question properties, then the order of the options should change from the previous random order', () => {
|
75
|
+
listOrderingPage.steps.switchToEditTab();
|
76
|
+
listOrderingPage.steps.allotPoints(12);
|
77
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Question');
|
78
|
+
listOrderingPage.steps.switchToPreviewTab();
|
79
|
+
listOrderingPage.steps.verifyRandomizeOptionOrderSeparateList(options);
|
80
|
+
listOrderingPage.steps.verifyOptionsAreReRandomizedSeparateList(optionsArray);
|
81
|
+
});
|
82
|
+
|
83
|
+
it('When the user disables the \'Randomize options\' functionality, then the options in the preview tab should be displayed in the order in which the user has set them in the edit tab', () => {
|
84
|
+
listOrderingPage.steps.switchToEditTab()
|
85
|
+
listOrderingPage.steps.uncheckRandomizeOptionsCheckbox();
|
86
|
+
listOrderingPage.steps.switchToPreviewTab();
|
87
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(options);
|
88
|
+
});
|
89
|
+
});
|
90
|
+
|
91
|
+
describe('Enable outer border for question: Edit tab', () => {
|
92
|
+
abortEarlySetup();
|
93
|
+
before(() => {
|
94
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
95
|
+
cy.barsPreLoaderWait();
|
96
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
97
|
+
});
|
98
|
+
|
99
|
+
listOrderingPage.tests.verifyEnableOuterBorderContents();
|
100
|
+
});
|
101
|
+
|
102
|
+
describe('Enable outer border for question: Preview tab', () => {
|
103
|
+
abortEarlySetup();
|
104
|
+
before(() => {
|
105
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
106
|
+
cy.barsPreLoaderWait();
|
107
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
108
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
|
109
|
+
listOrderingPage.steps.switchToPreviewTab();
|
110
|
+
});
|
111
|
+
|
112
|
+
//need to remove skip after https://redmine.zeuslearning.com/issues/571731 is resolved
|
113
|
+
it.skip('When the \'Enable outer border for question\' checkbox is in checked state, an outer border over the question preview should be visible', () => {
|
114
|
+
listOrderingPage.steps.verifyOuterBorderOfQuestionPreview();
|
115
|
+
});
|
116
|
+
|
117
|
+
it('CSS of the outer border', { tags: 'css' }, () => {
|
118
|
+
utilities.verifyCSS(listOrderingPage.questionBorderPreviewTab(), {
|
119
|
+
'border': `1px solid ${css.color.draggableOptionsContainerBorder}`
|
120
|
+
});
|
121
|
+
});
|
122
|
+
|
123
|
+
it('When the user unchecks the \'Enable outer border for question\' checkbox, then the outer border over the question preview should not be displayed', () => {
|
124
|
+
listOrderingPage.steps.switchToEditTab();
|
125
|
+
listOrderingPage.steps.uncheckEnableOuterBorderCheckbox();
|
126
|
+
listOrderingPage.steps.switchToPreviewTab()
|
127
|
+
listOrderingPage.steps.verifyOuterBorderOfQuestionPreviewNotExistsSeparateList();
|
128
|
+
});
|
129
|
+
});
|
130
|
+
});
|