itemengine-cypress-automation 1.0.573-IEI-7065-Improve-test-coverage-for-essay-response-c25d1ee.0 → 1.0.574-IEI-7080-e6d1871.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 +2 -8
- package/cypress/e2e/ILC/EssayResponse/additionalSettingsBasic.js +0 -15
- package/cypress/e2e/ILC/EssayResponse/createCustomCategory.smoke.js +1 -14
- package/cypress/e2e/ILC/EssayResponse/editTabBasicSections.js +5 -155
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions2.js +4 -116
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions3.js +0 -93
- package/cypress/e2e/ILC/EssayResponse/essayResponseCustomizeFormattingOptions4.js +0 -114
- package/cypress/e2e/ILC/EssayResponse/essayResponseSpecialCharacters.js +1 -11
- package/cypress/e2e/ILC/EssayResponse/previewAddTable.js +2 -29
- package/cypress/e2e/ILC/EssayResponse/previewContentsForAllViews.smoke.js +1 -11
- package/cypress/e2e/ILC/EssayResponse/previewEditTable.js +0 -75
- package/cypress/e2e/ILC/EssayResponse/previewHyperlink.js +0 -13
- package/cypress/e2e/ILC/EssayResponse/studentViewSettings.js +0 -71
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsAlternativePointsGreaterThanCorrectPoints.js +124 -9
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsEqualToAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialDifferentWeightsWithCorrectPointsGreaterThanAlternativePoints.js +123 -8
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithAlternativePointsGreaterThanCorrectPoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsEqualToAlternativePoints.js +93 -6
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/partialEqualWeightsWithCorrectPointsGreaterThanAlternativePoints.js +108 -7
- package/cypress/e2e/ILC/FillInTheGapsTextNew/Scoring/responseLevelAlternateAnswersBasicScoring.js +23 -2
- package/cypress/pages/components/equationEditorSectionCommonComponent.js +0 -21
- package/cypress/pages/components/essayResponseCommonComponents.js +1 -20
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +36 -0
- package/cypress/pages/essayResponsePage.js +0 -2
- package/package.json +1 -1
|
@@ -108,44 +108,6 @@ 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
|
-
|
|
149
111
|
describe('Highlight Text formatting option - Preview tab', () => {
|
|
150
112
|
abortEarlySetup();
|
|
151
113
|
before(() => {
|
|
@@ -256,39 +218,6 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
256
218
|
});
|
|
257
219
|
});
|
|
258
220
|
|
|
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
|
-
|
|
292
221
|
describe('enable color picker - Preview tab', () => {
|
|
293
222
|
abortEarlySetup();
|
|
294
223
|
before(() => {
|
|
@@ -329,47 +258,4 @@ describe('Create question page - Essay Response: Customize formatting options (f
|
|
|
329
258
|
essayResponsePage.steps.verifyResponseFieldTextColor(`${css.color.newResponseFieldColor}`);
|
|
330
259
|
});
|
|
331
260
|
});
|
|
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
|
-
});
|
|
375
261
|
});
|
|
@@ -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', () => {
|
|
154
154
|
essayResponsePage.steps.switchToPreviewTab();
|
|
155
155
|
essayResponsePage.steps.selectPreviewTabToolbarOption('Special characters');
|
|
156
156
|
essayResponsePage.steps.verifyCustomSpecialCharactersDisplayedInPreviewTab(customSpecialCharacters);
|
|
@@ -158,16 +158,6 @@ 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
|
-
|
|
171
161
|
it('CSS of Customize special characters', { tags: 'css' }, () => {
|
|
172
162
|
utilities.verifyCSS(essayResponsePage.customizeSpecialCharactersLabel(), {
|
|
173
163
|
'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', () => {
|
|
239
239
|
cy.log('Check the \'Add header row\' checkbox.');
|
|
240
240
|
essayResponsePage.steps.checkAddRowHeaderCheckbox();
|
|
241
241
|
essayResponsePage.steps.addTable();
|
|
@@ -245,20 +245,7 @@ describe('Essay Response Preview: Add Table Functionality', () => {
|
|
|
245
245
|
essayResponsePage.steps.verifyTableNormalCellsAreNotHighlighted();
|
|
246
246
|
});
|
|
247
247
|
|
|
248
|
-
it('When user checks the \'
|
|
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.', () => {
|
|
248
|
+
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.', () => {
|
|
262
249
|
cy.log('Check the \'Highlight first column\' checkbox.');
|
|
263
250
|
essayResponsePage.steps.checkHighlightFirstColumnCheckbox();
|
|
264
251
|
essayResponsePage.steps.addTable();
|
|
@@ -268,20 +255,6 @@ describe('Essay Response Preview: Add Table Functionality', () => {
|
|
|
268
255
|
essayResponsePage.steps.verifyTableNormalCellsAreNotHighlighted();
|
|
269
256
|
});
|
|
270
257
|
|
|
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
|
-
|
|
285
258
|
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.', () => {
|
|
286
259
|
cy.log('Check both \'Add header row\' and \'Highlight first column\' checkboxes.');
|
|
287
260
|
essayResponsePage.steps.checkAddRowHeaderCheckbox();
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { essayResponsePage, itemPreviewPage } from "../../../pages";
|
|
2
|
-
import { gradingViewPage } from "../../../pages/gradingViewPage";
|
|
3
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
3
|
import utilities from "../../../support/helpers/utilities";
|
|
5
4
|
const css = Cypress.env('css');
|
|
6
|
-
let previewContentViews = ['Question preview', 'Item preview', 'Student view'
|
|
5
|
+
let previewContentViews = ['Question preview', 'Item preview', 'Student view'];
|
|
7
6
|
const views = utilities.getViews(previewContentViews);
|
|
8
7
|
let itemReferenceID = "";
|
|
9
8
|
|
|
@@ -49,15 +48,6 @@ describe('Create item page - Essay response: Preview contents', () => {
|
|
|
49
48
|
});
|
|
50
49
|
};
|
|
51
50
|
|
|
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
|
-
|
|
61
51
|
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`, () => {
|
|
62
52
|
essayResponsePage.steps.verifyDefaultToolbarOptions(defaultFormattingOptionsPreviewTab, defaultFormattingOptionsPreviewTab[7]);
|
|
63
53
|
});
|
|
@@ -240,30 +240,6 @@ 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
|
-
|
|
267
243
|
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.', () => {
|
|
268
244
|
cy.log('Pre-step: Right click in the required cell to open edit table flyout.');
|
|
269
245
|
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
@@ -283,28 +259,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
283
259
|
essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
|
|
284
260
|
});
|
|
285
261
|
|
|
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
|
-
|
|
308
262
|
it('When user clicks on \'Delete Row\' button then, the row in which it had focused should be deleted.', () => {
|
|
309
263
|
cy.log('Pre-step: Right click in the required cell to open edit table flyout.');
|
|
310
264
|
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
@@ -316,22 +270,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
316
270
|
essayResponsePage.steps.verifyContentOfTableStandardCell(1, 'Standard cell');
|
|
317
271
|
});
|
|
318
272
|
|
|
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
|
-
|
|
335
273
|
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.', () => {
|
|
336
274
|
cy.log('Pre-step: Right click in the required cell to open edit table flyout and click on Delete Row button.');
|
|
337
275
|
essayResponsePage.steps.openEditTablePopupThroughHeaderCell(0);
|
|
@@ -339,19 +277,6 @@ describe('Essay Response Preview: Edit Table functionality', () => {
|
|
|
339
277
|
essayResponsePage.steps.openEditTablePopupThroughNormalCell(0);
|
|
340
278
|
essayResponsePage.steps.verifyUncheckedStateOfEditTableAddRowHeaderCheckbox();
|
|
341
279
|
});
|
|
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
|
-
});
|
|
355
280
|
});
|
|
356
281
|
|
|
357
282
|
describe('Edit \'Add header row\' and \'Highlight first column\' checkboxes.', () => {
|
|
@@ -161,19 +161,6 @@ 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
|
-
|
|
177
164
|
it('CSS of the hyperlink in response field', { tags: 'css' }, () => {
|
|
178
165
|
utilities.verifyCSS(essayResponsePage.previewInputFieldHyperlinkText(), {
|
|
179
166
|
'color': css.color.linkText,
|
|
@@ -123,53 +123,6 @@ 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
|
-
|
|
173
126
|
describe('Student view settings : Spell check - Preview tab functionality', () => {
|
|
174
127
|
abortEarlySetup();
|
|
175
128
|
before(() => {
|
|
@@ -190,28 +143,4 @@ describe('Create Item page - Short text response : Student view settings', () =>
|
|
|
190
143
|
essayResponsePage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled();
|
|
191
144
|
});
|
|
192
145
|
});
|
|
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
|
-
});
|
|
217
146
|
});
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { fillInTheGapsTextPage } from "../../../../pages";
|
|
2
|
+
import { showAlternativeAnswersComponent } from "../../../../pages/components";
|
|
2
3
|
import abortEarlySetup from "../../../../support/helpers/abortEarly";
|
|
3
4
|
const css = Cypress.env('css');
|
|
4
5
|
|
|
6
|
+
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
7
|
+
|
|
5
8
|
describe('Create item page - Fill in the gaps with text: All or nothing with alternative answers', () => {
|
|
6
9
|
before(() => {
|
|
7
10
|
cy.loginAs('admin');
|
|
@@ -26,7 +29,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
26
29
|
fillInTheGapsTextPage.steps.switchToGradingView();
|
|
27
30
|
fillInTheGapsTextPage.steps.verifyResponseAreaNumeration();
|
|
28
31
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectStatusMessageNotExists();
|
|
29
|
-
|
|
32
|
+
if (alternativeAnswerCheck) {
|
|
33
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
34
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
35
|
+
{
|
|
36
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
37
|
+
points: ['(20 points)'],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
41
|
+
points: ['(10 points)'],
|
|
42
|
+
}
|
|
43
|
+
]);
|
|
44
|
+
} else {
|
|
45
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
46
|
+
}
|
|
30
47
|
});
|
|
31
48
|
|
|
32
49
|
it('When the user attempts the question with responses from the correct accordion, then the user should be awarded with points specified for correct accordion (less than overall points) and on switching to \'Grading\' view, correct icons should be displayed beside all the correct responses, a status message with text \'Your answer is correct\' and correct answer section should not be displayed', () => {
|
|
@@ -78,7 +95,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
78
95
|
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
|
79
96
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
|
|
80
97
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
81
|
-
|
|
98
|
+
if (alternativeAnswerCheck) {
|
|
99
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
100
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
101
|
+
{
|
|
102
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
103
|
+
points: ['(20 points)'],
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
107
|
+
points: ['(10 points)'],
|
|
108
|
+
}
|
|
109
|
+
]);
|
|
110
|
+
} else {
|
|
111
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
112
|
+
}
|
|
82
113
|
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
83
114
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the correct accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
84
115
|
fillInTheGapsTextPage.steps.checkAnswer();
|
|
@@ -98,7 +129,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
98
129
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
|
|
99
130
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
|
|
100
131
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
101
|
-
|
|
132
|
+
if (alternativeAnswerCheck) {
|
|
133
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
134
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
135
|
+
{
|
|
136
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
137
|
+
points: ['(20 points)'],
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
141
|
+
points: ['(10 points)'],
|
|
142
|
+
}
|
|
143
|
+
]);
|
|
144
|
+
} else {
|
|
145
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
146
|
+
}
|
|
102
147
|
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
103
148
|
/*cy.log('When the user has attempted the question with partially correct options exclusively from the alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
104
149
|
fillInTheGapsTextPage.steps.checkAnswer();
|
|
@@ -118,7 +163,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
118
163
|
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
|
119
164
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
|
|
120
165
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
121
|
-
|
|
166
|
+
if (alternativeAnswerCheck) {
|
|
167
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
168
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
169
|
+
{
|
|
170
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
171
|
+
points: ['(20 points)'],
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
175
|
+
points: ['(10 points)'],
|
|
176
|
+
}
|
|
177
|
+
]);
|
|
178
|
+
} else {
|
|
179
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
180
|
+
}
|
|
122
181
|
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
123
182
|
/*cy.log('When the user has attempted the question with partially correct with all the response correct as per the alternative accordion but one response incomplete and clicks on \'Check answer\' button, then correct icon should be displayed besides the response from the correct accordion and no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
124
183
|
fillInTheGapsTextPage.steps.checkAnswer();
|
|
@@ -138,7 +197,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
138
197
|
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(1);
|
|
139
198
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
|
|
140
199
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
141
|
-
|
|
200
|
+
if (alternativeAnswerCheck) {
|
|
201
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
202
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
203
|
+
{
|
|
204
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
205
|
+
points: ['(20 points)'],
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
209
|
+
points: ['(10 points)'],
|
|
210
|
+
}
|
|
211
|
+
]);
|
|
212
|
+
} else {
|
|
213
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
214
|
+
}
|
|
142
215
|
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
143
216
|
/*cy.log('When the user has attempted the question with equal number of correct responses from correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, incorrect icon should be displayed beside empty responses a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
144
217
|
fillInTheGapsTextPage.steps.checkAnswer();
|
|
@@ -158,7 +231,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
158
231
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
|
|
159
232
|
fillInTheGapsTextPage.steps.verifyCorrectOptionIcon(2);
|
|
160
233
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
161
|
-
|
|
234
|
+
if (alternativeAnswerCheck) {
|
|
235
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
236
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
237
|
+
{
|
|
238
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
239
|
+
points: ['(20 points)'],
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
243
|
+
points: ['(10 points)'],
|
|
244
|
+
}
|
|
245
|
+
]);
|
|
246
|
+
} else {
|
|
247
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
248
|
+
}
|
|
162
249
|
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
163
250
|
/*cy.log('When the user has attempted the question with common response between correct and alternative accordion and clicks on \'Check answer\' button, then correct icon should be displayed besides the correct answer responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
164
251
|
fillInTheGapsTextPage.steps.checkAnswer();
|
|
@@ -178,7 +265,21 @@ describe('Create item page - Fill in the gaps with text: All or nothing with alt
|
|
|
178
265
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(1);
|
|
179
266
|
fillInTheGapsTextPage.steps.verifyIncorrectOptionIcon(2);
|
|
180
267
|
fillInTheGapsTextPage.steps.verifyCorrectIncorrectAnswerLabel('incorrect');
|
|
181
|
-
|
|
268
|
+
if (alternativeAnswerCheck) {
|
|
269
|
+
showAlternativeAnswersComponent.steps.clickShowAlternativeAnswersToggle();
|
|
270
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerSectionWithAlternateAnswer([
|
|
271
|
+
{
|
|
272
|
+
correctAnswers: [['Petals'],['Leaves'],['Stem']],
|
|
273
|
+
points: ['(20 points)'],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
correctAnswers: [['Flower'],['Leaf'],['Stem']],
|
|
277
|
+
points: ['(10 points)'],
|
|
278
|
+
}
|
|
279
|
+
]);
|
|
280
|
+
} else {
|
|
281
|
+
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesInCorrectAnswerSectionAndCount(['Petals', 'Leaves', 'Stem']);
|
|
282
|
+
}
|
|
182
283
|
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
183
284
|
/*cy.log('When the user has attempted the question incorrectly and clicks on \'Check answer\' button, then incorrect icons should be displayed besides all incorrect responses, no icon should be displayed for unattempted response area, a status message with text \'Your answer is incorrect\' and correct answer section should not be displayed')
|
|
184
285
|
fillInTheGapsTextPage.steps.checkAnswer();
|