Testing Example Not Updated for v3, Only Shows MongoDB Test Approach
While trying to follow the examples/testing approach to test a new v3 project, I quickly found many errors cropping up on the payload.init() call and checked - the example seems to be for PayloadCMS 2.0 only, not 3.0. Also, I could not figure out for the life of me what started the in-memory MongoDB server, there are no explicit calls to the library I could find or any passing of the connection parameters to the PayloadCMS instance. In any case, it would be great to upgrade this example to 3.0 and show setup for any of the other drivers. I couldn't find anything obvious in the core tests, I found helpers to start the in-memory MongoDB server but nothing for other databases.
hi! I'm also interested in an example repo showing how to write e2e tests, especially for the Admin Panel. i see you've removed this outdated testing example: https://github.com/payloadcms/payload/pull/10370 . I've tried my best to follow the testing setup you are using for core package development, but I'm finding it difficult to synthesize this into a setup intended for an app just using Payload.
an example setting up MongoDB server & using Cypress or Playwright for e2e tests would be really helpful!
So do you find anyway to setup test ? I am struggling with it too
Hi @stevekuznetsov, apologies for the extreme delay in response here. Our examples have since been updated to v3, this report should no longer be an issue. If you have any other problems, feel free to open a new issue here. Thank you!
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.