-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add product export endpoint and a dummy workflow #8178
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
6 Skipped Deployments
|
|
}) | ||
|
||
describe("POST /admin/products/export", () => { | ||
it("should export a csv file containing the expected products", async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests will be enabled once the workflow is implemented (follow-up PRs)
a60961a
to
ff43330
Compare
expect(workflowId).toBeTruthy() | ||
|
||
// Pull to check the status until it is completed | ||
while (true) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment from someone that is not aware of all the underlying mechanism and not only valid for the test here:
This looks a good use case for the workflow engine and the async workflow triggers the action and we subscribe to that transaction to handle when it is done.
Even to push these events to the UI would be great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah agreed, I just copy-pasted the tests from the original batch tests, and I will be changing them as I am implementing the exports. I'll try using what you suggested instead of the while loop 👍
CLOSES CC-222