This is an automated email from the ASF dual-hosted git repository.
yjc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new e2f6764 test(dashboard): fix flaky Cypress test (#12151)
e2f6764 is described below
commit e2f676445b406ddc3793949154270ab7a533a0e7
Author: Jesse Yang <[email protected]>
AuthorDate: Mon Dec 21 20:40:33 2020 -0800
test(dashboard): fix flaky Cypress test (#12151)
---
.../cypress-base/cypress/integration/dashboard/filter.test.ts | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/superset-frontend/cypress-base/cypress/integration/dashboard/filter.test.ts
b/superset-frontend/cypress-base/cypress/integration/dashboard/filter.test.ts
index cbca4ca..8827c09 100644
---
a/superset-frontend/cypress-base/cypress/integration/dashboard/filter.test.ts
+++
b/superset-frontend/cypress-base/cypress/integration/dashboard/filter.test.ts
@@ -69,8 +69,10 @@ describe('Dashboard filter', () => {
it('should apply filter', () => {
cy.get('.Select__placeholder:first').click();
- // should open the filter indicator
- cy.get('svg[data-test="filter"]').should('be.visible');
+ // should show the filter indicator
+ cy.get('svg[data-test="filter"]:visible').should(nodes => {
+ expect(nodes.length).to.least(9);
+ });
cy.get('.Select__control:first input[type=text]').type('So', {
force: true,
@@ -80,9 +82,8 @@ describe('Dashboard filter', () => {
cy.get('.Select__menu').first().contains('South Asia').click();
// should still have all filter indicators
- // and since the select is closed, all filter indicators should be visible
cy.get('svg[data-test="filter"]:visible').should(nodes => {
- expect(nodes).to.have.length(10);
+ expect(nodes.length).to.least(9);
});
cy.get('.filter_box button').click({ force: true });