Replies: 1 comment
-
There aren't any utilities exposed at the moment but if you want to open a Proposal I don't see why we couldn't expose some helpers alongside our testing utilities. That said, for now, since it's just using https://www.npmjs.com/package/turbo-stream v2.4.1, you can probably get by just using that directly to encode/decode. At one point we upstreamed the code into the RR repo and made I think one very minor change (don't recall what offhand though) but chances are it won't impact your testing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
We’re currently upgrading from Remix 2.8 to React Router v7 and have encountered an issue with our Cypress tests that appears to be related to the Single Fetch implementation.
In many of our test suites, we use
cy.intercept
to mock responses from POST requests and form submissions. Here's an example that would be in one of our tests that mocks an error state on a form submission:When v3_singleFetch is enabled, this test fails with the following error:
Error: Unable to decode turbo-stream response from URL
I assume this is because React Router expects the response to be in turbo-stream format.
We also use
cy.request
to fetch data from other routes for purposes like validating input options on pages. Here's an example:This test is now failing because
categories
is no longer defined.So my questions are:
Thanks in advance for any guidance!
Beta Was this translation helpful? Give feedback.
All reactions