-
Notifications
You must be signed in to change notification settings - Fork 881
chore(site): add tests for deprecate template flow #12685
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
Conversation
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.
Looks good!
await deprecateTemplate(MockTemplate, deprecationMessage); | ||
|
||
const [templateId, data] = updateTemplateMetaSpy.mock.calls[0]; | ||
await waitFor(() => expect(templateId).toEqual(MockTemplate.id)); |
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.
Does this waitFor
do anything? It looks like it is comparing two static IDs so the result would never change, or am I missing something?
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.
You are right
); | ||
|
||
const [templateId, data] = updateTemplateMetaSpy.mock.calls[0]; | ||
await waitFor(() => expect(templateId).toEqual(MockTemplate.id)); |
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.
Same question here about waitFor
.
Merge activity
|
Closes #12505