GithubHelp home page GithubHelp logo

Comments (4)

gethinwebster avatar gethinwebster commented on August 26, 2024 1

I've taken a bit more of a look into this and I can indeed recreate it, although in vitest only: it doesn't occur in our own tests, but they use jest.

I have a feeling it has something to do with our use of motion/transitions in the component, but usual things like disabling motion or fake timers don't seem to help. I'll continue to look into this a bit further.

from components.

MathiasSM avatar MathiasSM commented on August 26, 2024

They seem to be correctly wrapped for both current version and your version (keep in mind SelectWrapper extends that class)

Could it be because of the async test callback? (I don't think it should affect it but no idea)

For maintainers: I wonder if this test has the same issue?

Disclaimer: I'm not a mantainer for this package

from components.

gethinwebster avatar gethinwebster commented on August 26, 2024

We are continuing to investigate fixing this internally, but as a workaround, you can get rid of the warnings by wrapping open/close dropdown actions in an async act call:

test('thing', async () => {
	const { container } = render(<TestThing />);
	const select = wrapper(container).findSelect()!;
	await act(async () => select.openDropdown()};
	await act(async () => select.closeDropdown()};
});

from components.

JElgar avatar JElgar commented on August 26, 2024

Thanks @gethinwebster. That work around works! Head us that Ive also observed this issue with dialogs. Would it make sense to keep this issue open until a fix is released or is that not how you do things around here?

from components.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.