itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.573-IEI-7065-Improve-test-coverage-for-essay-response-c25d1ee.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 +14 -1
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +155 -5
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +116 -4
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +93 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +114 -0
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +11 -1
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +29 -2
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +11 -1
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +75 -0
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +13 -0
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +71 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/Scoring/partialEqualWeightsBasic.js +181 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsBasic.js +37 -2
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js +72 -4
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/backgroundImageAndCanvasProperties.js +19 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js +56 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/setLimitSection.js +57 -3
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/specialCharactersSection.js +15 -18
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/studentViewSettings.js +54 -1
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomization.js +12 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/styleAndLayoutCustomizationAllViews.js +156 -0
- package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/supportedFileTypes.js +0 -2
- 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 +9 -124
- 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/ImageHighlight/additionalSettings.js +86 -0
- package/cypress/e2e/ILC/ImageHighlight/backgroundImageAndCanvasProperties.js +60 -9
- package/cypress/e2e/ILC/ImageHighlight/customiseHighlightStyle.js +14 -12
- package/cypress/e2e/ILC/ImageHighlight/imageHighlightStyle.js +12 -3
- package/cypress/e2e/ILC/ImageHighlight/minimumScoringPenaltyPointsAndRoundingDropdown.js +65 -2
- package/cypress/e2e/ILC/ImageHighlight/studentViewSettings.js +15 -1
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingBasicForAllViews.smoke.js +1 -168
- package/cypress/e2e/ILC/MultipleSelection/allOrNothingWithAlternativeAnswer.js +284 -17
- package/cypress/e2e/ILC/MultipleSelection/partialDifferentWeightsWithAlternativeAnswer.js +397 -25
- package/cypress/e2e/ILC/MultipleSelection/partialEqualWeightsWithAlternativeAnswer.js +320 -20
- package/cypress/e2e/ILC/SingleSelection/allOrNothingBasicForAllViews.smoke.js +0 -130
- package/cypress/e2e/ILC/SingleSelection/allOrNothingWithAlternativeAnswer.js +97 -10
- package/cypress/e2e/ILC/dataApi/saveItems.js +1 -1
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +7 -7
- package/cypress/e2e/ILC/dataApi/saveQuestionsMCQAlternateAnswers.js +6 -6
- package/cypress/pages/components/additionalSettingsPanel.js +9 -0
- package/cypress/pages/components/backgroundImageUploadComponent.js +1 -1
- package/cypress/pages/components/colorPopupComponent.js +1 -1
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +21 -0
- package/cypress/pages/components/essayResponseCommonComponents.js +20 -1
- package/cypress/pages/components/figCommonStyleAndLayoutComponent.js +4 -10
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +14 -37
- package/cypress/pages/components/gradingViewEnumerationComponent.js +5 -0
- package/cypress/pages/components/imageCanvasComponent.js +0 -3
- package/cypress/pages/components/placeholderTextSectionComponent.js +10 -0
- package/cypress/pages/components/showAlternativeAnswersComponent.js +41 -65
- package/cypress/pages/essayResponsePage.js +2 -0
- package/cypress/pages/fillInTheGapsOverImageTextPage.js +21 -1
- package/cypress/pages/imageHighlightPage.js +184 -7
- package/cypress/pages/itemPreviewPage.js +1 -0
- package/cypress/pages/multipleSelectionPage.js +32 -0
- package/cypress/pages/singleSelectionPage.js +17 -0
- package/cypress/support/helpers/utilities.js +16 -0
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +47 -53
- package/service.yaml +2 -2
|
@@ -108,6 +108,44 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
108
108
|
});
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
+
describe('Font Size formatting option - Item preview', () => {
|
|
112
|
+
abortEarlySetup();
|
|
113
|
+
before(() => {
|
|
114
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
115
|
+
cy.barsPreLoaderWait();
|
|
116
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
117
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Font size']);
|
|
118
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
119
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
120
|
+
essayResponsePage.steps.enterInputInResponseField('{selectAll}');
|
|
121
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
122
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
it('By default fontsize of response filed text is 16 px ', () => {
|
|
126
|
+
essayResponsePage.steps.verifyResponseFieldTextFontSizeNew(16);
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
it(`When the user selects the \'Font size\' toolbar option,then open a list of ${Object.keys(fontSizes).length} options - ${Object.keys(fontSizes).join(',')} is should be display and by default \'Default\' option should be selected`, () => {
|
|
130
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Font Size');
|
|
131
|
+
Object.values(fontSizes).forEach((option) => {
|
|
132
|
+
essayResponsePage.steps.verifyFontSizeListContent(option);
|
|
133
|
+
});
|
|
134
|
+
essayResponsePage.steps.selectFontSizeOption(16);
|
|
135
|
+
essayResponsePage.steps.clearResponseField();
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
Object.values(fontSizes).forEach((option) => {
|
|
139
|
+
it(`When the user selects \'${option}\' option from the font size list, then font size of the response field text should be change to ${fontSizes[option]} accordingly`, () => {
|
|
140
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Font Size');
|
|
141
|
+
essayResponsePage.steps.selectFontSizeOption(`${option}`);
|
|
142
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
143
|
+
essayResponsePage.steps.verifyResponseFieldTextFontSize(`${option}`);
|
|
144
|
+
essayResponsePage.steps.clearResponseField();
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
|
|
111
149
|
describe('Highlight Text formatting option - Preview tab', () => {
|
|
112
150
|
abortEarlySetup();
|
|
113
151
|
before(() => {
|
|
@@ -218,6 +256,39 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
218
256
|
});
|
|
219
257
|
});
|
|
220
258
|
|
|
259
|
+
describe('Clear All Controls - Item preview', () => {
|
|
260
|
+
abortEarlySetup();
|
|
261
|
+
before(() => {
|
|
262
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
263
|
+
cy.barsPreLoaderWait();
|
|
264
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
265
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Clear All']);
|
|
266
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
267
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
268
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
269
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('When the user select the \'Highlight Text\' toolbar option,then a pop up should be display in item preview', () => {
|
|
273
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Clear all');
|
|
274
|
+
utilities.verifyElementVisibilityState(essayResponsePage.dialogBox(), 'visible');
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
it('\'Are you sure you want to clear all text?\' message,\'Clear all\' title,\'Cancel\' and \'Clear all\' button should be visible in item preview', () => {
|
|
278
|
+
utilities.verifyTextContent(essayResponsePage.clearTextMessage(), 'Are you sure you want to clear all text?');
|
|
279
|
+
utilities.verifyElementVisibilityState(essayResponsePage.clearTextMessage(), 'visible');
|
|
280
|
+
utilities.verifyTextContent(essayResponsePage.clearAllLabel(), 'Clear all');
|
|
281
|
+
utilities.verifyElementVisibilityState(essayResponsePage.clearAllLabel(), 'visible');
|
|
282
|
+
utilities.verifyElementVisibilityState(essayResponsePage.cancelButton(), 'visible');
|
|
283
|
+
utilities.verifyElementVisibilityState(essayResponsePage.clearAllButton(), 'visible');
|
|
284
|
+
});
|
|
285
|
+
|
|
286
|
+
it('When the user click on \'Clear All\' button,no text should be display in item preview', () => {
|
|
287
|
+
essayResponsePage.steps.clickOnClearAllButton();
|
|
288
|
+
utilities.verifyTextContent(essayResponsePage.responseField(), '');
|
|
289
|
+
});
|
|
290
|
+
});
|
|
291
|
+
|
|
221
292
|
describe('enable color picker - Preview tab', () => {
|
|
222
293
|
abortEarlySetup();
|
|
223
294
|
before(() => {
|
|
@@ -258,4 +329,47 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
258
329
|
essayResponsePage.steps.verifyResponseFieldTextColor(`${css.color.newResponseFieldColor}`);
|
|
259
330
|
});
|
|
260
331
|
});
|
|
332
|
+
|
|
333
|
+
describe('enable color picker - Item preview', () => {
|
|
334
|
+
abortEarlySetup();
|
|
335
|
+
before(() => {
|
|
336
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
337
|
+
cy.barsPreLoaderWait();
|
|
338
|
+
essayResponsePage.steps.expandCustomizeFormattingOptionsAccordion();
|
|
339
|
+
essayResponsePage.steps.selectCustomizedFormattingOption(['Font Color']);
|
|
340
|
+
essayResponsePage.steps.clickOnEnableColorPickerCheckbox();
|
|
341
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
342
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
343
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
344
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
it('When the user checked \'Enable color picker\' checkbox,then \'Select color\' label, \'Selected color\' label,\'Cancel\' button and \'ok\' button should be display,and by default color option \'rgb(0, 0, 0)\' is selected in item preview', () => {
|
|
348
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Text Color');
|
|
349
|
+
utilities.verifyInnerText(utilities.getNthElement(essayResponsePage.selectColorLabel(), 0), 'Select color');
|
|
350
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(essayResponsePage.selectColorLabel(), 0), 'visible');
|
|
351
|
+
utilities.verifyInnerText(utilities.getNthElement(essayResponsePage.selectColorLabel(), 1), 'Selected color');
|
|
352
|
+
utilities.verifyElementVisibilityState(utilities.getNthElement(essayResponsePage.selectColorLabel(), 1), 'visible');
|
|
353
|
+
utilities.verifyElementVisibilityState(colorPopupComponent.cancelButton(), 'visible');
|
|
354
|
+
utilities.verifyInnerText(colorPopupComponent.cancelButton(), 'Cancel');
|
|
355
|
+
utilities.verifyElementVisibilityState(colorPopupComponent.okButton(), 'visible');
|
|
356
|
+
utilities.verifyInnerText(colorPopupComponent.okButton(), 'Ok');
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
colorPopupComponent.tests.verifySaturationAndOpacityGradientPalette('rgb(0, 0, 0)');
|
|
360
|
+
|
|
361
|
+
it('When the user click \'Cancel\' button,then response field text color should not be change in item preview', () => {
|
|
362
|
+
colorPopupComponent.steps.clickOnCancelButton();
|
|
363
|
+
essayResponsePage.steps.verifyResponseFieldTextNewColor(`${css.color.text}`);
|
|
364
|
+
});
|
|
365
|
+
|
|
366
|
+
it('When the user select color using color palate and click on \'Ok\' button,then response field text color should change accordingly in item preview', () => {
|
|
367
|
+
essayResponsePage.steps.enterInputInResponseField(`{selectAll}{backspace}`);
|
|
368
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Text Color');
|
|
369
|
+
colorPopupComponent.steps.clickInColorSaturationPalette();
|
|
370
|
+
colorPopupComponent.steps.clickOnOkButton();
|
|
371
|
+
essayResponsePage.steps.enterInputInResponseField('Lorem Ipsum');
|
|
372
|
+
essayResponsePage.steps.verifyResponseFieldTextColor(`${css.color.newResponseFieldColor}`);
|
|
373
|
+
});
|
|
374
|
+
});
|
|
261
375
|
});
|
|
@@ -150,7 +150,7 @@ describe('Essay response: Customize math characters', () => {
|
|
|
150
150
|
essayResponsePage.steps.closeWarningPopup();
|
|
151
151
|
});
|
|
152
152
|
|
|
153
|
-
it('When the user has specified custom special characters and opens the special characters popup in the preview tab, then only the specified custom special characters should be displayed in the popup', () => {
|
|
153
|
+
it('When the user has specified custom special characters and opens the special characters popup in the preview tab, then only the specified custom special characters should be displayed in the popup in question preview', () => {
|
|
154
154
|
essayResponsePage.steps.switchToPreviewTab();
|
|
155
155
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Special characters');
|
|
156
156
|
essayResponsePage.steps.verifyCustomSpecialCharactersDisplayedInPreviewTab(customSpecialCharacters);
|
|
@@ -158,6 +158,16 @@ describe('Essay response: Customize math characters', () => {
|
|
|
158
158
|
essayResponsePage.steps.switchToEditTab();
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
+
it('When the user has specified custom special characters and opens the special characters popup in the preview tab, then only the specified custom special characters should be displayed in the popup in item preview', () => {
|
|
162
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
163
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
164
|
+
essayResponsePage.steps.selectPreviewTabToolbarOption('Special characters');
|
|
165
|
+
essayResponsePage.steps.verifyCustomSpecialCharactersDisplayedInPreviewTab(customSpecialCharacters);
|
|
166
|
+
cy.log('Post-step: Switching to edit tab');
|
|
167
|
+
essayResponsePage.steps.switchToEditTab();
|
|
168
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
169
|
+
});
|
|
170
|
+
|
|
161
171
|
it('CSS of Customize special characters', { tags: 'css' }, () => {
|
|
162
172
|
utilities.verifyCSS(essayResponsePage.customizeSpecialCharactersLabel(), {
|
|
163
173
|
'color': css.color.labels,
|
|
@@ -235,7 +235,7 @@ describe('Essay Response Preview: Add Table Functionality', () => {
|
|
|
235
235
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Insert Table');
|
|
236
236
|
});
|
|
237
237
|
|
|
238
|
-
it('When user checks the \'Add header row\' checkbox and then clicks on \'Add table\' button, the first row of the added table should be highlighted as table header', () => {
|
|
238
|
+
it('When user checks the \'Add header row\' checkbox and then clicks on \'Add table\' button, the first row of the added table should be highlighted as table header in question preview', () => {
|
|
239
239
|
cy.log('Check the \'Add header row\' checkbox.');
|
|
240
240
|
essayResponsePage.steps.checkAddRowHeaderCheckbox();
|
|
241
241
|
essayResponsePage.steps.addTable();
|
|
@@ -245,7 +245,20 @@ describe('Essay Response Preview: Add Table Functionality', () => {
|
|
|
245
245
|
essayResponsePage.steps.verifyTableNormalCellsAreNotHighlighted();
|
|
246
246
|
});
|
|
247
247
|
|
|
248
|
-
it('When user checks the \'
|
|
248
|
+
it('When user checks the \'Add header row\' checkbox and then clicks on \'Add table\' button, the first row of the added table should be highlighted as table header in item preview', () => {
|
|
249
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
250
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
251
|
+
essayResponsePage.steps.checkAddRowHeaderCheckbox();
|
|
252
|
+
essayResponsePage.steps.addTable();
|
|
253
|
+
essayResponsePage.steps.verifyTableHeaderRowCellCount(3);
|
|
254
|
+
essayResponsePage.steps.verifyTableProperties(2, 3, 3);
|
|
255
|
+
essayResponsePage.steps.verifyTableHeaderCellsAreHighlighted();
|
|
256
|
+
essayResponsePage.steps.verifyTableNormalCellsAreNotHighlighted();
|
|
257
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
258
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
it('When user checks the \'Highlight first column\' checkbox and then clicks on \'Add table\' button, the first column of the added table should be highlighted in question preview.', () => {
|
|
249
262
|
cy.log('Check the \'Highlight first column\' checkbox.');
|
|
250
263
|
essayResponsePage.steps.checkHighlightFirstColumnCheckbox();
|
|
251
264
|
essayResponsePage.steps.addTable();
|
|
@@ -255,6 +268,20 @@ describe('Essay Response Preview: Add Table Functionality', () => {
|
|
|
255
268
|
essayResponsePage.steps.verifyTableNormalCellsAreNotHighlighted();
|
|
256
269
|
});
|
|
257
270
|
|
|
271
|
+
it('When user checks the \'Highlight first column\' checkbox and then clicks on \'Add table\' button, the first column of the added table should be highlighted in item preview.', () => {
|
|
272
|
+
cy.log('Check the \'Highlight first column\' checkbox.');
|
|
273
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
274
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
275
|
+
essayResponsePage.steps.checkHighlightFirstColumnCheckbox();
|
|
276
|
+
essayResponsePage.steps.addTable();
|
|
277
|
+
essayResponsePage.steps.verifyFirstColumnsIsHighlighted(2);
|
|
278
|
+
essayResponsePage.steps.verifyTableProperties(2, 4, 2);
|
|
279
|
+
essayResponsePage.steps.verifyTableHeaderCellsAreHighlighted();
|
|
280
|
+
essayResponsePage.steps.verifyTableNormalCellsAreNotHighlighted();
|
|
281
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
282
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
283
|
+
});
|
|
284
|
+
|
|
258
285
|
it('When user checks both \'Add header row\' and \'Highlight first column\' checkboxes and then clicks on \'Add table\' button, the first column and first row of the added table should be highlighted.', () => {
|
|
259
286
|
cy.log('Check both \'Add header row\' and \'Highlight first column\' checkboxes.');
|
|
260
287
|
essayResponsePage.steps.checkAddRowHeaderCheckbox();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { essayResponsePage, itemPreviewPage } from "../../../pages";
|
|
2
|
+
import { gradingViewPage } from "../../../pages/gradingViewPage";
|
|
2
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
4
|
import utilities from "../../../support/helpers/utilities";
|
|
4
5
|
const css = Cypress.env('css');
|
|
5
|
-
let previewContentViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
let previewContentViews = ['Question preview', 'Item preview', 'Student view', 'Grading view'];
|
|
6
7
|
const views = utilities.getViews(previewContentViews);
|
|
7
8
|
let itemReferenceID = "";
|
|
8
9
|
|
|
@@ -48,6 +49,15 @@ describe('Create item page - Essay response: Preview contents', () => {
|
|
|
48
49
|
});
|
|
49
50
|
};
|
|
50
51
|
|
|
52
|
+
if (view === 'Item view') {
|
|
53
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
54
|
+
essayResponsePage.steps.checkManuallyScoredScoringLabel();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
if (view === 'Grading view') {
|
|
58
|
+
gradingViewPage.steps.verifyGradingViewScore('', 10);
|
|
59
|
+
};
|
|
60
|
+
|
|
51
61
|
it(`When the user switches to Preview tab, then the following options should be displayed in the response field toolbar - ${defaultFormattingOptionsPreviewTab.join('')} along with a separator after ${defaultFormattingOptionsPreviewTab[7]} option`, () => {
|
|
52
62
|
essayResponsePage.steps.verifyDefaultToolbarOptions(defaultFormattingOptionsPreviewTab, defaultFormattingOptionsPreviewTab[7]);
|
|
53
63
|
});
|
|
@@ -240,6 +240,30 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
240
240
|
essayResponsePage.steps.verifyContentOfTableStandardCell(3, 'Standard cell');
|
|
241
241
|
});
|
|
242
242
|
|
|
243
|
+
it('When user clicks on \'Insert Above\' button then a new identical row should be inserted above (item preview)', () => {
|
|
244
|
+
cy.log('Saving question to switch to item preview context.');
|
|
245
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
246
|
+
essayResponsePage.steps.switchToPreviewTab(); // Item preview context
|
|
247
|
+
cy.log('Right clicking in header cell to open edit table flyout.');
|
|
248
|
+
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
249
|
+
essayResponsePage.steps.clickOnEditTableInsertAboveButton();
|
|
250
|
+
cy.log('Opening flyout through a standard cell to insert another row above it.');
|
|
251
|
+
essayResponsePage.steps.openEditTablePopupThroughNormalCell(1);
|
|
252
|
+
essayResponsePage.steps.clickOnEditTableInsertAboveButton();
|
|
253
|
+
essayResponsePage.steps.verifyTableHeaderRowCellCount(6);
|
|
254
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(0, 3);
|
|
255
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(1, 3);
|
|
256
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(2, 1);
|
|
257
|
+
essayResponsePage.steps.verifyTableRowStandardCellCount(2, 2);
|
|
258
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(3, 1);
|
|
259
|
+
essayResponsePage.steps.verifyTableRowStandardCellCount(3, 2);
|
|
260
|
+
essayResponsePage.steps.verifyContentOfTableHeaderCell(7, 'Header cell');
|
|
261
|
+
essayResponsePage.steps.verifyContentOfTableStandardCell(3, 'Standard cell');
|
|
262
|
+
cy.log('Returning to edit mode for subsequent tests.');
|
|
263
|
+
essayResponsePage.steps.switchToEditTab();
|
|
264
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
265
|
+
});
|
|
266
|
+
|
|
243
267
|
it('When user clicks on \'Insert Below\' button, then a new row should be inserted below the row in which the user had focused. Also the newly inserted row should be identical to the row in which user had focused.', () => {
|
|
244
268
|
cy.log('Pre-step: Right click in the required cell to open edit table flyout.');
|
|
245
269
|
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
@@ -259,6 +283,28 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
259
283
|
essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
|
|
260
284
|
});
|
|
261
285
|
|
|
286
|
+
it('When user clicks on \'Insert Below\' button then a new identical row should be inserted below (item preview)', () => {
|
|
287
|
+
cy.log('Saving question to switch to item preview context.');
|
|
288
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
289
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
290
|
+
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
291
|
+
essayResponsePage.steps.clickOnEditTableInsertBelowButton();
|
|
292
|
+
essayResponsePage.steps.openEditTablePopupThroughNormalCell(1);
|
|
293
|
+
essayResponsePage.steps.clickOnEditTableInsertBelowButton();
|
|
294
|
+
essayResponsePage.steps.verifyTableHeaderRowCellCount(6);
|
|
295
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(0, 3);
|
|
296
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(1, 3);
|
|
297
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(2, 1);
|
|
298
|
+
essayResponsePage.steps.verifyTableRowStandardCellCount(2, 2);
|
|
299
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(3, 1);
|
|
300
|
+
essayResponsePage.steps.verifyTableRowStandardCellCount(3, 2);
|
|
301
|
+
essayResponsePage.steps.verifyContentOfTableHeaderCell(6, 'Header cell');
|
|
302
|
+
essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
|
|
303
|
+
cy.log('Returning to edit mode for subsequent tests.');
|
|
304
|
+
essayResponsePage.steps.switchToEditTab();
|
|
305
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
306
|
+
});
|
|
307
|
+
|
|
262
308
|
it('When user clicks on \'Delete Row\' button then, the row in which it had focused should be deleted.', () => {
|
|
263
309
|
cy.log('Pre-step: Right click in the required cell to open edit table flyout.');
|
|
264
310
|
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
@@ -270,6 +316,22 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
270
316
|
essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
|
|
271
317
|
});
|
|
272
318
|
|
|
319
|
+
it('When user clicks on \'Delete Row\' button then the focused row should be deleted (item preview)', () => {
|
|
320
|
+
cy.log('Saving question to switch to item preview context.');
|
|
321
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
322
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
323
|
+
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
324
|
+
essayResponsePage.steps.clickOnEditTableDeleteRowButton();
|
|
325
|
+
essayResponsePage.steps.verifyTableRowCount(1);
|
|
326
|
+
essayResponsePage.steps.verifyTableRowHeaderCellCount(0, 1);
|
|
327
|
+
essayResponsePage.steps.verifyTableRowStandardCellCount(0, 2);
|
|
328
|
+
essayResponsePage.steps.verifyContentOfTableHeaderCell(0, 'Header cell');
|
|
329
|
+
essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
|
|
330
|
+
cy.log('Returning to edit mode for subsequent tests.');
|
|
331
|
+
essayResponsePage.steps.switchToEditTab();
|
|
332
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
333
|
+
});
|
|
334
|
+
|
|
273
335
|
it('When user deletes the header row by clicking on the \'Delete Row\' button, then in edit table flyout the \'Add Header Row\' checkbox should be unchecked.', () => {
|
|
274
336
|
cy.log('Pre-step: Right click in the required cell to open edit table flyout and click on Delete Row button.');
|
|
275
337
|
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
@@ -277,6 +339,19 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
277
339
|
essayResponsePage.steps.openEditTablePopupThroughNormalCell(0);
|
|
278
340
|
essayResponsePage.steps.verifyUncheckedStateOfEditTableAddRowHeaderCheckbox();
|
|
279
341
|
});
|
|
342
|
+
|
|
343
|
+
it('When header row is deleted then the Add Header Row checkbox should be unchecked (item preview)', () => {
|
|
344
|
+
cy.log('Saving question to switch to item preview context.');
|
|
345
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
346
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
347
|
+
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
348
|
+
essayResponsePage.steps.clickOnEditTableDeleteRowButton();
|
|
349
|
+
essayResponsePage.steps.openEditTablePopupThroughNormalCell(0);
|
|
350
|
+
essayResponsePage.steps.verifyUncheckedStateOfEditTableAddRowHeaderCheckbox();
|
|
351
|
+
cy.log('Returning to edit mode for subsequent tests.');
|
|
352
|
+
essayResponsePage.steps.switchToEditTab();
|
|
353
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
354
|
+
});
|
|
280
355
|
});
|
|
281
356
|
|
|
282
357
|
describe('Edit \'Add header row\' and \'Highlight first column\' checkboxes.', () => {
|
|
@@ -161,6 +161,19 @@ describe('Essay Response Preview: Hyperlink', () => {
|
|
|
161
161
|
utilities.verifyInnerText(essayResponsePage.previewInputFieldHyperlinkText(), 'Link')
|
|
162
162
|
});
|
|
163
163
|
|
|
164
|
+
it('When user adds both \'Display text\' as well as \'URL\' in the hyperlink popup and clicks on Ok button, then the hyperlink with the added display text and URL should be displayed in the response field of item preview', () => {
|
|
165
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
166
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
167
|
+
essayResponsePage.steps.enterTextInHyperlinkDialogboxDisplayTextInputField('Link');
|
|
168
|
+
essayResponsePage.steps.enterTextInHyperlinkDialogBoxURLInputField(`${Cypress.config().baseUrl}`);
|
|
169
|
+
essayResponsePage.steps.clickOnHyperLinkDialogBoxOkButton();
|
|
170
|
+
utilities.verifyInnerText(essayResponsePage.previewInputFieldHyperlinkText(), 'Link')
|
|
171
|
+
essayResponsePage.steps.switchToEditTab();
|
|
172
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
173
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
174
|
+
essayResponsePage.steps.enterTextInHyperlinkDialogboxDisplayTextInputField('Link');
|
|
175
|
+
});
|
|
176
|
+
|
|
164
177
|
it('CSS of the hyperlink in response field', { tags: 'css' }, () => {
|
|
165
178
|
utilities.verifyCSS(essayResponsePage.previewInputFieldHyperlinkText(), {
|
|
166
179
|
'color': css.color.linkText,
|
|
@@ -123,6 +123,53 @@ describe('Create Item page - Short text response : Student view settings', () =>
|
|
|
123
123
|
});
|
|
124
124
|
});
|
|
125
125
|
|
|
126
|
+
describe('Student view settings : Display character count, Display word count - Item preview functionality', () => {
|
|
127
|
+
abortEarlySetup();
|
|
128
|
+
before(() => {
|
|
129
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
130
|
+
cy.barsPreLoaderWait();
|
|
131
|
+
essayResponsePage.steps.checkCharacterRadioButton();
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it('When \'Display character count\' checkbox is unchecked, then \'Character\' label and count should not be displayed in item preview', () => {
|
|
135
|
+
essayResponsePage.steps.verifyDisplayCharacterCountCheckboxUnchecked();
|
|
136
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
137
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
138
|
+
utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'hidden');
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('When \'Display character count\' checkbox is checked, then on switching to preview tab \'Character\' label and count should be displayed and count should be zero by default in item preview', () => {
|
|
142
|
+
essayResponsePage.steps.switchToEditTab();
|
|
143
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
144
|
+
essayResponsePage.steps.checkDisplayCharacterCountCheckbox();
|
|
145
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
146
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
147
|
+
utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 0');
|
|
148
|
+
utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'visible');
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('When user enters text in response field, then character count should be updated in item preview', () => {
|
|
152
|
+
essayResponsePage.steps.enterTextInResponseField('Flowers are blooming');
|
|
153
|
+
utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Characters: 18');
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
it('When user selects word in set limit section and checks \'Display word count\' checkbox , then \'Word\' label and count should be displayed in item preview', () => {
|
|
157
|
+
essayResponsePage.steps.switchToEditTab();
|
|
158
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
159
|
+
essayResponsePage.steps.selectWordRadioButton();
|
|
160
|
+
essayResponsePage.steps.checkDisplayWordCountCheckbox();
|
|
161
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
162
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
163
|
+
utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Words: 0');
|
|
164
|
+
utilities.verifyElementVisibilityState(essayResponsePage.characterWordCountLabelPreviewTab(), 'visible');
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
it('When user enters text in response field, then character count should be updated in item preview', () => {
|
|
168
|
+
essayResponsePage.steps.enterTextInResponseField('Flowers are blooming');
|
|
169
|
+
utilities.verifyInnerText(essayResponsePage.characterWordCountLabelPreviewTab(), 'Words: 3');
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
126
173
|
describe('Student view settings : Spell check - Preview tab functionality', () => {
|
|
127
174
|
abortEarlySetup();
|
|
128
175
|
before(() => {
|
|
@@ -143,4 +190,28 @@ describe('Create Item page - Short text response : Student view settings', () =>
|
|
|
143
190
|
essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled();
|
|
144
191
|
});
|
|
145
192
|
});
|
|
193
|
+
|
|
194
|
+
describe('Student view settings : Spell check - Item preview', () => {
|
|
195
|
+
abortEarlySetup();
|
|
196
|
+
before(() => {
|
|
197
|
+
essayResponsePage.steps.navigateToCreateQuestion('essay response');
|
|
198
|
+
cy.barsPreLoaderWait();
|
|
199
|
+
essayResponsePage.steps.uncheckSpellCheckCheckbox();
|
|
200
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
201
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
it('When the \'Spell check\' checkbox is unchecked, the response field should have \'spellcheck\' attribute set as \'false\' in item preview', () => {
|
|
205
|
+
essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled();
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
it('When the \'Spell check\' checkbox is checked, the response field should have \'spellcheck\' attribute set as \'true\' in item preview', () => {
|
|
209
|
+
essayResponsePage.steps.switchToEditTab();
|
|
210
|
+
essayResponsePage.steps.clickOnEditQuestionButton();
|
|
211
|
+
essayResponsePage.steps.checkSpellCheckCheckbox();
|
|
212
|
+
essayResponsePage.steps.saveAQuestionAndVerifySnackbar();
|
|
213
|
+
essayResponsePage.steps.switchToPreviewTab();
|
|
214
|
+
essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled();
|
|
215
|
+
});
|
|
216
|
+
});
|
|
146
217
|
});
|
|
@@ -142,4 +142,185 @@ describe('Create item page - Fill in the gaps over image with text: Partial equa
|
|
|
142
142
|
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(2, 20);
|
|
143
143
|
});
|
|
144
144
|
});
|
|
145
|
+
|
|
146
|
+
describe('Question preview: Auto scored - Partial equal weights: Rounding', () => {
|
|
147
|
+
abortEarlySetup();
|
|
148
|
+
before(() => {
|
|
149
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
150
|
+
cy.barsPreLoaderWait();
|
|
151
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
152
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
153
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
|
154
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
|
155
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
156
|
+
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
157
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(15);
|
|
158
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
|
159
|
+
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value greater than 0.5 and less than 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
163
|
+
fillInTheGapsOverImageTextPage.steps.expandRoundingDropdown();
|
|
164
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.99');
|
|
165
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(11);
|
|
166
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
167
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
168
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 11);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.99\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.99, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
172
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
173
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(8.97);
|
|
174
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
175
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
176
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(2, 8.97);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
180
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
181
|
+
fillInTheGapsOverImageTextPage.steps.expandRoundingDropdown();
|
|
182
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50');
|
|
183
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
|
184
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
185
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
|
186
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 10);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
190
|
+
cy.log('Points allocation based on the test case requirements.');
|
|
191
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
192
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(4.5);
|
|
193
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
194
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
|
195
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(1, 4.5);
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('When the user sets \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value less than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
199
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
200
|
+
fillInTheGapsOverImageTextPage.steps.expandRoundingDropdown();
|
|
201
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromRoundingDropdown('round down if <= 0.50; Round up if > 0.50');
|
|
202
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(10);
|
|
203
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
204
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'Stem' }]);
|
|
205
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 10);
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value equal to 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
209
|
+
cy.log('Points allocation based on the test case requirements.');
|
|
210
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
211
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(4.5);
|
|
212
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
213
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
214
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(1, 4.5);
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
it('When the user has set \'Rounding\' to \'Round down if <=0.50, Round up if > 0.50\', attempts the question partially correct with an response such that points of the correctly attempted responses has decimal value greater than 0.50, then the points awarded should be rounded down to the nearest integer value', () => {
|
|
218
|
+
cy.log('Points allocation based on the test case requirements.');
|
|
219
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
220
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(11);
|
|
221
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
222
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
223
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(4, 11);
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
it('When \'Round negative score to zero\' is in checked state and the user attempts the question incorrectly, then the user should be awarded with 0 points', () => {
|
|
227
|
+
cy.log('Pre-step: Setting penalty scoring to \'Penalty points for the entire question\', allotting penalty points')
|
|
228
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
229
|
+
fillInTheGapsOverImageTextPage.steps.expandPenaltyScoringDropdown();
|
|
230
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
|
231
|
+
fillInTheGapsOverImageTextPage.steps.allotPenaltyPoints(4);
|
|
232
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
233
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
234
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(0, 11);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
it('When the user unchecks \'Round negative score to zero\' checkbox and the user attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
|
238
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
239
|
+
fillInTheGapsOverImageTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
|
240
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
241
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
242
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(-4, 11);
|
|
243
|
+
});
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
describe('Question preview: Auto scored - Partial equal weights: Penalty scoring with \'Round negative score to zero\' unchecked', () => {
|
|
247
|
+
abortEarlySetup();
|
|
248
|
+
before(() => {
|
|
249
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
250
|
+
cy.barsPreLoaderWait();
|
|
251
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
252
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
253
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
|
254
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(40);
|
|
255
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
256
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }, { responseIndex: 2, responseText: 'Stem' }]);
|
|
257
|
+
fillInTheGapsOverImageTextPage.steps.selectAutoScoredScoringSubtype('Partial equal weights');
|
|
258
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(27);
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
//Penalty points for the entire question
|
|
262
|
+
it('When the user sets penalty scoring to \'Penalty points for the entire question\', allots penalty points and attempts the question incorrectly, then the user should be awarded with negative points', () => {
|
|
263
|
+
fillInTheGapsOverImageTextPage.steps.expandPenaltyScoringDropdown();
|
|
264
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for the entire question');
|
|
265
|
+
fillInTheGapsOverImageTextPage.steps.uncheckRoundNegativeScoresToZeroCheckbox();
|
|
266
|
+
fillInTheGapsOverImageTextPage.steps.allotPenaltyPoints(2);
|
|
267
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
268
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
269
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(-2, 27);
|
|
270
|
+
});
|
|
271
|
+
|
|
272
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
|
273
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
274
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Roots' }]);
|
|
275
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
276
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(7, 27);
|
|
277
|
+
});
|
|
278
|
+
|
|
279
|
+
it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points should get deducted from the awarded points only once, the deducted penalty points should not increase as per number of attempted incorrect responses', () => {
|
|
280
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
281
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
282
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
283
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'apple' }]);
|
|
284
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(7, 27);
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
it('When the user has defined penalty points and also sets minimum scoring to \'Award minimum score only if attempted\' and allots minimum points, then on attempting the question incorrectly, minimum points should be awarded', () => {
|
|
288
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
289
|
+
fillInTheGapsOverImageTextPage.steps.expandMinimumScoringDropdown();
|
|
290
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromMinimumScoringDropdown('Award minimum score only if attempted');
|
|
291
|
+
fillInTheGapsOverImageTextPage.steps.allotMinimumPoints(3);
|
|
292
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
293
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
294
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(3, 27);
|
|
295
|
+
cy.log('Post step: Switching to edit tab and resetting minimum scoring to "No minimum score"')
|
|
296
|
+
fillInTheGapsOverImageTextPage.steps.switchToEditTab();
|
|
297
|
+
fillInTheGapsOverImageTextPage.steps.expandMinimumScoringDropdown();
|
|
298
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromMinimumScoringDropdown('No minimum score');
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
//Penalty points for each incorrect cell - Specify total penalty points
|
|
302
|
+
it('When the user sets penalty scoring to \'Penalty points for each incorrect text container\', and \'Specify total penalty points\' radio button in checked state, allots total penalty points and attempts the question incorrectly, then the user should be awarded with negative points of incorrect response', () => {
|
|
303
|
+
fillInTheGapsOverImageTextPage.steps.expandPenaltyScoringDropdown();
|
|
304
|
+
fillInTheGapsOverImageTextPage.steps.selectOptionFromPenaltyScoringDropdown('Penalty points for each incorrect text container');
|
|
305
|
+
fillInTheGapsOverImageTextPage.steps.allotTotalPenaltyPoints(4);
|
|
306
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
307
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
308
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(-4, 27);
|
|
309
|
+
});
|
|
310
|
+
|
|
311
|
+
it('When the user attempts the question correctly along with an incorrect response, then penalty points should get deducted from the awarded points', () => {
|
|
312
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
313
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
314
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
315
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(6.3333, 27);
|
|
316
|
+
});
|
|
317
|
+
|
|
318
|
+
it('When the user attempts the question correctly along with multiple incorrect responses, then penalty points for each incorrect response should get deducted from the awarded points', () => {
|
|
319
|
+
fillInTheGapsOverImageTextPage.steps.resetQuestionPreview();
|
|
320
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Leaf' }]);
|
|
321
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'leaves' }]);
|
|
322
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 2, responseText: 'apple' }]);
|
|
323
|
+
fillInTheGapsOverImageTextPage.steps.verifyPreviewScore(6.3333, 27);
|
|
324
|
+
});
|
|
325
|
+
});
|
|
145
326
|
});
|