From 4f8d2caed48eba4ef1589c63474adbc5df099375 Mon Sep 17 00:00:00 2001 From: Gabriel Dutra Date: Tue, 5 May 2020 01:12:01 -0300 Subject: [PATCH] Cypress: Add tests for Filters (#4757) --- client/app/components/Filters.jsx | 11 +- client/app/pages/dashboards/DashboardPage.jsx | 5 +- .../integration/dashboard/filters_spec.js | 87 ++++++++++++++ .../cypress/integration/query/filters_spec.js | 109 ++++++++++++++++++ .../cypress/support/visualizations/table.js | 12 ++ 5 files changed, 218 insertions(+), 6 deletions(-) create mode 100644 client/cypress/integration/dashboard/filters_spec.js create mode 100644 client/cypress/integration/query/filters_spec.js create mode 100644 client/cypress/support/visualizations/table.js diff --git a/client/app/components/Filters.jsx b/client/app/components/Filters.jsx index dc962dfbe3..5cab56e3da 100644 --- a/client/app/components/Filters.jsx +++ b/client/app/components/Filters.jsx @@ -74,7 +74,7 @@ function Filters({ filters, onChange }) { onChange = createFilterChangeHandler(filters, onChange); return ( -
+
{map(filters, filter => { @@ -83,7 +83,10 @@ function Filters({ filters, onChange }) { )); return ( -
+
{options.length === 0 &&