itemengine-cypress-automation 1.0.166-migrationScripts-b8c79a0.0 → 1.0.167-repoUpdate10April-1465c8c.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cypress/e2e/ILC/BrainingCampManipulative/additionalSettings.js +83 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabBasicSection.js +200 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/editTabScoringSection.js +56 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/gradingViewAndCorrectAnswerViewContents.smoke.js +95 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/headerSection.js +71 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/previewTabContent.smoke.js +72 -0
- package/cypress/e2e/ILC/BrainingCampManipulative/toolSettings.js +71 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/allOrNothingBasicForAllViews.smoke.js +2 -2
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +22 -11
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettings.js +432 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseAdditionalSettingsBasic.js +134 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/feedbackScaleStylePreviewTab.js +161 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/numbersFeedbackScaleStyle.js +308 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/previewContentsForAllViews.smoke.js +216 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/starsHeartsFeedbackScaleStyle.js +336 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/textFeedbackScaleStyle.js +570 -0
- package/cypress/e2e/ILC/FeedbackScaleNew/thumbsFeedbackScaleStyle.js +214 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettings.js +356 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDrop/fillInTheGapsDragAndDropAdditionalSettingsResponseAccordion.js +299 -0
- package/cypress/e2e/ILC/FillInTheGapsDragAndDropNew/clickAndDrop.js +18 -7
- package/cypress/e2e/ILC/FillInTheGapsOverImageDragAndDrop/clickAndDrop.js +11 -6
- package/cypress/e2e/ILC/Graphing/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +355 -0
- package/cypress/e2e/ILC/Graphing/previewContentsForAllViews.smoke.js +0 -1
- package/cypress/e2e/ILC/Graphing/toolsControlsAndBackgroundSection.js +2 -36
- package/cypress/e2e/ILC/GridFill/allOrNothingBasicForAllViews.smoke.js +22 -34
- package/cypress/e2e/ILC/GridFill/checkAnswerFunctionalityForAllViews.smoke.js +8 -24
- package/cypress/e2e/ILC/GridFill/previewContentsForAllViews.smoke.js +5 -25
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +68 -114
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +67 -111
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +71 -123
- package/cypress/e2e/ILC/GridFill/scoring/allOrNothingScoringCellShadeCount.js +41 -63
- package/cypress/e2e/ILC/GridFill/scoring/manuallyAndNonScored.js +21 -25
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsBasic.js +50 -85
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +68 -115
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +54 -98
- package/cypress/e2e/ILC/GridFill/scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +72 -120
- package/cypress/e2e/ILC/GridFill/studentViewSettingsSection.js +3 -3
- package/cypress/e2e/ILC/Matching/maximumCapacityPerDropzoneSection.js +309 -0
- package/cypress/e2e/ILC/Matching/specifyCorrectAnswerSection.js +1 -1
- package/cypress/e2e/ILC/Matching/toolSettings.js +72 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/editTabBasicSection.js +1033 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/test.js +28 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithAlternatePointsGreaterThanCorrectPoints.js +236 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsEqualToAlternatePoints.js +239 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/allOrNothingWithCorrectPointsGreaterThanAlternativePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/manualAndNonScoredScoring.js +178 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsBasic.js +407 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithAlternatePointsGreaterThanCorrectPoints.js +273 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternatePoints.js +278 -0
- package/cypress/e2e/ILC/NumberLine/Scoring/partialEqualWeigtsWithCorrectPointsEqualToAlternatePoints.js +228 -0
- package/cypress/e2e/ILC/NumberLine/additionalSettings.js +120 -0
- package/cypress/e2e/ILC/NumberLine/allOrNothingScoringForAllViews.smoke.js +659 -0
- package/cypress/e2e/ILC/NumberLine/checkAnswerFunctionalityForAllViews.smoke.js +149 -0
- package/cypress/e2e/ILC/NumberLine/editTabScoringSection.js +151 -0
- package/cypress/e2e/ILC/NumberLine/gradingViewAndCorrectAnswerView.smoke.js +171 -0
- package/cypress/e2e/ILC/NumberLine/headerSection.js +76 -0
- package/cypress/e2e/ILC/NumberLine/minimumScoringPenaltyPointsAndRoundingDropdown.js +54 -0
- package/cypress/e2e/ILC/NumberLine/previewTabContentsForAllViews.smoke.js +200 -0
- package/cypress/e2e/ILC/NumberLine/specifyCorrectAnswerSection.js +67 -0
- package/cypress/e2e/ILC/NumberLine/studentViewSettings.js +135 -0
- package/cypress/e2e/ILC/NumberLine/toolSettings.js +73 -0
- package/cypress/e2e/ILC/NumberLine/toolsAndControls.js +372 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/editTabBasicSection.js +1014 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingAlternatePointsMoreThanCorrectPoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsEqualToAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/allOrNothingCorrectPointsMoreThanAlternatePoints.js +235 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsBasic.js +457 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithAlternativePointsGreaterThanCorrectPoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +342 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsBasic.js +155 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +275 -0
- package/cypress/e2e/ILC/TextSelection/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +314 -0
- package/cypress/e2e/ILC/TextSelection/allOrNothingScoringForAllViews.smoke.js +290 -0
- package/cypress/e2e/ILC/TextSelection/checkAnswerFunctionalityForAllViews.smoke.js +142 -0
- package/cypress/e2e/ILC/TextSelection/previewContentsForAllViews.js +137 -0
- package/cypress/e2e/ILC/ToolSettings/toolSettingsContent.js +4 -4
- package/cypress/fixtures/theme/ilc.json +14 -26
- package/cypress/pages/brainingCampManipulativePage.js +122 -0
- package/cypress/pages/components/autoScoredScoringSectionMultiResponseType.js +1 -1
- package/cypress/pages/components/autoScoredSpecifyCorrectAnswerSection.js +3 -0
- package/cypress/pages/components/autoScoredStudentViewSettings.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +2 -2
- package/cypress/pages/components/defaultToolDropdown.js +77 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +629 -2
- package/cypress/pages/components/index.js +3 -0
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/measuringToolComponent.js +2 -2
- package/cypress/pages/components/resetPopupComponent.js +74 -0
- package/cypress/pages/components/scoringSectionBaseEditTab.js +1 -1
- package/cypress/pages/components/setPointsPopupBase.js +6 -4
- package/cypress/pages/components/specifyRowsAndColumnsComponent.js +60 -3
- package/cypress/pages/components/toolSettingsComponent.js +80 -12
- package/cypress/pages/components/toolsAndControlsComponent.js +69 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +0 -8
- package/cypress/pages/feedbackScalePage copy.js +716 -0
- package/cypress/pages/feedbackScalePage.js +591 -449
- package/cypress/pages/fillInTheGapsOverImageDragAndDropPage.js +3 -1
- package/cypress/pages/graphingPage.js +9 -145
- package/cypress/pages/gridFillPage.js +135 -120
- package/cypress/pages/highlightPage.js +0 -394
- package/cypress/pages/index.js +5 -2
- package/cypress/pages/matchingPage.js +78 -20
- package/cypress/pages/multipleSelectionGridPage.js +88 -1
- package/cypress/pages/numberLinePage.js +723 -0
- package/cypress/pages/singleSelectionGridPage.js +86 -0
- package/cypress/pages/textSelectionPage.js +582 -0
- package/cypress/support/migrationHelpers/extractLrnQuestionData.js +3 -12
- package/cypress/support/migrationHelpers/lrnQestionTypesENUM.js +0 -1
- package/cypress/support/migrationHelpers/migrationScript.js +0 -10
- package/cypress/support/migrationHelpers/verifyIeQuestionData.js +0 -8
- package/package.json +1 -1
@@ -0,0 +1,309 @@
|
|
1
|
+
import { matchingPage } from "../../../pages";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
const css = Cypress.env('css');
|
5
|
+
|
6
|
+
const defaultListOptions = ['No limit', '1', '2', '3']
|
7
|
+
const options = ['Petals', 'Leaves', 'Roots', 'Stem', 'Seeds', 'Flower', 'Branch'];
|
8
|
+
|
9
|
+
describe('Create Item page - Matching : Maximum capacity per dropzone section', () => {
|
10
|
+
before(() => {
|
11
|
+
cy.loginAs('admin');
|
12
|
+
});
|
13
|
+
|
14
|
+
describe('Maximum capacity per dropzone : Specify correct answer section', () => {
|
15
|
+
abortEarlySetup();
|
16
|
+
before(() => {
|
17
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
18
|
+
cy.barsPreLoaderWait();
|
19
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
|
20
|
+
matchingPage.steps.enterTextInOptionInputField(options.slice(0, 3));
|
21
|
+
matchingPage.steps.allotPoints(5);
|
22
|
+
});
|
23
|
+
|
24
|
+
it('\'Maximum capacity per dropzone\' label and dropdown should be displayed. By default the \'1\' should be the selected option in the \'Maximum capacity per dropzone\' dropdown', () => {
|
25
|
+
utilities.verifyInnerText(matchingPage.maxCapacityPerDropzoneLabel(), 'Maximum capacity per dropzone');
|
26
|
+
utilities.verifyElementVisibilityState(matchingPage.maxCapacityPerDropzoneLabel(), 'visible');
|
27
|
+
utilities.verifyInnerText(matchingPage.maxCapacityPerDropzoneDropdown(), '1');
|
28
|
+
});
|
29
|
+
|
30
|
+
it(`When the user expands the \'Maximum capacity per dropzone\' dropdown, a list of ${defaultListOptions.length} options - ${defaultListOptions.join(',')} should be displayed`, () => {
|
31
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
32
|
+
utilities.verifyElementVisibilityState(matchingPage.dropdownList(), 'visible')
|
33
|
+
matchingPage.steps.verifyMaxCapacityPerDropzoneListOptions(defaultListOptions);
|
34
|
+
});
|
35
|
+
|
36
|
+
it('CSS of \'Maximum capacity per dropzone\' dropdown in active state', { tags: 'css' }, () => {
|
37
|
+
utilities.verifyCSS(matchingPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[1]), {
|
38
|
+
'color': css.color.liText,
|
39
|
+
'font-size': css.fontSize.default,
|
40
|
+
'font-weight': css.fontWeight.regular,
|
41
|
+
'background-color': css.color.liTextSelectedBg
|
42
|
+
})
|
43
|
+
utilities.verifyCSS(matchingPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[0]), {
|
44
|
+
'background-color': css.color.transparent
|
45
|
+
})
|
46
|
+
});
|
47
|
+
|
48
|
+
it('Accessibility of \'Maximum capacity per dropzone\' dropdown in active state', { tags: 'a11y' }, () => {
|
49
|
+
cy.checkAccessibility(matchingPage.dropdownList())
|
50
|
+
});
|
51
|
+
|
52
|
+
it('When the user adds new options, the list options in the \'Maximum capacity per dropzone\' dropdown should also update accordingly', () => {
|
53
|
+
matchingPage.steps.addMultipleOptionFields(4);
|
54
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
55
|
+
utilities.verifyElementVisibilityState(matchingPage.dropdownList(), 'visible')
|
56
|
+
matchingPage.steps.verifyMaxCapacityPerDropzoneListOptions(['No limit', '1', '2', '3', '4', '5', '6', '7']);
|
57
|
+
});
|
58
|
+
|
59
|
+
it('When the user selects \'No limit\' from the \'Maximum capacity per dropzone\' dropdown, then the user should be able to set n number of options in a dropzone in the specify correct answer section', () => {
|
60
|
+
cy.log('Pre step: Adding input to the empty options input field')
|
61
|
+
matchingPage.steps.enterTextInOneOptionInputField(3, 'Flower');
|
62
|
+
matchingPage.steps.enterTextInOneOptionInputField(4, 'Seeds');
|
63
|
+
matchingPage.steps.enterTextInOneOptionInputField(5, 'Stem');
|
64
|
+
matchingPage.steps.enterTextInOneOptionInputField(6, 'Branch');
|
65
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
66
|
+
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('No limit');
|
67
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Flower', dropzoneIndex: 1 }, { optionText: 'Seeds', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 1 }]);
|
68
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(1, ['Flower', 'Seeds', 'Stem']);
|
69
|
+
});
|
70
|
+
|
71
|
+
it('When the user selects a finite number of options value from the \'Maximum capacity per dropzone\' dropdown, then the user should only be able to set options in a dropzone in the specify correct answer section according to the selected option and warning message should be displayed when user dropped options more than maximum capacity specified', () => {
|
72
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
73
|
+
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
74
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Branch', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 0 }]);
|
75
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Branch', 'Roots']);
|
76
|
+
matchingPage.steps.verifyWarningMessage('Maximum 2 options can be dropped in each dropzone.');
|
77
|
+
});
|
78
|
+
|
79
|
+
it('CSS of warning message', { tags: 'css' }, () => {
|
80
|
+
utilities.verifyCSS(matchingPage.warningMessage(), {
|
81
|
+
'color': css.color.warningMessage,
|
82
|
+
'font-size': css.fontSize.normal,
|
83
|
+
'font-weight': css.fontWeight.regular
|
84
|
+
});
|
85
|
+
utilities.verifyCSS(matchingPage.warningMessageContainer().find('[class*="IconWrapper"]'), {
|
86
|
+
'background-color': css.color.warningContainerBorder,
|
87
|
+
});
|
88
|
+
utilities.verifyCSS(matchingPage.warningMessageContainer(), {
|
89
|
+
'border': `1px solid ${css.color.warningContainerBorder}`,
|
90
|
+
'background-color': css.color.warningContainerBackground
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it('Accessibility of warning message', { tags: 'a11y' }, () => {
|
95
|
+
cy.checkAccessibility(matchingPage.warningMessage());
|
96
|
+
});
|
97
|
+
|
98
|
+
it('When user clicks on the options container, warning message should disappear', () => {
|
99
|
+
matchingPage.steps.clickOnOptionContainerSpecifyCorrectAnswerSection();
|
100
|
+
utilities.verifyElementVisibilityState(matchingPage.warningMessageContainer(), 'notExist');
|
101
|
+
});
|
102
|
+
|
103
|
+
it('When the user updates the value for the \'Maximum capacity per dropzone\' dropdown less than the options in the dropzone then the recently added option in the dropzone should move back to the option container', () => {
|
104
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
105
|
+
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('1');
|
106
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneSpecifyCorrectAnswerSection(0, ['Branch']);
|
107
|
+
matchingPage.steps.verifyOptionContainerOptionSpecifyCorrectAnswerSection([{ index: 0, optionText: 'Petals' }, { index: 1, optionText: 'Leaves' }, { index: 2, optionText: 'Roots' }, { index: 3, optionText: 'Seeds' }, { index: 4, optionText: 'Stem' }]);
|
108
|
+
});
|
109
|
+
});
|
110
|
+
|
111
|
+
describe('Maximum capacity per dropzone: Preview tab', () => {
|
112
|
+
abortEarlySetup();
|
113
|
+
before(() => {
|
114
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
115
|
+
cy.barsPreLoaderWait();
|
116
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
|
117
|
+
matchingPage.steps.addMultipleOptionFields(2);
|
118
|
+
matchingPage.steps.enterTextInOptionInputField(options.slice(0, 5));
|
119
|
+
matchingPage.steps.allotPoints(5);
|
120
|
+
});
|
121
|
+
|
122
|
+
it('By default user should be able to set only 1 options in a dropzone in the preview tab', () => {
|
123
|
+
matchingPage.steps.switchToPreviewTab();
|
124
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 1 }]);
|
125
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Stem']);
|
126
|
+
});
|
127
|
+
|
128
|
+
it('When the user selects \'No limit\' from the \'Maximum capacity per dropzone\' dropdown, then the user should be able to set n number of options in a dropzone in the preview tab', () => {
|
129
|
+
matchingPage.steps.switchToEditTab();
|
130
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
131
|
+
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('No limit');
|
132
|
+
matchingPage.steps.switchToPreviewTab();
|
133
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 1 }, { optionText: 'Roots', dropzoneIndex: 1 }]);
|
134
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Leaves', 'Stem', 'Roots']);
|
135
|
+
});
|
136
|
+
|
137
|
+
it('When the user selects a finite number of options value from the \'Maximum capacity per dropzone\' dropdown, then the user should only be able to drop options in a dropzone in the preview tab according to the selected option and warning message should be displayed if user drops more options than selected option in edit tab', () => {
|
138
|
+
matchingPage.steps.switchToEditTab();
|
139
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
140
|
+
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
141
|
+
matchingPage.steps.switchToPreviewTab();
|
142
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Seeds', dropzoneIndex: 0 }]);
|
143
|
+
matchingPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(0, ['Leaves', 'Petals']);
|
144
|
+
matchingPage.steps.verifyWarningMessage('Maximum 2 options can be dropped in each dropzone.');
|
145
|
+
});
|
146
|
+
|
147
|
+
it('CSS of warning message', { tags: 'css' }, () => {
|
148
|
+
utilities.verifyCSS(matchingPage.warningMessage(), {
|
149
|
+
'color': css.color.warningMessage,
|
150
|
+
'font-size': css.fontSize.normal,
|
151
|
+
'font-weight': css.fontWeight.regular
|
152
|
+
});
|
153
|
+
utilities.verifyCSS(matchingPage.warningMessageContainer().find('[class*="IconWrapper"]'), {
|
154
|
+
'background-color': css.color.warningContainerBorder,
|
155
|
+
});
|
156
|
+
utilities.verifyCSS(matchingPage.warningMessageContainer(), {
|
157
|
+
'border': `1px solid ${css.color.warningContainerBorder}`,
|
158
|
+
'background-color': css.color.warningContainerBackground
|
159
|
+
});
|
160
|
+
});
|
161
|
+
|
162
|
+
it('Accessibility of warning message', { tags: 'a11y' }, () => {
|
163
|
+
cy.checkAccessibility(matchingPage.warningMessage());
|
164
|
+
});
|
165
|
+
|
166
|
+
it('When user clicks on the options container, warning message should disappear', () => {
|
167
|
+
matchingPage.steps.clickOnOptionContainerPreviewTab();
|
168
|
+
utilities.verifyElementVisibilityState(matchingPage.warningMessageContainer(), 'notExist');
|
169
|
+
});
|
170
|
+
});
|
171
|
+
|
172
|
+
describe('Maximum capacity per dropzone: Scoring', () => {
|
173
|
+
abortEarlySetup();
|
174
|
+
before(() => {
|
175
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
176
|
+
cy.barsPreLoaderWait();
|
177
|
+
matchingPage.steps.addTextInQuestionInstructionsInputField('matching');
|
178
|
+
matchingPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
179
|
+
matchingPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
180
|
+
matchingPage.steps.addMultipleOptionFields(4);
|
181
|
+
matchingPage.steps.enterTextInOptionInputField(options);
|
182
|
+
matchingPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 2 }, { optionText: 'Seeds', dropzoneIndex: 2 }])
|
183
|
+
matchingPage.steps.allotPoints(5);
|
184
|
+
matchingPage.steps.checkAllowStudentsToCheckAnswerCheckbox();
|
185
|
+
});
|
186
|
+
|
187
|
+
it('When the user selects \'Grading\' view without attempting the question, dropzone numeration should be displayed, correct answers section with a label \'Correct answers\' should be displayed with correct answers and respective option numeration', () => {
|
188
|
+
matchingPage.steps.switchToPreviewTab();
|
189
|
+
matchingPage.steps.switchToGradingView();
|
190
|
+
matchingPage.steps.verifyDropzoneNumeration();
|
191
|
+
utilities.verifyInnerText(matchingPage.correctAnswersLabel(), 'Correct answers');
|
192
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
|
193
|
+
});
|
194
|
+
|
195
|
+
it('When the user attempts the question incorrectly, then the user should be awarded 0 points and on switching to \'Grading\' view, incorrect icons should be displayed besides all incorrect responses, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
196
|
+
matchingPage.steps.resetQuestionPreview();
|
197
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Branch', dropzoneIndex: 0 }, { optionText: 'Petals', dropzoneIndex: 1 }, { optionText: 'Roots', dropzoneIndex: 2 }]);
|
198
|
+
matchingPage.steps.verifyPreviewScore(0, 5);
|
199
|
+
matchingPage.steps.switchToGradingView();
|
200
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
201
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
202
|
+
matchingPage.steps.verifyIncorrectOptionIcon(2);
|
203
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
204
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
|
205
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
206
|
+
cy.log('When the user attempts the question incorrectly and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the incorrect answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
207
|
+
matchingPage.steps.checkAnswer();
|
208
|
+
matchingPage.steps.verifyIncorrectOptionIcon(0);
|
209
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1);
|
210
|
+
matchingPage.steps.verifyIncorrectOptionIcon(2);
|
211
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
212
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
213
|
+
});
|
214
|
+
|
215
|
+
it('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
216
|
+
matchingPage.steps.resetQuestionPreview();
|
217
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Branch', dropzoneIndex: 1 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
|
218
|
+
matchingPage.steps.verifyPreviewScore(0, 5);
|
219
|
+
matchingPage.steps.switchToGradingView();
|
220
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
221
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
222
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1, 0);
|
223
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
224
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
225
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
|
226
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
227
|
+
cy.log('When the user attempts the question partially correct with some correct, some incomplete, some incorrect options and clicks on \'Check answer\' button, then incorrect icon should be displayed besides the incorrect answer responses and correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
228
|
+
matchingPage.steps.checkAnswer();
|
229
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
230
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
231
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1, 0);
|
232
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
233
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
234
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
235
|
+
});
|
236
|
+
|
237
|
+
it('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section with all correct answers along with numeration should be displayed', () => {
|
238
|
+
matchingPage.steps.resetQuestionPreview();
|
239
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
|
240
|
+
matchingPage.steps.verifyPreviewScore(0, 5);
|
241
|
+
matchingPage.steps.switchToGradingView();
|
242
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
243
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
244
|
+
matchingPage.steps.verifyCorrectOptionIcon(1, 0);
|
245
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
246
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
247
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
|
248
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
249
|
+
cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but one dropzone incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
250
|
+
matchingPage.steps.checkAnswer();
|
251
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
252
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
253
|
+
matchingPage.steps.verifyCorrectOptionIcon(1, 0);
|
254
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
255
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
256
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
257
|
+
});
|
258
|
+
|
259
|
+
it('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer, then the user should be awarded 0 points and on switching to \'Grading\' view, correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed besides incorrect answer response, a status message with text \'Your answer is incorrect\' and correct answer section should be displayed along with numeration', () => {
|
260
|
+
matchingPage.steps.resetQuestionPreview();
|
261
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Branch', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 2 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
|
262
|
+
matchingPage.steps.verifyPreviewScore(0, 5);
|
263
|
+
matchingPage.steps.switchToGradingView();
|
264
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
265
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
266
|
+
matchingPage.steps.verifyCorrectOptionIcon(1, 0);
|
267
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1, 1);
|
268
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
269
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 1);
|
270
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
271
|
+
matchingPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionForMultipleOptions([['Petals', 'Leaves'], ['Roots'], ['Stem', 'Seeds']]);
|
272
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
273
|
+
cy.log('When the user attempts the question partially correct with all the dropzone correctly attempted but with an extra option which is not set as correct answer and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses and incorrect icon should be displayed besides the incorrect answer responses, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
274
|
+
matchingPage.steps.checkAnswer();
|
275
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
276
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
277
|
+
matchingPage.steps.verifyCorrectOptionIcon(1, 0);
|
278
|
+
matchingPage.steps.verifyIncorrectOptionIcon(1, 1);
|
279
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
280
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 1);
|
281
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
282
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
283
|
+
});
|
284
|
+
|
285
|
+
it('When user attempts the question correctly, the user should be awarded full points and on switching to \'Grading\' view, then correct icons should be displayed beside all the correct responses, correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
286
|
+
matchingPage.steps.resetQuestionPreview();
|
287
|
+
matchingPage.steps.clickAndDropOptionInDropzonePreviewTab([{ optionText: 'Petals', dropzoneIndex: 0 }, { optionText: 'Leaves', dropzoneIndex: 0 }, { optionText: 'Roots', dropzoneIndex: 1 }, { optionText: 'Stem', dropzoneIndex: 2 }, { optionText: 'Seeds', dropzoneIndex: 2 }]);
|
288
|
+
matchingPage.steps.verifyPreviewScore(5, 5);
|
289
|
+
matchingPage.steps.switchToGradingView();
|
290
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
291
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
292
|
+
matchingPage.steps.verifyCorrectOptionIcon(1, 0);
|
293
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
294
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 1);
|
295
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
296
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
297
|
+
matchingPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
298
|
+
cy.log('When the user attempts the question correctly and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed')
|
299
|
+
matchingPage.steps.checkAnswer();
|
300
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 0);
|
301
|
+
matchingPage.steps.verifyCorrectOptionIcon(0, 1);
|
302
|
+
matchingPage.steps.verifyCorrectOptionIcon(1, 0);
|
303
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 0);
|
304
|
+
matchingPage.steps.verifyCorrectOptionIcon(2, 1);
|
305
|
+
matchingPage.steps.verifyCorrectIncorrectAnswerLabel('correct');
|
306
|
+
matchingPage.steps.verifyCorrectAnswerSectionNotExists();
|
307
|
+
});
|
308
|
+
});
|
309
|
+
});
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { matchingPage } from "../../../pages";
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
4
|
-
|
4
|
+
const css = Cypress.env('css');
|
5
5
|
const promptTextArray = ['Wild', 'Aquatic', 'Pet'];
|
6
6
|
const options = ['Petals', 'Leaves', 'Roots', 'Flowers'];
|
7
7
|
|
@@ -0,0 +1,72 @@
|
|
1
|
+
import { toolSettingsComponent } from "../../../pages/components";
|
2
|
+
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
4
|
+
import { dialogBoxBase, matchingPage, rulerPage } from "../../../pages";
|
5
|
+
|
6
|
+
const css = Cypress.env('css');
|
7
|
+
|
8
|
+
describe('Create Item page: Tool settings', () => {
|
9
|
+
before(() => {
|
10
|
+
cy.loginAs('admin');
|
11
|
+
});
|
12
|
+
|
13
|
+
describe('Tool settings: Contents', () => {
|
14
|
+
abortEarlySetup();
|
15
|
+
before(() => {
|
16
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
17
|
+
});
|
18
|
+
|
19
|
+
matchingPage.tests.verifyToolSettingsContent();
|
20
|
+
});
|
21
|
+
|
22
|
+
describe('Tool settings: Edit tool settings', () => {
|
23
|
+
abortEarlySetup();
|
24
|
+
before(() => {
|
25
|
+
matchingPage.steps.navigateToCreateQuestion('matching');
|
26
|
+
toolSettingsComponent.steps.expandToolSettingsAccordion();
|
27
|
+
});
|
28
|
+
|
29
|
+
it('When user clicks on edit icon for ruler tool, then popup for ruler tool settings should be displayed', () => {
|
30
|
+
toolSettingsComponent.steps.clickOnToolEditIcon(0);
|
31
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
32
|
+
});
|
33
|
+
|
34
|
+
it('When user modifies the settings for the ruler tool and clicks the \'Ok\' button, then ruler tool should enter selected state.', () => {
|
35
|
+
rulerPage.steps.expandUnitOfMeasurementDropdown();
|
36
|
+
rulerPage.steps.selectOptionFromUnitOfMeasurementDropdown('Inch');
|
37
|
+
rulerPage.steps.selectOptionFromLengthOfRulerOptions('12 in');
|
38
|
+
rulerPage.steps.selectColorBlock(1);
|
39
|
+
rulerPage.steps.expandRotationDropdown();
|
40
|
+
rulerPage.steps.selectOptionFromRotationDropdown('Allow rotation and display angle');
|
41
|
+
rulerPage.steps.enterInputToOpacityInputField(60);
|
42
|
+
dialogBoxBase.steps.clickOnAcceptButtonInDialogBox();
|
43
|
+
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'notExist');
|
44
|
+
toolSettingsComponent.steps.verifyToolSelectedState(0);
|
45
|
+
});
|
46
|
+
|
47
|
+
it('When user has made changes for ruler tool in edit tab then changes should be reflected in the ruler tool in the preview tab', () => {
|
48
|
+
cy.log('Switching to Preview Tab');
|
49
|
+
rulerPage.steps.switchToPreviewTab();
|
50
|
+
rulerPage.steps.verifyPreviewTabRulerVisibilityButtonLabel('Show');
|
51
|
+
rulerPage.steps.clickOnRulerVisibilityButton();
|
52
|
+
utilities.verifyElementVisibilityState(rulerPage.rulerPreviewTab(), 'visible');
|
53
|
+
rulerPage.steps.verifyLengthOfRulerInPreview('12in');
|
54
|
+
rulerPage.steps.verifyColorOfRulerInPreview(1);
|
55
|
+
rulerPage.steps.verifyRulerOpacityInPreview('0.6');
|
56
|
+
rulerPage.steps.verifyRotationButtonWithDegreeVisible();
|
57
|
+
});
|
58
|
+
|
59
|
+
it('CSS of the \'Hide ruler\' button', { tags: 'css' }, () => {
|
60
|
+
utilities.verifyCSS(rulerPage.rulerVisibilityButtonPreviewTab(), {
|
61
|
+
'border': `1px solid ${css.color.activeButtons}`,
|
62
|
+
'background-color': css.color.defaultBackground,
|
63
|
+
'font-size': css.fontSize.normal,
|
64
|
+
'font-weight': css.fontWeight.semibold
|
65
|
+
});
|
66
|
+
});
|
67
|
+
|
68
|
+
it('Accessibility of \'Hide ruler\' button', { tags: 'a11y' }, () => {
|
69
|
+
cy.checkAccessibility(rulerPage.rulerVisibilityButtonPreviewTab().parents('[class*="ItemEnginestyles__MainWrapper"]'));
|
70
|
+
});
|
71
|
+
});
|
72
|
+
});
|