Skip to content

Commit

Permalink
add new native filter test for time column filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jinghua-qa committed Feb 23, 2022
1 parent 0ae1ca7 commit c55112f
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,47 @@ describe('Nativefilters Sanity test', () => {
.contains('Month')
.should('be.visible');
});
it('User can create a time column filter', () => {
cy.get(nativeFilters.filterFromDashboardView.expand).click({ force: true });
cy.get(nativeFilters.filterFromDashboardView.createFilterButton)
.should('be.visible')
.click();
cy.get(nativeFilters.filtersPanel.filterTypeInput)
.find(nativeFilters.filtersPanel.filterTypeItem)
.click({ force: true });
cy.get('[label="Time column"]').click({ force: true });
cy.get(nativeFilters.modal.container)
.find(nativeFilters.filtersPanel.filterName)
.click({ force: true })
.clear()
.type('time column');
cy.get(nativeFilters.modal.container)
.find(nativeFilters.filtersPanel.datasetName)
.click()
.type('wb_health_population');
cy.get(nativeFilters.silentLoading).should('not.exist');
cy.get('[label="wb_health_population"]').click();

cy.get(nativeFilters.modal.footer)
.contains('Save')
.should('be.visible')
.click();
cy.intercept(`/api/v1/chart/data?form_data=**`).as('chart');
cy.get(nativeFilters.modal.container).should('not.exist');
// assert that native filter is created
cy.get(nativeFilters.filterFromDashboardView.filterName)
.should('be.visible')
.contains('time column');
cy.get(nativeFilters.filterFromDashboardView.filterValueInput)
.should('be.visible', { timeout: 10000 })
.click()
.type('year{enter}');
cy.get(nativeFilters.applyFilter).click({ force: true });
cy.wait('@chart');
cy.get(nativeFilters.filterFromDashboardView.filterContent)
.contains('year')
.should('be.visible');
});
});

xdescribe('Nativefilters', () => {
Expand Down
8 changes: 0 additions & 8 deletions superset-frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c55112f

Please sign in to comment.