-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide better example for async snapshot testing #7745
Comments
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Would love a better solution for this! |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
no! bad stale-bot! ... ok, you are just doing your job... but... has no one in the whole storybook-comunity found a better way for asyns snaphost testing? :-/ |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Bumping this, bloody stalebot. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
no! stalebot! we are not done here! |
i want to bump this because i can't believe that there is no better way. I am looking for a solution for over a year now and i am very astonished that no one came up with a solution. my workaround has a lot of downsides, e.g. jest-styled-components does not work with it and the diff is slow and hard to parse. |
https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-puppeteer |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Bump |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
shoo stale bot |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Seems okey by me, thank you. you are awesome. import initStoryshots, { Stories2SnapsConverter } from '@storybook/addon-storyshots';
import { StoryContext } from '@storybook/react/types-6-0';
import { act, create, ReactTestRenderer } from 'react-test-renderer';
const wait = () => act(() => new Promise((resolve) => setTimeout(resolve, 10)));
const converter = new Stories2SnapsConverter();
const runTest = async (story: StoryContext, context: StoryContext) => {
const filename = converter.getSnapshotFileName(context);
if (!filename) return;
const storyElement = story.render();
let tree: ReactTestRenderer | undefined;
act(() => {
tree = create(storyElement) as ReactTestRenderer;
});
await wait();
expect(tree?.toJSON()).toMatchSpecificSnapshot(filename);
tree?.unmount();
};
initStoryshots({
asyncJest: true,
test: ({ story, context, done }) => {
runTest(story, context).then(done);
},
}); |
problem is, that toJSON is not a good idea as it may contain also code from the decorator of the story (and in my case completly breaks because of memory problem). the default does not seem to use toJSON, i could not figure out how the default works. We just need to have the default snapshot mechanism with the additional |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Stalebot no! |
…onentを受け取るように変更 ↓解決策の参考↓ storybookjs/storybook#7745
In case someone will need it, here's an example how we run async snapshot tests in our project using react-testing-library and msw: import initStoryshots from "@storybook/addon-storyshots";
import { act, render } from "@testing-library/react";
import { setupServer } from "msw/node";
initStoryshots({
asyncJest: true,
test: async ({ story, context, done }) => {
const endpoints = context.parameters.msw ?? [];
const server = setupServer(...endpoints);
server.listen();
try {
const jsx = story.render();
const { unmount, rerender, container } = await render(jsx);
// wait for state changes
await act(() => new Promise((resolve) => setTimeout(resolve)));
await rerender(jsx);
expect(container).toMatchSnapshot();
unmount();
done!();
} finally {
server.close();
}
},
}); |
wow that actually works much better and only takes a litte more then half the time of my previous implementation, thank you very much! |
since none of the solutions above worked for my repository — import React from 'react';
import { create, act } from 'react-test-renderer';
import initStoryshots from '@storybook/addon-storyshots';
import wait from 'waait';
initStoryshots({
asyncJest: true,
test: async ({ story, done }) => {
let renderer;
act(() => {
// React.createElement() is important because of hooks [shouldn't call story.render() directly]
renderer = create(React.createElement(story.render));
});
// Let one render cycle pass before rendering snapshot
await act(() => wait(0));
// save all snapshots to the same file (similar to "snapshotWithOptions")
expect(renderer).toMatchSnapshot();
done();
}
}); Or if you want to save the snapshots to multiple files (similar to import React from 'react';
import { create, act } from 'react-test-renderer';
import initStoryshots, { Stories2SnapsConverter } from '@storybook/addon-storyshots';
import wait from 'waait';
const converter = new Stories2SnapsConverter();
initStoryshots({
asyncJest: true,
test: async ({ story, context, done }) => {
let renderer;
act(() => {
// React.createElement() is important because of hooks [shouldn't call story.render() directly]
renderer = create(React.createElement(story.render));
});
// Let one render cycle pass before rendering snapshot
await act(() => wait(0));
// save each snapshot to a different file (similar to "multiSnapshotWithOptions")
const snapshotFileName = converter.getSnapshotFileName(context);
expect(renderer).toMatchSpecificSnapshot(snapshotFileName);
done();
}
}); PS: tested this on |
@millermedeiros Thank you! This helped me enable async testing and get rid of "Component is not wrapped in act" errors from my tests. @annaloukianova I was using createNodeMock to fix Material UI Dialog related warnings in my previous setup, import React from "react";
import ReactDOM from "react-dom";
import initStoryshots, {
Stories2SnapsConverter,
} from "@storybook/addon-storyshots";
import { create, act } from "react-test-renderer";
import wait from "waait";
import "regenerator-runtime/runtime";
// Mock fetch
require("jest-fetch-mock").enableMocks();
//Fix portal / fade related issues
ReactDOM.createPortal = jest.fn((element, node) => {
if (!element.style) {
return React.cloneElement(element, { style: { webkitTransition: "" } });
}
return element;
});
jest.mock("@material-ui/core/Fade");
jest.mock("@material-ui/core/Zoom");
const converter = new Stories2SnapsConverter();
initStoryshots({
asyncJest: true,
test: async ({ story, context, done }) => {
let renderer;
act(() => {
// React.createElement() is important because of hooks [shouldn't call story.render() directly]
renderer = create(React.createElement(story.render), {
// Fix Portal / MUI Dialog issues
createNodeMock: (node) => document.createElement(node.type),
});
});
// Let one render cycle pass before rendering snapshot
await act(() => wait(0));
// save each snapshot to a different file (similar to "multiSnapshotWithOptions")
const snapshotFileName = converter.getSnapshotFileName(context);
expect(renderer).toMatchSpecificSnapshot(snapshotFileName);
done();
},
}); |
Written current code, based on storybookjs/storybook#7745
It's been a couple of years now. Edit: Sorry for my bitchy tone. |
@armordog we're planning an overhaul of storyshots as part of the 6.x/7.0 cycle |
Written current code, based on storybookjs/storybook#7745
thank you to contributors in this thread. also, @shilman is the intent to remove needless boilerplate like that posted above? specifically |
the focus of the overhaul is to make global test running more efficient and transparent. we have a jest transform that converts a story file into a jest file with one test per story. the contents of each test is specified globally by the user, as is done today. the difference is that you can run jest tests (1) in parallel, (2) on a filtered set of files from the CLI, (3) only on changes since the last commit, etc.: all the stuff that jest is great at. what goes inside the |
that sounds really promising! |
* Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Moved related components from canvas. * Changed imports of components. * Fixed renderer and storybook. * Fixed types errors. * Added limits. * Removed useless translations and fixed .i18nrc.json * added `done` handler call. * Added more fixes fo i18nc. * Added docs. * More fixes of i18nrc. * Fixed async functions. Written current code, based on storybookjs/storybook#7745 * Fixed one test with Expression input. After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without mounted `monaco` editor. * Fixed storybook error. * More fixes. * removed unused translations. * Removed handlers and changed the way of handling `resize` and calling `done`. * Fixed i18n error. * Fixed storybook. * Replaced Popover with EuiPopover. * Moved `Popover` back to `canvas` * Removed `Popover` export from presentation_utils components. * Moved error_component and debug_component from presentation_util to expression_error. * Fixed translations and imports. * Moved `debug renderer` to `expression_error` plugin. * Fixed error. * Fixed lazy exports. * Fixed imports * Fixed storybook snapshot. * Removed `.i18nrc.json`. * Fixed color of `error`. * Exported concrete elements from popover. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
* Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Moved related components from canvas. * Changed imports of components. * Fixed renderer and storybook. * Fixed types errors. * Added limits. * Removed useless translations and fixed .i18nrc.json * added `done` handler call. * Added more fixes fo i18nc. * Added docs. * More fixes of i18nrc. * Fixed async functions. Written current code, based on storybookjs/storybook#7745 * Fixed one test with Expression input. After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without mounted `monaco` editor. * Fixed storybook error. * More fixes. * removed unused translations. * Removed handlers and changed the way of handling `resize` and calling `done`. * Fixed i18n error. * Fixed storybook. * Replaced Popover with EuiPopover. * Moved `Popover` back to `canvas` * Removed `Popover` export from presentation_utils components. * Moved error_component and debug_component from presentation_util to expression_error. * Fixed translations and imports. * Moved `debug renderer` to `expression_error` plugin. * Fixed error. * Fixed lazy exports. * Fixed imports * Fixed storybook snapshot. * Removed `.i18nrc.json`. * Fixed color of `error`. * Exported concrete elements from popover. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # packages/kbn-optimizer/limits.yml # src/plugins/expression_error/public/components/debug/debug.tsx
* Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Moved related components from canvas. * Changed imports of components. * Fixed renderer and storybook. * Fixed types errors. * Added limits. * Removed useless translations and fixed .i18nrc.json * added `done` handler call. * Added more fixes fo i18nc. * Added docs. * More fixes of i18nrc. * Fixed async functions. Written current code, based on storybookjs/storybook#7745 * Fixed one test with Expression input. After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without mounted `monaco` editor. * Fixed storybook error. * More fixes. * removed unused translations. * Removed handlers and changed the way of handling `resize` and calling `done`. * Fixed i18n error. * Fixed storybook. * Replaced Popover with EuiPopover. * Moved `Popover` back to `canvas` * Removed `Popover` export from presentation_utils components. * Moved error_component and debug_component from presentation_util to expression_error. * Fixed translations and imports. * Moved `debug renderer` to `expression_error` plugin. * Fixed error. * Fixed lazy exports. * Fixed imports * Fixed storybook snapshot. * Removed `.i18nrc.json`. * Fixed color of `error`. * Exported concrete elements from popover. Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # packages/kbn-optimizer/limits.yml # src/plugins/expression_error/public/components/debug/debug.tsx
Written current code, based on storybookjs/storybook#7745
* expression_reveal_image skeleton. * expression_functions added. * expression_renderers added. * Backup of daily work. * Fixed errors. * Added legacy support. Added button for legacy. * Added storybook. * Removed revealImage from canvas. * Types fixed. * Fixed test suite error. * Fixed eslint error. * Moved UI and elements, related to expressionRevealImage from canvas. * Fixed unused translations errors. * Moved type of element to types. * Fixed types and added service for representing elements, ui and supported renderers to canvas. * Added expression registration to canvas. * Fixed * Fixed mutiple call of the function. * Removed support of a legacy lib for revealImage chart. * Removed legacy presentation_utils plugin import. * Removed useless translations and tried to fix error. * One more fix. * Small imports fix. * Fixed translations. * Made fixes based on nits. * Removed useless params. * fix. * Fixed errors, related to jest and __mocks__. * Removed useless type definition. * Replaced RendererHandlers with IInterpreterRendererHandlers. * fixed supported_shareable. * Moved elements back to canvas. * Moved views to canvas, removed expression service and imported renderer to canvas. * Fixed translations. * Moved libs to presentation utils. * Fixed types and removed function_wrapper.ts * Fixed types of test helpers. * Fixed imports. * One more fix. * Fixed public API. * Moved css to component. * Fixed spaces at element. * Removed unused plugin. * Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Moved related components from canvas. * Changed imports of components. * Removed useless translations and fixed .i18nrc.json * More fixes of i18nrc. * Fixed async functions. Written current code, based on storybookjs/storybook#7745 * Fixed one test with Expression input. After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without mounted `monaco` editor. * generated plugin and copied code from expression_reveal_image * fixed double import after merge. * Changed all names from reveal_image to shape. * moved shape to plugin and added all necessary configs * Fixed translations, fixed all imports and debug of svg. * `function` moved to `server`. * One shape is rewritten to `React` and rendering is written with passing necessary props. * changed default width and heigth. * Added `ShapeHOC`. * Shapes changed. * small refactor. * Removed useless import. * one more refactor. * Refactor + fix errors + updated limits. * Changed ShapePreview from pure js to react and removed `dangerouslySetInnerHTML` * Fixed types of viewbox. * Changed types source for Shape components. * small refactor. * Fixed imports. * Removed `shape` from `canvas` * Updated docs. * Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Changed imports of components. * Fixed errors, related to shape and autosuggestions. * Fixed i18n for shape. * Moved function from public to common and registered at server. * Fixed types error. * Fixed snapshots and shape mocks. * Moved some libs from `presentations_util` to `expression_shape` * Shape refactored. * Shape picker fixed. * Moved `Popover` back to `canvas` * Removed `Popover` export from presentation_utils components. * Moved error_component and debug_component from presentation_util to expression_error. * Removed `.i18nrc.json`. * Removed `.i18nrc.json`. * Removed useless scss. * Fixed color of `error`. * added fixes of rebase. * More fixes of rebase error . * Removed useless .i18nrc.json file. * More fixes. * More fixes of rebase. * One more fix. * More fixes. * Fixed limits and translations. * Added. * Fixed i18nrc. * Fixed error.. * Moved shapes to async chunks. * One more fix. * Some fixes. * Trying to fix the typecheck error. * Added temp of drawer. * Moved shapes to the async chunk in a less complex way. * Made `ShapeDrawer` reusable among different `expressions`. * Changed type of `shapes` from `any` and `Shape` to `string`. * Made changes, based on nits. * Removed not necessary changes. * Moved all reusable libs to `expression_shapes`. * Reduced the size of the bundle. * Hope, fixed type check errors. * Removed getDefaultShapeData. * Removed `getViewBox` from bundle.
* expression_reveal_image skeleton. * expression_functions added. * expression_renderers added. * Backup of daily work. * Fixed errors. * Added legacy support. Added button for legacy. * Added storybook. * Removed revealImage from canvas. * Types fixed. * Fixed test suite error. * Fixed eslint error. * Moved UI and elements, related to expressionRevealImage from canvas. * Fixed unused translations errors. * Moved type of element to types. * Fixed types and added service for representing elements, ui and supported renderers to canvas. * Added expression registration to canvas. * Fixed * Fixed mutiple call of the function. * Removed support of a legacy lib for revealImage chart. * Removed legacy presentation_utils plugin import. * Removed useless translations and tried to fix error. * One more fix. * Small imports fix. * Fixed translations. * Made fixes based on nits. * Removed useless params. * fix. * Fixed errors, related to jest and __mocks__. * Removed useless type definition. * Replaced RendererHandlers with IInterpreterRendererHandlers. * fixed supported_shareable. * Moved elements back to canvas. * Moved views to canvas, removed expression service and imported renderer to canvas. * Fixed translations. * Moved libs to presentation utils. * Fixed types and removed function_wrapper.ts * Fixed types of test helpers. * Fixed imports. * One more fix. * Fixed public API. * Moved css to component. * Fixed spaces at element. * Removed unused plugin. * Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Moved related components from canvas. * Changed imports of components. * Removed useless translations and fixed .i18nrc.json * More fixes of i18nrc. * Fixed async functions. Written current code, based on storybookjs/storybook#7745 * Fixed one test with Expression input. After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without mounted `monaco` editor. * generated plugin and copied code from expression_reveal_image * fixed double import after merge. * Changed all names from reveal_image to shape. * moved shape to plugin and added all necessary configs * Fixed translations, fixed all imports and debug of svg. * `function` moved to `server`. * One shape is rewritten to `React` and rendering is written with passing necessary props. * changed default width and heigth. * Added `ShapeHOC`. * Shapes changed. * small refactor. * Removed useless import. * one more refactor. * Refactor + fix errors + updated limits. * Changed ShapePreview from pure js to react and removed `dangerouslySetInnerHTML` * Fixed types of viewbox. * Changed types source for Shape components. * small refactor. * Fixed imports. * Removed `shape` from `canvas` * Updated docs. * Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Changed imports of components. * Fixed errors, related to shape and autosuggestions. * Fixed i18n for shape. * Moved function from public to common and registered at server. * Fixed types error. * Fixed snapshots and shape mocks. * Moved some libs from `presentations_util` to `expression_shape` * Shape refactored. * Shape picker fixed. * Moved `Popover` back to `canvas` * Removed `Popover` export from presentation_utils components. * Moved error_component and debug_component from presentation_util to expression_error. * Removed `.i18nrc.json`. * Removed `.i18nrc.json`. * Removed useless scss. * Fixed color of `error`. * added fixes of rebase. * More fixes of rebase error . * Removed useless .i18nrc.json file. * More fixes. * More fixes of rebase. * One more fix. * More fixes. * Fixed limits and translations. * Added. * Fixed i18nrc. * Fixed error.. * Moved shapes to async chunks. * One more fix. * Some fixes. * Trying to fix the typecheck error. * Added temp of drawer. * Moved shapes to the async chunk in a less complex way. * Made `ShapeDrawer` reusable among different `expressions`. * Changed type of `shapes` from `any` and `Shape` to `string`. * Made changes, based on nits. * Removed not necessary changes. * Moved all reusable libs to `expression_shapes`. * Reduced the size of the bundle. * Hope, fixed type check errors. * Removed getDefaultShapeData. * Removed `getViewBox` from bundle. # Conflicts: # packages/kbn-optimizer/limits.yml
* expression_reveal_image skeleton. * expression_functions added. * expression_renderers added. * Backup of daily work. * Fixed errors. * Added legacy support. Added button for legacy. * Added storybook. * Removed revealImage from canvas. * Types fixed. * Fixed test suite error. * Fixed eslint error. * Moved UI and elements, related to expressionRevealImage from canvas. * Fixed unused translations errors. * Moved type of element to types. * Fixed types and added service for representing elements, ui and supported renderers to canvas. * Added expression registration to canvas. * Fixed * Fixed mutiple call of the function. * Removed support of a legacy lib for revealImage chart. * Removed legacy presentation_utils plugin import. * Removed useless translations and tried to fix error. * One more fix. * Small imports fix. * Fixed translations. * Made fixes based on nits. * Removed useless params. * fix. * Fixed errors, related to jest and __mocks__. * Removed useless type definition. * Replaced RendererHandlers with IInterpreterRendererHandlers. * fixed supported_shareable. * Moved elements back to canvas. * Moved views to canvas, removed expression service and imported renderer to canvas. * Fixed translations. * Moved libs to presentation utils. * Fixed types and removed function_wrapper.ts * Fixed types of test helpers. * Fixed imports. * One more fix. * Fixed public API. * Moved css to component. * Fixed spaces at element. * Removed unused plugin. * Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Moved related components from canvas. * Changed imports of components. * Removed useless translations and fixed .i18nrc.json * More fixes of i18nrc. * Fixed async functions. Written current code, based on storybookjs/storybook#7745 * Fixed one test with Expression input. After changing the way of rendering in stories, all elements are mounting and componentDidMount is involved. The previous snapshot was without mounted `monaco` editor. * generated plugin and copied code from expression_reveal_image * fixed double import after merge. * Changed all names from reveal_image to shape. * moved shape to plugin and added all necessary configs * Fixed translations, fixed all imports and debug of svg. * `function` moved to `server`. * One shape is rewritten to `React` and rendering is written with passing necessary props. * changed default width and heigth. * Added `ShapeHOC`. * Shapes changed. * small refactor. * Removed useless import. * one more refactor. * Refactor + fix errors + updated limits. * Changed ShapePreview from pure js to react and removed `dangerouslySetInnerHTML` * Fixed types of viewbox. * Changed types source for Shape components. * small refactor. * Fixed imports. * Removed `shape` from `canvas` * Updated docs. * Basic setup of error plugin. * Removed not used `function` files at `error` expression. * Changed imports of components. * Fixed errors, related to shape and autosuggestions. * Fixed i18n for shape. * Moved function from public to common and registered at server. * Fixed types error. * Fixed snapshots and shape mocks. * Moved some libs from `presentations_util` to `expression_shape` * Shape refactored. * Shape picker fixed. * Moved `Popover` back to `canvas` * Removed `Popover` export from presentation_utils components. * Moved error_component and debug_component from presentation_util to expression_error. * Removed `.i18nrc.json`. * Removed `.i18nrc.json`. * Removed useless scss. * Fixed color of `error`. * added fixes of rebase. * More fixes of rebase error . * Removed useless .i18nrc.json file. * More fixes. * More fixes of rebase. * One more fix. * More fixes. * Fixed limits and translations. * Added. * Fixed i18nrc. * Fixed error.. * Moved shapes to async chunks. * One more fix. * Some fixes. * Trying to fix the typecheck error. * Added temp of drawer. * Moved shapes to the async chunk in a less complex way. * Made `ShapeDrawer` reusable among different `expressions`. * Changed type of `shapes` from `any` and `Shape` to `string`. * Made changes, based on nits. * Removed not necessary changes. * Moved all reusable libs to `expression_shapes`. * Reduced the size of the bundle. * Hope, fixed type check errors. * Removed getDefaultShapeData. * Removed `getViewBox` from bundle. # Conflicts: # packages/kbn-optimizer/limits.yml
@Nerlin I've tried your solution for |
same as @FokkeZB |
I think the answer is in here: Together with: |
Is your feature request related to a problem? Please describe.
the readme of storyshots mentions a way to do async snapshot testing, e.g. if you use apollo or siilar: https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-core#storyshots-for-async-rendered-components
There are two problems with that example:
enzyme-to-json
will render all properties (at least im my case). This is not what you want, you want to diff the resulting html. it also seems to run out of memory on larger stories. I think this is because i use a decorator that provides the apolloclientDescribe the solution you'd like
I'd like to see a way to configure this async rendering with the default storybook renderer
Describe alternatives you've considered
Houff... i tried many things... Best solution so far is this (using diffable-html and enzym's html())
I hope that if async rendering lands in react, these problems will be solved...
Are you able to assist bring the feature to reality?
yes, but i want to gather better solutions here (if any) first.
The text was updated successfully, but these errors were encountered: