2020-11-19 11:44:13 +00:00
|
|
|
import pytest
|
|
|
|
|
|
2024-06-20 08:14:38 +00:00
|
|
|
import cern_caimira.apps.expert_apps as exp
|
2020-10-21 18:29:17 +00:00
|
|
|
|
|
|
|
|
|
2020-11-19 11:44:13 +00:00
|
|
|
@pytest.fixture
|
|
|
|
|
def expert_app():
|
2024-06-20 08:14:38 +00:00
|
|
|
return exp.ExpertApplication()
|
2020-11-19 11:44:13 +00:00
|
|
|
|
|
|
|
|
|
2024-06-28 12:44:38 +00:00
|
|
|
@pytest.mark.skip(reason="ExpertApplication is deactivated")
|
2020-11-19 11:44:13 +00:00
|
|
|
def test_app(expert_app):
|
2020-10-21 18:29:17 +00:00
|
|
|
# To start with, let's just test that the application runs. We don't try to
|
|
|
|
|
# do anything fancy to verify how it looks etc., we leave that for manual
|
|
|
|
|
# testing.
|
2020-11-19 11:44:13 +00:00
|
|
|
assert expert_app._model_scenarios[0][0] == "Scenario 1"
|
|
|
|
|
|
|
|
|
|
|
2024-06-28 12:44:38 +00:00
|
|
|
@pytest.mark.skip(reason="ExpertApplication is deactivated")
|
2020-11-19 11:44:13 +00:00
|
|
|
def test_new_scenario_changes_tab(expert_app):
|
|
|
|
|
# Adding a new scenario should change the tab index of the multi-model view.
|
|
|
|
|
assert expert_app.multi_model_view.widget.selected_index == 0
|
|
|
|
|
expert_app.add_scenario("Another scenario")
|
|
|
|
|
assert expert_app.multi_model_view.widget.selected_index == 1
|