In my application, I am testing a download function that works by clicking a button. I know I can check if a download of a file with a known name happened with:
cy.readFile(path.join(downloadsFolder, "tickets.pdf")).should("exist");
But how can I check if a different pdf is downloaded into the same folder, while I don't know the name of the pdf?