quiet icon indicating copy to clipboard operation
quiet copied to clipboard

Create e2e test for sending files of all sizes

Open holmesworcester opened this issue 2 years ago • 3 comments

We suspect unreliability when sending large files, so let's create an e2e test for this.

The test should:

  1. Send multiple large files between two clients
  2. Send messages at some intervals and confirm that these are received within a reasonable amount of time (5 seconds, e.g.)

UPDATE: there are many issues sending files of all sizes. We need e2e tests for files of all sizes, single files, multiple files, in many combinations.

We should have e2e tests on mobile for this too.

holmesworcester avatar Jul 18 '23 14:07 holmesworcester

There is an easy way to upload file in Selenium (.sendKeys()) but it assumes that application has regular 'input' element with type=file. Right now we don't have that, we use custom contenteditable (divs) + extra logic.

One can use a workaround in test - copy file to clipboard and paste it (ctrl+v) to our input.

EmiM avatar Aug 02 '23 11:08 EmiM

That works for me!

Is there a reason we can't use an input element? Mostly just curious but it would be nice to be able to test all the different ways of sending a file (file select as well as copy paste)

holmesworcester avatar Aug 02 '23 12:08 holmesworcester

This issue is still relevant; however, while re-writing downloads that @Isla handled, she covered a few tests:

  • uploading an image and checking if another user can see it,
  • uploading a small file and checking if another user successfully downloads it automatically,
  • uploading a larger file and starting a download but canceling it immediately.

kingalg avatar Jan 30 '25 13:01 kingalg