Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slow userEvent typing #464

Open
carlgieringer opened this issue Jul 13, 2023 · 0 comments
Open

Fix slow userEvent typing #464

carlgieringer opened this issue Jul 13, 2023 · 0 comments
Labels
devprod Development productivity. Local development, automated testing, etc.

Comments

@carlgieringer
Copy link
Contributor

In #462 we fixed a test that was timing out due to userEvent.type taking over 1s. One timing was below ("After typing source description"):

    0.006547033786773682 FlakyTest: start.
    14.387037992477417 FlakyTest: before render.
    129.02622401714325 FlakyTest: after render.
    147.39467698335648 FlakyTest: after msw setup.
    697.5765160322189 FlakyTest: typing proposition text.
    795.5602499842644 FlakyTest: After clicking media excerpt basis radio.
    1358.519621014595 FlakyTest: After typing quotation.
    1536.340575993061 FlakyTest: After clicking to add URL.
    2092.2555230259895 FlakyTest: After typing URL.
    4141.343954026699 FlakyTest: After typing source description.
    4276.237133026123 FlakyTest: After clicking add speaker.
    4766.997620999813 FlakyTest: After typing speaker name.

This error was logged during the action, and so may have been the cause:

console.error
    Warning: `NaN` is an invalid value for the `height` css style property.
        in textarea (created by ForwardRef(TextArea))
        in div (created by ForwardRef(TextArea))
        in div (created by ForwardRef(TextFieldContainer))
        in ForwardRef(TextFieldContainer) (created by ForwardRef(TextArea))
        in ForwardRef(TextArea) (created by ForwardRef(TextAreaWithMessage))
        in div (created by ForwardRef(FormMessageContainer))
        in ForwardRef(FormMessageContainer) (created by ForwardRef(TextAreaWithMessage))
        in ForwardRef(TextAreaWithMessage) (created by ForwardRef(AutoComplete))
        in ForwardRef(AutoComplete) (created by ApiAutoComplete)
        in div (created by ApiAutoComplete)
        in ApiAutoComplete (created by SourceDescriptionAutocomplete)
        in SourceDescriptionAutocomplete (created by MediaExcerptEditorFields)
        in fieldset (created by MediaExcerptEditorFields)
        in div (created by MediaExcerptEditorFields)
        in MediaExcerptEditorFields (created by JustificationEditorFields)
        in div (created by JustificationEditorFields)
        in JustificationEditorFields (created by CreatePropositionPage)
        in section (created by CardText)
        in CardText (created by CreatePropositionPage)
        in div (created by Paper)
        in Paper (created by Card)
        in Card (created by CreatePropositionPage)
        in div (created by CreatePropositionPage)
        in div (created by CreatePropositionPage)
        in form (created by CreatePropositionPage)
        in div (created by CreatePropositionPage)
        in CreatePropositionPage
        in Router (created by Wrapper)
        in Provider (created by Wrapper)
        in Wrapper

I suspect the cause is parseFloat here, but it needs investigation.

We should also check newer versions of react-md to see if the issue may go away (#17), or this issue may become moot if we replace react-md (#304).

@carlgieringer carlgieringer added the devprod Development productivity. Local development, automated testing, etc. label Jul 13, 2023
carlgieringer added a commit that referenced this issue Jul 13, 2023
By increasing test timeout. #464 is for addressing the slowness.

Also:

* Fix some UI errors causing log noise
* Make cancellation logging optional

---------

Signed-off-by: Carl Gieringer <78054+carlgieringer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devprod Development productivity. Local development, automated testing, etc.
Projects
None yet
Development

No branches or pull requests

1 participant