summaryrefslogtreecommitdiff
path: root/app/tests/windows/main.cpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-15 22:26:12 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-15 22:26:12 +0200
commit3262b3a337759439f3049b9299be12baf8420750 (patch)
tree53d2e71a390662894bca3eb5c9345a59f08fc806 /app/tests/windows/main.cpp
parent7758fbc7522b39bad768abfa728b37c97007ffb6 (diff)
downloadturns-3262b3a337759439f3049b9299be12baf8420750.tar.xz
turns-3262b3a337759439f3049b9299be12baf8420750.zip
turns: add more tests
Diffstat (limited to 'app/tests/windows/main.cpp')
-rw-r--r--app/tests/windows/main.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/app/tests/windows/main.cpp b/app/tests/windows/main.cpp
index 8661153..a04a130 100644
--- a/app/tests/windows/main.cpp
+++ b/app/tests/windows/main.cpp
@@ -12,13 +12,14 @@
#include <glibmm/ustring.h>
#include <gtkmm/builder.h>
#include <gtkmm/button.h>
+#include <gtkmm/listbox.h>
#include <gtkmm/menubutton.h>
#include <gtkmm/widget.h>
namespace turns::app::windows::tests
{
- TEST_CASE("Newly constructed main window", "[windows]")
+ TEST_CASE("A freshly constructed main window", "[windows]")
{
auto locale = GENERATE("en_US.UTF-8", "de_CH.UTF-8");
setlocale(LC_ALL, locale);
@@ -26,46 +27,46 @@ namespace turns::app::windows::tests
auto builder = Gtk::Builder::create_from_resource("/ch/arknet/Turns/windows/main.ui");
auto instance = Gtk::Builder::get_widget_derived<main>(builder, "main");
- SECTION("construction via builder succeeds")
+ SECTION("was successfully constructed")
{
REQUIRE(instance);
}
- SECTION("the window sub-title is not empty")
+ SECTION("has a non-empty subtitle")
{
auto widget = builder->get_widget<Gtk::Widget>("title");
auto adw = ADW_WINDOW_TITLE(widget->gobj());
REQUIRE(adw_window_title_get_subtitle(adw));
}
- SECTION("the window sub-title is set according to the active language")
+ SECTION("has its subtitle set according to the active language")
{
auto widget = builder->get_widget<Gtk::Widget>("title");
auto adw = ADW_WINDOW_TITLE(widget->gobj());
REQUIRE(adw_window_title_get_subtitle(adw) == Glib::ustring{_(lang::no_active_turn_order)});
}
- SECTION("the window title is not empty")
+ SECTION("has a non-empty title")
{
auto widget = builder->get_widget<Gtk::Widget>("title");
auto adw = ADW_WINDOW_TITLE(widget->gobj());
REQUIRE(adw_window_title_get_title(adw));
}
- SECTION("the window title is set according to the active language")
+ SECTION("has its title set according to the active language")
{
auto widget = builder->get_widget<Gtk::Widget>("title");
auto adw = ADW_WINDOW_TITLE(widget->gobj());
REQUIRE(adw_window_title_get_title(adw) == Glib::ustring{_(lang::turns)});
}
- SECTION("the add_participant button has the correct tooltip")
+ SECTION("has its add_participant button's tooltip set according to the active language")
{
auto widget = builder->get_widget<Gtk::Button>("add_participant");
REQUIRE(widget->get_tooltip_text() == Glib::ustring{_(lang::add_participant)});
}
- SECTION("the open_main_menu button has the correct tooltip")
+ SECTION("as its open_main_menu button's tooltip set according to the active language")
{
auto widget = builder->get_widget<Gtk::MenuButton>("open_main_menu");
REQUIRE(widget->get_tooltip_text() == Glib::ustring{_(lang::main_menu)});