Skip to content

Add Example: stencil component with a form and test #677

@toddjspin

Description

@toddjspin

Can you add a test example of a stencil component that has a form that calls a method in that component with the onSubmit. I can't get this to work in the test as it seems the method that is called is being mocked by jest. Thanks!

`<form name="claimSearchForm" onReset={() => this.resetForm()}
onSubmit={(e) => this.handleSubmit(e)} ref={(el) => this.claimForm = el as HTMLFormElement}
class="needs-validation" novalidate enctype="multipart/form-data">

async handleSubmit(e) {
console.log("handle called");
e.preventDefault();
}`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions