itemengine-cypress-automation 1.0.559-task-IEI-6999-c84dd46.0 → 1.0.559
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/FillInTheGapsTextNew/additionalSettingsBasic.js +0 -27
- package/cypress/e2e/ILC/FillInTheGapsTextNew/additionalSettingsForAnswerInputFields.js +0 -8
- package/cypress/e2e/ILC/FillInTheGapsTextNew/setLimitSection.js +2 -58
- package/cypress/e2e/ILC/FillInTheGapsTextNew/specialCharactersSection.js +1 -115
- package/cypress/e2e/ILC/FillInTheGapsTextNew/studentViewSettings.js +6 -86
- package/cypress/e2e/ILC/FillInTheGapsTextNew/styleAndLayoutCustomization.js +3 -58
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +1 -49
- package/cypress/pages/fillInTheGapsTextPage.js +2 -2
- package/package.json +1 -1
- package/scripts/sorry-cypress.mjs +7 -1
|
@@ -36,7 +36,6 @@ describe('Fill In the gaps with text - Additional settings', () => {
|
|
|
36
36
|
cy.barsPreLoaderWait();
|
|
37
37
|
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
38
38
|
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
|
39
|
-
fillInTheGapsTextPage.steps.allotPoints(5);
|
|
40
39
|
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
|
41
40
|
});
|
|
42
41
|
|
|
@@ -66,33 +65,7 @@ describe('Fill In the gaps with text - Additional settings', () => {
|
|
|
66
65
|
'font-size': fontSizes[option]
|
|
67
66
|
});
|
|
68
67
|
fillInTheGapsTextPage.steps.switchToStudentView();
|
|
69
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
70
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
71
|
-
// fillInTheGapsTextPage.steps.switchToGradingView();
|
|
72
|
-
// fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
73
|
-
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsPreviewTab([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
74
|
-
utilities.verifyCSS(fillInTheGapsTextPage.questionInstructionsText(), {
|
|
75
|
-
'font-size': fontSizes[option]
|
|
76
|
-
});
|
|
77
|
-
utilities.verifyCSS(fillInTheGapsTextPage.answerInputFieldPreviewTab(), {
|
|
78
|
-
'font-size': fontSizes[option]
|
|
79
|
-
});
|
|
80
|
-
fillInTheGapsTextPage.steps.switchToGradingView();
|
|
81
|
-
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswersLabel(), {
|
|
82
|
-
'font-size': fontSizes[option]
|
|
83
|
-
});
|
|
84
|
-
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerResponseNumeration().find('.response-input-adornment'), {
|
|
85
|
-
'font-size': fontSizes[option]
|
|
86
|
-
});
|
|
87
|
-
utilities.verifyCSS(fillInTheGapsTextPage.correctAnswerResponse(), {
|
|
88
|
-
'font-size': fontSizes[option]
|
|
89
|
-
});
|
|
90
|
-
utilities.verifyCSS(fillInTheGapsTextPage.correctIncorrectStatusMessageText(), {
|
|
91
|
-
'font-size': fontSizes[option]
|
|
92
|
-
});
|
|
93
68
|
fillInTheGapsTextPage.steps.switchToEditTab();
|
|
94
|
-
fillInTheGapsTextPage.steps.clickOnEditQuestionButton();
|
|
95
|
-
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
|
96
69
|
});
|
|
97
70
|
});
|
|
98
71
|
});
|
|
@@ -90,7 +90,6 @@ describe('Fill In the gaps with text - Additional settings : Placeholder text, G
|
|
|
90
90
|
cy.barsPreLoaderWait();
|
|
91
91
|
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }, { responseIndex: 1, responseText: 'Leaf' }]);
|
|
92
92
|
//fillInTheGapsTextPage.steps.checkAllowStudentToCheckAnswerCheckbox();
|
|
93
|
-
fillInTheGapsTextPage.steps.allotPoints(5);
|
|
94
93
|
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
|
95
94
|
});
|
|
96
95
|
|
|
@@ -107,18 +106,11 @@ describe('Fill In the gaps with text - Additional settings : Placeholder text, G
|
|
|
107
106
|
});*/
|
|
108
107
|
|
|
109
108
|
it(`When the user switches to the "Grading view", then the "${option}" numeration should be displayed in the answer input fields as well as correct answer options in the correct answer section`, () => {
|
|
110
|
-
fillInTheGapsTextPage.steps.switchToGradingView();
|
|
111
|
-
fillInTheGapsTextPage.steps.verifyAnswerInputFieldEnumeration(enumerationOptions[option]);
|
|
112
|
-
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesEnumeration(enumerationOptions[option]);
|
|
113
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
114
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
115
109
|
fillInTheGapsTextPage.steps.switchToGradingView();
|
|
116
110
|
fillInTheGapsTextPage.steps.verifyAnswerInputFieldEnumeration(enumerationOptions[option]);
|
|
117
111
|
fillInTheGapsTextPage.steps.verifyCorrectAnswerResponsesEnumeration(enumerationOptions[option]);
|
|
118
112
|
cy.log('Post step: Switch to Edit tab')
|
|
119
113
|
fillInTheGapsTextPage.steps.switchToEditTab();
|
|
120
|
-
fillInTheGapsTextPage.steps.clickOnEditQuestionButton();
|
|
121
|
-
fillInTheGapsTextPage.steps.expandAdditionalSettings();
|
|
122
114
|
});
|
|
123
115
|
});
|
|
124
116
|
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import { fillInTheGapsTextPage
|
|
1
|
+
import { fillInTheGapsTextPage } from "../../../pages";
|
|
2
2
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
3
|
-
import utilities from "../../../support/helpers/utilities";
|
|
4
3
|
const css = Cypress.env('css');
|
|
5
|
-
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
|
-
const views = utilities.getViews(correctAnswerViews);
|
|
7
|
-
var itemReferenceID = "";
|
|
8
4
|
|
|
9
5
|
describe('Create item page - Fill in the gaps with text: Set limit section', () => {
|
|
10
6
|
before(() => {
|
|
@@ -45,7 +41,7 @@ describe('Create item page - Fill in the gaps with text: Set limit section', ()
|
|
|
45
41
|
it('User should able to enter characters in the answer input field', () => {
|
|
46
42
|
fillInTheGapsTextPage.steps.enterTextInAnswerInputFieldsSpecifyCorrectAnswerSection([{ responseIndex: 0, responseText: 'Flower' }]);
|
|
47
43
|
});
|
|
48
|
-
|
|
44
|
+
|
|
49
45
|
//Uncomment below code once https://redmine.zeuslearning.com/issues/571588 is resolved
|
|
50
46
|
// fillInTheGapsTextPage.tests.verifyMaximumCharacterLimitWarningConditionsSpecifyCorrectAnswerSection();
|
|
51
47
|
|
|
@@ -80,56 +76,4 @@ describe('Create item page - Fill in the gaps with text: Set limit section', ()
|
|
|
80
76
|
|
|
81
77
|
// fillInTheGapsTextPage.tests.verifyMinimumCharacterLimitWarningConditionsPreviewTab();
|
|
82
78
|
});
|
|
83
|
-
|
|
84
|
-
views.forEach((view) => {
|
|
85
|
-
describe(`${view}: Maximum character limit functionality`, () => {
|
|
86
|
-
abortEarlySetup();
|
|
87
|
-
before(() => {
|
|
88
|
-
switch (view) {
|
|
89
|
-
case 'Question preview':
|
|
90
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
|
91
|
-
cy.barsPreLoaderWait();
|
|
92
|
-
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
93
|
-
fillInTheGapsTextPage.steps.setMaximumLimit(15);
|
|
94
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
95
|
-
break;
|
|
96
|
-
case 'Item preview':
|
|
97
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
98
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
99
|
-
break;
|
|
100
|
-
case 'Grading view':
|
|
101
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
102
|
-
break;
|
|
103
|
-
};
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
beforeEach(() => {
|
|
107
|
-
switch (view) {
|
|
108
|
-
case 'Question preview':
|
|
109
|
-
break;
|
|
110
|
-
case 'Item preview':
|
|
111
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
112
|
-
itemPreviewPage.steps.resetQuestionPreview();
|
|
113
|
-
break;
|
|
114
|
-
case 'Student view':
|
|
115
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
if (view === 'Question preview') {
|
|
121
|
-
after(() => {
|
|
122
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
123
|
-
fillInTheGapsTextPage.steps.clickOnConfirmButton();
|
|
124
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
125
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
|
|
129
|
-
it('When the user reaches the character limit, then the warning message \'Maximum 15 characters have been entered\' should be displayed', () => {
|
|
130
|
-
fillInTheGapsTextPage.steps.addTextInAnswerInputFieldsAllView(0, 'NewFlowerpotsingarden');
|
|
131
|
-
fillInTheGapsTextPage.steps.verifyLimitReachedWarningMessageExist('Maximum 15 characters have been entered.');
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
79
|
});
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import { specialCharacters } from "../../../fixtures/drawingToolbarOptionsAdditionalOptionsAndSpecialAndMathCharacters";
|
|
2
|
-
import { dialogBoxBase, fillInTheGapsTextPage
|
|
2
|
+
import { dialogBoxBase, fillInTheGapsTextPage } from "../../../pages";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
6
|
|
|
7
7
|
const specialCharactersCategories = Object.values(specialCharacters.map((icon) => icon.categoryName));
|
|
8
8
|
const customSpecialCharacters = ['A', '1', '#'];
|
|
9
|
-
const specialCharactersLanguageLabel = ['French', 'Portuguese', 'Italian'];
|
|
10
|
-
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
11
|
-
const views = utilities.getViews(correctAnswerViews);
|
|
12
|
-
var itemReferenceID = "";
|
|
13
9
|
|
|
14
10
|
describe('Create item page - Fill in the gaps with text - Special characters section', () => {
|
|
15
11
|
before(() => {
|
|
@@ -239,114 +235,4 @@ describe('Create item page - Fill in the gaps with text - Special characters sec
|
|
|
239
235
|
});
|
|
240
236
|
});
|
|
241
237
|
});
|
|
242
|
-
|
|
243
|
-
views.forEach((view) => {
|
|
244
|
-
describe(`${view}: Special characters section `, () => {
|
|
245
|
-
abortEarlySetup();
|
|
246
|
-
before(() => {
|
|
247
|
-
switch (view) {
|
|
248
|
-
case 'Question preview':
|
|
249
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
|
250
|
-
cy.barsPreLoaderWait();
|
|
251
|
-
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
252
|
-
fillInTheGapsTextPage.steps.checkEnableSpecialCharactersCheckbox();
|
|
253
|
-
fillInTheGapsTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[0].categoryName);
|
|
254
|
-
fillInTheGapsTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[2].categoryName);
|
|
255
|
-
fillInTheGapsTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[4].categoryName);
|
|
256
|
-
fillInTheGapsTextPage.steps.clickOnSpecialCharactersCategoryTile(specialCharacters[6].categoryName);
|
|
257
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
258
|
-
break;
|
|
259
|
-
case 'Item preview':
|
|
260
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
261
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
262
|
-
break;
|
|
263
|
-
case 'Grading view':
|
|
264
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
265
|
-
break;
|
|
266
|
-
};
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
beforeEach(() => {
|
|
270
|
-
switch (view) {
|
|
271
|
-
case 'Question preview':
|
|
272
|
-
break;
|
|
273
|
-
case 'Item preview':
|
|
274
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
275
|
-
break;
|
|
276
|
-
case 'Student view':
|
|
277
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
|
|
282
|
-
if (view === 'Question preview') {
|
|
283
|
-
after(() => {
|
|
284
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
285
|
-
fillInTheGapsTextPage.steps.clickOnConfirmButton();
|
|
286
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
287
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
288
|
-
});
|
|
289
|
-
};
|
|
290
|
-
|
|
291
|
-
it(`should display the ${specialCharactersLanguageLabel} special characters language labels in the popup`, () => {
|
|
292
|
-
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
|
293
|
-
fillInTheGapsTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
|
294
|
-
fillInTheGapsTextPage.steps.verifySpecialCharactersLanguageLabelsInSpecialCharactersPopupPreviewTab(specialCharactersLanguageLabel);
|
|
295
|
-
});
|
|
296
|
-
});
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
views.forEach((view) => {
|
|
300
|
-
describe(`${view}: Custom special characters section`, () => {
|
|
301
|
-
abortEarlySetup();
|
|
302
|
-
before(() => {
|
|
303
|
-
switch (view) {
|
|
304
|
-
case 'Question preview':
|
|
305
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
|
306
|
-
cy.barsPreLoaderWait();
|
|
307
|
-
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
308
|
-
fillInTheGapsTextPage.steps.checkEnableSpecialCharactersCheckbox();
|
|
309
|
-
fillInTheGapsTextPage.steps.selectShowOnlyCustomSpecialCharactersRadioButton();
|
|
310
|
-
fillInTheGapsTextPage.steps.addInputToCustomSpecialCharactersInputField(`${customSpecialCharacters.join('')}`);
|
|
311
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
312
|
-
break;
|
|
313
|
-
case 'Item preview':
|
|
314
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
315
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
316
|
-
break;
|
|
317
|
-
case 'Grading view':
|
|
318
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
319
|
-
break;
|
|
320
|
-
};
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
beforeEach(() => {
|
|
324
|
-
switch (view) {
|
|
325
|
-
case 'Question preview':
|
|
326
|
-
break;
|
|
327
|
-
case 'Item preview':
|
|
328
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
329
|
-
break;
|
|
330
|
-
case 'Student view':
|
|
331
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
332
|
-
break;
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
|
|
336
|
-
if (view === 'Question preview') {
|
|
337
|
-
after(() => {
|
|
338
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
339
|
-
fillInTheGapsTextPage.steps.clickOnConfirmButton();
|
|
340
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
341
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
342
|
-
});
|
|
343
|
-
};
|
|
344
|
-
|
|
345
|
-
it(`should display the ${customSpecialCharacters} custom special characters in the popup`, () => {
|
|
346
|
-
fillInTheGapsTextPage.steps.focusInResponseInputFieldPreviewTab(0);
|
|
347
|
-
fillInTheGapsTextPage.steps.openSpecialCharactersPopupPreviewTab();
|
|
348
|
-
fillInTheGapsTextPage.steps.verifyCustomSpecialCharactersInSpecialCharactersPopupPreviewTab(customSpecialCharacters);
|
|
349
|
-
});
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
238
|
});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { fillInTheGapsTextPage, gradingViewPage, itemPreviewPage, studentViewPage
|
|
1
|
+
import { fillInTheGapsTextPage, gradingViewPage, 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'
|
|
5
|
+
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
6
6
|
const views = utilities.getViews(correctAnswerViews);
|
|
7
7
|
var itemReferenceID = "";
|
|
8
8
|
|
|
@@ -59,7 +59,7 @@ describe('Create Item page - Fill in the gaps with text: Student view settings',
|
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
views.forEach((view) => {
|
|
62
|
-
describe(`${view}: student view settings
|
|
62
|
+
describe(`${view}: student view settings`, () => {
|
|
63
63
|
abortEarlySetup();
|
|
64
64
|
before(() => {
|
|
65
65
|
switch (view) {
|
|
@@ -101,93 +101,13 @@ describe('Create Item page - Fill in the gaps with text: Student view settings',
|
|
|
101
101
|
});
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
-
it(`
|
|
104
|
+
it(` 'Auto-resize response field' functionality in ${view}`, () => {
|
|
105
105
|
if (view === 'Student view') {
|
|
106
|
-
fillInTheGapsTextPage.
|
|
107
|
-
fillInTheGapsTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled(0);
|
|
108
|
-
studentViewPage.steps.submitResponse();
|
|
109
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
110
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
if (view === 'Grading view') {
|
|
114
|
-
fillInTheGapsTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled(0);
|
|
115
|
-
fillInTheGapsTextPage.steps.verifyAutoResizeOfResponseFieldPreviewTabDisabled(0);
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
if (view === 'Question preview' || view === 'Item preview') {
|
|
119
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
120
|
-
fillInTheGapsTextPage.steps.verifyAutoResizeOfResponseFieldPreviewTabDisabled(0);
|
|
121
|
-
fillInTheGapsTextPage.steps.verifySpellCheckOfResponseFieldPreviewTabDisabled(0);
|
|
122
|
-
};
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
views.forEach((view) => {
|
|
129
|
-
describe(`${view}: student view settings: Spell check and auto-resize checked`, () => {
|
|
130
|
-
abortEarlySetup();
|
|
131
|
-
before(() => {
|
|
132
|
-
switch (view) {
|
|
133
|
-
case 'Question preview':
|
|
134
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
|
135
|
-
cy.barsPreLoaderWait();
|
|
136
|
-
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('fill in the gaps');
|
|
137
|
-
fillInTheGapsTextPage.steps.addResponseAreaInQuestionField();
|
|
138
|
-
fillInTheGapsTextPage.steps.checkSpellCheckCheckbox();
|
|
139
|
-
fillInTheGapsTextPage.steps.checkAutoResizeCheckbox();
|
|
140
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
141
|
-
break;
|
|
142
|
-
case 'Item preview':
|
|
143
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
144
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
145
|
-
break;
|
|
146
|
-
case 'Student view':
|
|
147
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
148
|
-
break;
|
|
149
|
-
};
|
|
150
|
-
});
|
|
151
|
-
|
|
152
|
-
beforeEach(() => {
|
|
153
|
-
switch (view) {
|
|
154
|
-
case 'Question preview':
|
|
155
|
-
break;
|
|
156
|
-
case 'Item preview':
|
|
157
|
-
break;
|
|
158
|
-
case 'Student view':
|
|
159
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
160
|
-
break;
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
if (view === 'Question preview') {
|
|
165
|
-
after(() => {
|
|
166
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
167
|
-
fillInTheGapsTextPage.steps.clickOnConfirmButton();
|
|
168
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
169
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
170
|
-
});
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
it(`When the \'Spell check\' and \'Auto-resize response field\' functionality is enabled, the response field should have \'resizetype\' attribute set as \'vertical\' and \'spellcheck\' attribute set as \'true\' in the ${view}`, () => {
|
|
174
|
-
if (view === 'Student view') {
|
|
175
|
-
fillInTheGapsTextPage.steps.verifySpellCheckOfResponseFieldAllViewEnabled(0);
|
|
176
|
-
fillInTheGapsTextPage.steps.verifyAutoResizeOfResponseFieldPreviewTabEnabled(0);
|
|
177
|
-
studentViewPage.steps.submitResponse();
|
|
178
|
-
utilities.verifyElementVisibilityState(dialogBoxBase.dialogBox(), 'visible');
|
|
179
|
-
studentViewPage.steps.clickOnGoToGradingViewButton();
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
if (view === 'Grading view') {
|
|
183
|
-
fillInTheGapsTextPage.steps.verifySpellCheckOfResponseFieldAllViewEnabled(0);
|
|
184
|
-
fillInTheGapsTextPage.steps.verifyAutoResizeOfResponseFieldPreviewTabEnabled(0);
|
|
106
|
+
fillInTheGapsTextPage.tests.verifyAutoResizeResponseFieldFunctionalityPreviewTab();
|
|
185
107
|
};
|
|
186
108
|
|
|
187
109
|
if (view === 'Question preview' || view === 'Item preview') {
|
|
188
|
-
fillInTheGapsTextPage.
|
|
189
|
-
fillInTheGapsTextPage.steps.verifySpellCheckOfResponseFieldAllViewEnabled(0);
|
|
190
|
-
fillInTheGapsTextPage.steps.verifyAutoResizeOfResponseFieldPreviewTabEnabled(0);
|
|
110
|
+
fillInTheGapsTextPage.tests.verifyAutoResizeResponseFieldFunctionalityPreviewTab();
|
|
191
111
|
};
|
|
192
112
|
});
|
|
193
113
|
});
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
import { dialogBoxBase, fillInTheGapsTextPage
|
|
1
|
+
import { dialogBoxBase, fillInTheGapsTextPage } from "../../../pages";
|
|
2
2
|
import { colorPopupComponent } from "../../../pages/components";
|
|
3
3
|
import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
4
4
|
import utilities from "../../../support/helpers/utilities";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
-
const borderStyles = ["Dashed", "Dotted", "Solid", "None"]
|
|
7
|
-
let correctAnswerViews = ['Question preview', 'Item preview', 'Student view'];
|
|
8
|
-
const views = utilities.getViews(correctAnswerViews);
|
|
9
|
-
var itemReferenceID = "";
|
|
10
|
-
|
|
6
|
+
const borderStyles = ["Dashed", "Dotted", "Solid", "None"]
|
|
11
7
|
describe('Create Item page - Fill in the gaps with text: Style and layout customization', () => {
|
|
12
8
|
before(() => {
|
|
13
9
|
cy.loginAs('admin');
|
|
@@ -44,7 +40,7 @@ describe('Create Item page - Fill in the gaps with text: Style and layout custom
|
|
|
44
40
|
fillInTheGapsTextPage.tests.verifyFillColorTooltips();
|
|
45
41
|
|
|
46
42
|
fillInTheGapsTextPage.tests.verifyBorderColorTooltips();
|
|
47
|
-
|
|
43
|
+
|
|
48
44
|
fillInTheGapsTextPage.tests.verifyStyleAndLayoutCustomizationAccordionContentsCSSAndA11y('Solid');
|
|
49
45
|
});
|
|
50
46
|
|
|
@@ -337,55 +333,4 @@ describe('Create Item page - Fill in the gaps with text: Style and layout custom
|
|
|
337
333
|
});
|
|
338
334
|
})
|
|
339
335
|
});
|
|
340
|
-
|
|
341
|
-
views.forEach((view) => {
|
|
342
|
-
describe(`${view}: Default border style and default border color`, () => {
|
|
343
|
-
abortEarlySetup();
|
|
344
|
-
before(() => {
|
|
345
|
-
switch (view) {
|
|
346
|
-
case 'Question preview':
|
|
347
|
-
fillInTheGapsTextPage.steps.navigateToCreateQuestion('fill in the gaps with text');
|
|
348
|
-
cy.barsPreLoaderWait();
|
|
349
|
-
fillInTheGapsTextPage.steps.addTextInQuestionInstructionsInputField('Fill in the gaps');
|
|
350
|
-
fillInTheGapsTextPage.steps.expandStyleAndLayoutCustomizationAccordion();
|
|
351
|
-
fillInTheGapsTextPage.steps.allotPoints(5);
|
|
352
|
-
fillInTheGapsTextPage.steps.switchToPreviewTab();
|
|
353
|
-
break;
|
|
354
|
-
case 'Item preview':
|
|
355
|
-
cy.visit(`/item-engine/demo/edit-item/${utilities.base64Encoding(itemReferenceID)}`);
|
|
356
|
-
itemPreviewPage.steps.switchToPreviewTab();
|
|
357
|
-
break;
|
|
358
|
-
case 'Grading view':
|
|
359
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
360
|
-
break;
|
|
361
|
-
};
|
|
362
|
-
});
|
|
363
|
-
|
|
364
|
-
beforeEach(() => {
|
|
365
|
-
switch (view) {
|
|
366
|
-
case 'Question preview':
|
|
367
|
-
break;
|
|
368
|
-
case 'Item preview':
|
|
369
|
-
fillInTheGapsTextPage.steps.verifyQuestionPreviewStateWhenSwitchingBackToStudentView();
|
|
370
|
-
break;
|
|
371
|
-
case 'Student view':
|
|
372
|
-
cy.visit(`/item-engine/demo/render-item/student-view/${utilities.base64Encoding(itemReferenceID)}`);
|
|
373
|
-
break;
|
|
374
|
-
}
|
|
375
|
-
});
|
|
376
|
-
|
|
377
|
-
if (view === 'Question preview') {
|
|
378
|
-
after(() => {
|
|
379
|
-
fillInTheGapsTextPage.steps.clickOnSaveQuestionButton();
|
|
380
|
-
utilities.verifyElementVisibilityState(itemPreviewPage.referenceID(), 'visible');
|
|
381
|
-
itemReferenceID = itemPreviewPage.steps.getItemReferenceID();
|
|
382
|
-
});
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
it(`when the user switches to ${view} default border style and color should be displayed`, () => {
|
|
386
|
-
fillInTheGapsTextPage.steps.verifyAnswerInputFieldBorderColor(0, `1px solid ${css.color.activeComponentBorder}`);
|
|
387
|
-
fillInTheGapsTextPage.steps.verifyAnswerInputFieldFillColor(0, css.color.optionsBg);
|
|
388
|
-
});
|
|
389
|
-
});
|
|
390
|
-
});
|
|
391
336
|
});
|
|
@@ -90,8 +90,6 @@ const selectors = {
|
|
|
90
90
|
spellCheckCheckbox: () => cy.get('[data-ngie-testid="spell-check-checkbox"] input[type="checkbox"]'),
|
|
91
91
|
correctAnswerResponseForCorrectResponse: () => cy.get('[class*="ClozeWithTextResponsestyles__AnswerWrapperForLabelImg"]').eq(0),
|
|
92
92
|
correctIncorrectAnswerLabelNew: () => cy.get('[class*="ClozeWithTextPreviewstyle__AnswerStatusWrapper"]'),
|
|
93
|
-
answerInputFieldAllView: () => cy.get('[class*="question-preview-wrapper"] [aria-label*="Add answer for response"]'),
|
|
94
|
-
customSpecialCharactersButtonPreviewTab: () => cy.get('.special-character-popup-container .MuiButton-text'),
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
const steps = {
|
|
@@ -696,16 +694,6 @@ const steps = {
|
|
|
696
694
|
.should('have.attr', 'spellcheck', 'true');
|
|
697
695
|
},
|
|
698
696
|
|
|
699
|
-
/**
|
|
700
|
-
* Verify that the spell check for a response field in the Preview Tab is enabled.
|
|
701
|
-
* @param {number} responseFieldIndex - The index of the response field to verify.
|
|
702
|
-
*/
|
|
703
|
-
verifySpellCheckOfResponseFieldAllViewEnabled: (responseFieldIndex) => {
|
|
704
|
-
fillInTheGapsTextCommonComponent.answerInputFieldAllView()
|
|
705
|
-
.eq(responseFieldIndex)
|
|
706
|
-
.should('have.attr', 'spellcheck', 'true');
|
|
707
|
-
},
|
|
708
|
-
|
|
709
697
|
/**
|
|
710
698
|
*@description Verify numeration text for the answer input fields of the specify correct answer section.
|
|
711
699
|
* @param responseAccordionIndex denotes response accordion index
|
|
@@ -918,38 +906,7 @@ const steps = {
|
|
|
918
906
|
utilities.verifyCSS(utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldPreviewTab().parent('.response-input-field'), responseAreaIndex), {
|
|
919
907
|
'border-style': styleName
|
|
920
908
|
});
|
|
921
|
-
}
|
|
922
|
-
|
|
923
|
-
/**
|
|
924
|
-
* @param {number} responseIndex index number of text container
|
|
925
|
-
* @param {string} responseText text to be added in text container
|
|
926
|
-
* @description function enters text in the answer input fields of the preview tab
|
|
927
|
-
*/
|
|
928
|
-
addTextInAnswerInputFieldsAllView: (responseIndex, responseText) => {
|
|
929
|
-
utilities.getNthElement(fillInTheGapsTextCommonComponent.answerInputFieldPreviewTab(), responseIndex)
|
|
930
|
-
.type(responseText)
|
|
931
|
-
},
|
|
932
|
-
|
|
933
|
-
/**
|
|
934
|
-
* @description Verify special characters language labels in the special characters popup
|
|
935
|
-
* @param {string[]} specialCharactersLanguageLabel Array of the language labels for the category
|
|
936
|
-
*/
|
|
937
|
-
verifySpecialCharactersLanguageLabelsInSpecialCharactersPopupPreviewTab: (specialCharactersLanguageLabel) => {
|
|
938
|
-
specialCharactersLanguageLabel.forEach((label, index) => {
|
|
939
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextCommonComponent.specialCharactersPopupCategoryAccordionLabelPreviewTab(), index), label);
|
|
940
|
-
});
|
|
941
|
-
},
|
|
942
|
-
|
|
943
|
-
/**
|
|
944
|
-
* @description Verify =custom special characters displayed in special characters popup in preview tab
|
|
945
|
-
* @param {string[]} customSpecialCharacters Array of the custom special characters
|
|
946
|
-
*/
|
|
947
|
-
verifyCustomSpecialCharactersInSpecialCharactersPopupPreviewTab: (customSpecialCharacters) => {
|
|
948
|
-
customSpecialCharacters.forEach((character, index) => {
|
|
949
|
-
utilities.verifyElementVisibilityState(utilities.getNthElement(fillInTheGapsTextCommonComponent.customSpecialCharactersButtonPreviewTab(), index), 'visible');
|
|
950
|
-
utilities.verifyInnerText(utilities.getNthElement(fillInTheGapsTextCommonComponent.customSpecialCharactersButtonPreviewTab(), index), character);
|
|
951
|
-
});
|
|
952
|
-
},
|
|
909
|
+
}
|
|
953
910
|
}
|
|
954
911
|
|
|
955
912
|
const tests = {
|
|
@@ -1099,11 +1056,6 @@ const tests = {
|
|
|
1099
1056
|
fillInTheGapsTextCommonComponent.steps.setMinimumLimit(10);
|
|
1100
1057
|
fillInTheGapsTextCommonComponent.steps.setMaximumLimit(40);
|
|
1101
1058
|
});
|
|
1102
|
-
|
|
1103
|
-
it('When the user insert 100002 in maximum character limit input field, then the value should be reset to 100000', () => {
|
|
1104
|
-
fillInTheGapsTextCommonComponent.steps.setMaximumLimit(100002);
|
|
1105
|
-
fillInTheGapsTextCommonComponent.steps.verifyMaximumCharacterLimitInputField(100000);
|
|
1106
|
-
});
|
|
1107
1059
|
},
|
|
1108
1060
|
|
|
1109
1061
|
verifySetLimitSectionForNoneOption: () => {
|
|
@@ -300,11 +300,11 @@ const tests = {
|
|
|
300
300
|
},
|
|
301
301
|
|
|
302
302
|
verifyAutoResizeResponseFieldFunctionalityPreviewTab: () => {
|
|
303
|
-
it('When the \'Auto-resize response field\' functionality is disabled, the response field should have \'
|
|
303
|
+
it('When the \'Auto-resize response field\' functionality is disabled, the response field should have \'auto-resize\' attribute set as \'false\' in preview tab', () => {
|
|
304
304
|
fillInTheGapsTextPage.steps.verifyAutoResizeOfResponseFieldPreviewTabDisabled(0);
|
|
305
305
|
});
|
|
306
306
|
|
|
307
|
-
it('When the \'Auto-resize response field\' functionality is enabled, the response field should have \'
|
|
307
|
+
it('When the \'Auto-resize response field\' functionality is enabled, the response field should have \'auto-resize\' attribute set as \'true\' in the preview tab', () => {
|
|
308
308
|
createQuestionBasePage.steps.switchToEditTab();
|
|
309
309
|
fillInTheGapsTextPage.steps.checkAutoResizeCheckbox();
|
|
310
310
|
createQuestionBasePage.steps.switchToPreviewTab();
|
package/package.json
CHANGED
|
@@ -290,7 +290,13 @@ export async function runSorryCypressSpinnakerSmokeCopy() {
|
|
|
290
290
|
"cypress/e2e/ILC/SingleSelection/**/*.smoke.js",
|
|
291
291
|
"cypress/e2e/ILC/MultipleSelection/**/*.smoke.js",
|
|
292
292
|
"cypress/e2e/ILC/ShortTextResponseNew/**/*.smoke.js",
|
|
293
|
-
"cypress/e2e/ILC/ThinkSphere/**/*.smoke.js"
|
|
293
|
+
"cypress/e2e/ILC/ThinkSphere/**/*.smoke.js",
|
|
294
|
+
|
|
295
|
+
"cypress/e2e/ILC/FillInTheGapsTextNew/**/*.smoke.js",
|
|
296
|
+
"cypress/e2e/ILC/FillInTheGapsDropdownNew/**/*.smoke.js",
|
|
297
|
+
"cypress/e2e/ILC/FillInTheGapsDragAndDropNew/**/*.smoke.js",
|
|
298
|
+
"cypress/e2e/ILC/Matching/**/*.smoke.js",
|
|
299
|
+
"cypress/e2e/ILC/ShortTextResponseNew/**/*.smoke.js"
|
|
294
300
|
].join(",");
|
|
295
301
|
|
|
296
302
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "${testFolders}"`;
|