Closed razonyang closed 9 months ago
Name | Link |
---|---|
Latest commit | cfe6fae725be36fe26a257e97f7844b5608ec72e |
Latest deploy log | https://app.netlify.com/sites/decap-www/deploys/65abb744a9a2500008acb4c5 |
@razonyang the tests are failing because Cypress fixtures don't match anymore. Could you update these too, please?
Hi @martinjagodic, I'm willing to correct it, but I lost my direction after digging into the code, could you please share some hint?
hi @razonyang I hope you don't mind me taking this over, but currently recording fixtures does not really work because the whole cypress part is awaiting a large overhaul. The process that I currently use is quite manual and specific, so I will describe it here for future reference (also for me and @martinjagodic). I wanted to write these instructions but after I was finished the tests were working already, so it didn't make sense to me to make you do them again :)
a) run yarn test:e2e
and wait for it to finish, to see which tests failed
b) run yarn test:e2e:dev
and manually run the failed test(s) with the console open
c) notice the yellow warning about 404 request right before the test failing - it contains a content hash that you'll want to copy
d) find the correct file for the test in cypress/fixtures and find the request - in this case you could search by the hash start, since only the ending of the content is different
e) once you found the request, find and replace content hash with the one you copied from step c)
repeat b) until the test passes.. by using find and replace you possibly fixed multiple tests so if you suspect this, do a) again
@demshy Of course I don't mind, I'm completely newbie on this project, I have no idea on how to fix the tests, now I learned it from your code.
No worries, it's quite overwhelming for most of us. As I said the goal is to make this more automatic and documented, but one step at a time I guess :)
Anyhow, this seemed to do the trick
Closes #1382
Summary
Test plan
Checklist
Please add a
x
inside each checkbox:A picture of a cute animal (not mandatory but encouraged)