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
docs: fix pointerName
property in pointer API docs
#1383
base: main
Are you sure you want to change the base?
docs: fix pointerName
property in pointer API docs
#1383
Conversation
✅ Deploy Preview for testing-library ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
pointerName
property in pointer API docspointerName
property in pointer API docs
Thanks @ZeeshanTamboli. It looks like this is indeed the required behavior, if something isn't working properly, please file an issue for this one in the user-event repo. |
@MatanBobi @timdeschryver I'm trying to test textarea resizing with the user-event library to ensure it doesn't glitch. Here's what I've done: it.only('should not glitch when resizing textarea', async function test() {
if (/jsdom/.test(window.navigator.userAgent)) {
this.skip();
}
const { container } = render(<TextareaAutosize />);
const textarea = container.querySelector<HTMLTextAreaElement>('textarea')!;
console.log('before textarea.style.height: ', textarea.style.height);
// Get the element's dimensions
const { top, left, width, height } = textarea.getBoundingClientRect();
// Calculate coordinates of bottom-right corner
const bottomRightX = left + width;
const bottomRightY = top + height;
const user = userEvent.setup();
await user.pointer([
{
keys: '[MouseLeft>]',
target: textarea,
},
{
pointerName: 'MouseLeft',
target: textarea,
coords: { clientX: bottomRightX, clientY: bottomRightY },
},
'[/MouseLeft]',
]);
console.log('after textarea.style.height: ', textarea.style.height);
}); But I'm getting an error saying
Do you still want me to create an issue? |
I assume that this is different for pointers, let's wait for @ph-fritsche to respond as he knows this area best :) I'll re-open. |
No description provided.