Skip to content

Commit

Permalink
Merge pull request #718 from Altinity/issue-712-test-fix
Browse files Browse the repository at this point in the history
Issue 712 test fix
  • Loading branch information
Slach authored Feb 4, 2025
2 parents d2174e1 + 3aa784e commit 5ac4d01
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions tests/testflows/steps/panel/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def wait_sql_editor_input(self):
def select_input_query(self, query_name):
"""Select input query using triple click on textarea."""

ActionChains(self.context.driver).double_click(locators.sql_editor_input(query_name=query_name, grafana_version=self.context.grafana_version)).click(locators.sql_editor_input(query_name=query_name, grafana_version=self.context.grafana_version)).perform()

locators.input_in_sql_editor(query_name=query_name, grafana_version=self.context.grafana_version).send_keys(Keys.CONTROL, 'a')


@TestStep(When)
def clear_panel_title(self):
"""Clear panel title."""
Expand Down Expand Up @@ -172,13 +172,17 @@ def enter_sql_editor_input(self, query, query_name='A'):
"""Enter SQL request into sql editor input field."""

with By("waiting SQL editor"):
wait_sql_editor_input()
with delay():
wait_sql_editor_input()

with By("selecting input string"):
select_input_query(query_name=query_name)
with delay():
select_input_query(query_name=query_name)

with By("entering request"):
locators.input_in_sql_editor(query_name=query_name, grafana_version=self.context.grafana_version).send_keys(query)
with delay():
locators.input_in_sql_editor(query_name=query_name, grafana_version=self.context.grafana_version).send_keys(query + ' ')
locators.input_in_sql_editor(query_name=query_name, grafana_version=self.context.grafana_version).send_keys(Keys.ENTER)


@TestStep(When)
Expand Down

0 comments on commit 5ac4d01

Please sign in to comment.