-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixed tests for control panels container and filters * Fixed python tests for explorev2 * Fix linting errors
- Loading branch information
1 parent
f6f15f6
commit 9017ecf
Showing
8 changed files
with
131 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { it, describe } from 'mocha'; | ||
import { expect } from 'chai'; | ||
import * as actions from '../../../javascripts/explorev2/actions/exploreActions'; | ||
import { initialState } from '../../../javascripts/explorev2/stores/store'; | ||
import { defaultState } from '../../../javascripts/explorev2/stores/store'; | ||
import { exploreReducer } from '../../../javascripts/explorev2/reducers/exploreReducer'; | ||
|
||
describe('reducers', () => { | ||
it('sets correct field value given a key and value', () => { | ||
const newState = exploreReducer( | ||
initialState('dist_bar'), actions.setFieldValue('x_axis_label', 'x')); | ||
expect(newState.viz.form_data.x_axis_label).to.equal('x'); | ||
defaultState, actions.setFieldValue('x_axis_label', 'x', [])); | ||
expect(newState.fields.x_axis_label.value).to.equal('x'); | ||
}); | ||
it('setFieldValue works as expected with a checkbox', () => { | ||
const newState = exploreReducer(initialState('dist_bar'), | ||
actions.setFieldValue('show_legend', true)); | ||
expect(newState.viz.form_data.show_legend).to.equal(true); | ||
const newState = exploreReducer(defaultState, | ||
actions.setFieldValue('show_legend', true, [])); | ||
expect(newState.fields.show_legend.value).to.equal(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters