itemengine-cypress-automation 1.0.573-IEI-7080-f70315e.0 → 1.0.574-IEI-7080-e6d1871.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/ILC/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/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/figCommonStyleAndLayoutComponent.js +4 -10
- package/cypress/pages/components/fillInTheGapsTextCommonComponent.js +15 -2
- 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/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
|
@@ -79,6 +79,8 @@ const selectors = {
|
|
|
79
79
|
correctAnswersLabel: () => cy.get('[class*="question-preview-wrapper"] [class*="CorrectAnswerLabel"]'),
|
|
80
80
|
correctAnswerSectionWrapper: () => cy.get('[class*="question-preview-wrapper"] .mcq-checkbox-control.mcq-answer-checked').eq(1),
|
|
81
81
|
optionWrapperCorrectAnswerSection: () => cy.get('.mcq-option-wrapper'),
|
|
82
|
+
alternativeAnswerSectionWrapper: () => cy.get('[class*="CorrectAnswerLabelWrapper"]').eq(1).next(),
|
|
83
|
+
optionWrapperAlternativeAnswerSection: () => cy.get('.mcq-option-wrapper'),
|
|
82
84
|
answerStatusBanner: () => cy.get('[class*="StatusContainer"]'),
|
|
83
85
|
cancelButton: () => cy.get('.save-action-btn-wrapper .MuiButtonBase-root').eq(1),
|
|
84
86
|
optionsInputFieldInQuestionPreviewTab: () => cy.get('.mcq-option-wrapper [data-testid="question-instruction-element"]'),
|
|
@@ -861,6 +863,36 @@ const steps = {
|
|
|
861
863
|
.should('exist');
|
|
862
864
|
},
|
|
863
865
|
|
|
866
|
+
/**
|
|
867
|
+
* Verifies correct option icon in alternative answer section
|
|
868
|
+
* @param {number} optionIndex - The index of the option to verify
|
|
869
|
+
*/
|
|
870
|
+
verifyCorrectOptionIconAlternativeAnswerSection: (optionIndex) => {
|
|
871
|
+
multipleSelectionPage.alternativeAnswerSectionWrapper()
|
|
872
|
+
.within(() => {
|
|
873
|
+
multipleSelectionPage.optionWrapperAlternativeAnswerSection()
|
|
874
|
+
.eq(optionIndex)
|
|
875
|
+
.within(() => {
|
|
876
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
877
|
+
});
|
|
878
|
+
});
|
|
879
|
+
},
|
|
880
|
+
|
|
881
|
+
/**
|
|
882
|
+
* Verifies that correct/incorrect icon is not visible in alternative answer section
|
|
883
|
+
* @param {number} optionIndex - The index of the option to verify
|
|
884
|
+
*/
|
|
885
|
+
verifyCorrectIncorrectIconNotVisibleAlternativeAnswerSection: (optionIndex) => {
|
|
886
|
+
multipleSelectionPage.alternativeAnswerSectionWrapper()
|
|
887
|
+
.within(() => {
|
|
888
|
+
multipleSelectionPage.optionWrapperAlternativeAnswerSection()
|
|
889
|
+
.eq(optionIndex)
|
|
890
|
+
.within(() => {
|
|
891
|
+
autoScoredScoringPreviewTab.steps.verifyCorrectIncorrectIconsNotExist();
|
|
892
|
+
});
|
|
893
|
+
});
|
|
894
|
+
},
|
|
895
|
+
|
|
864
896
|
verifyAnswerBannerNotExist: () => {
|
|
865
897
|
multipleSelectionPage.answerStatusBanner()
|
|
866
898
|
.should('not.exist');
|
|
@@ -43,6 +43,8 @@ const selectors = {
|
|
|
43
43
|
correctIncorrectAnswerLabel: () => cy.get('[class*="style"][class*="__Status"]'),
|
|
44
44
|
answerStatusBanner: () => cy.get('[class*="StatusContainer"]'),
|
|
45
45
|
optionsInputFieldInQuestionPreviewTab: () => cy.get('.mcq-radio-control [data-testid="question-instruction-element"]'),
|
|
46
|
+
//alternate answer section
|
|
47
|
+
alternativeAnswerSectionWrapper: () => cy.get('[class*="CorrectAnswerLabelWrapper"]').eq(1).next(),
|
|
46
48
|
};
|
|
47
49
|
|
|
48
50
|
const steps = {
|
|
@@ -226,6 +228,21 @@ const steps = {
|
|
|
226
228
|
});
|
|
227
229
|
},
|
|
228
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Verifies the presence of the correct option icon in the alternate answer section
|
|
233
|
+
* @param {number} optionIndex - The index of the option to verify in the alternate answer section
|
|
234
|
+
*/
|
|
235
|
+
verifyAlternateAnswerOptionIconCorrectAnswerSection: (optionIndex) => {
|
|
236
|
+
singleSelectionPage.alternativeAnswerSectionWrapper()
|
|
237
|
+
.within(() => {
|
|
238
|
+
singleSelectionPage.optionWrapperCorrectAnswerSection()
|
|
239
|
+
.eq(optionIndex)
|
|
240
|
+
.within(() => {
|
|
241
|
+
utilities.verifyElementVisibilityState(autoScoredScoringPreviewTab.correctIcon(), 'visible');
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
|
|
229
246
|
/**
|
|
230
247
|
* Verifies that the correct and incorrect icons are not visible in the correct answer section
|
|
231
248
|
* @param {number} optionIndex - The index of the option to verify in the correct answer section
|
|
@@ -295,6 +295,22 @@ const utilities = {
|
|
|
295
295
|
}
|
|
296
296
|
});
|
|
297
297
|
},
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Verifies the selected/not selected state of an element.
|
|
301
|
+
* @param {Cypress.Chainable} selector - The element containing the image
|
|
302
|
+
* @param {string} state - 'selected' | 'notSelected'
|
|
303
|
+
*/
|
|
304
|
+
verifiedElementSelectedNotSelectedState: (selector, state) => {
|
|
305
|
+
switch (state) {
|
|
306
|
+
case 'selected':
|
|
307
|
+
selector.should('have.attr', 'aria-pressed', 'true');
|
|
308
|
+
break;
|
|
309
|
+
case 'notSelected':
|
|
310
|
+
selector.should('have.attr', 'aria-pressed', 'false');
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
},
|
|
298
314
|
}
|
|
299
315
|
|
|
300
316
|
export default utilities
|
package/package.json
CHANGED
|
@@ -173,21 +173,20 @@ export async function runSorryCypressSpinnaker() {
|
|
|
173
173
|
console.log(`command: ${command}`);
|
|
174
174
|
try {
|
|
175
175
|
execSync(command, { stdio: "inherit" });
|
|
176
|
-
if (isOtkv2) {
|
|
177
|
-
const status = await checkRunStatus(ciBuildId);
|
|
178
|
-
process.exit(status);
|
|
179
|
-
}
|
|
180
176
|
} catch (error) {
|
|
181
|
-
console.error("
|
|
177
|
+
console.error("cy2 exited non-zero; polling Sorry-Cypress before exit…");
|
|
182
178
|
console.error("Cypress run error details:", {
|
|
183
179
|
status: error.status,
|
|
184
180
|
message: error.message,
|
|
185
181
|
stack: error.stack
|
|
186
182
|
});
|
|
187
|
-
|
|
188
|
-
console.log("Exiting process with code: 1");
|
|
189
|
-
process.exit(1);
|
|
190
183
|
}
|
|
184
|
+
|
|
185
|
+
if (isOtkv2) {
|
|
186
|
+
const finalStatus = await checkRunStatus(ciBuildId);
|
|
187
|
+
process.exit(finalStatus);
|
|
188
|
+
}
|
|
189
|
+
|
|
191
190
|
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
|
192
191
|
process.exit(0);
|
|
193
192
|
}
|
|
@@ -219,21 +218,20 @@ export async function runSorryCypressSpinnakerSmoke() {
|
|
|
219
218
|
const isOtkv2 = process.env.OTK_VERSION === '2';
|
|
220
219
|
try {
|
|
221
220
|
execSync(command, { stdio: "inherit" });
|
|
222
|
-
if (isOtkv2) {
|
|
223
|
-
const status = await checkRunStatus(ciBuildId);
|
|
224
|
-
process.exit(status);
|
|
225
|
-
}
|
|
226
221
|
} catch (error) {
|
|
227
|
-
console.error("
|
|
222
|
+
console.error("cy2 exited non-zero; polling Sorry-Cypress before exit…");
|
|
228
223
|
console.error("Cypress run error details:", {
|
|
229
224
|
status: error.status,
|
|
230
225
|
message: error.message,
|
|
231
226
|
stack: error.stack
|
|
232
227
|
});
|
|
233
|
-
|
|
234
|
-
console.log("Exiting process with code: 1");
|
|
235
|
-
process.exit(1);
|
|
236
228
|
}
|
|
229
|
+
|
|
230
|
+
if (isOtkv2) {
|
|
231
|
+
const finalStatus = await checkRunStatus(ciBuildId);
|
|
232
|
+
process.exit(finalStatus);
|
|
233
|
+
}
|
|
234
|
+
|
|
237
235
|
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
|
238
236
|
process.exit(0);
|
|
239
237
|
}
|
|
@@ -257,21 +255,20 @@ export async function runSorryCypressSpinnakerMigration() {
|
|
|
257
255
|
const isOtkv2 = process.env.OTK_VERSION === '2';
|
|
258
256
|
try {
|
|
259
257
|
execSync(command, { stdio: "inherit" });
|
|
260
|
-
if (isOtkv2) {
|
|
261
|
-
const status = await checkRunStatus(ciBuildId);
|
|
262
|
-
process.exit(status);
|
|
263
|
-
}
|
|
264
258
|
} catch (error) {
|
|
265
|
-
console.error("
|
|
259
|
+
console.error("cy2 exited non-zero; polling Sorry-Cypress before exit…");
|
|
266
260
|
console.error("Cypress run error details:", {
|
|
267
261
|
status: error.status,
|
|
268
262
|
message: error.message,
|
|
269
263
|
stack: error.stack
|
|
270
264
|
});
|
|
271
|
-
|
|
272
|
-
console.log("Exiting process with code: 1");
|
|
273
|
-
process.exit(1);
|
|
274
265
|
}
|
|
266
|
+
|
|
267
|
+
if (isOtkv2) {
|
|
268
|
+
const finalStatus = await checkRunStatus(ciBuildId);
|
|
269
|
+
process.exit(finalStatus);
|
|
270
|
+
}
|
|
271
|
+
|
|
275
272
|
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
|
276
273
|
process.exit(0);
|
|
277
274
|
}
|
|
@@ -287,16 +284,16 @@ export async function runSorryCypressSpinnakerSmokeCopy() {
|
|
|
287
284
|
|
|
288
285
|
// Define specific folders to run smoke tests from (subset of tests - approximately 60%)
|
|
289
286
|
const testFolders = [
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
287
|
+
"cypress/e2e/ILC/SingleSelection/**/*.smoke.js",
|
|
288
|
+
"cypress/e2e/ILC/MultipleSelection/**/*.smoke.js",
|
|
289
|
+
"cypress/e2e/ILC/ShortTextResponseNew/**/*.smoke.js",
|
|
290
|
+
"cypress/e2e/ILC/ThinkSphere/**/*.smoke.js",
|
|
294
291
|
|
|
295
292
|
"cypress/e2e/ILC/FillInTheGapsTextNew/**/*.smoke.js",
|
|
296
293
|
"cypress/e2e/ILC/FillInTheGapsDropdownNew/**/*.smoke.js",
|
|
297
294
|
"cypress/e2e/ILC/FillInTheGapsDragAndDropNew/**/*.smoke.js",
|
|
298
295
|
"cypress/e2e/ILC/Matching/**/*.smoke.js",
|
|
299
|
-
|
|
296
|
+
"cypress/e2e/ILC/ShortTextResponseNew/**/*.smoke.js"
|
|
300
297
|
].join(",");
|
|
301
298
|
|
|
302
299
|
let command = `cy2 run --parallel --browser chrome --record --key imaginelearning/itemengine-cypress-automation --ci-build-id ${ciBuildId} ${envArgs} --spec "${testFolders}"`;
|
|
@@ -305,21 +302,20 @@ export async function runSorryCypressSpinnakerSmokeCopy() {
|
|
|
305
302
|
const isOtkv2 = process.env.OTK_VERSION === '2';
|
|
306
303
|
try {
|
|
307
304
|
execSync(command, { stdio: "inherit" });
|
|
308
|
-
if (isOtkv2) {
|
|
309
|
-
const status = await checkRunStatus(ciBuildId);
|
|
310
|
-
process.exit(status);
|
|
311
|
-
}
|
|
312
305
|
} catch (error) {
|
|
313
|
-
console.error("
|
|
306
|
+
console.error("cy2 exited non-zero; polling Sorry-Cypress before exit…");
|
|
314
307
|
console.error("Cypress run error details:", {
|
|
315
308
|
status: error.status,
|
|
316
309
|
message: error.message,
|
|
317
310
|
stack: error.stack
|
|
318
311
|
});
|
|
319
|
-
|
|
320
|
-
console.log("Exiting process with code: 1");
|
|
321
|
-
process.exit(1);
|
|
322
312
|
}
|
|
313
|
+
|
|
314
|
+
if (isOtkv2) {
|
|
315
|
+
const finalStatus = await checkRunStatus(ciBuildId);
|
|
316
|
+
process.exit(finalStatus);
|
|
317
|
+
}
|
|
318
|
+
|
|
323
319
|
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
|
324
320
|
process.exit(0);
|
|
325
321
|
}
|
|
@@ -372,21 +368,20 @@ export async function runSorryCypressQuestions() {
|
|
|
372
368
|
console.log(`Running Command: ${command}`);
|
|
373
369
|
try {
|
|
374
370
|
execSync(command, {stdio: "inherit"});
|
|
375
|
-
if (isOtkv2) {
|
|
376
|
-
const status = await checkRunStatus(ciBuildId);
|
|
377
|
-
process.exit(status);
|
|
378
|
-
}
|
|
379
371
|
} catch (error) {
|
|
380
|
-
console.error("
|
|
372
|
+
console.error("cy2 exited non-zero; polling Sorry-Cypress before exit…");
|
|
381
373
|
console.error("Cypress run error details:", {
|
|
382
374
|
status: error.status,
|
|
383
375
|
message: error.message,
|
|
384
376
|
stack: error.stack
|
|
385
377
|
});
|
|
386
|
-
|
|
387
|
-
console.log("Exiting process with code: 1");
|
|
388
|
-
process.exit(1);
|
|
389
378
|
}
|
|
379
|
+
|
|
380
|
+
if (isOtkv2) {
|
|
381
|
+
const finalStatus = await checkRunStatus(ciBuildId);
|
|
382
|
+
process.exit(finalStatus);
|
|
383
|
+
}
|
|
384
|
+
|
|
390
385
|
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
|
391
386
|
process.exit(0);
|
|
392
387
|
}
|
|
@@ -404,21 +399,20 @@ export async function runSorryCypressSpinnakerDataApi() {
|
|
|
404
399
|
const isOtkv2 = process.env.OTK_VERSION === '2';
|
|
405
400
|
try {
|
|
406
401
|
execSync(command, { stdio: "inherit" });
|
|
407
|
-
if (isOtkv2) {
|
|
408
|
-
const status = await checkRunStatus(ciBuildId);
|
|
409
|
-
process.exit(status);
|
|
410
|
-
}
|
|
411
402
|
} catch (error) {
|
|
412
|
-
console.error("
|
|
403
|
+
console.error("cy2 exited non-zero; polling Sorry-Cypress before exit…");
|
|
413
404
|
console.error("Cypress run error details:", {
|
|
414
405
|
status: error.status,
|
|
415
406
|
message: error.message,
|
|
416
407
|
stack: error.stack
|
|
417
408
|
});
|
|
418
|
-
|
|
419
|
-
console.log("Exiting process with code: 1");
|
|
420
|
-
process.exit(1);
|
|
421
409
|
}
|
|
410
|
+
|
|
411
|
+
if (isOtkv2) {
|
|
412
|
+
const finalStatus = await checkRunStatus(ciBuildId);
|
|
413
|
+
process.exit(finalStatus);
|
|
414
|
+
}
|
|
415
|
+
|
|
422
416
|
console.log("Cypress tests all passed successfully. Exiting process with code: 0");
|
|
423
417
|
process.exit(0);
|
|
424
418
|
}
|