Browser mode native browser form validation pauses app and test execution #8222
kevinlaw91
started this conversation in
Feedback
Replies: 1 comment 2 replies
-
|
What is your matcher? These popups are not HTML elements, so they can't be found with locators. You can use const input = page.getByRole('text')
await input.fill('content')
await expect.element(input).toBeValid() |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
So in browser mode(chrome in this example), the browser will attempt to validate form data natively without using js. the app script execution will be paused by the browser.
if i have matchers for custom div error msg below the submit action. the test will be timed out with
Error: Matcher did not succeed in time..So my question is, if I want to test for custom validation error display:
can we disable such native browser feature via vitest config? (so that script execution is continued like no support for native form validation)
or we should fully not test custom error message handling at all and hope the native validation works
I'm curious how you guys did it.
Beta Was this translation helpful? Give feedback.
All reactions