itemengine-cypress-automation 1.0.579-IEI-7178-6f40615.0 → 1.0.579-IEI-7193-1dd98c9.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/questionInstructionsAndPromptSection.js +17 -0
- 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 +18 -0
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingAlternativePointsGreaterThanCorrectPoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsEqualToAlternativePoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingCorrectPointsGreaterThanAlternativePoints.js +2 -11
- package/cypress/e2e/ILC/ShortTextResponseNew/Scoring/allOrNothingWeightsBasic.js +7 -7
- package/cypress/e2e/ILC/ShortTextResponseNew/allOrNothingBasicForAllViews.smoke.js +3 -3
- 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/e2e/ILC/dataApi/fetchQuestion.js +150 -111
- package/cypress/e2e/ILC/dataApi/saveQuestions.js +53 -0
- package/cypress/pages/components/ckEditorToolbar.js +20 -0
- package/cypress/pages/components/draggableOptionContainer.js +14 -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/shortTextResponsePage.js +7 -35
- package/cypress/pages/textSelectionPage.js +17 -1
- package/package.json +1 -1
|
@@ -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'),
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent
|
|
1
|
+
import { createQuestionBasePage, autoScoredStudentViewSettings, autoScoredScoringPreviewTab, scoringSectionBaseEditTab, questionInstructionsComponent, autoScoredScoringSectionMultiResponseType, autoScoredSpecifyCorrectAnswerSection, commonComponents, additionalSettingsPanel, acceptedStudentInputComponent, studentViewSettingsLabelComponent, customizeSpecialCharacterComponent, studentResponseAndLayoutComponent, printPreviewComponent } from "./components/";
|
|
2
2
|
import { dialogBoxBase } from "./dialogBoxBase";
|
|
3
3
|
import utilities from "../support/helpers/utilities";
|
|
4
4
|
import { createItemPage } from "./createItemPage";
|
|
5
5
|
const css = Cypress.env('css');
|
|
6
|
-
const alternativeAnswerCheck = Cypress.env('ENABLE_ALTERNATIVE_ANSWER_ENHANCEMENT') === 'true';
|
|
7
6
|
|
|
8
7
|
const selectors = {
|
|
9
8
|
...questionInstructionsComponent,
|
|
@@ -19,7 +18,6 @@ const selectors = {
|
|
|
19
18
|
...createQuestionBasePage,
|
|
20
19
|
...printPreviewComponent,
|
|
21
20
|
...autoScoredScoringSectionMultiResponseType,
|
|
22
|
-
...showAlternativeAnswersComponent,
|
|
23
21
|
|
|
24
22
|
answerLabelSpecifyCorrectAnswerSection: () => cy.get('.answer-label'),
|
|
25
23
|
displayCharacterCountLabel: () => cy.get('[data-ngie-testid="display-character-count-checkbox"] .MuiFormControlLabel-label'),
|
|
@@ -67,13 +65,7 @@ const selectors = {
|
|
|
67
65
|
//Preview tab
|
|
68
66
|
previewTabResponseField: () => cy.get('.input-field input:visible'),
|
|
69
67
|
previewTabResponseFieldWrapper: () => cy.get('.input-wrapper:visible'),
|
|
70
|
-
previewTabCorrectAnswerWrapper: () =>
|
|
71
|
-
if (alternativeAnswerCheck) {
|
|
72
|
-
return cy.get('[class*="CorrectAnswerSectionstyle__CorrectAnswerLabelWrapper"]');
|
|
73
|
-
} else {
|
|
74
|
-
return cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]');
|
|
75
|
-
}
|
|
76
|
-
},
|
|
68
|
+
previewTabCorrectAnswerWrapper: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerWrapper"]'),
|
|
77
69
|
previewTabCorrectAnswerLabel: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerLabel"]'),
|
|
78
70
|
previewTabCorrectAnswerResponse: () => cy.get('[class*="ShortTextResponsestyles__CorrectAnswerValueWrapper"]'),
|
|
79
71
|
responseFieldCountPreviewTab: () => cy.get('[class*="InputLimitLabelWrapper"]'),
|
|
@@ -135,7 +127,6 @@ const steps = {
|
|
|
135
127
|
...createItemPage.steps,
|
|
136
128
|
...printPreviewComponent.steps,
|
|
137
129
|
...autoScoredScoringSectionMultiResponseType.steps,
|
|
138
|
-
...showAlternativeAnswersComponent.steps,
|
|
139
130
|
|
|
140
131
|
verifyCorrectIcon: () => {
|
|
141
132
|
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
@@ -158,7 +149,7 @@ const steps = {
|
|
|
158
149
|
|
|
159
150
|
verifyIncorrectAttemptBorder: () => {
|
|
160
151
|
utilities.verifyCSS(shortTextResponsePage.previewTabResponseField().parent().find('fieldset'), {
|
|
161
|
-
'border': `
|
|
152
|
+
'border': `1px solid ${css.color.incorrectAnswer}`
|
|
162
153
|
});
|
|
163
154
|
},
|
|
164
155
|
|
|
@@ -174,33 +165,14 @@ const steps = {
|
|
|
174
165
|
* @param {String} correctAnswer correct answer in correct answer wrapper present in grading view
|
|
175
166
|
* @description function verifies correct answer wrapper in grading view
|
|
176
167
|
*/
|
|
177
|
-
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
} else {
|
|
182
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
183
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
184
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'visible');
|
|
185
|
-
}
|
|
168
|
+
verifyCorrectAnswerResponseInCorrectAnswerWrapper: (correctAnswer) => {
|
|
169
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
170
|
+
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'Correct answer:');
|
|
171
|
+
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerLabel(), 'visible');
|
|
186
172
|
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse(), correctAnswer);
|
|
187
173
|
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse(), 'visible');
|
|
188
174
|
},
|
|
189
175
|
|
|
190
|
-
verifyCorrectAnswerAndAlternateAnswerInCorrectAnswerWrapper: (correctAnswer, correctAnswerPoints, alternateAnswer, alternateAnswerPoints) => {
|
|
191
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerWrapper(), 'visible');
|
|
192
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), correctAnswer);
|
|
193
|
-
utilities.verifyElementVisibilityState(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(0), 'visible');
|
|
194
|
-
shortTextResponsePage.steps.verifyCorrectAnswersLabelAndPointVisible(`(${correctAnswerPoints} points)`);
|
|
195
|
-
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleExists();
|
|
196
|
-
shortTextResponsePage.steps.disableShowAlternativeAnswersToggle();
|
|
197
|
-
shortTextResponsePage.steps.verifyShowAlternativeAnswersToggleUnchecked();
|
|
198
|
-
shortTextResponsePage.steps.verifyAlternativeAnswersSectionNotExist();
|
|
199
|
-
shortTextResponsePage.steps.clickShowAlternativeAnswersToggle();
|
|
200
|
-
shortTextResponsePage.steps.verifyAlternativeAnswersLabelAndPointVisible(1, `(${alternateAnswerPoints} points)`);
|
|
201
|
-
utilities.verifyInnerText(shortTextResponsePage.previewTabCorrectAnswerResponse().eq(1), alternateAnswer);
|
|
202
|
-
},
|
|
203
|
-
|
|
204
176
|
enterTextInShortTextResponseInputField: (correctAnswer) => {
|
|
205
177
|
shortTextResponsePage.setCorrectAnswerResponseField()
|
|
206
178
|
.type(correctAnswer)
|
|
@@ -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 = {
|