diff --git a/tests/testflows/regression.py b/tests/testflows/regression.py index 13b51a8b9..b38049851 100755 --- a/tests/testflows/regression.py +++ b/tests/testflows/regression.py @@ -46,9 +46,6 @@ def argparser(parser): "/Grafana Datasource Plugin For Clickhouse/data source setup/check default values datetime64/": [ (Error, "https://github.com/Altinity/clickhouse-grafana/issues/630") ], - "/Grafana Datasource Plugin For Clickhouse/sql editor/extrapolation toggle/":[ - (Fail, "Run Query button do not update time ranges") - ], "/Grafana Datasource Plugin For Clickhouse/functions/rate function/rate_space_in_variable/*": [ (Fail, "Functions do not support escaping") ] diff --git a/tests/testflows/steps/panel/locators.py b/tests/testflows/steps/panel/locators.py index 89a0901fe..d622de75b 100644 --- a/tests/testflows/steps/panel/locators.py +++ b/tests/testflows/steps/panel/locators.py @@ -295,5 +295,10 @@ def query_inspector_close_button(self): driver: WebDriver = current().context.driver return driver.find_element(SelectBy.CSS_SELECTOR, f'[data-testid="data-testid Drawer close"]') + @property + def refresh_button(self): + driver: WebDriver = current().context.driver + return driver.find_element(SelectBy.CSS_SELECTOR, f'[data-testid="data-testid RefreshPicker run button"]') + locators = Locators() diff --git a/tests/testflows/steps/panel/view.py b/tests/testflows/steps/panel/view.py index f32ebebf7..67e040f42 100644 --- a/tests/testflows/steps/panel/view.py +++ b/tests/testflows/steps/panel/view.py @@ -521,6 +521,12 @@ def click_save_confirmation_button(self): locators.save_confirmations_button(grafana_version=self.context.grafana_version).click() +@TestStep(When) +def click_refresh_button(self): + """Click refresh button.""" + + locators.refresh_button.click() + @TestStep(When) def save_dashboard(self): """Save dashboard from panel view.""" diff --git a/tests/testflows/tests/automated/sql_editor.py b/tests/testflows/tests/automated/sql_editor.py index 30268fd52..4ad53591c 100644 --- a/tests/testflows/tests/automated/sql_editor.py +++ b/tests/testflows/tests/automated/sql_editor.py @@ -312,7 +312,7 @@ def extrapolation_toggle(self): for attempt in retries(delay=10, count=12): with attempt: with When("I click on run query button to see results with turned on extrapolation"): - panel.click_run_query_button() + panel.click_refresh_button() with When("I take screenshot with extrapolation"): panel.take_screenshot_for_visualization(screenshot_name='extrapolation_toggle_on')