I struggle with writing tests:
play: async ({ canvasElement }) => {
const canvas = within(canvasElement)
const input = within(canvas.getAllByTestId("appointment-date-picker")[0])
const month = input.getByLabelText("month")
const day = input.getByLabelText("day")
const year = input.getByLabelText("year")
const arrowDownButton = input.getByRole("button")
userEvent.click(month)
userEvent.type(month, "[ArrowUp]")
userEvent.tab()
userEvent.type(day, "[ArrowUp]")
userEvent.tab()
userEvent.type(year, "[ArrowUp]")
userEvent.tab()
userEvent.click(arrowDownButton)
},
I have following test.
And last one click doesn't work if done by the testing-library.
If I call just arrowDownButton.click() it works as expected opening calendar.
I'm using 7.0.0-rc4.