decaporg / decap-cms

A Git-based CMS for Static Site Generators
https://decapcms.org
MIT License
17.93k stars 3.04k forks source link

fix: add EOL for files #7039

Closed razonyang closed 9 months ago

razonyang commented 9 months ago

Closes #1382

Summary

Test plan

Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)

netlify[bot] commented 9 months ago

Deploy Preview for decap-www canceled.

Name Link
Latest commit cfe6fae725be36fe26a257e97f7844b5608ec72e
Latest deploy log https://app.netlify.com/sites/decap-www/deploys/65abb744a9a2500008acb4c5
martinjagodic commented 9 months ago

@razonyang the tests are failing because Cypress fixtures don't match anymore. Could you update these too, please?

razonyang commented 9 months ago

Hi @martinjagodic, I'm willing to correct it, but I lost my direction after digging into the code, could you please share some hint?

demshy commented 9 months ago

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

razonyang commented 9 months ago

@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.

demshy commented 9 months ago

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