itemengine-cypress-automation 1.0.553-IEI-7000-main-8cb7c78.0 → 1.0.554-IEI-5835-LIVE-30c8e27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettings.js +1 -120
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +1 -27
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +5 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +21 -29
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +4 -140
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +14 -16
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +3 -71
- package/cypress/e2e/LiveStudentView/MultipleSelection/liveStudentView.js +123 -0
- package/cypress/pages/components/additionalSettingsPanel.js +0 -18
- package/cypress/pages/components/draggableOptionsSectionComponent.js +1 -1
- package/cypress/pages/components/maximumCapacityPerDropzoneComponent.js +1 -1
- package/cypress/pages/components/optionsWrapperComponent.js +2 -2
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +81 -197
- package/cypress/pages/liveStudentViewBase.js +183 -0
- package/cypress/pages/liveStudentViewPage.js +227 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +22 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationAllViews.js +0 -230
|
@@ -1,230 +0,0 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
|
2
|
-
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
|
4
|
-
import { colorPopupComponent } from "../../../pages/components";
|
|
5
|
-
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
6
|
-
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
-
const css = Cypress.env('css');
|
|
8
|
-
let itemReferenceID = "";
|
|
9
|
-
const modifiedColor = 'rgb(121, 60, 60)';
|
|
10
|
-
|
|
11
|
-
describe('Create Item page - Drag and drop into categories: Style and layout customization', () => {
|
|
12
|
-
before(() => {
|
|
13
|
-
cy.loginAs('admin');
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
views.forEach((view) => {
|
|
17
|
-
describe(`${view}: Style and Layout Customization - Default State`, () => {
|
|
18
|
-
abortEarlySetup();
|
|
19
|
-
before(() => {
|
|
20
|
-
switch (view) {
|
|
21
|
-
case 'Question preview':
|
|
22
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
23
|
-
cy.barsPreLoaderWait();
|
|
24
|
-
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
|
25
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
26
|
-
break;
|
|
27
|
-
case 'Item preview':
|
|
28
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
29
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
30
|
-
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
31
|
-
break;
|
|
32
|
-
case 'Grading view':
|
|
33
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
34
|
-
break;
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
beforeEach(() => {
|
|
39
|
-
switch (view) {
|
|
40
|
-
case 'Question preview':
|
|
41
|
-
break;
|
|
42
|
-
case 'Item preview':
|
|
43
|
-
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
44
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
45
|
-
break;
|
|
46
|
-
case 'Grading view':
|
|
47
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
if (view === 'Question preview') {
|
|
53
|
-
after(() => {
|
|
54
|
-
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
|
55
|
-
dragAndDropIntoCategoriesPage.steps.clickOnConfirmButton();
|
|
56
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
57
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
if (view === 'Grading view') {
|
|
62
|
-
it(`\'Row spacing\' no spacing option is selected then no spacing should be displayed between the row options${view}`, () => {
|
|
63
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowSpacingStudentView('No spacing');
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it(`Options should have default alignment in ${view}`, () => {
|
|
67
|
-
dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInStudentView();
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
if (view !== 'Grading view') {
|
|
72
|
-
it(`\'Row spacing\' no spacing option is selected then no spacing should be displayed between the row options${view}`, () => {
|
|
73
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowSpacingPreviewTab('No spacing');
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it(`Options should have default alignment in ${view}`, () => {
|
|
77
|
-
dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInPreviewTab('Left');
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
it(`\'Column spacing\' no spacing option is selected then no spacing should be displayed between column options${view}`, () => {
|
|
82
|
-
dragAndDropIntoCategoriesPage.steps.verifyColumnSpacingPreviewTab('No spacing');
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
it(`Dropzone should have default border color, fill color, and border style in ${view}`, () => {
|
|
86
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneBorderStylePreviewTab('dashed');
|
|
87
|
-
dragAndDropIntoCategoriesPage.steps.verifyFillColorPreviewTab(css.color.matrixDropzoneCellBg);
|
|
88
|
-
dragAndDropIntoCategoriesPage.steps.verifyBorderColorPreviewTab(css.color.activeComponentBorder);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it(`Draggable options should have default fill color, border color, and border style in ${view}`, () => {
|
|
92
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderStylePreviewTab('solid');
|
|
93
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorPreviewTab(css.color.defaultBackground);
|
|
94
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorPreviewTab(css.color.figDefaultComponentBorder);
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
it(`Drag handle icon should be displayed in default state in ${view}`, () => {
|
|
98
|
-
dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconPreviewTab('drag icon');
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
it(`Draggable option panel should have default placement in ${view}`, () => {
|
|
102
|
-
dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementPreviewTab('Bottom');
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
it(`Dropzone dimensions should be default state in ${view}`, () => {
|
|
106
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneDimensionsPreviewTab('Auto');
|
|
107
|
-
});
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
views.forEach((view) => {
|
|
112
|
-
describe(`${view}: Style and Layout Customization - modified State`, () => {
|
|
113
|
-
abortEarlySetup();
|
|
114
|
-
before(() => {
|
|
115
|
-
switch (view) {
|
|
116
|
-
case 'Question preview':
|
|
117
|
-
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
118
|
-
cy.barsPreLoaderWait();
|
|
119
|
-
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
|
120
|
-
dragAndDropIntoCategoriesPage.steps.expandStyleAndLayoutCustomizationAccordion();
|
|
121
|
-
dragAndDropIntoCategoriesPage.steps.expandRowSpacingDropdown();
|
|
122
|
-
dragAndDropIntoCategoriesPage.steps.selectRowSpacingDropdownOption('Small');
|
|
123
|
-
dragAndDropIntoCategoriesPage.steps.expandColumnSpacingDropdown();
|
|
124
|
-
dragAndDropIntoCategoriesPage.steps.selectColumnSpacingDropdownOption('Wide');
|
|
125
|
-
dragAndDropIntoCategoriesPage.steps.editColor(0);
|
|
126
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
127
|
-
colorPopupComponent.steps.clickOnOkButton();
|
|
128
|
-
dragAndDropIntoCategoriesPage.steps.editColor(1);
|
|
129
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
130
|
-
colorPopupComponent.steps.clickOnOkButton();
|
|
131
|
-
dragAndDropIntoCategoriesPage.steps.editColor(2);
|
|
132
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
133
|
-
colorPopupComponent.steps.clickOnOkButton();
|
|
134
|
-
dragAndDropIntoCategoriesPage.steps.editColor(3);
|
|
135
|
-
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
136
|
-
colorPopupComponent.steps.clickOnOkButton();
|
|
137
|
-
dragAndDropIntoCategoriesPage.steps.selectDragHandleOption(1);
|
|
138
|
-
dragAndDropIntoCategoriesPage.steps.selectDraggableOptionsBorderStyleOption('dotted');
|
|
139
|
-
dragAndDropIntoCategoriesPage.steps.selectDropzoneBorderStyleOption('solid');
|
|
140
|
-
dragAndDropIntoCategoriesPage.steps.selectPanelPlacementOption('Top');
|
|
141
|
-
dragAndDropIntoCategoriesPage.steps.selectOptionAlignmentInPanelOption('right');
|
|
142
|
-
dragAndDropIntoCategoriesPage.steps.expandDropzoneDimensionsDropdown();
|
|
143
|
-
dragAndDropIntoCategoriesPage.steps.selectDropzoneDimensionsDropdownOption('Custom');
|
|
144
|
-
dragAndDropIntoCategoriesPage.steps.enterTextInDropzoneWidthInputField(0, 160);
|
|
145
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneWidthInputField(0, '160');
|
|
146
|
-
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
147
|
-
break;
|
|
148
|
-
case 'Item preview':
|
|
149
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
150
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
151
|
-
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
152
|
-
break;
|
|
153
|
-
case 'Grading view':
|
|
154
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
155
|
-
break;
|
|
156
|
-
};
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
beforeEach(() => {
|
|
160
|
-
switch (view) {
|
|
161
|
-
case 'Question preview':
|
|
162
|
-
break;
|
|
163
|
-
case 'Item preview':
|
|
164
|
-
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
165
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
166
|
-
break;
|
|
167
|
-
case 'Grading view':
|
|
168
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
if (view === 'Question preview') {
|
|
174
|
-
after(() => {
|
|
175
|
-
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
|
176
|
-
dragAndDropIntoCategoriesPage.steps.clickOnConfirmButton();
|
|
177
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
178
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
if (view === 'Grading view') {
|
|
183
|
-
it(`\'Row spacing\' no spacing option is selected then small spacing should be displayed between the row options${view}`, () => {
|
|
184
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowSpacingStudentView('Small');
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
if (view !== 'Grading view') {
|
|
189
|
-
it(`\'Row spacing\' no spacing option is selected then small spacing should be displayed between the row options${view}`, () => {
|
|
190
|
-
dragAndDropIntoCategoriesPage.steps.verifyRowSpacingPreviewTab('Small');
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
it(`\'Column spacing\' no spacing option is selected then wide spacing should be displayed between column options${view}`, () => {
|
|
195
|
-
dragAndDropIntoCategoriesPage.steps.verifyColumnSpacingPreviewTab('Wide');
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
it(`Dropzone should have modified border color, fill color, and border style in ${view}`, () => {
|
|
199
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneBorderStylePreviewTab('solid');
|
|
200
|
-
dragAndDropIntoCategoriesPage.steps.verifyBorderColorPreviewTab(modifiedColor);
|
|
201
|
-
dragAndDropIntoCategoriesPage.steps.verifyFillColorPreviewTab(modifiedColor);
|
|
202
|
-
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
it(`Draggable options should have modified fill color, border color, and border style in ${view}`, () => {
|
|
206
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderStylePreviewTab('dotted');
|
|
207
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsBorderColorAllView(modifiedColor);
|
|
208
|
-
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsFillColorPreviewTab(modifiedColor);
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
it(`Drag handle icon should be displayed in modified state in ${view}`, () => {
|
|
212
|
-
dragAndDropIntoCategoriesPage.steps.verifyDragHandleIconPreviewTab('arrow icon');
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
it(`Draggable option panel should have modified placement in ${view}`, () => {
|
|
216
|
-
dragAndDropIntoCategoriesPage.steps.verifyPanelPlacementPreviewTab('Top');
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
it(`Dropzone dimensions should be customized state in ${view}`, () => {
|
|
220
|
-
dragAndDropIntoCategoriesPage.steps.verifyDropzoneWidthPreviewTab(0, 160);
|
|
221
|
-
});
|
|
222
|
-
|
|
223
|
-
it(`Options should have modified alignment in ${view}`, () => {
|
|
224
|
-
dragAndDropIntoCategoriesPage.steps.verifyOptionAlignmentInPanelInPreviewTab('Right');
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
});
|