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
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const fontSizes = { 'Tiny': '12px', 'Small': '14px', 'Default': '16px', 'Normal': '18px', 'Big': '22px', 'Huge': '26px' };
|
|
5
|
+
let itemReferenceID = "";
|
|
5
6
|
|
|
6
7
|
describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
7
8
|
before(() => {
|
|
@@ -15,6 +16,15 @@ describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
|
15
16
|
});
|
|
16
17
|
|
|
17
18
|
fillInTheGapsOverImageTextPage.tests.verifyAdditionalSettingsAccordionProperties();
|
|
19
|
+
|
|
20
|
+
it('When the user expands the Additional settings accordion make some changes and collapse and re-expand it, the changes should persist', () => {
|
|
21
|
+
fillInTheGapsOverImageTextPage.steps.checkCustomizePlaceholderTextCheckbox();
|
|
22
|
+
fillInTheGapsOverImageTextPage.steps.selectEnumerationType('without enumeration');
|
|
23
|
+
fillInTheGapsOverImageTextPage.steps.collapsedAdditionalSettings();
|
|
24
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
25
|
+
fillInTheGapsOverImageTextPage.steps.verifyWithoutEnumerationRadioButtonCheckedState();
|
|
26
|
+
fillInTheGapsOverImageTextPage.steps.verifyCustomizePlaceholderTextCheckboxChecked();
|
|
27
|
+
});
|
|
18
28
|
});
|
|
19
29
|
|
|
20
30
|
describe('Additional settings: Font size - Contents in edit tab', () => {
|
|
@@ -73,7 +83,7 @@ describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
|
73
83
|
});
|
|
74
84
|
});
|
|
75
85
|
});
|
|
76
|
-
|
|
86
|
+
|
|
77
87
|
describe('Additional settings: Accessibility section', () => {
|
|
78
88
|
abortEarlySetup();
|
|
79
89
|
before(() => {
|
|
@@ -95,4 +105,29 @@ describe('Fill In the gaps over image with text - Additional settings', () => {
|
|
|
95
105
|
|
|
96
106
|
fillInTheGapsOverImageTextPage.tests.verifyDetailsSection();
|
|
97
107
|
});
|
|
108
|
+
|
|
109
|
+
describe('Additional settings: Details section Grading view', () => {
|
|
110
|
+
abortEarlySetup();
|
|
111
|
+
before(() => {
|
|
112
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
113
|
+
cy.barsPreLoaderWait();
|
|
114
|
+
fillInTheGapsOverImageTextPage.steps.addTextInQuestionInstructionsInputField('Navigating to fill in the gaps over image with text');
|
|
115
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
116
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInTeacherGuidelinesInputField('Teacher scoring guidelines');
|
|
117
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInSampleAnswerInputField('Sample answer');
|
|
118
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAcknowledgementsInputField('Acknowledgements');
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it('When the user navigates to the grading view, the Details section information should be displayed correctly', () => {
|
|
122
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
123
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
124
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
125
|
+
cy.wrap(itemPreviewPage.steps.getItemReferenceID()).then((referenceId) => {
|
|
126
|
+
itemReferenceID = referenceId;
|
|
127
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
128
|
+
fillInTheGapsOverImageTextPage.steps.verifyTeacherGuidelinesLabelInGradingView('Teacher Guidelines');
|
|
129
|
+
fillInTheGapsOverImageTextPage.steps.verifyTeacherGuidelinesDescriptionInGradingView('Teacher scoring guidelines');
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
});
|
|
98
133
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/additionalSettingsForAnswerInputFields.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage, dialogBoxBase } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const enumerationOptions = {
|
|
@@ -9,6 +9,9 @@ const enumerationOptions = {
|
|
|
9
9
|
'Roman numeral (lowercase)': ['i', 'ii'],
|
|
10
10
|
};
|
|
11
11
|
const css = Cypress.env('css');
|
|
12
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Grading view'];
|
|
13
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
14
|
+
let itemReferenceID = "";
|
|
12
15
|
|
|
13
16
|
describe('Fill In the gaps over image with text - Additional settings : Placeholder text, Grading view, ARIA label for text containers', () => {
|
|
14
17
|
before(() => {
|
|
@@ -110,7 +113,7 @@ describe('Fill In the gaps over image with text - Additional settings : Placehol
|
|
|
110
113
|
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
111
114
|
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
|
112
115
|
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
|
113
|
-
|
|
116
|
+
//fillInTheGapsOverImageTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
|
114
117
|
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
115
118
|
});
|
|
116
119
|
|
|
@@ -154,12 +157,11 @@ describe('Fill In the gaps over image with text - Additional settings : Placehol
|
|
|
154
157
|
'font-weight': css.fontWeight.regular
|
|
155
158
|
});
|
|
156
159
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.correctAnswerResponseWrapperWithoutEnumeration().parents('.response-input-field'), {
|
|
157
|
-
'border': `1px solid ${css.color.
|
|
160
|
+
'border': `1px solid ${css.color.primaryBtnBg}`
|
|
158
161
|
});
|
|
159
162
|
})
|
|
160
163
|
});
|
|
161
164
|
|
|
162
|
-
|
|
163
165
|
it('Accessibility of correct answer section', { tags: 'a11y' }, () => {
|
|
164
166
|
cy.checkAccessibility(fillInTheGapsOverImageTextPage.correctAnswerSectionWithoutEnumerationWrapper().parents('[class*="question-preview-wrapper"]'));
|
|
165
167
|
});
|
|
@@ -248,4 +250,70 @@ describe('Fill In the gaps over image with text - Additional settings : Placehol
|
|
|
248
250
|
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldAriaLabelPreviewTab(1, 'Add answer for response 2');
|
|
249
251
|
});
|
|
250
252
|
});
|
|
253
|
+
|
|
254
|
+
views.forEach((view) => {
|
|
255
|
+
describe(`${view}: Additional Settings: Grading view style with numeration`, () => {
|
|
256
|
+
abortEarlySetup();
|
|
257
|
+
before(() => {
|
|
258
|
+
switch (view) {
|
|
259
|
+
case 'Question preview':
|
|
260
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
261
|
+
cy.barsPreLoaderWait();
|
|
262
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
263
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
264
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(2);
|
|
265
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(30);
|
|
266
|
+
fillInTheGapsOverImageTextPage.steps.allotPoints(20);
|
|
267
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
|
268
|
+
fillInTheGapsOverImageTextPage.steps.expandAdditionalSettings();
|
|
269
|
+
fillInTheGapsOverImageTextPage.steps.selectIdentifierToggleButton('Alphabet (uppercase)');
|
|
270
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
271
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
272
|
+
break;
|
|
273
|
+
case 'Item preview':
|
|
274
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
275
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
276
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
277
|
+
break;
|
|
278
|
+
case 'Grading view':
|
|
279
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
280
|
+
break;
|
|
281
|
+
};
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
beforeEach(() => {
|
|
285
|
+
switch (view) {
|
|
286
|
+
case 'Question preview':
|
|
287
|
+
break;
|
|
288
|
+
case 'Item preview':
|
|
289
|
+
fillInTheGapsOverImageTextPage.steps.switchToGradingView();
|
|
290
|
+
break;
|
|
291
|
+
case 'Grading view':
|
|
292
|
+
cy.visit(`/item-engine/demo/render-item/grading-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
if (view === 'Question preview') {
|
|
298
|
+
after(() => {
|
|
299
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
300
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
301
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
302
|
+
});
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
if (view === 'Grading view') {
|
|
306
|
+
it(`When the user selected with numeration radio button, then the numeration should be displayed in the answer input fields in the ${view}`, () => {
|
|
307
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldEnumeration(['A', 'B']);
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (view === 'Item preview' || view === 'Question preview') {
|
|
312
|
+
it(`When the user selected with numeration radio button, then the numeration should be displayed in the answer input fields as well as correct answer options in the correct answer section in the ${view}`, () => {
|
|
313
|
+
fillInTheGapsOverImageTextPage.steps.verifyAnswerInputFieldEnumeration(['A', 'B']);
|
|
314
|
+
fillInTheGapsOverImageTextPage.steps.verifyCorrectAnswerResponsesEnumeration(['A', 'B']);
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
});
|
|
251
319
|
});
|
|
@@ -72,6 +72,12 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
72
72
|
|
|
73
73
|
fillInTheGapsOverImageTextPage.tests.verifyInsertTextTooltip();
|
|
74
74
|
|
|
75
|
+
it('When user insert text container, then it should be displayed', () => {
|
|
76
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(50);
|
|
77
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
78
|
+
fillInTheGapsOverImageTextPage.steps.undoAction();
|
|
79
|
+
});
|
|
80
|
+
|
|
75
81
|
fillInTheGapsOverImageTextPage.tests.verifyUndoRedoClearAllButtons();
|
|
76
82
|
});
|
|
77
83
|
|
|
@@ -217,7 +223,7 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
217
223
|
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
218
224
|
});
|
|
219
225
|
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsOverImageTextPage.responseArea(), 0), {
|
|
220
|
-
'border': `1px
|
|
226
|
+
'border': `1px solid ${css.color.activeComponentBorder}`
|
|
221
227
|
});
|
|
222
228
|
});
|
|
223
229
|
|
|
@@ -410,4 +416,16 @@ describe('Create item page - Fill in the gaps: Question instructions, Options se
|
|
|
410
416
|
|
|
411
417
|
fillInTheGapsOverImageTextPage.tests.verifyImageNotExistPreviewTab();
|
|
412
418
|
});
|
|
419
|
+
|
|
420
|
+
describe('Print layout settings accordion', () => {
|
|
421
|
+
abortEarlySetup();
|
|
422
|
+
before(() => {
|
|
423
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
424
|
+
cy.barsPreLoaderWait();
|
|
425
|
+
});
|
|
426
|
+
|
|
427
|
+
fillInTheGapsOverImageTextPage.tests.verifyPrintLayoutSettingsAccordionProperties();
|
|
428
|
+
|
|
429
|
+
fillInTheGapsOverImageTextPage.tests.verifyPrintLayoutSettingsAccordionContents();
|
|
430
|
+
});
|
|
413
431
|
});
|
package/cypress/e2e/ILC/FillInTheGapsOverImageTextNew/responseAnswersAndAcceptedStudentInput.js
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
5
8
|
|
|
6
9
|
describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
7
10
|
before(() => {
|
|
@@ -67,4 +70,56 @@ describe('Create Item page - Fill in the gaps over image - text: ', () => {
|
|
|
67
70
|
fillInTheGapsOverImageTextPage.steps.verifyTextInAnswerInputFieldsPreviewTab([{ responseIndex: 1, responseText: 'Flower232&*' }]);
|
|
68
71
|
});
|
|
69
72
|
});
|
|
73
|
+
|
|
74
|
+
views.forEach((view) => {
|
|
75
|
+
describe(`${view}: Accepted student input`, () => {
|
|
76
|
+
abortEarlySetup();
|
|
77
|
+
before(() => {
|
|
78
|
+
switch (view) {
|
|
79
|
+
case 'Question preview':
|
|
80
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
81
|
+
cy.barsPreLoaderWait();
|
|
82
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
83
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
84
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
85
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(50);
|
|
86
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(0, 'Number');
|
|
87
|
+
fillInTheGapsOverImageTextPage.steps.selectAcceptedStudentInputType(1, 'Integer');
|
|
88
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
89
|
+
break;
|
|
90
|
+
case 'Item preview':
|
|
91
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
92
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
93
|
+
break;
|
|
94
|
+
case 'Student view':
|
|
95
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
96
|
+
break;
|
|
97
|
+
};
|
|
98
|
+
});
|
|
99
|
+
beforeEach(() => {
|
|
100
|
+
switch (view) {
|
|
101
|
+
case 'Question preview':
|
|
102
|
+
break;
|
|
103
|
+
case 'Item preview':
|
|
104
|
+
break;
|
|
105
|
+
case 'Student view':
|
|
106
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
if (view === 'Question preview') {
|
|
111
|
+
after(() => {
|
|
112
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
113
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
114
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
115
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
it(`When the user try to insert text in the response field where the accepted student input type set to number , then it should show a warning message in ${view}`, () => {
|
|
120
|
+
fillInTheGapsOverImageTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
121
|
+
utilities.verifyInnerText(fillInTheGapsOverImageTextPage.limitReachedWarningMessageContainer(), 'Only number can be typed.');
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
});
|
|
70
125
|
});
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
|
+
import utilities from "../../../support/helpers/utilities";
|
|
3
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
4
8
|
|
|
5
9
|
describe('Create item page - Fill in the gaps over image with text: Set limit section', () => {
|
|
6
10
|
before(() => {
|
|
@@ -49,7 +53,7 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
|
49
53
|
|
|
50
54
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
51
55
|
// fillInTheGapsOverImageTextPage.tests.verifyMaximumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
52
|
-
|
|
56
|
+
|
|
53
57
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
54
58
|
// fillInTheGapsOverImageTextPage.tests.verifyMinimumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
55
59
|
});
|
|
@@ -79,11 +83,61 @@ describe('Create item page - Fill in the gaps over image with text: Set limit se
|
|
|
79
83
|
it('User should able to enter characters in the response field', () => {
|
|
80
84
|
fillInTheGapsOverImageTextPage.steps.addTextInAnswerInputFieldsPreviewTab(0, 'Flower');
|
|
81
85
|
});
|
|
82
|
-
|
|
86
|
+
|
|
83
87
|
//Uncomment below code oncee https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
84
88
|
// fillInTheGapsOverImageTextPage.tests.verifyMaximumCharacterLimitWarningConditionsPreviewTab();
|
|
85
89
|
|
|
86
90
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/566930 is resolved
|
|
87
91
|
// fillInTheGapsOverImageTextPage.tests.verifyMinimumCharacterLimitWarningConditionsPreviewTab();
|
|
88
92
|
});
|
|
93
|
+
|
|
94
|
+
views.forEach((view) => {
|
|
95
|
+
describe(`${view}: Student view settings`, () => {
|
|
96
|
+
abortEarlySetup();
|
|
97
|
+
before(() => {
|
|
98
|
+
switch (view) {
|
|
99
|
+
case 'Question preview':
|
|
100
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
101
|
+
cy.barsPreLoaderWait();
|
|
102
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
103
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
104
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
105
|
+
fillInTheGapsOverImageTextPage.steps.setMaximumLimit(30)
|
|
106
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
107
|
+
break;
|
|
108
|
+
case 'Item preview':
|
|
109
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
110
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
111
|
+
break;
|
|
112
|
+
case 'Student view':
|
|
113
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
114
|
+
break;
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
beforeEach(() => {
|
|
119
|
+
switch (view) {
|
|
120
|
+
case 'Question preview':
|
|
121
|
+
break;
|
|
122
|
+
case 'Item preview':
|
|
123
|
+
break;
|
|
124
|
+
case 'Student view':
|
|
125
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
if (view === 'Question preview') {
|
|
130
|
+
after(() => {
|
|
131
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
132
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
133
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
134
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
it(`When the user sets the maximum character limit for the response field, it should be reflected in the ${view}`, () => {
|
|
139
|
+
fillInTheGapsOverImageTextPage.steps.verifyMaximumCharacterLimitInPreviewTab(0, 30);
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
});
|
|
89
143
|
});
|
|
@@ -82,21 +82,21 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
82
82
|
|
|
83
83
|
it('CSS of special characters section', { tags: 'css' }, () => {
|
|
84
84
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersLabel(), {
|
|
85
|
-
'color': css.color.
|
|
85
|
+
'color': css.color.codeBlockText,
|
|
86
86
|
'font-size': css.fontSize.default,
|
|
87
87
|
'font-weight': css.fontWeight.semibold
|
|
88
88
|
});
|
|
89
89
|
//checked state of enable special characters checkbox
|
|
90
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
90
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.enableSpecialCharactersCheckboxWrapper().find('svg g g').eq(0), {
|
|
91
91
|
'fill': css.color.activeButtons
|
|
92
92
|
});
|
|
93
93
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.groupByLanguageLabel(), {
|
|
94
|
-
'color': css.color.
|
|
94
|
+
'color': css.color.labelText,
|
|
95
95
|
'font-size': css.fontSize.normal,
|
|
96
96
|
'font-weight': css.fontWeight.regular
|
|
97
97
|
});
|
|
98
98
|
//selected state of radio button
|
|
99
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
99
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.showOnlyCustomSpecialCharactersRadioButtonWrapper().find('svg'), {
|
|
100
100
|
'fill': css.color.activeButtons
|
|
101
101
|
});
|
|
102
102
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersLabel(), {
|
|
@@ -109,7 +109,7 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
109
109
|
'font-size': css.fontSize.default,
|
|
110
110
|
'font-weight': css.fontWeight.regular
|
|
111
111
|
});
|
|
112
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.
|
|
112
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customSpecialCharactersInputFieldWrapper().find('fieldset'), {
|
|
113
113
|
'border': `1px solid ${css.color.figDefaultComponentBorder}`
|
|
114
114
|
});
|
|
115
115
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.customizeSpecialCharactersPreviewButton(), {
|
|
@@ -150,13 +150,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
150
150
|
});
|
|
151
151
|
//Category tiles in de-selected state
|
|
152
152
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileIcon().eq(0).find('svg'), {
|
|
153
|
-
'fill': css.color.
|
|
154
|
-
});
|
|
155
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).parent(), {
|
|
156
|
-
'fill': css.color.secondaryBtn
|
|
153
|
+
'fill': css.color.optionColor
|
|
157
154
|
});
|
|
158
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).
|
|
159
|
-
'fill': css.color.
|
|
155
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileSectionCategoriesDragIcon().eq(0).find('svg'), {
|
|
156
|
+
'fill': css.color.optionColor
|
|
160
157
|
});
|
|
161
158
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharacterTileCategoryName().eq(0), {
|
|
162
159
|
'color': css.color.secondaryBtn,
|
|
@@ -172,18 +169,18 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
172
169
|
utilities.verifyCSS(dialogBoxBase.dialogBoxTitle(), {
|
|
173
170
|
'color': css.color.flyoutTitle,
|
|
174
171
|
'font-size': css.fontSize.heading,
|
|
175
|
-
'font-weight': css.fontWeight.
|
|
172
|
+
'font-weight': css.fontWeight.semibold
|
|
176
173
|
});
|
|
177
174
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryLabel().eq(0), {
|
|
178
175
|
'color': css.color.accordionLabel,
|
|
179
|
-
'font-size': css.fontSize.
|
|
180
|
-
'font-weight': css.fontWeight.
|
|
176
|
+
'font-size': css.fontSize.default,
|
|
177
|
+
'font-weight': css.fontWeight.bold
|
|
181
178
|
});
|
|
182
179
|
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupCategoryAccordionExpandIcon().last().find('svg'), {
|
|
183
180
|
'fill': css.color.activeButtons
|
|
184
181
|
});
|
|
185
|
-
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg'), {
|
|
186
|
-
'fill': css.color.
|
|
182
|
+
utilities.verifyCSS(fillInTheGapsOverImageTextPage.specialCharactersPreviewPopupSymbol().eq(0).find('svg path'), {
|
|
183
|
+
'fill': css.color.activeButtons
|
|
187
184
|
});
|
|
188
185
|
});
|
|
189
186
|
|
|
@@ -191,10 +188,10 @@ describe('Create item page - Fill in the gaps over image - text - Special charac
|
|
|
191
188
|
cy.checkAccessibility(dialogBoxBase.dialogBox());
|
|
192
189
|
cy.log('Closing preview popup');
|
|
193
190
|
dialogBoxBase.steps.closeWarningPopup();
|
|
194
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel()
|
|
191
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.specialCharactersLabel());
|
|
195
192
|
cy.log('Selecting show only custom special characters radio button');
|
|
196
193
|
fillInTheGapsOverImageTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
|
197
|
-
cy.checkAccessibility(fillInTheGapsOverImageTextPage.
|
|
194
|
+
cy.checkAccessibility(fillInTheGapsOverImageTextPage.customSpecialCharactersInputFieldWrapper());
|
|
198
195
|
});
|
|
199
196
|
});
|
|
200
197
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { fillInTheGapsOverImageTextPage } from "../../../pages";
|
|
1
|
+
import { fillInTheGapsOverImageTextPage, itemPreviewPage, studentViewPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
+
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
+
let itemReferenceID = "";
|
|
5
8
|
|
|
6
9
|
describe('Create Item page - drag and drop into categories: Student view settings', () => {
|
|
7
10
|
before(() => {
|
|
@@ -34,6 +37,56 @@ describe('Create Item page - drag and drop into categories: Student view setting
|
|
|
34
37
|
fillInTheGapsOverImageTextPage.tests.verifySpellCheckFunctionalityPreviewTab();
|
|
35
38
|
});
|
|
36
39
|
|
|
40
|
+
views.forEach((view) => {
|
|
41
|
+
describe(`${view}: Student view settings`, () => {
|
|
42
|
+
abortEarlySetup();
|
|
43
|
+
before(() => {
|
|
44
|
+
switch (view) {
|
|
45
|
+
case 'Question preview':
|
|
46
|
+
fillInTheGapsOverImageTextPage.steps.navigateToCreateQuestion('fill in the gaps over image with text');
|
|
47
|
+
cy.barsPreLoaderWait();
|
|
48
|
+
fillInTheGapsOverImageTextPage.steps.uploadFile('highlightImage.jpg');
|
|
49
|
+
fillInTheGapsOverImageTextPage.steps.verifyImageIsUploaded();
|
|
50
|
+
fillInTheGapsOverImageTextPage.steps.insertResponseArea(80);
|
|
51
|
+
fillInTheGapsOverImageTextPage.steps.checkSpellCheckCheckbox();
|
|
52
|
+
fillInTheGapsOverImageTextPage.steps.switchToPreviewTab();
|
|
53
|
+
break;
|
|
54
|
+
case 'Item preview':
|
|
55
|
+
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
56
|
+
itemPreviewPage.steps.switchToPreviewTab();
|
|
57
|
+
break;
|
|
58
|
+
case 'Student view':
|
|
59
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
60
|
+
break;
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
beforeEach(() => {
|
|
65
|
+
switch (view) {
|
|
66
|
+
case 'Question preview':
|
|
67
|
+
break;
|
|
68
|
+
case 'Item preview':
|
|
69
|
+
break;
|
|
70
|
+
case 'Student view':
|
|
71
|
+
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
if (view === 'Question preview') {
|
|
76
|
+
after(() => {
|
|
77
|
+
fillInTheGapsOverImageTextPage.steps.clickOnSaveQuestionButton();
|
|
78
|
+
fillInTheGapsOverImageTextPage.steps.clickOnConfirmButton();
|
|
79
|
+
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
80
|
+
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
it('When the \'Spell check\' functionality is enabled, the response field should have \'spellcheck\' attribute set as \'true\' in the preview tab', () => {
|
|
85
|
+
fillInTheGapsOverImageTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabEnabled(0);
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
37
90
|
/*describe('Allow students to check answer: Edit tab', () => {
|
|
38
91
|
abortEarlySetup();
|
|
39
92
|
before(() => {
|
|
@@ -399,6 +399,18 @@ describe('Create Item page - Fill in the gaps over image with text: Style and la
|
|
|
399
399
|
fillInTheGapsOverImageTextPage.steps.verifyResponseAreaDimensions(30, 118);
|
|
400
400
|
});
|
|
401
401
|
|
|
402
|
+
it('User should only be able to enter numeric values in the \'Height (px)\' and \'Width (px)\' input fields', () => {
|
|
403
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('1*2');
|
|
404
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('2%1');
|
|
405
|
+
fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('12', '21');
|
|
406
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('apple');
|
|
407
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('news');
|
|
408
|
+
fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('', '');
|
|
409
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight('54!@');
|
|
410
|
+
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth('@12');
|
|
411
|
+
fillInTheGapsOverImageTextPage.steps.verifyValueInTextContainerWidthAndHeightInputField('54', '12');
|
|
412
|
+
});
|
|
413
|
+
|
|
402
414
|
it('When the user specifies the height and width, the dimensions of the text containers should update accordingly', () => {
|
|
403
415
|
fillInTheGapsOverImageTextPage.steps.setTextContainerHeight(100);
|
|
404
416
|
fillInTheGapsOverImageTextPage.steps.setTextContainerWidth(200);
|