Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

fix(netlify): get interaction testing working in netlfiy #32

Closed

Conversation

virtuoushub
Copy link
Collaborator

act(...) is not supported in production builds of React.

```
act(...) is not supported in production builds of React.
```
@netlify
Copy link

netlify bot commented Apr 19, 2022

Deploy Preview for redwoodjs-example-storybook failed.

Name Link
🔨 Latest commit 8737095
🔍 Latest deploy log https://app.netlify.com/sites/redwoodjs-example-storybook/deploys/625f2ec7f4123600086188dd

```
8:51:29 AM:   Error message
8:51:29 AM:   Deploy did not succeed: Deploy directory 'web/dist' does not exist
```
https://app.netlify.com/sites/redwoodjs-example-storybook/deploys/625eaf738961de0008b38d9a
wat?

> By default, Netlify’s buildbot sets NODE_ENV to development.

https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-environment
?

```
4:19:36 PM: /opt/build/repo/node_modules/fs-extra/lib/util/stat.js:42
4:19:36 PM:       return cb(new Error(errMsg(src, dest, funcName)))
4:19:36 PM: Creating deploy upload records
4:19:36 PM:                 ^
4:19:36 PM: Error: Cannot copy '/opt/build/repo/web/public' to a subdirectory of itself, '/opt/build/repo/web/public/storybook/'.
4:19:36 PM:     at /opt/build/repo/node_modules/fs-extra/lib/util/stat.js:42:17
4:19:36 PM:     at processTicksAndRejections (node:internal/process/task_queues:83:21)
4:19:36 PM: ​
4:19:36 PM: (build.command completed in 13.8s)
```
This reverts commit 393aebb.
@virtuoushub
Copy link
Collaborator Author

this started working for whatever reason...

@virtuoushub
Copy link
Collaborator Author

Seems like prod Storybook builds are still not working as expected.

See this message specifically

Sure, any static assets I understand, and I'm used to seeing that e.g. for fonts or images, but I'm also seeing output in the console of the deployed storybook indicating un-intercepted graphql requests, which I believe are passed through to hit the real server (right?). In development I get output indicating what I believe are successful MSW requests. I'm seeing different data between the two as well -- mocked data from ArticleCell.mock.js in development, but data from scripts/seed.js in the deployed storybook. So I'm still trying to figure out whether it's intended that the deployed storybook should use the same mocks as development, or if seeing live data like this is actually the expected behavior.

Are you seeing different results than I am in the console and/or displayed data?

expected
msw expected

actual
msw actual

Will most likely want to add this to redwoodjs/redwood#5269

@virtuoushub virtuoushub deleted the fix/get-interaction-testing-working-in-netlfiy branch May 27, 2022 20:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant