Skip to content

Commit

Permalink
Fix story dataviewer setup store and remove form rename step story
Browse files Browse the repository at this point in the history
form-renam-step is removed because it was not working since a long time, implementation of this step has changed a lot
  • Loading branch information
zegonz authored and raphael committed Apr 20, 2020
1 parent 2aede0e commit 382b8c8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 60 deletions.
69 changes: 48 additions & 21 deletions stories/data-viewer.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
import { storiesOf } from '@storybook/vue';
import Vuex from 'vuex';
import Vue from 'vue';

import { DataViewer, registerModule } from '../dist/storybook/components';

import { DataViewer, setupStore } from '../dist/storybook/components';
const stories = storiesOf('DataViewer', module);
Vue.use(Vuex)

stories.add('empty', () => ({
store: setupStore({}, [], true),
store: new Vuex.Store({}),
created: function() {
registerModule(this.$store, {
dataset: {
headers:[],
data: [],
paginationContext: {
pagesize: 50,
pageno: 1,
totalCount: 0,
},
},
currentPipelineName: "test",
pipelines: {test: []}
})
},
components: { DataViewer },
template: `
<data-viewer>
Expand All @@ -13,28 +32,36 @@ stories.add('empty', () => ({
}));

stories.add('simple', () => ({
store: setupStore({
dataset: {
headers:
[
{ name: 'columnA' },
{ name: 'columnB' },
{ name: 'columnC' },
store: new Vuex.Store({}),
created: function() {
registerModule(this.$store, {
dataset: {
headers:
[
{ name: 'columnA', type: 'string' },
{ name: 'columnB', type: 'date' },
{ name: 'columnC', type: 'integer' },
],
data: [
['value1', 'value2', 'value3'],
['value4', 'value5', 'value6'],
['value7', 'value8', 'value9'],
['value10', 'value11', 'value12'],
['value10', { obj: 'value14' }, null],
],
data: [
['value1', 'value2', 'value3'],
['value4', 'value5', 'value6'],
['value7', 'value8', 'value9'],
['value10', 'value11', 'value12'],
['value10', { obj: 'value14' }, null],
]
},
}, [], true),
paginationContext: {
pagesize: 50,
pageno: 1,
totalCount: 0,
},
},
currentPipelineName: "test",
pipelines: {test: []}
});
},
components: { DataViewer },
template: `
<data-viewer
:dataset="dataset"
>
<data-viewer>
</data-viewer>
`,
}));
38 changes: 0 additions & 38 deletions stories/form-rename-step.js

This file was deleted.

1 change: 0 additions & 1 deletion stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ stories
}));

import './data-viewer';
import './form-rename-step';
import './resizable-panel';
import './filter-editor';
import './list-unique-values';

0 comments on commit 382b8c8

Please sign in to comment.