summaryrefslogtreecommitdiff
path: root/gui/tests/participant_editor.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-06-08 14:53:13 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-06-08 14:53:13 +0200
commit63aa6b86c211828c47027145ff405fd7e3fc5c3a (patch)
treeff77a5279b845b0fa2d5d5ef7c11de97a71c5c96 /gui/tests/participant_editor.cpp
parent0c5b0e03345d31406963e8ed8348a8c77ebe6352 (diff)
downloadturns-63aa6b86c211828c47027145ff405fd7e3fc5c3a.tar.xz
turns-63aa6b86c211828c47027145ff405fd7e3fc5c3a.zip
gui: wrap tests in application
Diffstat (limited to 'gui/tests/participant_editor.cpp')
-rw-r--r--gui/tests/participant_editor.cpp25
1 files changed, 13 insertions, 12 deletions
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 <turnsmm/participant.hpp>
@@ -15,9 +15,11 @@
#include <glib/gi18n.h>
+#include <adwaitamm/application.hpp>
#include <adwaitamm/applicationwindow.hpp>
#include <adwaitamm/comborow.hpp>
#include <glibmm/i18n.h>
+#include <glibmm/refptr.h>
#include <glibmm/ustring.h>
#include <gtkmm/stringobject.h>
@@ -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<ParticipantEditor>(nullptr);
- // auto window = Gtk::Window{};
+// auto participant = Participant::create(default_name, default_priority, default_disposition);
+// auto instance = std::make_shared<ParticipantEditor>(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());
+// }
+// }