From 81d791eb421c8540f271e267b6e80a67e63e7d27 Mon Sep 17 00:00:00 2001 From: Rob <5183487+Rexeh@users.noreply.github.com> Date: Tue, 2 Jan 2024 08:48:52 +0000 Subject: [PATCH] Update CI --- tests/ui/test_main_ui.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/ui/test_main_ui.py b/tests/ui/test_main_ui.py index 62c0269..d2c2e38 100644 --- a/tests/ui/test_main_ui.py +++ b/tests/ui/test_main_ui.py @@ -1,28 +1,28 @@ import pytest from PyQt5 import QtCore -import joystick_diagrams.__main__ as ui import joystick_diagrams.classes.version.version as version +from joystick_diagrams.ui.main_window import main_window def test_title(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() qtbot.addWidget(window) title = "Joystick Diagrams - V" version_text = version.VERSION assert window.windowTitle() == f"{title}{version_text}" -def test_default_ui(qtbot): - window = ui.MainWindow() +def test_default_main_window(qtbot): + window = main_window.MainWindow() window.show() qtbot.addWidget(window) assert not window.export_button.isEnabled() -@pytest.mark.skip(reason="No longer used in new UI") +@pytest.mark.skip(reason="No longer used in new main_window") def test_dcs_file_load_success(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() window.show() qtbot.addWidget(window) window.dcs_directory = "./tests/data/dcs_world/valid_dcs_world_directory" @@ -35,9 +35,9 @@ def test_dcs_file_load_success(qtbot): assert not window.dcs_easy_mode_checkbox.isChecked() -@pytest.mark.skip(reason="No longer used in new UI") +@pytest.mark.skip(reason="No longer used in new main_window") def test_dcs_file_load_failure_config(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() window.show() qtbot.addWidget(window) window.dcs_directory = "./tests/data/dcs_world/invalid_dcs_world_no_config" @@ -47,9 +47,9 @@ def test_dcs_file_load_failure_config(qtbot): assert e.args[0] == "DCS: No Config Folder found in DCS Folder." -@pytest.mark.skip(reason="No longer used in new UI") +@pytest.mark.skip(reason="No longer used in new main_window") def test_dcs_file_load_failure_input(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() window.show() qtbot.addWidget(window) window.dcs_directory = "./tests/data/dcs_world/invalid_dcs_world_no_input" @@ -61,7 +61,7 @@ def test_dcs_file_load_failure_input(qtbot): def test_jg_file_load(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() window.show() qtbot.addWidget(window) assert window.jg_profile_list.count() == 0 @@ -71,7 +71,7 @@ def test_jg_file_load(qtbot): def test_sc_file_load_success(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() window.show() qtbot.addWidget(window) assert window.application_information_textbrowser.toPlainText() == "" @@ -81,7 +81,7 @@ def test_sc_file_load_success(qtbot): def test_sc_file_load_failure(qtbot): - window = ui.MainWindow() + window = main_window.MainWindow() window.show() qtbot.addWidget(window) assert window.application_information_textbrowser.toPlainText() == ""