diff --git a/src/utils/table_sql.py b/src/utils/table_sql.py index 2c3dcdd..bb84647 100644 --- a/src/utils/table_sql.py +++ b/src/utils/table_sql.py @@ -221,7 +221,7 @@ def tokenize_text_filter( if col_is_date: quoted_col = f'CAST("{column}" AS VARCHAR)' else: - quoted_col = '"column"' + quoted_col = f'"{column}"' conditions = [f'"{column}" IS NOT NULL', f"{quoted_col} <> ''"] diff --git a/tests/test_main.py b/tests/test_main.py index 5a606cf..9070ba4 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -338,8 +338,7 @@ def test_015_tableau_filter_date(dash_duo: DashComposite): filter_cell_result = '.marches_table td[data-dash-column="dateNotification"] p' dash_duo.wait_for_element(filter_input, timeout=2) _filter_input: WebElement = dash_duo.find_element(filter_input) - _filter_input.send_keys("2024") # a dateNotification that doesn't exist + _filter_input.send_keys("3333") # a dateNotification that doesn't exist _filter_input.send_keys(Keys.ENTER) _filter_result: list[WebElement] = dash_duo.find_elements(filter_cell_result) - - assert len(_filter_result) == 0 + assert len(_filter_result) == 0, f"Page : {page}"