Skip to content

Commit

Permalink
add smoke test for each tab individually
Browse files Browse the repository at this point in the history
  • Loading branch information
joAschauer committed May 15, 2024
1 parent 61cd3ff commit f0905f7
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_ptxboa_streamlit.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,30 @@ def running_app():
def test_app_smoke(running_app):
"""Test if the app starts up without errors."""
assert not running_app.exception


@pytest.fixture(
params=(
"Info",
"Costs",
"Market scanning",
"Input data",
"Deep-dive countries",
"Country fact sheets",
"Certification schemes",
"Sustainability",
"Literature",
"Optimization",
)
)
def running_app_on_tab(request):
tab = request.param
at = AppTest.from_file("ptxboa_streamlit.py")
at.session_state["tab_key"] = "tab_key_0"
at.session_state[at.session_state["tab_key"]] = tab
at.run(timeout=60)
return at


def test_tabs_smoke(running_app_on_tab):
assert not running_app_on_tab.exception

0 comments on commit f0905f7

Please sign in to comment.