From 63aa6b86c211828c47027145ff405fd7e3fc5c3a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Sun, 8 Jun 2025 14:53:13 +0200 Subject: gui: wrap tests in application --- gui/tests/participant_editor.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'gui/tests/participant_editor.cpp') diff --git a/gui/tests/participant_editor.cpp b/gui/tests/participant_editor.cpp index 8f6f7d3..723c10a 100644 --- a/gui/tests/participant_editor.cpp +++ b/gui/tests/participant_editor.cpp @@ -5,7 +5,7 @@ #include "participant_editor.hpp" -#include "gtk-test.hpp" +#include "main.hpp" #include "messages.hpp" #include @@ -15,9 +15,11 @@ #include +#include #include #include #include +#include #include #include @@ -36,7 +38,6 @@ namespace Turns::gui::tests SCENARIO("Creating a participant editor", "[gui][windows][lifetime]") { - auto window = Adwaita::ApplicationWindow{gtk_test::application}; auto locale = GENERATE("en_US.UTF-8", "de_CH.UTF-8", "de_DE.UTF-8", "de_AT.UTF-8"); GIVEN(std::format("An active locale of {}", locale)) @@ -46,7 +47,7 @@ namespace Turns::gui::tests AND_GIVEN("a participant editor constructed without a participant") { auto instance = ParticipantEditor{nullptr}; - instance.present(&window); + instance.present(globals::win.get()); THEN("its title is message::add_participant") { @@ -180,14 +181,14 @@ namespace Turns::gui::tests } } } -} +} // namespace Turns::gui::tests - // auto participant = Participant::create(default_name, default_priority, default_disposition); - // auto instance = std::make_shared(nullptr); - // auto window = Gtk::Window{}; +// auto participant = Participant::create(default_name, default_priority, default_disposition); +// auto instance = std::make_shared(nullptr); +// auto window = Gtk::Window{}; - // SECTION("allows binding to the finished signal") - // { - // REQUIRE((instance->signal_finished().connect([](auto, auto, auto) {})).connected()); - // } - // } +// SECTION("allows binding to the finished signal") +// { +// REQUIRE((instance->signal_finished().connect([](auto, auto, auto) {})).connected()); +// } +// } -- cgit v1.2.3