Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexeh committed Jan 2, 2024
1 parent bf1ed12 commit 81d791e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/ui/test_main_ui.py
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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
Expand All @@ -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() == ""
Expand All @@ -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() == ""
Expand Down

0 comments on commit 81d791e

Please sign in to comment.