Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After Uploading an Image ( using t.setFilesToUpload() method ) , the image stored on the Azure Blob Storage is truncated and fetched Image is Broken #8299

Closed
SamShot81 opened this issue Oct 16, 2024 · 2 comments
Labels
STATE: Duplicate An issues has been already reported in the other thread. TYPE: bug The described behavior is considered as wrong (bug).

Comments

@SamShot81
Copy link

What is your Scenario?

I am trying to test a basic feature to see if the Company logo is uploaded successfully.

To upload the Image which is a PNG type file of size 7KB named manas.png I am using the method .setFilesToUpload method. It works as expected and uploads the file successfully. The problem occurs when I try to verify if the image is uploaded successfully.
On investigating I found out that the image is uploaded and gets to the Azure Blob storage but it is being truncated during uploading procedure and the size of the file on Blob Storage is 2.9Kb.

What is the Current behavior?

The image is uploaded and it reaches the Blob but is truncated and breaks, so I cannot test and confirm if its working or not.

What is the Expected behavior?

Image should be uploaded seamlessly and displayed without any problems

What is the public URL of the test page? (attach your complete example)

https://portal.fsm.epicor.com/

What is your TestCafe test code?

Test Case

test('Verify New Company Logo Functioning Successfully', async (t: TestController) => {

await t
    .setFilesToUpload('#imageFile', '../../../../../../Images/Photos/manas.png')
    .click(Selector('div').withAttribute('aria-label', 'Upload'))

});

Your complete configuration file

module.exports = {
skipJsErrors: true,
hooks: {

// fixture:{
//   before: async (t) => {
//     await t
//       .maximizeWindow();
//   }
// },
test: {
  before: async (t) => {
    await t

      .maximizeWindow();

  },
},
reporter: {
  onBeforeWrite: {
    'spec': hookFunction
  },
},

},
};

let i = 1
function hookFunction(writeInfo, testRuninfo, name) {
if (writeInfo.initiator === 'reportTestDone') { // Determine the reporter event
const dateTime = new Date().toLocaleString('en-US', { timeZone: 'GMT' });
writeInfo.formattedText = i++ + " - " + dateTime + writeInfo.formattedText;
//writeInfo.formattedText = "NUMBER OF TEST EXECUTED : " + (++i)
};
}

Your complete test report

N/A

Screenshots

Screenshot of Azure Blob Storage to prove that it is uploaded successfully but the SIZE IS REDUCED
image

Below is the image of how it looks.
image
Expecting to see the uploaded image.

Steps to Reproduce

TestCafe version

3.5.0

Node.js version

v21.6.2

Command-line arguments

testcafe chrome ./mytestfile.ts

Browser name(s) and version(s)

  • Chrome 129.0.0.0

Platform(s) and version(s)

Windows 11

Other

No response

@SamShot81 SamShot81 added the TYPE: bug The described behavior is considered as wrong (bug). label Oct 16, 2024
@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 16, 2024
@SamShot81 SamShot81 changed the title After Uploading an Image ( using t.setFilesToUpload() method ) , the image is truncated on the Azure Blob Storage and Image is Broken After Uploading an Image ( using t.setFilesToUpload() method ) , the image stored on the Azure Blob Storage is truncated and fetched Image is Broken Oct 16, 2024
@Bayheck
Copy link
Collaborator

Bayheck commented Oct 17, 2024

Hello,
I believe the issue was fixed in TestCafe v3.6.2

Please update your version and let us know your results.

Original issue: #8198.

I'll close this issue as a duplicate.

@Bayheck Bayheck closed this as completed Oct 17, 2024
@testcafe-need-response-bot testcafe-need-response-bot bot removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 17, 2024
@Bayheck Bayheck added the STATE: Duplicate An issues has been already reported in the other thread. label Oct 17, 2024
@SamShot81
Copy link
Author

Thanks. This works after updating.

@testcafe-need-response-bot testcafe-need-response-bot bot added the STATE: Need response An issue that requires a response or attention from the team. label Oct 17, 2024
@Bayheck Bayheck removed the STATE: Need response An issue that requires a response or attention from the team. label Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
STATE: Duplicate An issues has been already reported in the other thread. TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

2 participants