You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constCustomForm=()=>(<formonLoad={()=>{console.log('onLoad');// this is not triggered}}data-testid="formmy"></form>);test('SendToCheckButton is disabled if form has unsaved changes',async()=>{awaitact(async()=>{awaitrender(<CustomForm/>);});constform=awaitscreen.findByTestId('formmy');act(()=>fireEvent.load(form));});
What you did:
Hi I'm trying to fire onLoad event on the form but it does not work
it only works inside the addEventListener funtion: form.addEventListener('load', () => console.log('load'));
is there a way to make onLoad work on the form component when calling fireEvent.load?
The text was updated successfully, but these errors were encountered:
komarovalexander
changed the title
form do not trigger onLoad event
fireEvent does not trigger onLoad event on form component
Jan 30, 2023
komarovalexander
changed the title
fireEvent does not trigger onLoad event on form component
fireEvent does not trigger onLoad event of form component
Jan 31, 2023
@testing-library/react
version: 13.0.0Relevant code or config:
What you did:
Hi I'm trying to fire onLoad event on the form but it does not work
it only works inside the addEventListener funtion: form.addEventListener('load', () => console.log('load'));
is there a way to make onLoad work on the form component when calling fireEvent.load?
The text was updated successfully, but these errors were encountered: