Skip to content

Commit

Permalink
test(native filter): add new native filter test for time column filter (
Browse files Browse the repository at this point in the history
#18850)

* add new native filter test for time column filter
  • Loading branch information
jinghua-qa authored Feb 24, 2022
1 parent da3bc48 commit 0af671f
Showing 1 changed file with 41 additions and 0 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

0 comments on commit 0af671f

Please sign in to comment.