question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After updating version from "10.1.0" to "13.5.0" getting error

See original GitHub issue
  • @testing-library/user-event version: “13.5.0”

Relevant code or config

`longQueryText is more than 5000 characters.

                const errorText =
                    'The size is too big. Please reduce your string.';

                const { getByTestId, getByText, queryByText } = render(
                    <Test/>
                );

                expect(queryByText(errorText)).not.toBeInTheDocument();

                const searchInput = getByTestId('test');
                userEvent.type(searchInput, longQueryText);
                expect(getByText(errorText)).toBeInTheDocument();
            });

What you did:

What happened: Test is failing and getting this error TestingLibraryElementError: Unable to find an element with the text: The query size is too big. Please reduce your string.. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible. Ignored nodes: comments, <script />, <style />

Reproduction repository:

Note: It is passing till 11.4.2 but the issue is happening from version 13.0.0.

Problem description:

Suggested solution:

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
timdeschryvercommented, Oct 26, 2021

@ph-fritsche fyi, I transferred this issue back to user-event.

@Sushmasrig The problem is that type takes too long and thus the error message isn’t show yet. As a work around you can use userEvent.paste.

0reactions
ph-fritschecommented, Oct 27, 2021

Thanks for clearing that up. Yes, type is not meant to be used for thousands of characters. As there usually is nothing to be gained from simulating that amount of typing, we won’t do anything about it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cypress doesn't load or open its window · Issue #22297 - GitHub
Current behavior Cypress won't load and it is indicating a vague cannot find module when I've upgraded to v10.1.0 it was working previously ......
Read more >
Upgrade Panorama Version 10.1.8 to 10.2.0 Failure
I'm trying to update Panorama version 10.1.8 to 10.2.0 but failed. The error indicates that: Failed to install 10.2.0 with the following errors....
Read more >
APP STORE Installed security update 2020-002 and Safari ...
Question: Q: Problems after updates: Safari 13.5.0/13.1 and 2020-002. APP STORE Installed security update 2020-002 and Safari updates 13.0.5 ...
Read more >
Get help with Windows upgrade and installation errors
See some of the most common upgrade and installation errors for Windows 10 and Windows 11, and what you can do to try...
Read more >
VMware Tools 11.3.5 Release Notes
5 and later installer handles this system error condition by displaying a message to the end-user, then allows the install to proceed. After...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found