mirror of
https://github.com/apache/superset.git
synced 2026-04-27 03:55:47 +00:00
Put formData in store (#1281)
* Put formData in store * Reform actions and reducers * Maded modifications based on comments:
This commit is contained in:
@@ -11,33 +11,6 @@ describe('reducers', () => {
|
||||
expect(newState.datasourceId).to.equal(1);
|
||||
});
|
||||
|
||||
it('should return new state with viz type', () => {
|
||||
const newState = exploreReducer(initialState, actions.setVizType('bar'));
|
||||
expect(newState.vizType).to.equal('bar');
|
||||
});
|
||||
|
||||
it('should return new state with not groupby columns', () => {
|
||||
const newColumn = ['col'];
|
||||
const newState = exploreReducer(initialState, actions.setNotGroupByColumns(newColumn));
|
||||
expect(newState.columns).to.deep.equal(['col']);
|
||||
});
|
||||
|
||||
it('should return new state with orderings', () => {
|
||||
const newOrdering = ['ord'];
|
||||
const newState = exploreReducer(initialState, actions.setOrderings(newOrdering));
|
||||
expect(newState.orderings).to.deep.equal(['ord']);
|
||||
});
|
||||
|
||||
it('should return new state with time stamp', () => {
|
||||
const newState = exploreReducer(initialState, actions.setTimeStampFormat(1));
|
||||
expect(newState.timeStampFormat).to.equal(1);
|
||||
});
|
||||
|
||||
it('should return new state with row limit', () => {
|
||||
const newState = exploreReducer(initialState, actions.setRowLimit(10));
|
||||
expect(newState.rowLimit).to.equal(10);
|
||||
});
|
||||
|
||||
it('should return new state with search box toggled', () => {
|
||||
const newState = exploreReducer(initialState, actions.toggleSearchBox(true));
|
||||
expect(newState.searchBox).to.equal(true);
|
||||
|
||||
Reference in New Issue
Block a user