Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 712 test fix #718

Merged
merged 2 commits into from
Feb 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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