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,4 +1,4 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage
|
|
1
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const enumerationOptions = {
|
|
@@ -8,9 +8,6 @@ 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 = "";
|
|
14
11
|
|
|
15
12
|
//Failing due to https://redmine.zeuslearning.com/issues/574098
|
|
16
13
|
describe('Drag and drop into categories - Additional settings', () => {
|
|
@@ -173,120 +170,4 @@ describe('Drag and drop into categories - Additional settings', () => {
|
|
|
173
170
|
dragAndDropIntoCategoriesPage.steps.verifyDropzoneAriaLabelPreviewTab(1, 'dropzone-cell');
|
|
174
171
|
});
|
|
175
172
|
});
|
|
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
|
-
});
|
|
292
173
|
});
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage
|
|
1
|
+
import { dragAndDropIntoCategoriesPage } 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 = "";
|
|
9
8
|
|
|
10
9
|
describe('Drag and drop into categories - Additional settings', () => {
|
|
11
10
|
before(() => {
|
|
@@ -123,29 +122,4 @@ describe('Drag and drop into categories - Additional settings', () => {
|
|
|
123
122
|
|
|
124
123
|
dragAndDropIntoCategoriesPage.tests.verifyDetailsSection();
|
|
125
124
|
});
|
|
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
|
-
});
|
|
151
125
|
});
|
|
@@ -157,6 +157,8 @@ 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
|
+
|
|
160
162
|
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', () => {
|
|
161
163
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
|
|
162
164
|
dragAndDropIntoCategoriesPage.steps.verifyErrorMessageIsNotDisplayed();
|
|
@@ -482,6 +484,8 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
|
|
|
482
484
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.errorMessage(), 'notExist');
|
|
483
485
|
});
|
|
484
486
|
|
|
487
|
+
dragAndDropIntoCategoriesPage.tests.verifyErrorMessageCSSAndA11y();
|
|
488
|
+
|
|
485
489
|
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', () => {
|
|
486
490
|
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0 });
|
|
487
491
|
dragAndDropIntoCategoriesPage.steps.verifyErrorMessageIsNotDisplayed();
|
|
@@ -570,7 +574,7 @@ describe('Create Item Page: Drag and drop into categories: Click and drop cases
|
|
|
570
574
|
});
|
|
571
575
|
});
|
|
572
576
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.dropzoneCellPreviewTab().eq(0), {
|
|
573
|
-
'border
|
|
577
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
574
578
|
});
|
|
575
579
|
});
|
|
576
580
|
|
|
@@ -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.labels,
|
|
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.labels,
|
|
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.text,
|
|
492
|
+
'font-size': css.fontSize.heading,
|
|
493
|
+
'font-weight': css.fontWeight.bold
|
|
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.text,
|
|
502
|
+
'font-size': css.fontSize.default,
|
|
503
|
+
'font-weight': css.fontWeight.semibold
|
|
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.text,
|
|
512
|
+
'font-size': css.fontSize.default,
|
|
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.activeButtons}`
|
|
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.noneCellIcon
|
|
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.matrixHeadingCellBg,
|
|
535
535
|
});
|
|
536
536
|
//Cell type menu
|
|
537
537
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyButton().eq(5).find('g g'), {
|
|
@@ -550,19 +550,22 @@ 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.liText
|
|
554
554
|
});
|
|
555
555
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(1).find('span').eq(0), {
|
|
556
|
-
'fill': css.color.
|
|
556
|
+
'fill': css.color.liText
|
|
557
557
|
});
|
|
558
558
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(2).find('span').eq(0), {
|
|
559
|
-
'fill': css.color.
|
|
559
|
+
'fill': css.color.liText
|
|
560
560
|
});
|
|
561
561
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(3).find('span').eq(0), {
|
|
562
|
-
'fill': css.color.
|
|
562
|
+
'fill': css.color.liText
|
|
563
|
+
});
|
|
564
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(4).find('span').eq(0), {
|
|
565
|
+
'stroke': css.color.liText
|
|
563
566
|
});
|
|
564
567
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(0), {
|
|
565
|
-
'background-color': css.color.
|
|
568
|
+
'background-color': css.color.defaultBackground
|
|
566
569
|
});
|
|
567
570
|
utilities.verifyCSS(dragAndDropIntoCategoriesPage.editCellPropertyListOption().eq(3), {
|
|
568
571
|
'background-color': css.color.liTextSelectedBg
|
|
@@ -789,15 +792,4 @@ describe('Create item page - Drag and drop into categories: Question instruction
|
|
|
789
792
|
});
|
|
790
793
|
});
|
|
791
794
|
|
|
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
|
-
});
|
|
803
795
|
});
|
|
@@ -50,14 +50,16 @@ describe('Create item page - Drag and drop into categories: Minimum scoring, Pen
|
|
|
50
50
|
|
|
51
51
|
dragAndDropIntoCategoriesPage.tests.verifyPenaltyPointsErrorState();
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
//need to remove comment once this https://redmine.zeuslearning.com/issues/578881 is resolved
|
|
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', () => {
|
|
54
55
|
dragAndDropIntoCategoriesPage.steps.expandPenaltyScoringDropdown();
|
|
55
56
|
dragAndDropIntoCategoriesPage.steps.selectOptionFromPenaltyScoringDropdown(penaltyPerDropzoneScoringTypeArray[2]);
|
|
56
57
|
dragAndDropIntoCategoriesPage.steps.verifyPenaltyPointsForEachIncorrectDropzone('');
|
|
57
58
|
utilities.verifyInnerText(dragAndDropIntoCategoriesPage.penaltyPointsForEachIncorrectOptionOrDropzoneLabel(), 'Penalty points for each incorrect dropzone');
|
|
58
59
|
});
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
//need to remove comment once this https://redmine.zeuslearning.com/issues/578881 is resolved
|
|
62
|
+
it.skip('User should be able to allot \'Penalty points for each incorrect dropzone\'', () => {
|
|
61
63
|
dragAndDropIntoCategoriesPage.steps.allotPenaltyPointsForEachIncorrectDropzone(5);
|
|
62
64
|
});
|
|
63
65
|
|
|
@@ -139,142 +141,4 @@ describe('Create item page - Drag and drop into categories: Minimum scoring, Pen
|
|
|
139
141
|
|
|
140
142
|
dragAndDropIntoCategoriesPage.tests.verifyRoundNegativeScoreToZeroLabelAndCheckbox();
|
|
141
143
|
});
|
|
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
|
-
});
|
|
280
144
|
});
|
|
@@ -69,8 +69,7 @@ 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.
|
|
73
|
-
cy.checkAccessibility(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonSpecifyCorrectAnswerSection());
|
|
72
|
+
cy.checkAccessibility(dragAndDropIntoCategoriesPage.specifyCorrectAnswerSectionWrapper());
|
|
74
73
|
});
|
|
75
74
|
|
|
76
75
|
it('When user has navigated towards the left using the left arrow navigation button, then the right arrow navigation button should be enabled again', () => {
|
|
@@ -127,20 +126,6 @@ describe('Create Item page - Drag and drop into categories: Pagination cases - E
|
|
|
127
126
|
utilities.verifyElementNotDisabled(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab());
|
|
128
127
|
});
|
|
129
128
|
|
|
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
|
-
|
|
144
129
|
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', () => {
|
|
145
130
|
for (let index = 9; index < 16; index++) {
|
|
146
131
|
dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButtonPreviewTab();
|
|
@@ -169,5 +154,18 @@ describe('Create Item page - Drag and drop into categories: Pagination cases - E
|
|
|
169
154
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonPreviewTab(), 'notExist');
|
|
170
155
|
utilities.verifyElementVisibilityState(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonPreviewTab(), 'notExist');
|
|
171
156
|
});
|
|
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
|
+
});
|
|
172
170
|
});
|
|
173
171
|
});
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { dragAndDropIntoCategoriesPage
|
|
1
|
+
import { dragAndDropIntoCategoriesPage } from "../../../pages/dragAndDropIntoCategoriesPage";
|
|
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 = "";
|
|
9
6
|
|
|
10
7
|
describe('Create Item page - drag and drop into categories: Student view settings', () => {
|
|
11
8
|
before(() => {
|
|
@@ -355,13 +352,13 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
|
355
352
|
});
|
|
356
353
|
|
|
357
354
|
it('CSS of \'Maximum capacity per dropzone\' dropdown in active state', { tags: 'css' }, () => {
|
|
358
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[
|
|
355
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[1]), {
|
|
359
356
|
'color': css.color.liText,
|
|
360
357
|
'font-size': css.fontSize.default,
|
|
361
358
|
'font-weight': css.fontWeight.regular,
|
|
362
359
|
'background-color': css.color.liTextSelectedBg
|
|
363
360
|
});
|
|
364
|
-
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[
|
|
361
|
+
utilities.verifyCSS(dragAndDropIntoCategoriesPage.maxCapacityPerDropzoneDropdownListOptions(defaultListOptions[0]), {
|
|
365
362
|
'background-color': css.color.transparent
|
|
366
363
|
});
|
|
367
364
|
});
|
|
@@ -472,69 +469,4 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
|
472
469
|
dragAndDropIntoCategoriesPage.steps.verifyDraggableOptionInDropzoneOfPreviewTab(1, ['Parrot', 'Ostrich', 'Whale']);
|
|
473
470
|
});
|
|
474
471
|
});
|
|
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
|
-
|
|
540
472
|
});
|