Skip to content
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

Bug when toFill matcher try to clear input of type number #411

Closed
rjurado01 opened this issue May 25, 2021 · 1 comment · Fixed by #412
Closed

Bug when toFill matcher try to clear input of type number #411

rjurado01 opened this issue May 25, 2021 · 1 comment · Fixed by #412
Labels

Comments

@rjurado01
Copy link

rjurado01 commented May 25, 2021

🐛 Bug Report

toFill matcher fails when input type is number

To Reproduce

<input id="input" type="number">
await expect(page).toFill('#input', '2018')
await expect(page).toFill('#input', '2018')

image

Expected behavior

Clear value before fill new value

Technical details

The error occurs on selectAll method. When line 8 is executed it through this error:

image

Then the code: elementHandle.focus() is executed but it seems that content is not selected.

I confirm that this code on my chrome / firefox console, does not work either:

image

I'm runing test on chrome headless using jest-puppeteer 5.0.3

Possible alternatives

await page.click(selector, {clickCount: 3})
await page.keyboard.press('Backspace')
@UziTech
Copy link
Contributor

UziTech commented May 26, 2021

This should be fixed in v5.0.4 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants