chore(Form): catch-up with v2 changes (#2165)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Romain Hamel
2024-09-10 14:09:42 +02:00
committed by GitHub
parent 9ddfec123e
commit 175229384f
8 changed files with 33 additions and 21 deletions

View File

@@ -228,7 +228,7 @@ describe('Form', () => {
expect(passwordField.text()).toBe('Required')
})
test('valid submit works', async () => {
test('validate on submit works', async () => {
state.email = 'bob@dylan.com'
state.password = 'strongpassword'
@@ -236,6 +236,7 @@ describe('Form', () => {
expect(wrapper.setupState.onSubmit).toHaveBeenCalledTimes(1)
expect(wrapper.setupState.onSubmit).toHaveBeenCalledWith(expect.objectContaining({
type: 'submit',
data: {
email: 'bob@dylan.com',
password: 'strongpassword'