-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[UI v2] test: Adds tests for global concurrency view #16333
Conversation
90c0d01
to
a077cbf
Compare
e9b6de5
to
e498db2
Compare
66f007b
to
7c69e16
Compare
5ad6562
to
b343140
Compare
8d6d63d
to
793b837
Compare
active_slots: [] as Array<string>, | ||
}; | ||
|
||
test.skip("CreateLimitDialog calls onSubmit upon entering form data", 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.
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.
Could it be because the ResizeObserverMock
isn't in a beforeAll
?
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.
that didn't fix it.
I'm pretty stumped on this one
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, that's really weird. Especially considering the tests for the other dialogs are fine 🫠
793b837
to
5c81614
Compare
5c81614
to
3d5bd60
Compare
await user.click(screen.getByRole("button", { name: /save/i })); | ||
|
||
// ------------ Assert | ||
expect(mockOnSubmitFn).toHaveBeenCalledOnce(); |
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.
Can you assert that this has been called with the expected values?
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.
I've updated the other calls to validate to be called with expected values.
This one is just a UI callback (in this case onSubmit
is just a callback to close the dialog)
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.
Gotcha, I guess I was hoping for a test verifying the form values make it to the API call correctly, but maybe that's a better PlayWright test.
await user.click(screen.getByRole("button", { name: /update/i })); | ||
|
||
// ------------ Assert | ||
expect(mockOnSubmitFn).toHaveBeenCalledOnce(); |
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.
Can you assert that this has been called with the expected values?
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 as comment above
ui-v2/src/components/concurrency/global-concurrency-view/data-table/data-table.test.tsx
Show resolved
Hide resolved
active_slots: [] as Array<string>, | ||
}; | ||
|
||
test.skip("CreateLimitDialog calls onSubmit upon entering form data", 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.
Could it be because the ResizeObserverMock
isn't in a beforeAll
?
885a60a
to
4c9e55d
Compare
89b6de8
to
bfae1f3
Compare
bfae1f3
to
52bd8d0
Compare
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.
LGTM!
Checklist
<link to issue>
"mint.json
.Relates to #15512