itemengine-cypress-automation 1.0.553-IEI-3480-e6afc10.0 → 1.0.553-IEI-7000-main-043954e.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 +120 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/additionalSettingsBasic.js +27 -1
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/clickAndDrop.js +1 -5
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/editTabBasicSection.js +29 -21
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/minimumScoringPenaltyPointsAndRoundingDropdown.js +140 -4
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +16 -14
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +71 -3
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/styleAndLayoutCustomizationAllViews.js +230 -0
- package/cypress/pages/components/additionalSettingsPanel.js +18 -0
- 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 +197 -81
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
|
1
|
+
import { dragAndDropIntoCategoriesPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const enumerationOptions = {
|
|
@@ -8,6 +8,9 @@ const enumerationOptions = {
|
|
|
8
8
|
'Roman numeral (uppercase)': ['I', 'II'],
|
|
9
9
|
'Roman numeral (lowercase)': ['i', 'ii'],
|
|
10
10
|
};
|
|
11
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
12
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
13
|
+
let itemReferenceID = "";
|
|
11
14
|
|
|
12
15
|
//Failing due to https://redmine.zeuslearning.com/issues/574098
|
|
13
16
|
describe('Drag and drop into categories - Additional settings', () => {
|
|
@@ -170,4 +173,120 @@ describe('Drag and drop into categories - Additional settings', () => {
|
|
|
170
173
|
dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone-cell');
|
|
171
174
|
});
|
|
172
175
|
});
|
|
176
|
+
|
|
177
|
+
views.forEach((view) => {
|
|
178
|
+
describe(`${view}: Additional Settings: Grading view style without numeration`, () => {
|
|
179
|
+
abortEarlySetup();
|
|
180
|
+
before(() => {
|
|
181
|
+
switch (view) {
|
|
182
|
+
case 'Question preview':
|
|
183
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
184
|
+
cy.barsPreLoaderWait();
|
|
185
|
+
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
|
186
|
+
dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
|
|
187
|
+
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(2);
|
|
188
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale']);
|
|
189
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Parrot': 1 });
|
|
190
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
|
191
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
|
|
192
|
+
dragAndDropIntoCategoriesPage.steps.selectEnumerationType('without enumeration');
|
|
193
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
194
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
195
|
+
break;
|
|
196
|
+
case 'Item preview':
|
|
197
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
198
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
199
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
200
|
+
break;
|
|
201
|
+
case 'Grading view':
|
|
202
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
203
|
+
break;
|
|
204
|
+
};
|
|
205
|
+
});
|
|
206
|
+
|
|
207
|
+
beforeEach(() => {
|
|
208
|
+
switch (view) {
|
|
209
|
+
case 'Question preview':
|
|
210
|
+
break;
|
|
211
|
+
case 'Item preview':
|
|
212
|
+
dragAndDropIntoCategoriesPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
213
|
+
itemPreviewPage.steps.resetQuestionPreview();
|
|
214
|
+
break;
|
|
215
|
+
case 'Grading view':
|
|
216
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
217
|
+
break;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
if (view === 'Question preview') {
|
|
222
|
+
after(() => {
|
|
223
|
+
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
|
224
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
225
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
226
|
+
});
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
it(`When the user select toggle button \'Without numeration\' is selected in the dropzone identifiers section, then on switching to the ${view} dropzone numeration should not be displayed`, () => {
|
|
230
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.dropzoneCellNumeration(), 'notExist');
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
});
|
|
234
|
+
|
|
235
|
+
views.forEach((view) => {
|
|
236
|
+
describe(`${view}: Additional Settings: Grading view style with numeration`, () => {
|
|
237
|
+
abortEarlySetup();
|
|
238
|
+
before(() => {
|
|
239
|
+
switch (view) {
|
|
240
|
+
case 'Question preview':
|
|
241
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
242
|
+
cy.barsPreLoaderWait();
|
|
243
|
+
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
|
244
|
+
dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
|
|
245
|
+
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(2);
|
|
246
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale']);
|
|
247
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Parrot': 1 });
|
|
248
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(20);
|
|
249
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
|
|
250
|
+
dragAndDropIntoCategoriesPage.steps.selectIdentifierToggleButton('Alphabet (uppercase)');
|
|
251
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
252
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
253
|
+
break;
|
|
254
|
+
case 'Item preview':
|
|
255
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
256
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
257
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
258
|
+
break;
|
|
259
|
+
case 'Grading view':
|
|
260
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
261
|
+
break;
|
|
262
|
+
};
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
beforeEach(() => {
|
|
266
|
+
switch (view) {
|
|
267
|
+
case 'Question preview':
|
|
268
|
+
break;
|
|
269
|
+
case 'Item preview':
|
|
270
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
271
|
+
break;
|
|
272
|
+
case 'Grading view':
|
|
273
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
if (view === 'Question preview') {
|
|
279
|
+
after(() => {
|
|
280
|
+
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
|
281
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
282
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
283
|
+
});
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
it(`When with numeration radio button is selected, then the numeration should be displayed in the dropzones as well as correct answer options in ${view}`, () => {
|
|
287
|
+
dragAndDropIntoCategoriesPage.steps.verifyDropzoneCellNumerationPreviewTab(['A', 'B']);
|
|
288
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectAnswerContainerNumeration(['A', 'B']);
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
});
|
|
173
292
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
|
1
|
+
import { dragAndDropIntoCategoriesPage, gradingViewPage, itemPreviewPage } 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
|
|
|
6
6
|
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
|
7
7
|
const options = ['Bat', 'Eagle'];
|
|
8
|
+
let itemReferenceID = "";
|
|
8
9
|
|
|
9
10
|
describe('Drag and drop into categories - Additional settings', () => {
|
|
10
11
|
before(() => {
|
|
@@ -122,4 +123,29 @@ describe('Drag and drop into categories - Additional settings', () => {
|
|
|
122
123
|
|
|
123
124
|
dragAndDropIntoCategoriesPage.tests.verifyDetailsSection();
|
|
124
125
|
});
|
|
126
|
+
|
|
127
|
+
describe('Additional settings: Details section Grading view', () => {
|
|
128
|
+
abortEarlySetup();
|
|
129
|
+
before(() => {
|
|
130
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
131
|
+
cy.barsPreLoaderWait();
|
|
132
|
+
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
|
133
|
+
dragAndDropIntoCategoriesPage.steps.expandAdditionalSettings();
|
|
134
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInTeacherGuidelinesInputField('Teacher scoring guidelines');
|
|
135
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInSampleAnswerInputField('Sample answer');
|
|
136
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInAcknowledgementsInputField('Acknowledgements');
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('When the user navigates to the grading view, the Details section information should be displayed correctly', () => {
|
|
140
|
+
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
|
141
|
+
dragAndDropIntoCategoriesPage.steps.clickOnConfirmButton();
|
|
142
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
143
|
+
cy.wrap(itemPreviewPage.steps.getItemReferenceID()).then((referenceId) => {
|
|
144
|
+
itemReferenceID = referenceId;
|
|
145
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
146
|
+
dragAndDropIntoCategoriesPage.steps.verifyTeacherGuidelinesLabelInGradingView('Teacher Guidelines');
|
|
147
|
+
dragAndDropIntoCategoriesPage.steps.verifyTeacherGuidelinesDescriptionInGradingView('Teacher scoring guidelines');
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
});
|
|
125
151
|
});
|
|
@@ -157,8 +157,6 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
|
|
|
157
157
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
|
|
158
158
|
});
|
|
159
159
|
|
|
160
|
-
dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
|
|
161
|
-
|
|
162
160
|
it('When the user fills a dropzone cell, the dropzone cell should get filled with the option and the \'Error: Please set a correct answer\' error message should disappear', () => {
|
|
163
161
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
|
|
164
162
|
dragAndDropIntoCategoriesPage.steps.verifyErrorMessageIsNotDisplayed();
|
|
@@ -484,8 +482,6 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
|
|
|
484
482
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
|
|
485
483
|
});
|
|
486
484
|
|
|
487
|
-
dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
|
|
488
|
-
|
|
489
485
|
it('When the user fills a dropzone cell, the dropzone cell should get filled with the option and the \'Error: Please set a correct answer\' error message should disappear', () => {
|
|
490
486
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
|
|
491
487
|
dragAndDropIntoCategoriesPage.steps.verifyErrorMessageIsNotDisplayed();
|
|
@@ -574,7 +570,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
|
|
|
574
570
|
});
|
|
575
571
|
});
|
|
576
572
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.dropzoneCellPreviewTab().eq(0), {
|
|
577
|
-
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
573
|
+
'border-left': `1px solid ${css.color.activeComponentBorder}`
|
|
578
574
|
});
|
|
579
575
|
});
|
|
580
576
|
|
|
@@ -473,12 +473,12 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
473
473
|
|
|
474
474
|
it('CSS of \'Set first row cells as heading\', \'Set first column cells as heading\' and table in \'Specify columns and rows\' section', { tags: 'css' }, () => {
|
|
475
475
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.setFirstRowCellsAsHeadingLabel(), {
|
|
476
|
-
'color': css.color.
|
|
476
|
+
'color': css.color.labelText,
|
|
477
477
|
'font-size': css.fontSize.normal,
|
|
478
478
|
'font-weight': css.fontWeight.regular
|
|
479
479
|
});
|
|
480
480
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.setFirstColumnCellsAsHeadingLabel(), {
|
|
481
|
-
'color': css.color.
|
|
481
|
+
'color': css.color.labelText,
|
|
482
482
|
'font-size': css.fontSize.normal,
|
|
483
483
|
'font-weight': css.fontWeight.regular
|
|
484
484
|
});
|
|
@@ -488,9 +488,9 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
488
488
|
'border-color': css.color.activeButtons
|
|
489
489
|
});
|
|
490
490
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.cellHeadingTextArea(), {
|
|
491
|
-
'color': css.color.
|
|
492
|
-
'font-size': css.fontSize.
|
|
493
|
-
'font-weight': css.fontWeight.
|
|
491
|
+
'color': css.color.codeBlockText,
|
|
492
|
+
'font-size': css.fontSize.normal,
|
|
493
|
+
'font-weight': css.fontWeight.regular
|
|
494
494
|
});
|
|
495
495
|
//Subheading cell
|
|
496
496
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.tableCellContainer().eq(1), {
|
|
@@ -498,9 +498,9 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
498
498
|
'border-color': css.color.activeButtons
|
|
499
499
|
});
|
|
500
500
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.cellSubheadingTextArea(), {
|
|
501
|
-
'color': css.color.
|
|
502
|
-
'font-size': css.fontSize.
|
|
503
|
-
'font-weight': css.fontWeight.
|
|
501
|
+
'color': css.color.codeBlockText,
|
|
502
|
+
'font-size': css.fontSize.normal,
|
|
503
|
+
'font-weight': css.fontWeight.regular
|
|
504
504
|
});
|
|
505
505
|
//Text cell
|
|
506
506
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.tableCellContainer().eq(2), {
|
|
@@ -508,14 +508,14 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
508
508
|
'border': `1px dashed ${css.color.activeButtons}`
|
|
509
509
|
});
|
|
510
510
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.cellTextTextArea(), {
|
|
511
|
-
'color': css.color.
|
|
512
|
-
'font-size': css.fontSize.
|
|
511
|
+
'color': css.color.codeBlockText,
|
|
512
|
+
'font-size': css.fontSize.normal,
|
|
513
513
|
'font-weight': css.fontWeight.regular
|
|
514
514
|
});
|
|
515
515
|
//Dropzone cell
|
|
516
516
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.tableCellContainer().eq(3), {
|
|
517
517
|
'background-color': css.color.matrixDropzoneCellBg,
|
|
518
|
-
'border': `1px dashed ${css.color.
|
|
518
|
+
'border': `1px dashed ${css.color.borderColor}`
|
|
519
519
|
});
|
|
520
520
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.tableCellContainer().eq(3).find('svg path').eq(0), {
|
|
521
521
|
'fill': css.color.dropzoneCellIcon
|
|
@@ -526,12 +526,12 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
526
526
|
'border': `1px dashed ${css.color.activeButtons}`
|
|
527
527
|
});
|
|
528
528
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.tableCellContainer().eq(4).find('svg path'), {
|
|
529
|
-
'stroke': css.color.
|
|
529
|
+
'stroke': css.color.cellIcon
|
|
530
530
|
});
|
|
531
531
|
cy.log('Check set first row cells as heading checkbox');
|
|
532
532
|
dragAndDropIntoCategoriesPage.steps.checkSetFirstRowCellsAsHeadingCheckbox();
|
|
533
533
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.setFirstRowCellsAsHeadingCheckbox().find('g rect').eq(1), {
|
|
534
|
-
'fill': css.color.
|
|
534
|
+
'fill': css.color.activeButtons,
|
|
535
535
|
});
|
|
536
536
|
//Cell type menu
|
|
537
537
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyButton().eq(5).find('g g'), {
|
|
@@ -550,22 +550,19 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
550
550
|
'font-weight': css.fontWeight.regular
|
|
551
551
|
});
|
|
552
552
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(0).find('span').eq(0), {
|
|
553
|
-
'fill': css.color.
|
|
553
|
+
'fill': css.color.blackText
|
|
554
554
|
});
|
|
555
555
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(1).find('span').eq(0), {
|
|
556
|
-
'fill': css.color.
|
|
556
|
+
'fill': css.color.blackText
|
|
557
557
|
});
|
|
558
558
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(2).find('span').eq(0), {
|
|
559
|
-
'fill': css.color.
|
|
559
|
+
'fill': css.color.blackText
|
|
560
560
|
});
|
|
561
561
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(3).find('span').eq(0), {
|
|
562
|
-
'fill': css.color.
|
|
563
|
-
});
|
|
564
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(4).find('span').eq(0), {
|
|
565
|
-
'stroke': css.color.liText
|
|
562
|
+
'fill': css.color.blackText
|
|
566
563
|
});
|
|
567
564
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(0), {
|
|
568
|
-
'background-color': css.color.
|
|
565
|
+
'background-color': css.color.transparent
|
|
569
566
|
});
|
|
570
567
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(3), {
|
|
571
568
|
'background-color': css.color.liTextSelectedBg
|
|
@@ -792,4 +789,15 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
792
789
|
});
|
|
793
790
|
});
|
|
794
791
|
|
|
792
|
+
describe('Print layout settings accordion', () => {
|
|
793
|
+
abortEarlySetup();
|
|
794
|
+
before(() => {
|
|
795
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
796
|
+
cy.barsPreLoaderWait();
|
|
797
|
+
});
|
|
798
|
+
|
|
799
|
+
dragAndDropIntoCategoriesPage.tests.verifyPrintLayoutSettingsAccordionProperties();
|
|
800
|
+
dragAndDropIntoCategoriesPage.tests.verifyPrintLayoutSettingsAccordionContents();
|
|
801
|
+
dragAndDropIntoCategoriesPage.tests.verifyPrintLayoutSettingsAccordionAdditionalContents();
|
|
802
|
+
});
|
|
795
803
|
});
|
|
@@ -50,16 +50,14 @@ describe('Create item page - Drag and drop into categories: Minimum scoring, Pen
|
|
|
50
50
|
|
|
51
51
|
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErrorState();
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
it.skip('When the user selects \'Penalty points for each incorrect dropzone\' from the penalty scoring dropdown, a penalty points detail section with an empty input field and \'Penalty points for each incorrect dropzone\' label should be displayed', () => {
|
|
53
|
+
it('When the user selects \'Penalty points for each incorrect dropzone\' from the penalty scoring dropdown, a penalty points detail section with an empty input field and \'Penalty points for each incorrect dropzone\' label should be displayed', () => {
|
|
55
54
|
dragAndDropIntoCategoriesPage.steps.expandPenaltyScoringDropdown();
|
|
56
55
|
dragAndDropIntoCategoriesPage.steps.selectOptionFromPenaltyScoringDropdown(penaltyPerDropzoneScoringTypeArray[2]);
|
|
57
56
|
dragAndDropIntoCategoriesPage.steps.verifyPenaltyPointsForEachIncorrectDropzone('');
|
|
58
57
|
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.penaltyPointsForEachIncorrectOptionOrDropzoneLabel(), 'Penalty points for each incorrect dropzone');
|
|
59
58
|
});
|
|
60
59
|
|
|
61
|
-
|
|
62
|
-
it.skip('User should be able to allot \'Penalty points for each incorrect dropzone\'', () => {
|
|
60
|
+
it('User should be able to allot \'Penalty points for each incorrect dropzone\'', () => {
|
|
63
61
|
dragAndDropIntoCategoriesPage.steps.allotPenaltyPointsForEachIncorrectDropzone(5);
|
|
64
62
|
});
|
|
65
63
|
|
|
@@ -141,4 +139,142 @@ describe('Create item page - Drag and drop into categories: Minimum scoring, Pen
|
|
|
141
139
|
|
|
142
140
|
dragAndDropIntoCategoriesPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
|
143
141
|
});
|
|
142
|
+
|
|
143
|
+
describe('Rounding for per correct option scoring', () => {
|
|
144
|
+
abortEarlySetup();
|
|
145
|
+
before(() => {
|
|
146
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
147
|
+
cy.barsPreLoaderWait();
|
|
148
|
+
dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
|
|
149
|
+
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
|
150
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock']);
|
|
151
|
+
dragAndDropIntoCategoriesPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
|
152
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
|
153
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Platypus': 2 });
|
|
154
|
+
dragAndDropIntoCategoriesPage.steps.selectAutoScoredScoringSubtype('Per correct option');
|
|
155
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(7.2);
|
|
156
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
|
157
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
|
158
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
it('When the user select \'Round down if <= 0.99\' and attempt correctly, then the rounding option should be applied correctly', () => {
|
|
162
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
|
|
163
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(7, 21.6);
|
|
164
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
165
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(14, 21.6);
|
|
166
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Platypus': 2 });
|
|
167
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(21, 21.6);
|
|
168
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
169
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
|
170
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
|
171
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
|
172
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it('When the user select \'Round down if <= 0.50\' and attempt correctly, then the rounding option should be applied correctly', () => {
|
|
176
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
|
177
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
|
178
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
|
179
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
180
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
|
|
181
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(7, 21.6);
|
|
182
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
183
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(14, 21.6);
|
|
184
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Platypus': 2 });
|
|
185
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(21.6, 21.6);
|
|
186
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
187
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
|
188
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
|
189
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
|
190
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
it('When the user select \'Round up if >= 0.50:Round down if <= 0.50\' and attempt correctly, then the rounding option should be applied correctly', () => {
|
|
195
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
|
196
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
|
197
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
|
198
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
199
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
|
|
200
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(7, 21.6);
|
|
201
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
202
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(14, 21.6);
|
|
203
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Platypus': 2 });
|
|
204
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(21.6, 21.6);
|
|
205
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
206
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
|
207
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
|
208
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
|
209
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
210
|
+
});
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
describe('Rounding for per dropzone scoring', () => {
|
|
214
|
+
abortEarlySetup();
|
|
215
|
+
before(() => {
|
|
216
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
217
|
+
cy.barsPreLoaderWait();
|
|
218
|
+
dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
|
|
219
|
+
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
|
220
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock']);
|
|
221
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1, 'Platypus': 2 });
|
|
222
|
+
dragAndDropIntoCategoriesPage.steps.selectAutoScoredScoringSubtype('Per dropzone');
|
|
223
|
+
dragAndDropIntoCategoriesPage.steps.allotPoints(2.3);
|
|
224
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
|
225
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
|
226
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it('When the user select \'Round down if <= 0.99\' and attempt correctly, then the rounding option should be applied correctly', () => {
|
|
230
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
|
|
231
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(9, 13.8);
|
|
232
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
233
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(11, 13.8);
|
|
234
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Platypus': 2 });
|
|
235
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(13, 13.8);
|
|
236
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
237
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
|
238
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
|
239
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
|
240
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
it('When the user select \'Round down if <= 0.50\' and attempted correctly, then the rounding option should be applied correctly', () => {
|
|
245
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
|
246
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
|
247
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
|
248
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
249
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
|
|
250
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(9, 13.8);
|
|
251
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
252
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(11, 13.8);
|
|
253
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Platypus': 2 });
|
|
254
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(13.8, 13.8);
|
|
255
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
256
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
|
257
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
|
258
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
|
259
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
it('When the user select \'Round up if >= 0.50:Round down if <= 0.50\' and attempted correctly, then the rounding option should be applied correctly', () => {
|
|
263
|
+
dragAndDropIntoCategoriesPage.steps.switchToEditTab();
|
|
264
|
+
dragAndDropIntoCategoriesPage.steps.expandRoundingDropdown();
|
|
265
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
|
266
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
267
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Bat': 0 });
|
|
268
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(9, 13.8);
|
|
269
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
270
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(11, 13.8);
|
|
271
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Platypus': 2 });
|
|
272
|
+
dragAndDropIntoCategoriesPage.steps.verifyPreviewScore(13.8, 13.8);
|
|
273
|
+
dragAndDropIntoCategoriesPage.steps.switchToGradingView();
|
|
274
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(0);
|
|
275
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(1);
|
|
276
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectOptionIcon(2);
|
|
277
|
+
dragAndDropIntoCategoriesPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
278
|
+
});
|
|
279
|
+
});
|
|
144
280
|
});
|
|
@@ -69,7 +69,8 @@ describe('Create Item page - Drag and drop into categories: Pagination cases - E
|
|
|
69
69
|
});
|
|
70
70
|
|
|
71
71
|
it('Accessibility of \'Specify correct answer\' Columns and Rows input steppers section\'', { tags: 'a11y' }, () => {
|
|
72
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.
|
|
72
|
+
cy.checkAccessibility(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection());
|
|
73
|
+
cy.checkAccessibility(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonSpecifyCorrectAnswerSection());
|
|
73
74
|
});
|
|
74
75
|
|
|
75
76
|
it('When user has navigated towards the left using the left arrow navigation button, then the right arrow navigation button should be enabled again', () => {
|
|
@@ -126,6 +127,20 @@ describe('Create Item page - Drag and drop into categories: Pagination cases - E
|
|
|
126
127
|
utilities.verifyElementNotDisabled(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab());
|
|
127
128
|
});
|
|
128
129
|
|
|
130
|
+
it('CSS of \'Specify correct answer\' Columns and Rows input steppers section\'', { tags: 'css' }, () => {
|
|
131
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonPreviewTab(), {
|
|
132
|
+
'color': css.color.nextPreviousButtonFill
|
|
133
|
+
});
|
|
134
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab(), {
|
|
135
|
+
'color': css.color.nextPreviousButtonFill
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
it('Accessibility of \'Specify correct answer\' Columns and Rows input steppers section\'', { tags: 'a11y' }, () => {
|
|
140
|
+
cy.checkAccessibility(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonPreviewTab());
|
|
141
|
+
cy.checkAccessibility(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab());
|
|
142
|
+
});
|
|
143
|
+
|
|
129
144
|
it('When user has navigated to the rightmost column of the table, then the right arrow navigation button should be disabled and left arrow should be enabled', () => {
|
|
130
145
|
for (let index = 9; index < 16; index++) {
|
|
131
146
|
dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButtonPreviewTab();
|
|
@@ -154,18 +169,5 @@ describe('Create Item page - Drag and drop into categories: Pagination cases - E
|
|
|
154
169
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonPreviewTab(), 'notExist');
|
|
155
170
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab(), 'notExist');
|
|
156
171
|
});
|
|
157
|
-
|
|
158
|
-
it('CSS of \'Specify correct answer\' Columns and Rows input steppers section\'', { tags: 'css' }, () => {
|
|
159
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonPreviewTab(), {
|
|
160
|
-
'color': css.color.nextPreviousButtonFill
|
|
161
|
-
});
|
|
162
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab(), {
|
|
163
|
-
'color': css.color.nextPreviousButtonFill
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
it('Accessibility of \'Specify correct answer\' Columns and Rows input steppers section\'', { tags: 'a11y' }, () => {
|
|
168
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.previewTabQuestionWrapper());
|
|
169
|
-
});
|
|
170
172
|
});
|
|
171
173
|
});
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage } from "../../../pages
|
|
1
|
+
import { dragAndDropIntoCategoriesPage, itemPreviewPage, studentViewPage } 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 options = ['Bat', 'Eagle', 'Parrot', 'Whale', 'Platypus', 'Ostrich', 'Flying squirrel', 'Peacock'];
|
|
6
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
7
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
8
|
+
let itemReferenceID = "";
|
|
6
9
|
|
|
7
10
|
describe('Create Item page - drag and drop into categories: Student view settings', () => {
|
|
8
11
|
before(() => {
|
|
@@ -352,13 +355,13 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
|
352
355
|
});
|
|
353
356
|
|
|
354
357
|
it('CSS of \'Maximum capacity per dropzone\' dropdown in active state', { tags: 'css' }, () => {
|
|
355
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[
|
|
358
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[0]), {
|
|
356
359
|
'color': css.color.liText,
|
|
357
360
|
'font-size': css.fontSize.default,
|
|
358
361
|
'font-weight': css.fontWeight.regular,
|
|
359
362
|
'background-color': css.color.liTextSelectedBg
|
|
360
363
|
});
|
|
361
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[
|
|
364
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[1]), {
|
|
362
365
|
'background-color': css.color.transparent
|
|
363
366
|
});
|
|
364
367
|
});
|
|
@@ -469,4 +472,69 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
|
469
472
|
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Parrot', 'Ostrich', 'Whale']);
|
|
470
473
|
});
|
|
471
474
|
});
|
|
475
|
+
|
|
476
|
+
views.forEach((view) => {
|
|
477
|
+
describe(`${view}: Student view settings`, () => {
|
|
478
|
+
abortEarlySetup();
|
|
479
|
+
before(() => {
|
|
480
|
+
switch (view) {
|
|
481
|
+
case 'Question preview':
|
|
482
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
|
483
|
+
cy.barsPreLoaderWait();
|
|
484
|
+
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
|
485
|
+
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
|
486
|
+
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
|
|
487
|
+
dragAndDropIntoCategoriesPage.steps.checkShowStudentsDropzoneLimitsCheckbox();
|
|
488
|
+
dragAndDropIntoCategoriesPage.steps.expandMaxCapacityPerDropzoneDropdown();
|
|
489
|
+
dragAndDropIntoCategoriesPage.steps.selectOptionFromMaxCapacityPerDropzoneDropdown('2');
|
|
490
|
+
dragAndDropIntoCategoriesPage.steps.uncheckEnableOuterBorderCheckbox();
|
|
491
|
+
dragAndDropIntoCategoriesPage.steps.checkAllowMultipleInstancesOfSameDraggableOptionCheckbox();
|
|
492
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
|
493
|
+
break;
|
|
494
|
+
case 'Item preview':
|
|
495
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
496
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
497
|
+
break;
|
|
498
|
+
case 'Student view':
|
|
499
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
500
|
+
break;
|
|
501
|
+
};
|
|
502
|
+
});
|
|
503
|
+
|
|
504
|
+
beforeEach(() => {
|
|
505
|
+
switch (view) {
|
|
506
|
+
case 'Question preview':
|
|
507
|
+
break;
|
|
508
|
+
case 'Item preview':
|
|
509
|
+
break;
|
|
510
|
+
case 'Student view':
|
|
511
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
512
|
+
break;
|
|
513
|
+
}
|
|
514
|
+
});
|
|
515
|
+
if (view === 'Question preview') {
|
|
516
|
+
after(() => {
|
|
517
|
+
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
|
518
|
+
dragAndDropIntoCategoriesPage.steps.clickOnConfirmButton();
|
|
519
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
520
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
521
|
+
});
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
it(`When the user checks show students dropzone limits and maximum capacity per dropzone 2 option is selected then a help text \'Maximum answers in each dropzone: #\' should be displayed in the ${view}`, () => {
|
|
525
|
+
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.maxLimitInEachDropzoneHelpText(), 'Maximum answers in each dropzone:\n2');
|
|
526
|
+
});
|
|
527
|
+
|
|
528
|
+
it(`When the user unchecks the "Enable outer border for question" checkbox, then the outer border over the question preview should not be displayed in the ${view}`, () => {
|
|
529
|
+
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.tableOuterBorder(), 'notExist');
|
|
530
|
+
});
|
|
531
|
+
|
|
532
|
+
it(`When the user enables the \'Allow multiple instances of same draggable option\' functionality, then on setting correct answer in a dropzone, the draggable options should persist in the options container in the ${view}`, () => {
|
|
533
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzonePreviewTab({ 'Eagle': 1 });
|
|
534
|
+
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(options);
|
|
535
|
+
});
|
|
536
|
+
});
|
|
537
|
+
});
|
|
538
|
+
|
|
539
|
+
|
|
472
540
|
});
|