payload icon indicating copy to clipboard operation
payload copied to clipboard

Testing Example Not Updated for v3, Only Shows MongoDB Test Approach

Open stevekuznetsov opened this issue 1 year ago • 4 comments

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.

stevekuznetsov avatar Jan 06 '25 00:01 stevekuznetsov

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!

dave-wwg avatar Jan 29 '25 18:01 dave-wwg

So do you find anyway to setup test ? I am struggling with it too

VoThanhDanh95 avatar Jun 27 '25 14:06 VoThanhDanh95

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!

JessRynkar avatar Jan 19 '26 17:01 JessRynkar

This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.

github-actions[bot] avatar Jan 27 '26 05:01 github-actions[bot]