Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 18, 2024
1 parent e493deb commit 36c7928
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions tests/python/dashboard/test_dashboard.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import importlib

from util import set_input_value, start_dashboard, wait_for_dashboard_ready, wait_for_ready

import pytest
from util import (
set_input_value,
start_dashboard,
wait_for_dashboard_ready,
wait_for_ready,
)


@pytest.mark.skipif(
importlib.util.find_spec("seleniumbase") is None, reason="seleniumbase is not available"
importlib.util.find_spec("seleniumbase") is None,
reason="seleniumbase is not available",
)
def test_dashboard():
"""
Expand Down Expand Up @@ -72,7 +77,7 @@ def test_dashboard():
sb.click("#Run_route")
sb.sleep(1)
sb.click("#run_simulation_button")
sb.sleep(7) # for simulation to finish
sb.sleep(7) # for simulation to finish

# Interact with phase space projection plots
sb.click("#Analyze_route")
Expand Down
3 changes: 2 additions & 1 deletion tests/python/dashboard/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def wait_for_dashboard_ready(process, timeout=60):
return
raise Exception("Dashboard did not start correctly.")


def set_input_value(sb, element_id, value):
"""
Function to clear, update, and trigger a change event on an input field by ID.
Expand Down Expand Up @@ -56,5 +57,5 @@ def start_dashboard():
cwd=working_directory,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True
universal_newlines=True,
)

0 comments on commit 36c7928

Please sign in to comment.