itemengine-cypress-automation 1.0.246 → 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,167 @@
|
|
1
|
+
import { listOrderingPage } from "../../../pages";
|
2
|
+
import { ckEditorToolbar, equationEditorFlyout } from "../../../pages/components";
|
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
|
+
const modifiedOptions = ['sprout', 'plant', 'flower'];
|
8
|
+
|
9
|
+
describe('Create Item page - List ordering : Question instructions and prompt section', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Question instructions input field - Edit tab', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
20
|
+
});
|
21
|
+
|
22
|
+
listOrderingPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
23
|
+
});
|
24
|
+
|
25
|
+
describe('Question instructions input field - Preview tab', () => {
|
26
|
+
abortEarlySetup();
|
27
|
+
before(() => {
|
28
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
29
|
+
cy.barsPreLoaderWait();
|
30
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
31
|
+
});
|
32
|
+
|
33
|
+
listOrderingPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
34
|
+
});
|
35
|
+
|
36
|
+
describe('Options section', () => {
|
37
|
+
abortEarlySetup();
|
38
|
+
before(() => {
|
39
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
40
|
+
cy.barsPreLoaderWait();
|
41
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
42
|
+
});
|
43
|
+
|
44
|
+
listOrderingPage.tests.verifyOptionsSectionContents({ optionFieldsCount: 4, optionLabel: 'Options' });
|
45
|
+
|
46
|
+
listOrderingPage.tests.verifyDragHandleTooltip();
|
47
|
+
|
48
|
+
it('When user clicks on the \'Delete\' option button then the respective options input field should get deleted and option numeration should change accordingly', () => {
|
49
|
+
cy.log('Pre step: Adding text in all option input fields')
|
50
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
51
|
+
|
52
|
+
const optionsAfterDeleting = options.filter((el) => el !== options[1]);
|
53
|
+
listOrderingPage.steps.deleteOption(1);
|
54
|
+
utilities.verifyElementCount(listOrderingPage.optionWrapper(), 3);
|
55
|
+
cy.log('Verifying the input text given to input fields after deletion of 2nd option')
|
56
|
+
optionsAfterDeleting.forEach((inputFieldText, optionIndex) => {
|
57
|
+
utilities.verifyTextContent(utilities.getNthElement(listOrderingPage.optionsInputField(), optionIndex), inputFieldText);
|
58
|
+
});
|
59
|
+
});
|
60
|
+
|
61
|
+
it('When only two options are present, the delete buttons should be in disabled state', () => {
|
62
|
+
cy.log('Deleting one more option')
|
63
|
+
listOrderingPage.steps.deleteOption(2);
|
64
|
+
listOrderingPage.steps.verifyDeleteOptionButtonDisabledState();
|
65
|
+
});
|
66
|
+
|
67
|
+
listOrderingPage.tests.verifyDisabledDeleteButtonTooltip();
|
68
|
+
|
69
|
+
listOrderingPage.tests.verifyAddOptionFunctionality();
|
70
|
+
|
71
|
+
listOrderingPage.tests.verifyOptionInputFieldErrorState(2);
|
72
|
+
|
73
|
+
listOrderingPage.tests.verifyEnabledDeleteButtonAndTooltip();
|
74
|
+
});
|
75
|
+
|
76
|
+
describe('Options section - image, bold text and equation options', () => {
|
77
|
+
abortEarlySetup();
|
78
|
+
before(() => {
|
79
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
80
|
+
cy.barsPreLoaderWait();
|
81
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
82
|
+
});
|
83
|
+
|
84
|
+
listOrderingPage.tests.verifyImageUploadInOptionsInputField(0);
|
85
|
+
|
86
|
+
listOrderingPage.tests.verifyBoldTextInOptionsInputField(1);
|
87
|
+
|
88
|
+
listOrderingPage.tests.verifyEquationTextInOptionsInputField(2);
|
89
|
+
});
|
90
|
+
|
91
|
+
describe('Options section: Add and delete an option, options with image, bold text and equation - Specify correct answer section', () => {
|
92
|
+
abortEarlySetup();
|
93
|
+
before(() => {
|
94
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
95
|
+
cy.barsPreLoaderWait();
|
96
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
97
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
98
|
+
});
|
99
|
+
|
100
|
+
it('User should be able to delete an option input field and the deleted option should not be displayed in the \'Specify correct answer\' section', () => {
|
101
|
+
listOrderingPage.steps.deleteOption(3);
|
102
|
+
utilities.verifyElementCount(listOrderingPage.optionsInputField(), 3);
|
103
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 3);
|
104
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(modifiedOptions);
|
105
|
+
});
|
106
|
+
|
107
|
+
it('User should be able to add an option using \'Add option\' button and the added option should be displayed in the \'Specify correct answer\' section', () => {
|
108
|
+
listOrderingPage.steps.addOption();
|
109
|
+
utilities.verifyElementCount(listOrderingPage.optionsInputField(), 4);
|
110
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
|
111
|
+
});
|
112
|
+
|
113
|
+
it('When the user adds an image in the options input field, the uploaded image should be displayed in the \'Specify correct answer\' section', () => {
|
114
|
+
listOrderingPage.steps.focusInOptionsInputField(1)
|
115
|
+
ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar();
|
116
|
+
ckEditorToolbar.steps.addImageToInputField();
|
117
|
+
cy.wait(1000);
|
118
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
119
|
+
listOrderingPage.steps.verifyOptionWithImageInDropzonePreviewTabSeperateList(0);
|
120
|
+
});
|
121
|
+
|
122
|
+
it('When the user adds bold text in the options input field, the uploaded image should be displayed in the \'Specify correct answer\' section', () => {
|
123
|
+
listOrderingPage.steps.focusInOptionsInputField(3)
|
124
|
+
ckEditorToolbar.steps.selectBoldOptionFromCKEditorToolbar();
|
125
|
+
listOrderingPage.steps.addBoldTextInputToOptionsInputField(3);
|
126
|
+
cy.wait(1000);
|
127
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('This is a bold option');
|
128
|
+
listOrderingPage.steps.verifyOptionWithBoldTextInDropzoneCorrectAnswerSectionSeperateListEditTab(1);
|
129
|
+
});
|
130
|
+
|
131
|
+
it('When the user adds an equation in the options input field, the uploaded image should be displayed in the \'Specify correct answer\' section', () => {
|
132
|
+
listOrderingPage.steps.addOption();
|
133
|
+
listOrderingPage.steps.focusInOptionsInputField(4)
|
134
|
+
ckEditorToolbar.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
135
|
+
equationEditorFlyout.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
136
|
+
cy.wait(1000);
|
137
|
+
listOrderingPage.steps.clickAndDropEquationOptionSeperateList('x');
|
138
|
+
listOrderingPage.steps.verifyOptionWithEquationTextInDropzoneCorrectAnswerSectionSeperateListEditTab(2);
|
139
|
+
});
|
140
|
+
});
|
141
|
+
|
142
|
+
describe('Options section: Add and delete an option - Preview tab', () => {
|
143
|
+
abortEarlySetup();
|
144
|
+
before(() => {
|
145
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
146
|
+
cy.barsPreLoaderWait();
|
147
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
148
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
149
|
+
});
|
150
|
+
|
151
|
+
it('User should be able to delete an option input field and the deleted option should not be displayed in the \'Preview\' tab', () => {
|
152
|
+
listOrderingPage.steps.deleteOption(3);
|
153
|
+
utilities.verifyElementCount(listOrderingPage.optionsInputField(), 3);
|
154
|
+
listOrderingPage.steps.switchToPreviewTab();
|
155
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 3);
|
156
|
+
listOrderingPage.steps.verifyOptionsOrderAsSeperateList(modifiedOptions);
|
157
|
+
});
|
158
|
+
|
159
|
+
it('User should be able to add an option using \'Add option\' button and the added option should be displayed in the \'Preview\' tab', () => {
|
160
|
+
cy.log('Switching to edit tab')
|
161
|
+
listOrderingPage.steps.switchToEditTab();
|
162
|
+
listOrderingPage.steps.addOption();
|
163
|
+
listOrderingPage.steps.switchToPreviewTab();
|
164
|
+
utilities.verifyElementCount(listOrderingPage.optionsSeperateList(), 4);
|
165
|
+
});
|
166
|
+
});
|
167
|
+
});
|
@@ -0,0 +1,202 @@
|
|
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 options = ['sprout', 'plant', 'flower', 'seed'];
|
6
|
+
|
7
|
+
describe('Create item page - List ordering: Scoring section', () => {
|
8
|
+
before(() => {
|
9
|
+
cy.loginAs('admin');
|
10
|
+
});
|
11
|
+
|
12
|
+
describe('Scoring section contents', () => {
|
13
|
+
abortEarlySetup();
|
14
|
+
before(() => {
|
15
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
16
|
+
cy.barsPreLoaderWait();
|
17
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
18
|
+
});
|
19
|
+
|
20
|
+
listOrderingPage.tests.verifyScoringTypeLabelAndDropdown('Auto scored');
|
21
|
+
|
22
|
+
listOrderingPage.tests.verifyScoringSubtypeContentsForMultipleResponseTypeQuestion();
|
23
|
+
});
|
24
|
+
|
25
|
+
describe('Auto scored: All or nothing scoring - Scoring section', () => {
|
26
|
+
abortEarlySetup();
|
27
|
+
before(() => {
|
28
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
29
|
+
cy.barsPreLoaderWait();
|
30
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
31
|
+
listOrderingPage.steps.allotPoints(10);
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When the user has selected \'All or nothing\' scoring subtype, minimum scoring dropdown and penalty scoring dropdown should be displayed in the scoring section', () => {
|
35
|
+
listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
36
|
+
listOrderingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
37
|
+
});
|
38
|
+
});
|
39
|
+
|
40
|
+
describe('Auto scored: All or nothing scoring - Specify correct answer section', () => {
|
41
|
+
abortEarlySetup();
|
42
|
+
before(() => {
|
43
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
44
|
+
cy.barsPreLoaderWait();
|
45
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
46
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
47
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
48
|
+
});
|
49
|
+
|
50
|
+
listOrderingPage.tests.verifyContentsOfSpecifyCorrectAnswerSectionSeperateList();
|
51
|
+
|
52
|
+
listOrderingPage.tests.verifyPointsLabelAndInputField();
|
53
|
+
});
|
54
|
+
|
55
|
+
describe('Auto scored: Partial - equal weights scoring - Scoring section', () => {
|
56
|
+
abortEarlySetup();
|
57
|
+
before(() => {
|
58
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
59
|
+
cy.barsPreLoaderWait();
|
60
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
61
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
62
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
63
|
+
});
|
64
|
+
|
65
|
+
it('User should be able to select \'Partial - equal weights\' scoring type', () => {
|
66
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
67
|
+
});
|
68
|
+
|
69
|
+
it('When the user has switched to \'Partial - equal weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' label and dropdown should be displayed in the \'Scoring\' section, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
70
|
+
listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
71
|
+
listOrderingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
72
|
+
listOrderingPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
73
|
+
utilities.verifyElementVisibilityState(listOrderingPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
74
|
+
});
|
75
|
+
});
|
76
|
+
|
77
|
+
describe('Auto scored: Partial equal weights scoring - Specify correct answer section', () => {
|
78
|
+
abortEarlySetup();
|
79
|
+
before(() => {
|
80
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
81
|
+
cy.barsPreLoaderWait();
|
82
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
83
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
84
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
85
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
86
|
+
});
|
87
|
+
|
88
|
+
listOrderingPage.tests.verifyContentsOfSpecifyCorrectAnswerSectionSeperateList();
|
89
|
+
|
90
|
+
it('\'Points per response\' label should be displayed below the points input field in the \'Specify correct answer\' section', () => {
|
91
|
+
utilities.verifyInnerText(listOrderingPage.pointsPerResponseLabel(), 'Points per response:\n-');
|
92
|
+
});
|
93
|
+
|
94
|
+
it('When the user gives a score input to \'Points\' input field, then the score should be equally divided amongst the options and the \'Points per response\' label should also update accordingly', () => {
|
95
|
+
listOrderingPage.steps.allotPoints(6);
|
96
|
+
listOrderingPage.steps.verifyPointsPerResponseScore('1.5');
|
97
|
+
});
|
98
|
+
|
99
|
+
it('When the user adds a new option, then points per response should get updated accordingly', () => {
|
100
|
+
listOrderingPage.steps.addOption();
|
101
|
+
listOrderingPage.steps.verifyPointsPerResponseScore('1.2');
|
102
|
+
});
|
103
|
+
|
104
|
+
it('When the user deletes an option, then points per response should get updated accordingly', () => {
|
105
|
+
listOrderingPage.steps.deleteOption(4);
|
106
|
+
listOrderingPage.steps.verifyPointsPerResponseScore('1.5');
|
107
|
+
});
|
108
|
+
|
109
|
+
it('When the user switches to \'All or nothing\' scoring, the \'Points per response\' label and the points displayed for individual responses should not be displayed and the points displayed in \'Points\' input field should remain unchanged', () => {
|
110
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
111
|
+
utilities.verifyElementVisibilityState(listOrderingPage.pointsPerResponseLabel(), 'notExist');
|
112
|
+
listOrderingPage.steps.verifyPointsFieldValue(6);
|
113
|
+
});
|
114
|
+
|
115
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial equal weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
|
116
|
+
listOrderingPage.steps.allotPoints(12);
|
117
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
118
|
+
listOrderingPage.steps.verifyPointsPerResponseScore('3');
|
119
|
+
});
|
120
|
+
|
121
|
+
it('CSS of \'Points per response\' label and its displayed score', { tags: 'css' }, () => {
|
122
|
+
utilities.verifyCSS(listOrderingPage.pointsPerResponseLabel(), {
|
123
|
+
'color': css.color.labels,
|
124
|
+
'font-size': css.fontSize.normal,
|
125
|
+
'font-weight': css.fontWeight.semibold
|
126
|
+
});
|
127
|
+
});
|
128
|
+
});
|
129
|
+
|
130
|
+
describe('Auto scored: Partial - different weights scoring - Scoring section', () => {
|
131
|
+
abortEarlySetup();
|
132
|
+
before(() => {
|
133
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
134
|
+
cy.barsPreLoaderWait();
|
135
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
136
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
137
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
138
|
+
});
|
139
|
+
|
140
|
+
it('User should be able to select \'Partial - different weights\' scoring', () => {
|
141
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
142
|
+
});
|
143
|
+
|
144
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Penalty scoring\', \'Minimum scoring\' and \'Rounding\' labels and dropdowns, \'Round negative scores to zero\' label and checkbox should not be displayed in the \'Scoring\' section', () => {
|
145
|
+
listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
146
|
+
listOrderingPage.steps.verifyPenaltyPointsLabelAndDropdownDefaultState();
|
147
|
+
listOrderingPage.steps.verifyRoundingLabelAndDropdownDefaultState();
|
148
|
+
utilities.verifyElementVisibilityState(listOrderingPage.roundNegativeScoresToZeroCheckbox(), 'notExist');
|
149
|
+
});
|
150
|
+
});
|
151
|
+
|
152
|
+
describe('Auto scored: Partial - different weights scoring - Specify correct answer section', () => {
|
153
|
+
abortEarlySetup();
|
154
|
+
before(() => {
|
155
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
156
|
+
cy.barsPreLoaderWait();
|
157
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
158
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
159
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
160
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
161
|
+
});
|
162
|
+
|
163
|
+
listOrderingPage.tests.verifyContentsOfSpecifyCorrectAnswerSectionSeperateList();
|
164
|
+
|
165
|
+
it('When the user has switched to \'Partial - different weights\' scoring, then \'Points\' label should be displayed and a points input field should be displayed besides each option', () => {
|
166
|
+
utilities.verifyInnerText(listOrderingPage.partialDifferentWeightsPointsLabelSeparateList(), 'Points');
|
167
|
+
utilities.verifyElementVisibilityState(listOrderingPage.partialDifferentWeightsPointsLabelSeparateList(), 'visible');
|
168
|
+
});
|
169
|
+
|
170
|
+
it('By default the \'Points\' input field should be empty', () => {
|
171
|
+
listOrderingPage.steps.verifyPartialDifferentWeightsPointsInputFieldIsEmpty();
|
172
|
+
});
|
173
|
+
|
174
|
+
it('User should be able to set points in the \'Points\' input fields', () => {
|
175
|
+
listOrderingPage.steps.allotPartialDifferentWeightsPoints({ 0: 2.3, 1: 3.4 });
|
176
|
+
});
|
177
|
+
|
178
|
+
it('CSS of \'Points\' label and \'Points\' input fields', { tags: 'css' }, () => {
|
179
|
+
utilities.verifyCSS(listOrderingPage.partialDifferentWeightsPointsLabelSeparateList(), {
|
180
|
+
'color': css.color.labels,
|
181
|
+
'font-size': css.fontSize.normal,
|
182
|
+
'font-weight': css.fontWeight.semibold
|
183
|
+
});
|
184
|
+
utilities.verifyCSS(listOrderingPage.pointsInputField(), {
|
185
|
+
'color': css.color.text,
|
186
|
+
'font-size': css.fontSize.default,
|
187
|
+
'font-weight': css.fontWeight.regular
|
188
|
+
});
|
189
|
+
});
|
190
|
+
|
191
|
+
it('When the user switches to \'All or nothing\' scoring, the points added for individual responses in Partial - different weights scoring should get summed up in the \'All or nothing scoring\' points input field', () => {
|
192
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('All or nothing');
|
193
|
+
listOrderingPage.steps.verifyPointsFieldValue(5.7);
|
194
|
+
});
|
195
|
+
|
196
|
+
it('When the user updates the entered points in \'All or nothing\' scoring type and switches to \'Partial different weights\' scoring type, then the points should be equally divided and displayed besides each correct option', () => {
|
197
|
+
listOrderingPage.steps.allotPoints(12);
|
198
|
+
listOrderingPage.steps.selectAutoScoredScoringSubtype('Partial different weights');
|
199
|
+
listOrderingPage.steps.verifyPartialDifferentWeightsPointsInputFieldValue([3, 3, 3]);
|
200
|
+
});
|
201
|
+
});
|
202
|
+
});
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
2
|
+
import { dialogBoxBase, listOrderingPage } from "../../../pages";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const options = ['sprout', 'plant', 'flower', 'seed'];
|
5
|
+
|
6
|
+
describe('Create item page - Matching : Header section and Saving question', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Header section contents', () => {
|
12
|
+
abortEarlySetup();
|
13
|
+
before(() => {
|
14
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
15
|
+
});
|
16
|
+
|
17
|
+
listOrderingPage.tests.verifyCreateQuestionPageQuestionTypeHeader('List ordering');
|
18
|
+
});
|
19
|
+
|
20
|
+
describe('Tabs section', () => {
|
21
|
+
abortEarlySetup();
|
22
|
+
before(() => {
|
23
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
24
|
+
});
|
25
|
+
|
26
|
+
listOrderingPage.tests.verifyTabsSection();
|
27
|
+
});
|
28
|
+
|
29
|
+
describe('Cancel button', () => {
|
30
|
+
abortEarlySetup();
|
31
|
+
before(() => {
|
32
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
33
|
+
});
|
34
|
+
|
35
|
+
listOrderingPage.tests.verifyCancelButton('list ordering')
|
36
|
+
});
|
37
|
+
|
38
|
+
describe('Save Question button', () => {
|
39
|
+
abortEarlySetup();
|
40
|
+
before(() => {
|
41
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
42
|
+
cy.barsPreLoaderWait();
|
43
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
44
|
+
});
|
45
|
+
|
46
|
+
describe('Validation error messages', () => {
|
47
|
+
dialogBoxBase.tests.verifyRequiredFieldsWarningPopupOnClickingSaveButton(['Please enter all option values', 'Please set points']);
|
48
|
+
|
49
|
+
it('Validation error messages should be displayed below required input fields', () => {
|
50
|
+
listOrderingPage.steps.verifyQuestionInstructionsErrorMessageIsNotDisplayed();
|
51
|
+
listOrderingPage.steps.verifyWarningIconOnRequiredFields(['Please enter all option values', 'Please set points']);
|
52
|
+
});
|
53
|
+
|
54
|
+
it('Validation error messages should disappear when required input fields are filled', () => {
|
55
|
+
listOrderingPage.steps.addTextInQuestionInstructionsInputField('list ordering');
|
56
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
57
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('seed');
|
58
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('sprout');
|
59
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('plant');
|
60
|
+
listOrderingPage.steps.clickAndDropOptionSeperateList('flower');
|
61
|
+
listOrderingPage.steps.allotPoints(10);
|
62
|
+
listOrderingPage.steps.verifyErrorMessageIsNotDisplayed();
|
63
|
+
listOrderingPage.steps.verifySpecifyCorrectAnswerErrorIconNotExists();
|
64
|
+
});
|
65
|
+
|
66
|
+
listOrderingPage.tests.verifyCreateItemWrapperContentsA11y();
|
67
|
+
});
|
68
|
+
|
69
|
+
describe('Saving a question', () => {
|
70
|
+
it('Clicking on Save Question button the question should get saved and a snackbar with text \'Saved successfully!\' should be displayed', () => {
|
71
|
+
listOrderingPage.steps.saveAQuestionAndVerifySnackbar();
|
72
|
+
});
|
73
|
+
listOrderingPage.tests.verifySavedSuccessfullySnackbarCSSAndA11y();
|
74
|
+
});
|
75
|
+
});
|
76
|
+
});
|
@@ -0,0 +1,72 @@
|
|
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: Scoring cases', () => {
|
7
|
+
before(() => {
|
8
|
+
cy.loginAs('admin');
|
9
|
+
});
|
10
|
+
|
11
|
+
describe('Manually Scored scoring - Edit tab', () => {
|
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.addTextInQuestionInstructionsInputField('Arrange options in correct order.');
|
18
|
+
});
|
19
|
+
|
20
|
+
it('When the user selects \'Manually scored\' option from the scoring Type dropdown then the \'Specify correct answer\' section should not be displayed; \'Points\' and \'Minimum scoring\' label and dropdown should be displayed', () => {
|
21
|
+
listOrderingPage.steps.expandScoringTypeDropdown();
|
22
|
+
listOrderingPage.steps.selectOptionFromScoringTypeDropdown('Manually scored')
|
23
|
+
utilities.verifyElementVisibilityState(listOrderingPage.pointsLabel(), 'visible');
|
24
|
+
utilities.verifyElementVisibilityState(listOrderingPage.pointsInputField(), 'visible');
|
25
|
+
listOrderingPage.steps.verifyMinimumScoringLabelAndDropdownDefaultState();
|
26
|
+
utilities.verifyElementVisibilityState(listOrderingPage.specifyCorrectAnswerLabel(), 'notExist');
|
27
|
+
utilities.verifyElementVisibilityState(listOrderingPage.specifyCorrectAnswerSectionWrapper(), 'notExist');
|
28
|
+
});
|
29
|
+
|
30
|
+
it('When the user focuses in and out of the empty points input field, error message should not be displayed', () => {
|
31
|
+
listOrderingPage.steps.focusInAndFocusOutOfPointsInputField(0)
|
32
|
+
utilities.verifyElementVisibilityState(listOrderingPage.errorMessage(), 'notExist');
|
33
|
+
});
|
34
|
+
|
35
|
+
it('The user should be able to enter point in points input field', () => {
|
36
|
+
listOrderingPage.steps.allotPoints(10);
|
37
|
+
});
|
38
|
+
});
|
39
|
+
|
40
|
+
describe('Non scored scoring - Scoring section', () => {
|
41
|
+
abortEarlySetup();
|
42
|
+
before(() => {
|
43
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
44
|
+
cy.barsPreLoaderWait();
|
45
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
46
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Dropdown menu');
|
47
|
+
});
|
48
|
+
|
49
|
+
it('User should be able to select \'Non scored\' scoring type from scoring type dropdown', () => {
|
50
|
+
listOrderingPage.steps.expandScoringTypeDropdown();
|
51
|
+
listOrderingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
52
|
+
});
|
53
|
+
|
54
|
+
listOrderingPage.tests.verifyScoringSectionContentsForNonScoredScoringType();
|
55
|
+
});
|
56
|
+
|
57
|
+
describe('Non scored scoring - Specify correct answer section', () => {
|
58
|
+
abortEarlySetup();
|
59
|
+
before(() => {
|
60
|
+
listOrderingPage.steps.navigateToCreateQuestion('list ordering');
|
61
|
+
cy.barsPreLoaderWait();
|
62
|
+
listOrderingPage.steps.selectOrderingLayoutOption('Reorder as a separate list');
|
63
|
+
listOrderingPage.steps.addInputToOptionsInputField(options);
|
64
|
+
listOrderingPage.steps.expandScoringTypeDropdown();
|
65
|
+
listOrderingPage.steps.selectOptionFromScoringTypeDropdown('Non scored');
|
66
|
+
});
|
67
|
+
|
68
|
+
listOrderingPage.tests.verifyContentsOfSpecifyCorrectAnswerSectionSeperateList();
|
69
|
+
|
70
|
+
listOrderingPage.tests.verifyPointsLabelAndInputFieldForNonScoredScoringType();
|
71
|
+
});
|
72
|
+
});
|