itemengine-cypress-automation 1.0.312-addedDeployFiles-90a1897.0 → 1.0.312-fixes14thFeb-291c392.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/allOrNothingBasicForAllViews.smoke.js +2 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/pagination.js +1 -0
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/previewContentsForAllViews.smoke.js +95 -75
- package/cypress/e2e/ILC/DragAndDropIntoCategoriesNew/studentViewSettings.js +8 -0
- package/cypress/pages/components/optionsWrapperComponent.js +4 -0
- package/cypress/pages/dragAndDropIntoCategoriesPage.js +1 -1
- package/package.json +1 -1
@@ -291,7 +291,9 @@ describe('Create item page - Drag and drop into categories: All or nothing ', ()
|
|
291
291
|
};
|
292
292
|
});
|
293
293
|
});
|
294
|
+
});
|
294
295
|
|
296
|
+
views.forEach((view) => {
|
295
297
|
//https://weldnorthed.atlassian.net/browse/IEI-4998
|
296
298
|
describe(`${view}: Drag and drop into categories - Per dropzone`, { tags: 'smoke' }, () => {
|
297
299
|
abortEarlySetup();
|
@@ -38,6 +38,7 @@ describe('Create Item page - Drag and drop into categories: Pagination cases - E
|
|
38
38
|
cy.log('Pre-step: Setting number of columns to 15');
|
39
39
|
dragAndDropIntoCategoriesPage.steps.addInputToColumnInputStepper(15);
|
40
40
|
dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButtonSpecifyCorrectAnswerSection();
|
41
|
+
dragAndDropIntoCategoriesPage.steps.clickOnRightArrowNavigationButtonSpecifyCorrectAnswerSection();
|
41
42
|
dragAndDropIntoCategoriesPage.steps.verifyColumnIsVisibleInTableSpecifyCorrectAnswer(7);
|
42
43
|
utilities.verifyElementNotDisabled(dragAndDropIntoCategoriesPage.leftArrowNavigationButtonSpecifyCorrectAnswerSection());
|
43
44
|
utilities.verifyElementNotDisabled(dragAndDropIntoCategoriesPage.rightArrowNavigationButtonSpecifyCorrectAnswerSection());
|
@@ -2,6 +2,7 @@ import { dragAndDropIntoCategoriesPage, itemPreviewPage, studentViewPage } from
|
|
2
2
|
import { equationEditorFlyout } from "../../../pages/components";
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
5
|
+
import * as applitoolsConfig from "../../applitools.config";
|
5
6
|
const css = Cypress.env('css');
|
6
7
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view'];
|
7
8
|
const views = utilities.getViews(previewContentViews);
|
@@ -92,20 +93,37 @@ describe('Create item page - Drag and drop into categories: Preview contents', (
|
|
92
93
|
cy.eyesCheckWindow(`DND into categories: ${view} Default question state`);
|
93
94
|
});
|
94
95
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
96
|
+
if (view !== 'Student view') {
|
97
|
+
it(`The category table as set by the user should be displayed in the ${view}`, () => {
|
98
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyPreviewTab(0, 'None');
|
99
|
+
utilities.verifyInnerText(utilities.getNthElement(dragAndDropIntoCategoriesPage.cellContainerPreviewTab(), 0), '');
|
100
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyPreviewTab(1, 'Heading');
|
101
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(1, 'Mammal');
|
102
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(2, 'Not mammal');
|
103
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(3, 'Can fly');
|
104
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyPreviewTab(4, 'Dropzone');
|
105
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyPreviewTab(6, 'Subheading');
|
106
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(6, 'Can walk');
|
107
|
+
utilities.verifyInnerText(utilities.getNthElement(dragAndDropIntoCategoriesPage.cellContainerPreviewTab(), 6), 'Can walk');
|
108
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyPreviewTab(9, 'Text');
|
109
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(9, 'Can swim');
|
110
|
+
});
|
111
|
+
} else {
|
112
|
+
it(`The category table as set by the user should be displayed in the ${view}`, () => {
|
113
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyStudentView(0, 'None');
|
114
|
+
utilities.verifyInnerText(utilities.getNthElement(dragAndDropIntoCategoriesPage.cellContainerPreviewTab(), 0), '');
|
115
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyStudentView(1, 'Heading');
|
116
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(1, 'Mammal');
|
117
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(2, 'Not mammal');
|
118
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(3, 'Can fly');
|
119
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyStudentView(4, 'Dropzone');
|
120
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyStudentView(6, 'Subheading');
|
121
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(6, 'Can walk');
|
122
|
+
utilities.verifyInnerText(utilities.getNthElement(dragAndDropIntoCategoriesPage.cellContainerPreviewTab(), 6), 'Can walk');
|
123
|
+
dragAndDropIntoCategoriesPage.steps.verifyTableCellPropertyStudentView(9, 'Text');
|
124
|
+
dragAndDropIntoCategoriesPage.steps.verifyTextContentOfTableCellPreviewTab(9, 'Can swim');
|
125
|
+
});
|
126
|
+
}
|
109
127
|
|
110
128
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
111
129
|
it(`When the user has added image, equation, bold text and link to the options input fields, then they should be displayed in the options container in ${view}`, () => {
|
@@ -207,69 +225,71 @@ describe('Create item page - Drag and drop into categories: Preview contents', (
|
|
207
225
|
});
|
208
226
|
|
209
227
|
//https://weldnorthed.atlassian.net/browse/IEI-4579
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
228
|
+
if (!applitoolsConfig.APPLITOOLS_IS_DISABLED) {
|
229
|
+
views.forEach((view) => {
|
230
|
+
describe('Equations in table layout', () => {
|
231
|
+
before(() => {
|
232
|
+
switch (view) {
|
233
|
+
case 'Question preview':
|
234
|
+
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
235
|
+
cy.barsPreLoaderWait();
|
236
|
+
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Drag and drop options in correct categories');
|
237
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInOptionInputField(0, 'Bat');
|
238
|
+
dragAndDropIntoCategoriesPage.steps.enterTextInOptionInputField(1, 'Eagle');
|
239
|
+
dragAndDropIntoCategoriesPage.steps.modifyTableCellProperty(3, 'Text');
|
240
|
+
dragAndDropIntoCategoriesPage.steps.modifyTableCellProperty(6, 'Text');
|
241
|
+
dragAndDropIntoCategoriesPage.steps.modifyTableCellProperty(9, 'Text');
|
242
|
+
dragAndDropIntoCategoriesPage.steps.clickAndDropOptionInDropzoneSpecifyCorrectAnswerSection({ 'Bat': 0, 'Eagle': 1 });
|
243
|
+
dragAndDropIntoCategoriesPage.steps.focusWithinCellText(3);
|
244
|
+
dragAndDropIntoCategoriesPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
245
|
+
dragAndDropIntoCategoriesPage.steps.addGenericEquationUsingEquationEditorToCKEditorInputField();
|
246
|
+
dragAndDropIntoCategoriesPage.steps.focusWithinCellText(6);
|
247
|
+
dragAndDropIntoCategoriesPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
248
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('This is a equation');
|
249
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
250
|
+
dragAndDropIntoCategoriesPage.steps.focusWithinCellText(9);
|
251
|
+
dragAndDropIntoCategoriesPage.steps.selectEquationEditorOptionFromCKEditorToolbar();
|
252
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('This is a very long text to test the equation editor');
|
253
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
254
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
255
|
+
break;
|
256
|
+
case 'Item view':
|
257
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
258
|
+
break;
|
259
|
+
case 'Item preview':
|
260
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
261
|
+
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
262
|
+
break;
|
263
|
+
case 'Student view':
|
264
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
265
|
+
break;
|
266
|
+
case 'Grading view':
|
267
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
268
|
+
break;
|
269
|
+
case 'Correct answer view':
|
270
|
+
cy.visit(`/item-engine/demo/render-item/correct-answer-view/${utilities.base64Encoding(itemReferenceID)}`);
|
271
|
+
break;
|
272
|
+
default:
|
273
|
+
throw new Error('Invalid view');
|
274
|
+
}
|
275
|
+
});
|
257
276
|
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
277
|
+
after(() => {
|
278
|
+
if (view === 'Question preview') {
|
279
|
+
dragAndDropIntoCategoriesPage.steps.clickOnSaveQuestionButton();
|
280
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
281
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
282
|
+
}
|
283
|
+
if (view === 'Student view') {
|
284
|
+
studentViewPage.steps.submitResponse();
|
285
|
+
utilities.verifyElementVisibilityState(studentViewPage.buttonGoToGradingView(), 'visible');
|
286
|
+
}
|
287
|
+
});
|
269
288
|
|
270
|
-
|
271
|
-
|
289
|
+
it(`DND into categories ${view}: The equations should be correctly displayed in all views`, () => {
|
290
|
+
cy.eyesCheckWindow(`Equations in table layout: ${view}`);
|
291
|
+
});
|
272
292
|
});
|
273
293
|
});
|
274
|
-
}
|
294
|
+
}
|
275
295
|
});
|
@@ -15,6 +15,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
15
15
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
16
16
|
cy.barsPreLoaderWait();
|
17
17
|
dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
|
18
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
18
19
|
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
19
20
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
|
20
21
|
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
@@ -52,6 +53,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
52
53
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
53
54
|
cy.barsPreLoaderWait();
|
54
55
|
dragAndDropIntoCategoriesPage.steps.setRowsAndColumnsForQuestion();
|
56
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
55
57
|
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
56
58
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
|
57
59
|
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
@@ -108,6 +110,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
108
110
|
before(() => {
|
109
111
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
110
112
|
cy.barsPreLoaderWait();
|
113
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
111
114
|
dragAndDropIntoCategoriesPage.steps.switchToPreviewTab();
|
112
115
|
});
|
113
116
|
|
@@ -145,6 +148,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
145
148
|
before(() => {
|
146
149
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
147
150
|
cy.barsPreLoaderWait();
|
151
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
148
152
|
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
149
153
|
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
150
154
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
|
@@ -194,6 +198,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
194
198
|
before(() => {
|
195
199
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
196
200
|
cy.barsPreLoaderWait();
|
201
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
197
202
|
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
198
203
|
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(6);
|
199
204
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(options);
|
@@ -233,6 +238,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
233
238
|
before(() => {
|
234
239
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
235
240
|
cy.barsPreLoaderWait();
|
241
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
236
242
|
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
237
243
|
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(2);
|
238
244
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Whale',]);
|
@@ -327,6 +333,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
327
333
|
before(() => {
|
328
334
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
329
335
|
cy.barsPreLoaderWait();
|
336
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
330
337
|
dragAndDropIntoCategoriesPage.steps.addTextInQuestionInstructionsInputField('Navigating to drag and drop into categories');
|
331
338
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle']);
|
332
339
|
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
@@ -427,6 +434,7 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
427
434
|
before(() => {
|
428
435
|
dragAndDropIntoCategoriesPage.steps.navigateToCreateQuestion('drag and drop into categories');
|
429
436
|
cy.barsPreLoaderWait();
|
437
|
+
dragAndDropIntoCategoriesPage.steps.verifyOptionCount(2);
|
430
438
|
dragAndDropIntoCategoriesPage.steps.addMultipleOptionFields(3);
|
431
439
|
dragAndDropIntoCategoriesPage.steps.addInputToOptionsInputField(['Bat', 'Eagle', 'Parrot', 'Ostrich', 'Whale']);
|
432
440
|
dragAndDropIntoCategoriesPage.steps.allotPoints(5);
|
@@ -298,6 +298,10 @@ const steps = {
|
|
298
298
|
utilities.verifyTextContent(utilities.getNthElement(optionsWrapperComponent.optionsInputField(), optionIndex), option);
|
299
299
|
});
|
300
300
|
});
|
301
|
+
},
|
302
|
+
|
303
|
+
verifyOptionCount: (count) => {
|
304
|
+
utilities.verifyElementCount(optionsWrapperComponent.optionsInputField(), count);
|
301
305
|
}
|
302
306
|
}
|
303
307
|
|