-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dashboard filter box default (#6236)
* Setting default FilterBox date filter to No Filter * Adding test for FilterBox
- Loading branch information
1 parent
59109f6
commit d34217e
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
superset/assets/cypress/integration/explore/visualizations/filter_box.js
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { FORM_DATA_DEFAULTS } from './shared.helper'; | ||
|
||
export default () => describe('FilterBox', () => { | ||
const VIZ_DEFAULTS = { ...FORM_DATA_DEFAULTS, viz_type: 'filter_box' }; | ||
|
||
function verify(formData) { | ||
cy.visitChartByParams(JSON.stringify(formData)); | ||
cy.verifySliceSuccess({ waitAlias: '@getJson' }); | ||
} | ||
|
||
beforeEach(() => { | ||
cy.server(); | ||
cy.login(); | ||
cy.route('POST', '/superset/explore_json/**').as('getJson'); | ||
}); | ||
|
||
it('should work with default date filter', () => { | ||
verify(VIZ_DEFAULTS); | ||
// Filter box should default to having a date filter with no filter selected | ||
cy.get('div.filter_box').within(() => { | ||
cy.get('span').contains('No filter'); | ||
}); | ||
}); | ||
|
||
}); |
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