Skip to content
Snippets Groups Projects
Commit f4b2ae77 authored by Behrisch, M. (Michael)'s avatar Behrisch, M. (Michael)
Browse files

test: :white_check_mark: adds redux to main app story

This test failed until now to provide at storybook component as the redux store was not accessible.
parent d27f1d56
No related branches found
No related tags found
1 merge request!7refactor(rawjsonvis): moves rawjsonvis into own component
import { Story, Meta } from '@storybook/react';
import { configureStore } from '@reduxjs/toolkit';
import { Meta, Story } from '@storybook/react';
import React from 'react';
import { Provider } from 'react-redux';
import graphQueryResultSlice from '../../../../libs/shared/data-access/store/src/lib/graphQueryResultSlice';
import { App } from './app';
export default {
component: App,
title: 'App',
decorators: [
(story) => (
<div style={{ padding: '3rem' }}>
<Provider store={Mockstore}>{story()}</Provider>
</div>
),
],
} as Meta;
const Template: Story = (args) => <App {...args} />;
// A super-simple mock of a redux store
const Mockstore = configureStore({
reducer: {
graphQueryResult: graphQueryResultSlice,
},
});
export const Primary = Template.bind({});
Primary.args = {};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment