Skip to content

Form missing emitted data when submit #282

Open
@maartenvanhunsel

Description

@maartenvanhunsel

Hi all,

I've also opened an issue in the Formkit repository but I still think it's a vue-testing-library related issue.

Describe the bug
When logging emailField and passwordField I'm getting the values I've added using fireEvent.update.
However when we submit the form @submit is missing the internal formData when using @submit.

To Reproduce Steps to reproduce the behavior:
https://stackblitz.com/edit/github-k2bhcr?file=app.vue,nuxt.config.ts,components%2FFormExample.vue,.vscode%2Fsettings.json,components%2FFormExample.test.js

Expected behavior
The loginHandler in FormExample.vue should have data which is provided by the form.

Related information:

  • @testing-library/vue version: 6.6.1
  • Vue version: 3
  • node version: 16.14.2
  • npm (or yarn) version: yarn 1.22.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions