Skip to content

Commit

Permalink
Merge pull request #714 from Altinity/issue-705-tests
Browse files Browse the repository at this point in the history
Issue 705 tests
  • Loading branch information
Slach authored Jan 27, 2025
2 parents 1b412ed + 4aa11a8 commit 7d0f07a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/testflows/steps/panel/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,15 +688,15 @@ def save_dashboard(self):
click_save_confirmation_button()

@TestStep(When)
def check_no_labels(self, labels):
def check_no_labels_on_visualization(self, labels):
"""Check there is no labels in the panel."""

for label in labels:
with By(f"searching for label {label}"):
try:
ui.wait_for_element_to_be_visible(
select_type=SelectBy.XPATH,
element=f'//*[contains(text(), "{label}")]'
element=f'//*[@data-viz-panel-key]//*[contains(text(), "{label}")]'
)
return False
except:
Expand Down
2 changes: 1 addition & 1 deletion tests/testflows/tests/automated/e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def many_categories(self):

with Then("I check there is no errors on the visualization"):
with delay():
assert panel.check_no_labels(labels=["normalized_query_hash", "Too many points"]), error()
assert panel.check_no_labels_on_visualization(labels=["normalized_query_hash", "Too many points"]), error()
finally:
with Finally("I discard changes for panel"):
with delay():
Expand Down

0 comments on commit 7d0f07a

Please sign in to comment.