Wallaby Using Old Assets Even After Rebuild? #650
-
Hi, I’ve got a wallaby test I’m running with two sessions. The first creates a database entity and then navigates to that URL. The second navigates to the url that the first one created. The problem I’m having is that something is trying to load the wrong record from the database. It’s like something somewhere was cached and it’s still trying to load id 900 when the URL (according to IO.inspect) points to 906. Any thoughts on how to debug this? The error is happening in the channel, not the route being loaded. Data transfer is:
The record being sent by the controller is in fact the correct ID. So the issue is somewhere on the client side <-> channel join. The data is being transferred through a script tag on the DOM that’s sent with the request. So my only thought is that maybe that’s being cached to an old value? I have no idea why that would be the case though as this doesn’t occur ever when manually testing it, only through wallaby. If I update my client to send a new key to the server and then rebuild assets I now get new errors because some of the clients are not sending the new data. I only have one place where channel connection is initiated so this must mean that there’s a client being spawned running old assets. Any ideas for how to debug? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Are you creating any data inside a But, most likely you don't have the ecto sandbox configured for your channels. You probably have to add this to your socket and channel https://github.com/phoenixframework/phoenix_ecto/blob/master/lib/phoenix_ecto/sql/sandbox.ex#L57 Let me know if i'm misunderstanding what you're saying here. |
Beta Was this translation helpful? Give feedback.
#650 (reply in thread)