summaryrefslogtreecommitdiff
path: root/app/tests/windows/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/tests/windows/main.cpp')
-rw-r--r--app/tests/windows/main.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/app/tests/windows/main.cpp b/app/tests/windows/main.cpp
index 53c9386..fca04fd 100644
--- a/app/tests/windows/main.cpp
+++ b/app/tests/windows/main.cpp
@@ -1,5 +1,7 @@
#include "turns/app/windows/main.hpp"
+#include "turns/lang/messages.hpp"
+
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>
@@ -9,11 +11,14 @@
#include <glibmm/i18n.h>
#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
+#include <gtkmm/button.h>
#include <gtkmm/widget.h>
namespace turns::app::windows::tests
{
+ using namespace turns::lang;
+
TEST_CASE("Newly constructed main window", "[windows]")
{
auto locale = GENERATE("en_US.UTF-8", "de_CH.UTF-8");
@@ -38,7 +43,7 @@ namespace turns::app::windows::tests
{
auto widget = builder->get_widget<Gtk::Widget>("title");
auto adw = ADW_WINDOW_TITLE(widget->gobj());
- REQUIRE(adw_window_title_get_subtitle(adw) == Glib::ustring{_("No active turn-order")});
+ REQUIRE(adw_window_title_get_subtitle(adw) == Glib::ustring{_(labels::no_active_turn_order)});
}
SECTION("the window title is not empty")
@@ -52,7 +57,13 @@ namespace turns::app::windows::tests
{
auto widget = builder->get_widget<Gtk::Widget>("title");
auto adw = ADW_WINDOW_TITLE(widget->gobj());
- REQUIRE(adw_window_title_get_title(adw) == Glib::ustring{_("Turns")});
+ REQUIRE(adw_window_title_get_title(adw) == Glib::ustring{_(labels::turns)});
+ }
+
+ SECTION("the add_participant button has the correct tooltip")
+ {
+ auto widget = builder->get_widget<Gtk::Button>("add_participant");
+ REQUIRE(widget->get_tooltip_text() == Glib::ustring{_(tooltips::add_a_participant)});
}
}