testing-react icon indicating copy to clipboard operation
testing-react copied to clipboard

What is the TypeScript return type of within()?

Open SaavanNanavati opened this issue 3 years ago • 1 comments

  play: async ({ canvasElement }) => {
    const canvas = within(canvasElement);
    await userEvent.type(canvas.getByRole('textbox'), 'Hello world!');
  },
};

In this example, what is the type of canvas? I tried BoundFunctions<HTMLElement> and that did not work. Please let me know :D

SaavanNanavati avatar Aug 17 '22 16:08 SaavanNanavati

And for screen?

SaavanNanavati avatar Aug 17 '22 19:08 SaavanNanavati

Hey @FrozenFury sorry but I believe this question doesn't have anything to do with this library. Happy to be proven wrong, feel free to reopen this issue with more context and I might be able to help you out. Thank you!

yannbf avatar Nov 07 '22 08:11 yannbf