No step for downloads — how do I assert that an export produced a real CSV?
Asked 4,030 views2 answers
21votes
We have about a dozen export buttons. The most I can assert from a feature file today is that a toast appeared, which passed happily for two weeks while the export was returning an empty file.
Is there a download step anywhere? I cannot find one in the step library.
Given what you described — a toast that passed while the file was empty — please assert on content and not just on the filename. A zero-byte report.csv satisfies every filename check you can write.
Minimum useful pair: a byte size above some floor, and a row count that matches something you know (the number of rows the UI was showing). The second one has caught genuine bugs for us twice, both times a filter that applied on screen and not in the export.