itemengine-cypress-automation 1.0.172-uploadResponseMigration-88018d1.0 → 1.0.173-uploadResponseMigration-c1e2b7c.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ export const iePage = {
|
|
27
27
|
shortTextResponseCorrectAnswerText: () => cy.get('[class*="CorrectAnswerValueWrapper"]'),
|
28
28
|
specialCharactersButtonPreviewTab: () => cy.get('.custon-special-character-button'),
|
29
29
|
uploadResponseCaptureImage: () => cy.get('[aria-label="capture an image"]'),
|
30
|
+
|
30
31
|
steps: {
|
31
32
|
verifyQuestionInstructions: (expectedQuestionData) => {
|
32
33
|
if (expectedQuestionData.previewQuestionInstructions) {
|
@@ -559,7 +560,7 @@ export const verifyIeQuestionData = {
|
|
559
560
|
};
|
560
561
|
});
|
561
562
|
},
|
562
|
-
|
563
|
+
|
563
564
|
uploadResponse: (expectedQuestionData, index) => {
|
564
565
|
cy.get('.ngie-upload-response')
|
565
566
|
.eq(index)
|
@@ -569,7 +570,7 @@ export const verifyIeQuestionData = {
|
|
569
570
|
.invoke('attr', 'aria-label')
|
570
571
|
.then((ariaLabel) => {
|
571
572
|
let supportedFormatsText = ariaLabel.replace('Supported file formats: ', '').replace(/\.$/, '').trim();
|
572
|
-
let supportedFormatsArray = supportedFormatsText.split(', ');
|
573
|
+
let supportedFormatsArray = supportedFormatsText.split(', ');
|
573
574
|
// Replace "MP4" with "Video" in the supported formats array
|
574
575
|
supportedFormatsArray = supportedFormatsArray.map(format => format === 'MP4' ? 'Video' : format);
|
575
576
|
expect(supportedFormatsArray).to.have.lengthOf(expectedQuestionData.supportedFormatsArray.length);
|
@@ -577,14 +578,14 @@ export const verifyIeQuestionData = {
|
|
577
578
|
expect(expectedQuestionData.supportedFormatsArray).to.include(element);
|
578
579
|
});
|
579
580
|
});
|
580
|
-
|
581
|
+
|
581
582
|
uploadResponsePage.uploadedFileCount()
|
582
583
|
.then(($element) => {
|
583
584
|
let fileLimit = $element[0].innerText;
|
584
585
|
let normalizedFileUploadLimitText = fileLimit.trim().replace(/\s+/g, '');
|
585
586
|
expect(normalizedFileUploadLimitText).to.be.eq(expectedQuestionData.fileLimit);
|
586
587
|
});
|
587
|
-
|
588
|
+
|
588
589
|
if (expectedQuestionData.captureImage) {
|
589
590
|
uploadResponsePage.fileUploadOptionsLabel()
|
590
591
|
.within(() => {
|