itemengine-cypress-automation 1.0.577 → 1.0.578-IEI-7105-c0daa6d.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/config-files/ilprod.json +2 -1
- package/cypress/config-files/ilqa.json +2 -1
- package/cypress/config-files/ilstage.json +2 -1
- package/cypress/e2e/ILC/Matching/draggableOptions.js +1 -1
- package/cypress/e2e/ILC/Matching/questionInstructionsAndPromptSection.js +19 -2
- package/cypress/e2e/ILC/MultipleSelection/previewContentsForAllViews.smoke.js +18 -0
- package/cypress/e2e/ILC/MultipleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
- package/cypress/e2e/ILC/NumberLineLabel/editTabBasicSection.js +19 -1
- package/cypress/e2e/ILC/SingleSelection/previewContents.smoke.js +18 -0
- package/cypress/e2e/ILC/SingleSelectionGridNew/previewContentsForAllViews.smoke.js +19 -0
- package/cypress/e2e/ILC/TextEntryMath/editTabBasicSection.js +17 -0
- package/cypress/e2e/ILC/TextSelection/questionInstructionsAndQuestion.js +16 -0
- package/cypress/pages/components/ckEditorToolbar.js +20 -0
- package/cypress/pages/components/draggableOptionContainer.js +22 -0
- package/cypress/pages/components/gridQuestionCommonComponent.js +17 -1
- package/cypress/pages/components/optionsWrapperComponent.js +33 -2
- package/cypress/pages/components/questionInputFieldComponent.js +18 -2
- package/cypress/pages/matchingPage.js +18 -0
- package/cypress/pages/numberLineLabelPage.js +1 -0
- package/cypress/pages/textSelectionPage.js +17 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
14
|
"migration_usernme": "ilc-prod-content-user",
|
|
15
15
|
"migration_password": "Oj2kTWQM7ZRmegmS",
|
|
16
|
-
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false",
|
|
17
|
+
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "false"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
14
|
"migration_usernme": "demo-technical-tester",
|
|
15
15
|
"migration_password": "SXYeokWOoTuwEg2w",
|
|
16
|
-
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "true"
|
|
16
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "true",
|
|
17
|
+
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "true"
|
|
17
18
|
}
|
|
18
19
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"admin_username": "demouser-ilc",
|
|
12
12
|
"admin_password": "T6b9FK0pC6Tg8wDz",
|
|
13
13
|
"organisation_id": "eb7d4a20-c96c-4852-9b34-7e3231016315",
|
|
14
|
-
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false"
|
|
14
|
+
"ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT": "false",
|
|
15
|
+
"ENABLE_EXPAND_IMAGE_ENHANCEMENT": "false"
|
|
15
16
|
}
|
|
16
17
|
}
|
|
@@ -110,7 +110,7 @@ describe('Create Item page - Matching: Draggable options section', () => {
|
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
describe('Standard options layout - Preview tab contents', () => {
|
|
113
|
+
describe.only('Standard options layout - Preview tab contents', () => {
|
|
114
114
|
abortEarlySetup();
|
|
115
115
|
before(() => {
|
|
116
116
|
matchingPage.steps.navigateToCreateQuestion('matching');
|
|
@@ -3,6 +3,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const promptArray = ['Land pollution', 'Water pollution', 'Air pollution'];
|
|
6
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
6
7
|
|
|
7
8
|
describe('Create Item page - Matching : Question Instructions and prompt section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -207,7 +208,7 @@ describe('Create Item page - Matching : Question Instructions and prompt section
|
|
|
207
208
|
});
|
|
208
209
|
});
|
|
209
210
|
|
|
210
|
-
describe('Prompt - Preview tab section', () => {
|
|
211
|
+
describe.only('Prompt - Preview tab section', () => {
|
|
211
212
|
abortEarlySetup();
|
|
212
213
|
before(() => {
|
|
213
214
|
cy.log('Navigating to Matching question type');
|
|
@@ -265,13 +266,29 @@ describe('Create Item page - Matching : Question Instructions and prompt section
|
|
|
265
266
|
matchingPage.steps.verifyPromptHeaderTextPreviewTab('Header');
|
|
266
267
|
});
|
|
267
268
|
|
|
268
|
-
it('When user clears text in prompt header input field then prompt header should be removed in preview tab', () => {
|
|
269
|
+
it.only('When user clears text in prompt header input field then prompt header should be removed in preview tab', () => {
|
|
269
270
|
matchingPage.steps.switchToEditTab();
|
|
270
271
|
matchingPage.steps.clearAndFocusOutOfPromptHeaderInputField();
|
|
271
272
|
matchingPage.steps.switchToPreviewTab();
|
|
272
273
|
utilities.verifyElementVisibilityState(matchingPage.dropzoneColumnAndPromptHeaderWrapperPreviewTab(), 'notExist');
|
|
273
274
|
});
|
|
274
275
|
|
|
276
|
+
if (imageExpandEnhancement === 'true') {
|
|
277
|
+
it.only('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
278
|
+
matchingPage.steps.switchToEditTab();
|
|
279
|
+
matchingPage.steps.clearPromptInputField(0);
|
|
280
|
+
matchingPage.steps.focusInPromptInputField(0);
|
|
281
|
+
matchingPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
282
|
+
matchingPage.steps.addImageToInputField();
|
|
283
|
+
matchingPage.steps.switchToPreviewTab();
|
|
284
|
+
matchingPage.steps.verifyExpandIconInImage();
|
|
285
|
+
matchingPage.steps.clickExpandIconInImage();
|
|
286
|
+
utilities.verifyInnerText(matchingPage.closeImagePopup(), 'Close');
|
|
287
|
+
matchingPage.steps.closeImagePopup();
|
|
288
|
+
matchingPage.steps.verifyExpandIconInImage();
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
|
|
275
292
|
it('CSS of added prompt in \'Preview\' tab table', { tags: 'css' }, () => {
|
|
276
293
|
utilities.verifyCSS(matchingPage.promptContainerPreviewTab().find('.question-text-wrapper'), {
|
|
277
294
|
'color': css.color.text,
|
|
@@ -6,6 +6,7 @@ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Stu
|
|
|
6
6
|
const views = utilities.getViews(previewContentViews);
|
|
7
7
|
var itemReferenceID = "";
|
|
8
8
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
|
9
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Multiple selection: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -91,6 +92,23 @@ describe('Create item page - Multiple selection: Preview contents', () => {
|
|
|
91
92
|
multipleSelectionPage.steps.verifyEquationTextInPreviewTab(2);
|
|
92
93
|
cy.eyesCheckWindow(`Multiple selection - ${view} - Image, Bold Text, and Equation Display`);
|
|
93
94
|
});
|
|
95
|
+
if (imageExpandEnhancement === 'true') {
|
|
96
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
97
|
+
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
98
|
+
multipleSelectionPage.steps.verifyExpandIconInImage();
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
102
|
+
multipleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
103
|
+
multipleSelectionPage.steps.clickExpandIconInImage();
|
|
104
|
+
utilities.verifyInnerText(multipleSelectionPage.closeImagePopup(), 'Close');
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
108
|
+
multipleSelectionPage.steps.closeImagePopup();
|
|
109
|
+
multipleSelectionPage.steps.verifyExpandIconInImage();
|
|
110
|
+
});
|
|
111
|
+
}
|
|
94
112
|
|
|
95
113
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
96
114
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -6,6 +6,7 @@ const css = Cypress.env('css');
|
|
|
6
6
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view', 'Print preview'];
|
|
7
7
|
const views = utilities.getViews(previewContentViews);
|
|
8
8
|
var itemReferenceID = "";
|
|
9
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -94,6 +95,24 @@ describe('Create item page - Multiple selection grid: Preview contents', () => {
|
|
|
94
95
|
utilities.verifyInnerText(multipleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
95
96
|
utilities.verifyElementVisibilityState(multipleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
96
97
|
});
|
|
98
|
+
|
|
99
|
+
if (imageExpandEnhancement === 'true') {
|
|
100
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
101
|
+
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
102
|
+
multipleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
106
|
+
multipleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
107
|
+
multipleSelectionGridPage.steps.clickExpandIconInImage();
|
|
108
|
+
utilities.verifyInnerText(multipleSelectionGridPage.closeImagePopup(), 'Close');
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
112
|
+
multipleSelectionGridPage.steps.closeImagePopup();
|
|
113
|
+
multipleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
114
|
+
});
|
|
115
|
+
}
|
|
97
116
|
|
|
98
117
|
it(`Multiple selection grid - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
99
118
|
multipleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,6 +3,7 @@ import { ckEditorToolbar, equationEditorFlyout } 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 imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
6
7
|
const labels = ['Label 1', 'Label 2', 'Label 3']
|
|
7
8
|
describe('Create Item page - Number line label : Question instructions and label section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -20,7 +21,7 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
|
20
21
|
numberLineLabelPage.tests.verifyQuestionInstructionsInputFieldEditTab();
|
|
21
22
|
});
|
|
22
23
|
|
|
23
|
-
describe('Question instructions input field - Preview tab', () => {
|
|
24
|
+
describe.only('Question instructions input field - Preview tab', () => {
|
|
24
25
|
abortEarlySetup();
|
|
25
26
|
before(() => {
|
|
26
27
|
numberLineLabelPage.steps.navigateToCreateQuestion('Number line');
|
|
@@ -41,6 +42,23 @@ describe('Create Item page - Number line label : Question instructions and label
|
|
|
41
42
|
utilities.verifyTextContent(numberLineLabelPage.questionInstructionsText(), 'Which of the following is the major contributor to increased carbon dioxide levels because of urbanization? Select your answer from the options below.');
|
|
42
43
|
});
|
|
43
44
|
|
|
45
|
+
if (imageExpandEnhancement === 'true') {
|
|
46
|
+
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
47
|
+
numberLineLabelPage.steps.switchToEditTab();
|
|
48
|
+
numberLineLabelPage.steps.clearQuestionInstructionsInputField();
|
|
49
|
+
numberLineLabelPage.steps.focusInQuestionInstructionsInputField();
|
|
50
|
+
numberLineLabelPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
51
|
+
numberLineLabelPage.steps.addImageToInputField();
|
|
52
|
+
numberLineLabelPage.steps.focusOutQuestionInstructionsInputField();
|
|
53
|
+
numberLineLabelPage.steps.switchToPreviewTab();
|
|
54
|
+
numberLineLabelPage.steps.verifyExpandIconInImage();
|
|
55
|
+
numberLineLabelPage.steps.clickExpandIconInImage();
|
|
56
|
+
utilities.verifyInnerText(numberLineLabelPage.closeImagePopup(), 'Close');
|
|
57
|
+
numberLineLabelPage.steps.closeImagePopup();
|
|
58
|
+
numberLineLabelPage.steps.verifyExpandIconInImage();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
44
62
|
//Need to remove this comment once https://redmine.zeuslearning.com/issues/578531 is resolved
|
|
45
63
|
// numberLineLabelPage.tests.verifyQuestionInstructionsInputFieldPreviewTab();
|
|
46
64
|
});
|
|
@@ -6,6 +6,7 @@ let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Stu
|
|
|
6
6
|
const views = utilities.getViews(previewContentViews);
|
|
7
7
|
var itemReferenceID = "";
|
|
8
8
|
const options = ['Pollution caused by treating chemical waste', 'Pollution caused by cement production', 'Pollution caused by methane production', 'Pollution caused by cement and methane production'];
|
|
9
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
9
10
|
|
|
10
11
|
describe('Create item page - Single selection: Preview contents', () => {
|
|
11
12
|
before(() => {
|
|
@@ -94,6 +95,23 @@ describe('Create item page - Single selection: Preview contents', () => {
|
|
|
94
95
|
singleSelectionPage.steps.verifyEquationTextInPreviewTab(3);
|
|
95
96
|
cy.eyesCheckWindow(`Single selection - ${view} - Options with image, equation, bold text, and link`);
|
|
96
97
|
});
|
|
98
|
+
if (imageExpandEnhancement === 'true') {
|
|
99
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
100
|
+
singleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
101
|
+
singleSelectionPage.steps.verifyExpandIconInImage();
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
105
|
+
singleSelectionPage.steps.verifyImageInPreviewTab(0);
|
|
106
|
+
singleSelectionPage.steps.clickExpandIconInImage();
|
|
107
|
+
utilities.verifyInnerText(singleSelectionPage.closeImagePopup(), 'Close');
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
111
|
+
singleSelectionPage.steps.closeImagePopup();
|
|
112
|
+
singleSelectionPage.steps.verifyExpandIconInImage();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
97
115
|
|
|
98
116
|
if (view !== 'Grading view' && view !== 'Correct answer view') {
|
|
99
117
|
it(`All the options should be in unchecked state`, () => {
|
|
@@ -5,6 +5,7 @@ import utilities from "../../../support/helpers/utilities";
|
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
6
|
let previewContentViews = ['Question preview', 'Item view', 'Item preview', 'Student view', 'Grading view', 'Correct answer view', 'Print preview'];
|
|
7
7
|
const views = utilities.getViews(previewContentViews);
|
|
8
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
8
9
|
var itemReferenceID = "";
|
|
9
10
|
describe('Create item page - Single selection grid: Preview contents', () => {
|
|
10
11
|
before(() => {
|
|
@@ -93,6 +94,24 @@ describe('Create item page - Single selection grid: Preview contents', () => {
|
|
|
93
94
|
utilities.verifyInnerText(singleSelectionGridPage.questionInstructionsText(), 'Please select where the following animals are found');
|
|
94
95
|
utilities.verifyElementVisibilityState(singleSelectionGridPage.questionInstructionsText(), 'visible');
|
|
95
96
|
});
|
|
97
|
+
|
|
98
|
+
if (imageExpandEnhancement === 'true') {
|
|
99
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
100
|
+
singleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
101
|
+
singleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
105
|
+
singleSelectionGridPage.steps.verifyTableCellWithImageInPreviewTab({ row: 1, column: 1 });
|
|
106
|
+
singleSelectionGridPage.steps.clickExpandIconInImage();
|
|
107
|
+
utilities.verifyInnerText(singleSelectionGridPage.closeImagePopup(), 'Close');
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
111
|
+
singleSelectionGridPage.steps.closeImagePopup();
|
|
112
|
+
singleSelectionGridPage.steps.verifyExpandIconInImage();
|
|
113
|
+
});
|
|
114
|
+
}
|
|
96
115
|
|
|
97
116
|
it(`Single selection - grid ${view} - The question grid as set by the user should be displayed in the ${view}`, () => {
|
|
98
117
|
singleSelectionGridPage.steps.verifyTableCellPropertyPreviewTab({ row: 0, column: 0 }, 'None');
|
|
@@ -3,6 +3,7 @@ import { commonComponents } 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 imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
6
7
|
|
|
7
8
|
describe('Create item page - Text entry math: Question instructions, Add structure - Question input field', () => {
|
|
8
9
|
before(() => {
|
|
@@ -197,6 +198,22 @@ describe('Create item page - Text entry math: Question instructions, Add structu
|
|
|
197
198
|
textEntryMathPage.steps.switchToPreviewTab();
|
|
198
199
|
utilities.verifyElementCount(textEntryMathPage.responseFieldPreviewTab(), 1);
|
|
199
200
|
});
|
|
201
|
+
|
|
202
|
+
if (imageExpandEnhancement === 'true') {
|
|
203
|
+
it('When user add large image in question input field, user should be able to expand the image in preview tab', () => {
|
|
204
|
+
textEntryMathPage.steps.switchToEditTab();
|
|
205
|
+
textEntryMathPage.steps.focusInQuestionInputField();
|
|
206
|
+
textEntryMathPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
207
|
+
textEntryMathPage.steps.addImageToInputField();
|
|
208
|
+
textEntryMathPage.steps.switchToPreviewTab();
|
|
209
|
+
textEntryMathPage.steps.verifyExpandIconInImage();
|
|
210
|
+
textEntryMathPage.steps.clickExpandIconInImage();
|
|
211
|
+
utilities.verifyInnerText(textEntryMathPage.closeImagePopup(), 'Close');
|
|
212
|
+
textEntryMathPage.steps.closeImagePopup();
|
|
213
|
+
textEntryMathPage.steps.verifyExpandIconInImage();
|
|
214
|
+
|
|
215
|
+
});
|
|
216
|
+
}
|
|
200
217
|
});
|
|
201
218
|
|
|
202
219
|
describe('User should be able to edit incomplete authored question', () => {
|
|
@@ -3,6 +3,7 @@ import abortEarlySetup from "../../../support/helpers/abortEarly";
|
|
|
3
3
|
import utilities from "../../../support/helpers/utilities";
|
|
4
4
|
const css = Cypress.env('css');
|
|
5
5
|
const grepTags = Cypress.env('grepTags');
|
|
6
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
6
7
|
|
|
7
8
|
describe('Create Item page - Text selection: Question Instructions and Question section', () => {
|
|
8
9
|
before(() => {
|
|
@@ -191,6 +192,21 @@ describe('Create Item page - Text selection: Question Instructions and Question
|
|
|
191
192
|
textSelectionPage.steps.verifyBoldTextInPreviewTab();
|
|
192
193
|
textSelectionPage.steps.verifyLinkInPreviewTab();
|
|
193
194
|
});
|
|
195
|
+
if (imageExpandEnhancement === 'true') {
|
|
196
|
+
it('Image expand icon should be visible on the image in option', () => {
|
|
197
|
+
textSelectionPage.steps.verifyExpandIconInImage();
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
it('When the user clicks on the expand button then the image should be expanded and a close button should be displayed', () => {
|
|
201
|
+
textSelectionPage.steps.clickExpandIconInImage();
|
|
202
|
+
utilities.verifyInnerText(textSelectionPage.closeImagePopup(), 'Close');
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
it('When the user clicks on the close button the expanded option should be minimized and the expand icon should be displayed on image again in the option', () => {
|
|
206
|
+
textSelectionPage.steps.closeImagePopup();
|
|
207
|
+
textSelectionPage.steps.verifyExpandIconInImage();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
194
210
|
|
|
195
211
|
//Failing due to https://redmine.zeuslearning.com/issues/537907
|
|
196
212
|
it('CSS of \'Preview tab\' when image, equation, bold text and link are added', { tags: 'css' }, () => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import constants from "../../fixtures/constants";
|
|
2
|
+
import utilities from "../../support/helpers/utilities";
|
|
2
3
|
|
|
3
4
|
const selectors = {
|
|
4
5
|
imageIcon: () => cy.get('a[title="Insert Image"]:visible'),
|
|
@@ -26,9 +27,28 @@ const selectors = {
|
|
|
26
27
|
linkDialogboxURLInputField: () => cy.get('input[class*="cke_dialog_ui_input_text"]:visible').eq(1),
|
|
27
28
|
sourceIcon: () => cy.get('a[title="Source"]:visible'),
|
|
28
29
|
sourceTextArea: () => cy.get('textarea.cke_source'),
|
|
30
|
+
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
31
|
+
closeImagePopup: () => cy.get('.close-popup-btn'),
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
const steps = {
|
|
35
|
+
verifyExpandIconInImage: () => {
|
|
36
|
+
utilities.verifyElementVisibilityState(ckEditorToolbar.expandIconButton(), 'visible');
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
clickExpandIconInImage: () => {
|
|
40
|
+
ckEditorToolbar.expandIconButton()
|
|
41
|
+
.first()
|
|
42
|
+
.scrollIntoView()
|
|
43
|
+
.realClick();
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
closeImagePopup: () => {
|
|
47
|
+
ckEditorToolbar.closeImagePopup()
|
|
48
|
+
.click();
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
|
|
32
52
|
selectBoldOptionFromCKEditorToolbar: () => {
|
|
33
53
|
ckEditorToolbar.boldIcon()
|
|
34
54
|
.click();
|
|
@@ -3,6 +3,7 @@ import { commonComponents } from "./commonComponents";
|
|
|
3
3
|
import { createQuestionBasePage } from "./createQuestionBasePage";
|
|
4
4
|
import { draggableOptionsSectionComponent } from "./draggableOptionsSectionComponent";
|
|
5
5
|
import { optionsWrapperComponent } from "./optionsWrapperComponent";
|
|
6
|
+
import { ckEditorToolbar } from "./ckEditorToolbar";
|
|
6
7
|
const css = Cypress.env('css');
|
|
7
8
|
const options = ['option 1', 'option 2'];
|
|
8
9
|
const threeOptions = ['option 1', 'option 2', 'option 3'];
|
|
@@ -453,6 +454,27 @@ const tests = {
|
|
|
453
454
|
createQuestionBasePage.steps.switchToPreviewTab();
|
|
454
455
|
draggableOptionContainer.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(optionsAfterDeleting);
|
|
455
456
|
});
|
|
457
|
+
it.only('When user add large image in option, the option container should have expand icon', () => {
|
|
458
|
+
// const imagePath = 'images/largeImage.png';
|
|
459
|
+
// cy.log('Pre-step : Switching to \'Edit\' tab')
|
|
460
|
+
// createQuestionBasePage.steps.switchToEditTab();
|
|
461
|
+
// optionsWrapperComponent.steps.addOption();
|
|
462
|
+
// optionsWrapperComponent.steps.uploadImageInOption(2, imagePath);
|
|
463
|
+
// createQuestionBasePage.steps.switchToPreviewTab();
|
|
464
|
+
// utilities.verifyElementVisibilityState(utilities.getNthElement(draggableOptionContainer.optionContainerItemListPreviewTab().find('svg'), 2), 'visible');
|
|
465
|
+
createQuestionBasePage.steps.switchToEditTab();
|
|
466
|
+
optionsWrapperComponent.steps.addOption();
|
|
467
|
+
optionsWrapperComponent.steps.focusInOptionsInputField(2)
|
|
468
|
+
ckEditorToolbar.steps.selectImageOptionFromCKEditorToolbar()
|
|
469
|
+
ckEditorToolbar.steps.addImageToInputField();
|
|
470
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
|
471
|
+
optionsWrapperComponent.steps.verifyExpandIconInImage();
|
|
472
|
+
optionsWrapperComponent.steps.clickExpandIconInImage();
|
|
473
|
+
cy.wait(1000); //Added wait as this is failing due to page updating
|
|
474
|
+
utilities.verifyInnerText(optionsWrapperComponent.closeImagePopup(), 'Close');
|
|
475
|
+
// optionsWrapperComponent.steps.closeImagePopup();
|
|
476
|
+
// optionsWrapperComponent.steps.verifyExpandIconInImage();
|
|
477
|
+
});
|
|
456
478
|
},
|
|
457
479
|
|
|
458
480
|
verifyDraggableOptionsForGroupedLayoutInSpecifyCorrectAnswerSection: () => {
|
|
@@ -158,10 +158,26 @@ const selectors = {
|
|
|
158
158
|
colorBlock: () => cy.get('.color-grid-wrapper .color-picker-block'),
|
|
159
159
|
editColorButton: () => cy.get('button[aria-label="edit color"]'),
|
|
160
160
|
colorBlockSelectedIcon: () => cy.get('[class*="BtnSelectionWrapper"] svg'),
|
|
161
|
-
optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text')
|
|
161
|
+
optionsInputFieldInQuestionPreviewTab: () => cy.get('.cell-content-text'),
|
|
162
|
+
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
163
|
+
closeImagePopup: () => cy.get('.close-popup-btn')
|
|
162
164
|
}
|
|
163
165
|
|
|
164
166
|
const steps = {
|
|
167
|
+
verifyExpandIconInImage: () => {
|
|
168
|
+
utilities.verifyElementVisibilityState(gridQuestionCommonComponent.expandIconButton(), 'visible');
|
|
169
|
+
},
|
|
170
|
+
|
|
171
|
+
clickExpandIconInImage: () => {
|
|
172
|
+
gridQuestionCommonComponent.expandIconButton()
|
|
173
|
+
.click();
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
closeImagePopup: () => {
|
|
177
|
+
gridQuestionCommonComponent.closeImagePopup()
|
|
178
|
+
.click();
|
|
179
|
+
},
|
|
180
|
+
|
|
165
181
|
/**
|
|
166
182
|
* Modifies the property of a table cell at the specified row and column.
|
|
167
183
|
* @param {Object} position - The position of the table cell to modify.
|
|
@@ -2,8 +2,10 @@ import constants from "../../fixtures/constants";
|
|
|
2
2
|
import utilities from "../../support/helpers/utilities";
|
|
3
3
|
import { ckEditorToolbar } from "./ckEditorToolbar";
|
|
4
4
|
import { commonComponents } from "./commonComponents";
|
|
5
|
+
import { createQuestionBasePage } from "./createQuestionBasePage";
|
|
5
6
|
import { equationEditorFlyout } from "./equationEditorFlyout";
|
|
6
7
|
const css = Cypress.env('css');
|
|
8
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
7
9
|
|
|
8
10
|
const selectors = {
|
|
9
11
|
optionsLabel: () => cy.get('.options-label-wrapper .options-label'),
|
|
@@ -13,7 +15,9 @@ const selectors = {
|
|
|
13
15
|
deleteOptionButton: () => cy.get('.ngie-button[aria-label*="Delete option"]'),
|
|
14
16
|
optionsInputField: () => cy.get('.option-component [role="textbox"]'),
|
|
15
17
|
//TODO: Need to update this in all TEI
|
|
16
|
-
optionNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]')
|
|
18
|
+
optionNumeration: () => cy.get('[class*="SingleOptionstyle__AdornmentDiv"]'),
|
|
19
|
+
expandIconButton: () => cy.get('.expand-image-container .expand-image-btn[aria-label="expand image button"]'),
|
|
20
|
+
closeImagePopup: () => cy.get('.close-popup-btn')
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
const steps = {
|
|
@@ -300,7 +304,23 @@ const steps = {
|
|
|
300
304
|
|
|
301
305
|
verifyOptionCount: (count) => {
|
|
302
306
|
utilities.verifyElementCount(optionsWrapperComponent.optionsInputField(), count);
|
|
303
|
-
}
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
verifyExpandIconInImage: () => {
|
|
310
|
+
utilities.verifyElementVisibilityState(optionsWrapperComponent.expandIconButton(), 'visible');
|
|
311
|
+
},
|
|
312
|
+
|
|
313
|
+
clickExpandIconInImage: () => {
|
|
314
|
+
optionsWrapperComponent.expandIconButton()
|
|
315
|
+
.first()
|
|
316
|
+
.scrollIntoView()
|
|
317
|
+
.realClick();
|
|
318
|
+
},
|
|
319
|
+
|
|
320
|
+
closeImagePopup: () => {
|
|
321
|
+
optionsWrapperComponent.closeImagePopup()
|
|
322
|
+
.click();
|
|
323
|
+
}
|
|
304
324
|
}
|
|
305
325
|
|
|
306
326
|
const tests = {
|
|
@@ -387,6 +407,17 @@ const tests = {
|
|
|
387
407
|
ckEditorToolbar.steps.addImageToInputField();
|
|
388
408
|
optionsWrapperComponent.steps.verifyImageAndAltTextInOptionsInputField(inputFieldIndex);
|
|
389
409
|
});
|
|
410
|
+
if (imageExpandEnhancement === 'true') {
|
|
411
|
+
it('When user add large image in options input field, user should be able to expand the image in preview tab', () => {
|
|
412
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
|
413
|
+
ckEditorToolbar.steps.verifyExpandIconInImage();
|
|
414
|
+
ckEditorToolbar.steps.clickExpandIconInImage();
|
|
415
|
+
utilities.verifyInnerText(ckEditorToolbar.closeImagePopup(), 'Close');
|
|
416
|
+
ckEditorToolbar.steps.closeImagePopup();
|
|
417
|
+
ckEditorToolbar.steps.verifyExpandIconInImage();
|
|
418
|
+
createQuestionBasePage.steps.switchToEditTab();
|
|
419
|
+
});
|
|
420
|
+
}
|
|
390
421
|
},
|
|
391
422
|
|
|
392
423
|
/**
|
|
@@ -10,7 +10,9 @@ const selectors = {
|
|
|
10
10
|
responseAreaNumeration: () => cy.get('marker'),
|
|
11
11
|
responseAreaResponseLabel: () => cy.get('content'),
|
|
12
12
|
questionContainerPreviewTab: () => cy.get('.preview-question-text-wrapper'),
|
|
13
|
-
responseAreaSettingsButton: () => cy.get('.add_response_settings_btn')
|
|
13
|
+
responseAreaSettingsButton: () => cy.get('.add_response_settings_btn'),
|
|
14
|
+
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
15
|
+
closeImagePopup: () => cy.get('.close-popup-btn'),
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
const steps = {
|
|
@@ -145,7 +147,21 @@ const steps = {
|
|
|
145
147
|
utilities.getNthElement(questionInputFieldComponent.responseArea(), responseAreaIndex)
|
|
146
148
|
.find('.add_response_element')
|
|
147
149
|
.should('have.css', 'height', height);
|
|
148
|
-
}
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
verifyExpandIconInImage: () => {
|
|
153
|
+
utilities.verifyElementVisibilityState(questionInputFieldComponent.expandIconButton(), 'visible');
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
clickExpandIconInImage: () => {
|
|
157
|
+
questionInputFieldComponent.expandIconButton()
|
|
158
|
+
.click();
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
closeImagePopup: () => {
|
|
162
|
+
questionInputFieldComponent.closeImagePopup()
|
|
163
|
+
.click();
|
|
164
|
+
}
|
|
149
165
|
}
|
|
150
166
|
|
|
151
167
|
const tests = {
|
|
@@ -5,6 +5,7 @@ import { createItemPage } from "./createItemPage";
|
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
6
|
const options = ['option 1', 'option 2', 'option 3'];
|
|
7
7
|
const fourOptions = ['option 1', 'option 2', 'option 3', 'option 4'];
|
|
8
|
+
const imageExpandEnhancement = Cypress.env('ENABLE_EXPAND_IMAGE_ENHANCEMENT');
|
|
8
9
|
|
|
9
10
|
const selectors = {
|
|
10
11
|
...correctIncorrectAnswerLabelComponent,
|
|
@@ -24,6 +25,7 @@ const selectors = {
|
|
|
24
25
|
...scoringSectionBaseEditTab,
|
|
25
26
|
...additionalSettingsPanel,
|
|
26
27
|
...connectorStyleStyleAndLayoutCustomizationComponent,
|
|
28
|
+
...ckEditorToolbar,
|
|
27
29
|
//Edit tab
|
|
28
30
|
promptInputField: () => cy.get('.edit-mcq-stems-wrapper [role="textbox"]'),
|
|
29
31
|
promptInputFieldWrapper: () => cy.get('.edit-mcq-stems-wrapper .edit-mcq-option-wrapper'),
|
|
@@ -2864,6 +2866,22 @@ const tests = {
|
|
|
2864
2866
|
createQuestionBasePage.steps.switchToPreviewTab();
|
|
2865
2867
|
draggableOptionContainer.steps.verifyDraggableOptionsInOptionsContainerPreviewTab(optionsAfterDeleting);
|
|
2866
2868
|
});
|
|
2869
|
+
if (imageExpandEnhancement === 'true') {
|
|
2870
|
+
it('When user add large image in question instruction, user should be able to expand the image in preview tab', () => {
|
|
2871
|
+
createQuestionBasePage.steps.switchToEditTab();
|
|
2872
|
+
optionsWrapperComponent.steps.addOption();
|
|
2873
|
+
matchingPage.steps.focusInOptionsInputField(3);
|
|
2874
|
+
matchingPage.steps.selectImageOptionFromCKEditorToolbar();
|
|
2875
|
+
matchingPage.steps.addImageToInputField();
|
|
2876
|
+
// matchingPage.steps.focusOutOptionsInputField(3);
|
|
2877
|
+
createQuestionBasePage.steps.switchToPreviewTab();
|
|
2878
|
+
matchingPage.steps.verifyExpandIconInImage();
|
|
2879
|
+
matchingPage.steps.clickExpandIconInImage();
|
|
2880
|
+
utilities.verifyInnerText(matchingPage.closeImagePopup(), 'Close');
|
|
2881
|
+
matchingPage.steps.closeImagePopup();
|
|
2882
|
+
matchingPage.steps.verifyExpandIconInImage();
|
|
2883
|
+
});
|
|
2884
|
+
}
|
|
2867
2885
|
},
|
|
2868
2886
|
|
|
2869
2887
|
//Need to remove when https://redmine.zeuslearning.com/issues/566720 is resolved
|
|
@@ -15,6 +15,7 @@ const selectors = {
|
|
|
15
15
|
...autoScoredScoringPreviewTab,
|
|
16
16
|
...randomizeOptionsComponent,
|
|
17
17
|
...additionalSettingsPanel,
|
|
18
|
+
...ckEditorToolbar,
|
|
18
19
|
partialEqualWeightsPointsPerResponseScore: () => cy.get('.alternate-points-points-per-value-span'),
|
|
19
20
|
snapToTicksCheckbox: () => cy.get('[data-ngie-testid="snap-to-grid-nodes-checkbox"] input'),
|
|
20
21
|
snapToTicksLabel: () => cy.get('[data-ngie-testid="snap-to-grid-nodes-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -102,6 +102,8 @@ const selectors = {
|
|
|
102
102
|
optionsInputFieldInQuestionPreviewTab: () => cy.get('[class*="word-span highlight_option"]'),
|
|
103
103
|
questionInstructionsPrintViewText: () => cy.get('.question-text-wrapper').eq(0),
|
|
104
104
|
questionTextPrintViewParagraphs: () => cy.get('#nextgen-assess-print-view [data-testid="question-instruction-element"] p'),
|
|
105
|
+
expandIconButton: () => cy.get('.expand-image-btn'),
|
|
106
|
+
closeImagePopup: () => cy.get('.close-popup-btn'),
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
const steps = {
|
|
@@ -1379,7 +1381,21 @@ const steps = {
|
|
|
1379
1381
|
textSelectionPage.questionTextPrintViewParagraphs().each(($el, index) => {
|
|
1380
1382
|
utilities.verifyInnerText(utilities.getNthElement(textSelectionPage.questionTextPrintViewParagraphs(), index), `${paragraphTextArray[index]}`);
|
|
1381
1383
|
});
|
|
1382
|
-
}
|
|
1384
|
+
},
|
|
1385
|
+
|
|
1386
|
+
verifyExpandIconInImage: () => {
|
|
1387
|
+
utilities.verifyElementVisibilityState(textSelectionPage.expandIconButton(), 'visible');
|
|
1388
|
+
},
|
|
1389
|
+
|
|
1390
|
+
clickExpandIconInImage: () => {
|
|
1391
|
+
textSelectionPage.expandIconButton()
|
|
1392
|
+
.click();
|
|
1393
|
+
},
|
|
1394
|
+
|
|
1395
|
+
closeImagePopup: () => {
|
|
1396
|
+
textSelectionPage.closeImagePopup()
|
|
1397
|
+
.click();
|
|
1398
|
+
},
|
|
1383
1399
|
}
|
|
1384
1400
|
|
|
1385
1401
|
const tests = {
|