Replies: 3 comments 1 reply
-
This is a great topic. To me, this comes down to being mindful of changes to your payload config during code review. I've run into similar scenarios when working with DynamoDB (NoSQL) at previous places. We do have some work related to migrations coming out with the next major release that may assist in this aspect, though. In the meantime, I have a few suggestions:
I'm curious what you had in mind here. Definitely open to ideas. |
Beta Was this translation helpful? Give feedback.
-
Thanks @ssyberg for raising this issue. And while reviewing PRs and preview testing is nice we also can't test everything that may be indirectly impacted. I'm curious about some e2e solutions; possibly with Cypress or similar on Github actions. Unsure on whether this will be easy/possible with Payload but recommended approaches to an automated solution would be awesome. On the site side of things which is Next.js there are numerous recommendations I can lean into. |
Beta Was this translation helpful? Give feedback.
-
For sure, I can tell you what we've settled on for now that feels pretty good overall:
The main things we are testing here: FWIW we have ~30 collections and this all runs in about 3-5 minutes. Leaving vitest up locally it runs continuously during development, the longest part of the process is reseeding data after a model change. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
So this isn't super specific to Payload as I've encountered various testing issues across multiple CMS solutions, but I'm interested what people are doing and if it might even make sense to incorporate some baseline testing into Payload/documentation.
With a relational based CMS, model changes (or collection config changes in Payload) that might result in broken data often get exposed while trying to generate migrations. With document/flatfile based persistence layers, we generally don't have this feature and it can be tricky to pinpoint what change led to your admin/API malfunctioning. I often stumble upon a broken admin list view or detail view from some previous PR.
Does anyone have a simple test suite that exposes this during CI? Hitting every API endpoint with a GET would probably be a decent start...
Beta Was this translation helpful? Give feedback.
All reactions