itemengine-cypress-automation 1.0.574-IEI-7071-main-96a7dd4.0 → 1.0.574-IEI-7065-Improve-test-coverage-for-essay-response-1a8de95.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/EssayResponse/additionalSettings.js +8 -2
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +15 -0
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +13 -0
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +155 -5
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +117 -4
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +101 -4
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +114 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +12 -2
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +38 -3
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +41 -23
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +78 -3
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +15 -0
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +71 -0
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +8 -123
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +6 -93
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +7 -108
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +2 -23
- package/cypress/e2e/ILC/ShortTextResponseNew/additionalSettings.js +2 -99
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingWithAlternativeAnswer.js +245 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/editTabBasicSections.js +1 -55
- package/cypress/e2e/ILC/ShortTextResponseNew/{Scoring/manuallyAndNonScoredScoring.js → manuallyAndNonScoredScoring.js} +18 -6
- package/cypress/e2e/ILC/ShortTextResponseNew/responseAnswersAndAcceptedStudentInput.js +1 -151
- package/cypress/e2e/ILC/ShortTextResponseNew/specialCharactersSection.js +3 -3
- package/cypress/e2e/ILC/ShortTextResponseNew/studentViewSettings.js +1 -129
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +20 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +29 -1
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +0 -36
- package/cypress/pages/components/printPreviewComponent.js +1 -8
- package/cypress/pages/essayResponsePage.js +3 -1
- package/cypress/pages/shortTextResponsePage.js +6 -195
- package/package.json +1 -1
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +0 -63
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +0 -63
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +0 -87
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +0 -163
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { shortTextResponsePage
|
|
1
|
+
import { shortTextResponsePage } from "../../../pages";
|
|
2
2
|
import utilities from "../../../support/helpers/utilities";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
-
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
-
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
-
let itemReferenceID = "";
|
|
8
5
|
|
|
9
6
|
describe('Create Item page - Short text response ', () => {
|
|
10
7
|
before(() => {
|
|
@@ -231,151 +228,4 @@ describe('Create Item page - Short text response ', () => {
|
|
|
231
228
|
shortTextResponsePage.steps.verifyWarningMessageNotExist();
|
|
232
229
|
});
|
|
233
230
|
});
|
|
234
|
-
|
|
235
|
-
views.forEach((view) => {
|
|
236
|
-
describe(`${view}: Accepted student input default state`, () => {
|
|
237
|
-
abortEarlySetup();
|
|
238
|
-
before(() => {
|
|
239
|
-
switch (view) {
|
|
240
|
-
case 'Question preview':
|
|
241
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
242
|
-
cy.barsPreLoaderWait();
|
|
243
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Correct answer');
|
|
244
|
-
shortTextResponsePage.steps.allotPoints(10);
|
|
245
|
-
shortTextResponsePage.steps.verifyAcceptedStudentTypeActiveButton(0, 'Text');
|
|
246
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
247
|
-
break;
|
|
248
|
-
case 'Item preview':
|
|
249
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
250
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
251
|
-
break;
|
|
252
|
-
case 'Student view':
|
|
253
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
254
|
-
break;
|
|
255
|
-
};
|
|
256
|
-
});
|
|
257
|
-
|
|
258
|
-
beforeEach(() => {
|
|
259
|
-
switch (view) {
|
|
260
|
-
case 'Question preview':
|
|
261
|
-
break;
|
|
262
|
-
case 'Item preview':
|
|
263
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
264
|
-
break;
|
|
265
|
-
case 'Student view':
|
|
266
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
267
|
-
break;
|
|
268
|
-
}
|
|
269
|
-
});
|
|
270
|
-
|
|
271
|
-
if (view === 'Question preview') {
|
|
272
|
-
after(() => {
|
|
273
|
-
shortTextResponsePage.steps.clickOnSaveQuestionButton();
|
|
274
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
275
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
|
|
279
|
-
it(`When \'Text\' is selected in accepted student input in edit tab, then user should be able to enter alphanumeric characters and special symbols in the ${view}`, () => {
|
|
280
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower23^^');
|
|
281
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('Flower23^^');
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
views.forEach((view) => {
|
|
287
|
-
describe(`${view}: Accepted student input default state`, () => {
|
|
288
|
-
abortEarlySetup();
|
|
289
|
-
before(() => {
|
|
290
|
-
switch (view) {
|
|
291
|
-
case 'Question preview':
|
|
292
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
293
|
-
cy.barsPreLoaderWait();
|
|
294
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Correct answer');
|
|
295
|
-
shortTextResponsePage.steps.allotPoints(10);
|
|
296
|
-
shortTextResponsePage.steps.selectAcceptedStudentInputType(0, 'Number');
|
|
297
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
298
|
-
break;
|
|
299
|
-
case 'Item preview':
|
|
300
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
301
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
302
|
-
break;
|
|
303
|
-
case 'Student view':
|
|
304
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
305
|
-
break;
|
|
306
|
-
};
|
|
307
|
-
});
|
|
308
|
-
|
|
309
|
-
beforeEach(() => {
|
|
310
|
-
switch (view) {
|
|
311
|
-
case 'Question preview':
|
|
312
|
-
break;
|
|
313
|
-
case 'Item preview':
|
|
314
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
315
|
-
break;
|
|
316
|
-
case 'Student view':
|
|
317
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
318
|
-
break;
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
|
|
322
|
-
if (view === 'Question preview') {
|
|
323
|
-
after(() => {
|
|
324
|
-
shortTextResponsePage.steps.clickOnSaveQuestionButton();
|
|
325
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
326
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
327
|
-
});
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
it(`When user selects \'Number\' in accepted student input in edit tab, then user should be able to enter numbers inside response input field in ${view}`, () => {
|
|
331
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('232&');
|
|
332
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('232');
|
|
333
|
-
});
|
|
334
|
-
|
|
335
|
-
it(`When user enters numerical values in the response input field, then warning message \'Only number can be typed.\' should appear in the ${view}`, () => {
|
|
336
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Number');
|
|
337
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('');
|
|
338
|
-
shortTextResponsePage.steps.verifyWarningMessagePreviewTab('Only number can be typed.');
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
it(`When user enters numerical value in response field then warning message should disappear ${view}`, () => {
|
|
342
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('23');
|
|
343
|
-
shortTextResponsePage.steps.focusOutOfResponseInputFieldPreviewTab();
|
|
344
|
-
shortTextResponsePage.steps.verifyWarningMessageNotExist();
|
|
345
|
-
});
|
|
346
|
-
|
|
347
|
-
it(`When user enters numerical value in response field then warning message should disappear ${view}`, () => {
|
|
348
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('23');
|
|
349
|
-
shortTextResponsePage.steps.focusOutOfResponseInputFieldPreviewTab();
|
|
350
|
-
shortTextResponsePage.steps.verifyWarningMessageNotExist();
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
it(`User should be able to enter decimal numbers inside response input field in ${view}`, () => {
|
|
354
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('23.2');
|
|
355
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('23.2');
|
|
356
|
-
});
|
|
357
|
-
|
|
358
|
-
it(`User should be able to enter negative numbers inside response input field in ${view}`, () => {
|
|
359
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('-6');
|
|
360
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('-6');
|
|
361
|
-
});
|
|
362
|
-
|
|
363
|
-
it(`User should be able to enter zero inside response input field in ${view}`, () => {
|
|
364
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('0');
|
|
365
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('0');
|
|
366
|
-
});
|
|
367
|
-
|
|
368
|
-
it(`When user enters alphanumeric values in the response input field, then and warning message \'Only number can be typed.\' should appear ${view}`, () => {
|
|
369
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('Flower');
|
|
370
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('');
|
|
371
|
-
shortTextResponsePage.steps.verifyWarningMessagePreviewTab('Only number can be typed.');
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
it(`When user enters numeric text in response field then warning message should disappear in the ${view}`, () => {
|
|
375
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldPreviewTab('82.5');
|
|
376
|
-
shortTextResponsePage.steps.verifyTextInAnswerInputFieldPreviewTab('82.5');
|
|
377
|
-
shortTextResponsePage.steps.verifyWarningMessageNotExist();
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
});
|
|
381
231
|
});
|
|
@@ -157,7 +157,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
157
157
|
});
|
|
158
158
|
//Category tiles in de-selected state
|
|
159
159
|
utilities.verifyCSS(shortTextResponsePage.specialCharacterTileIcon().eq(0).find('svg'), {
|
|
160
|
-
'fill': css.color.
|
|
160
|
+
'fill': css.color.secondaryBtn
|
|
161
161
|
});
|
|
162
162
|
utilities.verifyCSS(shortTextResponsePage.specialCharacterTileSectionCategoriesDragIcon().eq(0).find('path'), {
|
|
163
163
|
'fill': css.color.secondaryBtn
|
|
@@ -198,10 +198,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
198
198
|
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
|
199
199
|
cy.log('Closing preview popup');
|
|
200
200
|
dialogBoxBase.steps.closeWarningPopup();
|
|
201
|
-
cy.checkAccessibility(shortTextResponsePage.specialCharactersLabel());
|
|
201
|
+
cy.checkAccessibility(shortTextResponsePage.specialCharactersLabel().parents('.edit-question-edit-tab-wrapper'));
|
|
202
202
|
cy.log('Selecting show only custom special characters radio button');
|
|
203
203
|
shortTextResponsePage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
|
204
|
-
cy.checkAccessibility(shortTextResponsePage.
|
|
204
|
+
cy.checkAccessibility(shortTextResponsePage.specialCharactersLabel().parent());
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
207
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import { shortTextResponsePage
|
|
1
|
+
import { shortTextResponsePage } 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
|
-
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
-
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
-
let itemReferenceID = "";
|
|
8
5
|
|
|
9
6
|
const labels = [shortTextResponsePage.displayWordCountLabel, shortTextResponsePage.spellCheckLabel, shortTextResponsePage.autoScaleTheResponseFieldHeightLabel];
|
|
10
7
|
const checkboxes = [shortTextResponsePage.displayWordCountCheckbox, shortTextResponsePage.spellCheckCheckbox, shortTextResponsePage.autoScaleTheResponseFieldHeightCheckbox];
|
|
@@ -333,129 +330,4 @@ describe('Create Item page - Short text response : Student view settings', () =>
|
|
|
333
330
|
shortTextResponsePage.steps.verifyCheckAnswerButtonEnabled();
|
|
334
331
|
});
|
|
335
332
|
});*/
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
views.forEach((view) => {
|
|
339
|
-
describe(`${view}: Student view settings default state`, () => {
|
|
340
|
-
abortEarlySetup();
|
|
341
|
-
before(() => {
|
|
342
|
-
switch (view) {
|
|
343
|
-
case 'Question preview':
|
|
344
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
345
|
-
cy.barsPreLoaderWait();
|
|
346
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Correct answer');
|
|
347
|
-
shortTextResponsePage.steps.allotPoints(10);
|
|
348
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
349
|
-
break;
|
|
350
|
-
case 'Item preview':
|
|
351
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
352
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
353
|
-
break;
|
|
354
|
-
case 'Student view':
|
|
355
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
356
|
-
break;
|
|
357
|
-
};
|
|
358
|
-
});
|
|
359
|
-
|
|
360
|
-
beforeEach(() => {
|
|
361
|
-
switch (view) {
|
|
362
|
-
case 'Question preview':
|
|
363
|
-
break;
|
|
364
|
-
case 'Item preview':
|
|
365
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
366
|
-
break;
|
|
367
|
-
case 'Student view':
|
|
368
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
369
|
-
break;
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
|
|
373
|
-
if (view === 'Question preview') {
|
|
374
|
-
after(() => {
|
|
375
|
-
shortTextResponsePage.steps.clickOnSaveQuestionButton();
|
|
376
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
377
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
378
|
-
});
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
it(`When the \'Auto scale the response field height (no scrolling)\' checkbox is unchecked, then entering long text into the input field should display the entire text in the response input field on a single scrollable line and height of the response input field should remain unchanged in ${view}`, () => {
|
|
382
|
-
shortTextResponsePage.steps.verifyAutoScaleHeightOfResponseFieldFunctionalityPreviewTab('Disabled');
|
|
383
|
-
});
|
|
384
|
-
|
|
385
|
-
it(`When the \'Spell check\' checkbox is unchecked, the response field should have \'spellcheck\' attribute set as \'false\' in the ${view}`, () => {
|
|
386
|
-
shortTextResponsePage.steps.verifySpellCheckOfResponseFieldDisabledInAllViews();
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
it(`When \'Display character count\' checkbox is unchecked, then the \'Character\' label and count should not be displayed in ${view}`, () => {
|
|
390
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'notExist');
|
|
391
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'notExist');
|
|
392
|
-
});
|
|
393
|
-
});
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
views.forEach((view) => {
|
|
397
|
-
describe(`${view}: Student view settings`, () => {
|
|
398
|
-
abortEarlySetup();
|
|
399
|
-
before(() => {
|
|
400
|
-
switch (view) {
|
|
401
|
-
case 'Question preview':
|
|
402
|
-
shortTextResponsePage.steps.navigateToCreateQuestion('short text response');
|
|
403
|
-
cy.barsPreLoaderWait();
|
|
404
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldSpecifyCorrectAnswerSection('Correct answer');
|
|
405
|
-
shortTextResponsePage.steps.allotPoints(10);
|
|
406
|
-
shortTextResponsePage.steps.checkAutoScaleTheResponseFieldHeightCheckbox();
|
|
407
|
-
shortTextResponsePage.steps.checkSpellCheckCheckbox();
|
|
408
|
-
shortTextResponsePage.steps.checkDisplayCharacterCountCheckbox();
|
|
409
|
-
shortTextResponsePage.steps.switchToPreviewTab();
|
|
410
|
-
break;
|
|
411
|
-
case 'Item preview':
|
|
412
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
413
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
414
|
-
break;
|
|
415
|
-
case 'Student view':
|
|
416
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
417
|
-
break;
|
|
418
|
-
};
|
|
419
|
-
});
|
|
420
|
-
|
|
421
|
-
beforeEach(() => {
|
|
422
|
-
switch (view) {
|
|
423
|
-
case 'Question preview':
|
|
424
|
-
break;
|
|
425
|
-
case 'Item preview':
|
|
426
|
-
shortTextResponsePage.steps.switchToGradingView();
|
|
427
|
-
break;
|
|
428
|
-
case 'Student view':
|
|
429
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
430
|
-
break;
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
|
|
434
|
-
if (view === 'Question preview') {
|
|
435
|
-
after(() => {
|
|
436
|
-
shortTextResponsePage.steps.clickOnSaveQuestionButton();
|
|
437
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
438
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
439
|
-
});
|
|
440
|
-
};
|
|
441
|
-
|
|
442
|
-
it(`When \'Auto scale the response field height (no scrolling)\' checkbox is checked, then entering a long text in the input field should display the entire text in the response input field, and the height of the response input field should automatically resize according to the entered text in the ${view}`, () => {
|
|
443
|
-
shortTextResponsePage.steps.verifyAutoScaleHeightOfResponseFieldFunctionalityPreviewTab('Enabled');
|
|
444
|
-
});
|
|
445
|
-
|
|
446
|
-
it(`When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the ${view}`, () => {
|
|
447
|
-
shortTextResponsePage.steps.verifySpellCheckOfResponseFieldEnabledInAllViews();
|
|
448
|
-
});
|
|
449
|
-
|
|
450
|
-
it(`When \'Display character count\' checkbox is checked, then the \'Character\' label and count should be displayed and count should be zero by default in the ${view}`, () => {
|
|
451
|
-
utilities.verifyInnerText(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 0');
|
|
452
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'visible');
|
|
453
|
-
});
|
|
454
|
-
|
|
455
|
-
it(`When user enters text in response field, then character count should be updated in the ${view}`, () => {
|
|
456
|
-
shortTextResponsePage.steps.enterTextInAnswerInputFieldAllViews('Flowers are blooming');
|
|
457
|
-
utilities.verifyInnerText(shortTextResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 20');
|
|
458
|
-
});
|
|
459
|
-
});
|
|
460
|
-
});
|
|
461
333
|
});
|
|
@@ -333,6 +333,26 @@ const tests = {
|
|
|
333
333
|
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationTextNew(0, 'x+5×0');
|
|
334
334
|
}
|
|
335
335
|
});
|
|
336
|
+
|
|
337
|
+
it('When user edits the added equation and clicks on Ok button, the edited equation should be displayed in the preview input field in item preview', () => {
|
|
338
|
+
if (questionType === 'essay response') {
|
|
339
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
340
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
341
|
+
equationEditorSectionCommonComponent.steps.openResponseFieldEquationContainerEquationEditor(0);
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
equationEditorSectionCommonComponent.steps.focusInResponseAnswerInputFieldPreviewTab(0);
|
|
345
|
+
}
|
|
346
|
+
equationEditorFlyout.steps.enterTextInPreviewInputField('{backspace}{backspace}');
|
|
347
|
+
equationEditorFlyout.steps.enterEquation([{ categoryName: 'numPad', symbolName: ['multiply', 'zero'] }]);
|
|
348
|
+
equationEditorFlyout.steps.clickOnOkButton();
|
|
349
|
+
if (questionType === 'essay response') {
|
|
350
|
+
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationText(0, 'x+5×0');
|
|
351
|
+
}
|
|
352
|
+
else {
|
|
353
|
+
equationEditorSectionCommonComponent.steps.verifyResponseFieldEquationTextNew(0, 'x+5×0');
|
|
354
|
+
}
|
|
355
|
+
});
|
|
336
356
|
},
|
|
337
357
|
|
|
338
358
|
/**
|
|
@@ -96,7 +96,8 @@ const selectors = {
|
|
|
96
96
|
customSpecialCharacterLabel: () => cy.get('[class*="InlineTextFieldWithDebouncestyles__PropertyLabel"]').eq(1),
|
|
97
97
|
customSpecialCharacterInputField: () => cy.get('input[aria-label="Custom Special Characters"]'),
|
|
98
98
|
limitReachedWarningMessageContainer: () => cy.get('.disabled-wrapper-cls'),
|
|
99
|
-
limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]')
|
|
99
|
+
limitReachedWarningMessage: () => cy.get('.disabled-wrapper-cls [class*="DisabledTextWrapper"]'),
|
|
100
|
+
wordCharacterLimitWrapper: () => cy.get('.essay-character-view-wrapper')
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
const steps = {
|
|
@@ -202,6 +203,24 @@ const steps = {
|
|
|
202
203
|
.should('be.checked');
|
|
203
204
|
},
|
|
204
205
|
|
|
206
|
+
unCheckAlwaysShowMinimumLimitCheckbox: () => {
|
|
207
|
+
essayResponseCommonComponents.alwaysShowMinLimitCheckBox()
|
|
208
|
+
.click()
|
|
209
|
+
.should('not.be.checked');
|
|
210
|
+
},
|
|
211
|
+
|
|
212
|
+
checkAlwaysShowMaximumLimitCheckbox: () => {
|
|
213
|
+
essayResponseCommonComponents.alwaysShowMaxLimitCheckbox()
|
|
214
|
+
.click()
|
|
215
|
+
.should('be.checked');
|
|
216
|
+
},
|
|
217
|
+
|
|
218
|
+
uncheckAlwaysShowMaximumLimitCheckbox: () => {
|
|
219
|
+
essayResponseCommonComponents.alwaysShowMaxLimitCheckbox()
|
|
220
|
+
.click()
|
|
221
|
+
.should('not.be.checked');
|
|
222
|
+
},
|
|
223
|
+
|
|
205
224
|
verifyListItemLengthInResponseField: (length) => {
|
|
206
225
|
essayResponseCommonComponents.responseField()
|
|
207
226
|
.find('li')
|
|
@@ -458,6 +477,15 @@ const steps = {
|
|
|
458
477
|
.should('have.attr', 'aria-pressed', 'false');
|
|
459
478
|
},
|
|
460
479
|
|
|
480
|
+
/**
|
|
481
|
+
* This function verifies the formatting option is in collapsed state
|
|
482
|
+
* @param {string} formattingOption name of the formatting option
|
|
483
|
+
*/
|
|
484
|
+
verifyPreviewTabToolbarOptionNotExpanded: (formattingOption) => {
|
|
485
|
+
essayResponseCommonComponents.previewTabToolbarOption(formattingOption)
|
|
486
|
+
.should('have.attr', 'aria-expanded', 'false');
|
|
487
|
+
},
|
|
488
|
+
|
|
461
489
|
/**
|
|
462
490
|
* This function verifies the formatting option is in selected state
|
|
463
491
|
* @param {string} formattingOption name of the formatting option
|
|
@@ -21,7 +21,6 @@ const selectors = {
|
|
|
21
21
|
responseStatusWrapper: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper:visible'),
|
|
22
22
|
correctAnswerResponseNumeration: () => cy.get('.answer-numeration-number-box'),
|
|
23
23
|
correctAnswerResponseWrapper: () => cy.get('[class*="ClozeWithTextResponsestyles__AnswerCell"]'),
|
|
24
|
-
correctAnswerPointsLabel: () => cy.get('[class*="CorrectAnswerSectionstyle__CorrectAnswerLabelWrapper"] p'),
|
|
25
24
|
correctAnswerResponse: () => cy.get('[class*="AnswerWrapperForLabel"]'),
|
|
26
25
|
correctAnswerResponseWrapperWithoutEnumeration: () => cy.get('.cloze-with-text-answer-status-response-preview-wrapper [class*="ResponseInputWrapper"] input'),
|
|
27
26
|
|
|
@@ -186,41 +185,6 @@ const steps = {
|
|
|
186
185
|
});
|
|
187
186
|
},
|
|
188
187
|
|
|
189
|
-
/**
|
|
190
|
-
* Verify correct answer section with alternate answers.
|
|
191
|
-
*
|
|
192
|
-
* @param {Object[]} correctAnswerArray - An array of objects representing the expected correct answers and their corresponding points.
|
|
193
|
-
* @param {string[][]} correctAnswerArray[].correctAnswers - A nested array of correct answer text values.
|
|
194
|
-
* Each inner array represents a group of alternate correct answers for a particular text container.
|
|
195
|
-
* @param {string[]} correctAnswerArray[].points - An array of point label strings associated with each correct answer group.
|
|
196
|
-
*
|
|
197
|
-
*/
|
|
198
|
-
|
|
199
|
-
verifyCorrectAnswerSectionWithAlternateAnswer: (correctAnswerArray) => {
|
|
200
|
-
let responseIndex = 0;
|
|
201
|
-
let pointsLabelIndex = 0;
|
|
202
|
-
correctAnswerArray.forEach(({correctAnswers, points}) => {
|
|
203
|
-
correctAnswers.forEach((textContainers, index) => {
|
|
204
|
-
textContainers.forEach((correctAnswer) => {
|
|
205
|
-
fillInTheGapsTextCommonComponent.correctAnswerResponseWrapper()
|
|
206
|
-
.eq(responseIndex)
|
|
207
|
-
.within(() => {
|
|
208
|
-
utilities.verifyInnerText(fillInTheGapsTextCommonComponent.correctAnswerResponseNumeration(), `${index + 1}`);
|
|
209
|
-
fillInTheGapsTextCommonComponent.correctAnswerResponse()
|
|
210
|
-
.should('have.text', correctAnswer);
|
|
211
|
-
});
|
|
212
|
-
responseIndex += 1;
|
|
213
|
-
});
|
|
214
|
-
});
|
|
215
|
-
points.forEach((pointsText) => {
|
|
216
|
-
fillInTheGapsTextCommonComponent.correctAnswerPointsLabel()
|
|
217
|
-
.eq(pointsLabelIndex)
|
|
218
|
-
.should('have.text', pointsText);
|
|
219
|
-
pointsLabelIndex += 1;
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
},
|
|
223
|
-
|
|
224
188
|
verifyCorrectAnswerSectionNotExists: () => {
|
|
225
189
|
utilities.verifyElementVisibilityState(fillInTheGapsTextCommonComponent.correctAnswerSectionWrapper(), 'notExist');
|
|
226
190
|
},
|
|
@@ -54,14 +54,7 @@ const steps = {
|
|
|
54
54
|
verifyQuestionInstructionsInputFieldForPrintDisabledState: () => {
|
|
55
55
|
printPreviewComponent.questionInstructionsInputFieldForPrint()
|
|
56
56
|
.should('have.attr', 'contenteditable', 'false');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
addTextInQuestionInstructionsInputFieldForPrint: (text) => {
|
|
60
|
-
printPreviewComponent.questionInstructionsInputFieldForPrint()
|
|
61
|
-
.clear()
|
|
62
|
-
.type(text)
|
|
63
|
-
.should('have.text', text);
|
|
64
|
-
},
|
|
57
|
+
}
|
|
65
58
|
|
|
66
59
|
};
|
|
67
60
|
|
|
@@ -19,6 +19,7 @@ const selectors = {
|
|
|
19
19
|
...customizeSpecialCharacterComponent,
|
|
20
20
|
...dialogBoxBase,
|
|
21
21
|
...equationEditorSectionCommonComponent,
|
|
22
|
+
...autoScoredScoringPreviewTab,
|
|
22
23
|
//Basic section
|
|
23
24
|
displayWordLimitLabel: () => cy.get('#Display-word-limit-dropdown-label'),
|
|
24
25
|
displayWordLimitDropdown: () => cy.get('#Display-word-limit-select'),
|
|
@@ -37,7 +38,7 @@ const selectors = {
|
|
|
37
38
|
|
|
38
39
|
//Special characters
|
|
39
40
|
specialCharactersPopupTitle: () => cy.get('#alert-dialog-title'),
|
|
40
|
-
specialCharactersPopupCloseButton: () => cy.get('[class*="close-button"]'),
|
|
41
|
+
specialCharactersPopupCloseButton: () => cy.get('[class*="dialog-close-button"]'),
|
|
41
42
|
specialCharactersPopupCharactersCategoryWrapper: () => cy.get('.special-character-accordion'),
|
|
42
43
|
specialCharactersPopupCharacterSymbol: (ariaLabel = null) => {
|
|
43
44
|
if (ariaLabel) {
|
|
@@ -142,6 +143,7 @@ const steps = {
|
|
|
142
143
|
...dialogBoxBase.steps,
|
|
143
144
|
...equationEditorSectionCommonComponent.steps,
|
|
144
145
|
...createItemPage.steps,
|
|
146
|
+
...autoScoredScoringPreviewTab.steps,
|
|
145
147
|
|
|
146
148
|
clickOnSpecialCharactersPopupCloseButton: () => {
|
|
147
149
|
essayResponsePage.specialCharactersPopupCloseButton()
|