PersonaFlow / agentstack

A platform for building configurable, database-backed generative AI agentic assistants.
MIT License
11 stars 0 forks source link

Configure UI unit tests #167

Closed s2sa4v closed 3 months ago

s2sa4v commented 4 months ago

Configures Jest test runner with testing-library/react. Adds a simple test to assistand-builder to verify that everything is working and can be mocked. Updates Readme file. Adds UI Setup instructions.

Closes #169

s2sa4v commented 3 months ago

Awesome, thanks Stas! Were there any updates / modifications needed for server side components (we don't have many though right now if at all... been just trying to build first)? Or do you think it will just work as normal?

Great question, Kris! I do not have any experience with testing server side components yet but I believe that if they are not async server components, we should be able to test them with this setup. Async server components are recommended to be tested with e2e. I am not planning on configuring e2e tests right now, though. I think it's a bit early for e2e tests but we can talk about that.

krishokr commented 3 months ago

Awesome, thanks Stas! Were there any updates / modifications needed for server side components (we don't have many though right now if at all... been just trying to build first)? Or do you think it will just work as normal?

Great question, Kris! I do not have any experience with testing server side components yet but I believe that if they are not async server components, we should be able to test them with this setup. Async server components are recommended to be tested with e2e. I am not planning on configuring e2e tests right now, though. I think it's a bit early for e2e tests but we can talk about that.

Sounds good! That totally makes sense - yeah, definitely no async server components yet. I was having some trouble getting ReactQuery to play with SSR generally which is why I went with client components for everything. I'd definitely like to revisit that though because that's sorta a big point of using Next I think..