-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Improve browser tests #3547
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
Improve browser tests #3547
Conversation
test/copyPaste.test.tsx
Outdated
expect(getSelectedCell()).not.toHaveClass(copyCellClassName); | ||
expect(onCopySpy).not.toHaveBeenCalled(); | ||
await userEvent.keyboard('{arrowdown}'); | ||
pasteSelectedCell(); | ||
await userEvent.keyboard('{enter}{arrowdown}'); |
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.
Enter
closes the editor
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.
Why is the editor open at this point?
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 forgot about this change. I thought the empty cell was the editor. I will investigate
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.
It is actually the paste operation that triggers the editor. Also, escape
does not work with null
editor
- Use Vitest helpers to simulate copy/paste - Remove `scrollIntoView` mock and check grid position instead
Vitest
helpers to simulate copy/pastescrollIntoView
mock and check grid position instead