From 1a83168d5c7269bd91043d79169898ca6893d88a Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 16 Jul 2024 16:20:47 +0200 Subject: app: rename main window to tracker --- app/tests/windows/main.cpp | 76 ---------------------------------------------- 1 file changed, 76 deletions(-) delete mode 100644 app/tests/windows/main.cpp (limited to 'app/tests/windows/main.cpp') diff --git a/app/tests/windows/main.cpp b/app/tests/windows/main.cpp deleted file mode 100644 index a04a130..0000000 --- a/app/tests/windows/main.cpp +++ /dev/null @@ -1,76 +0,0 @@ -#include "turns/app/windows/main.hpp" - -#include "turns/lang/messages.hpp" - -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -namespace turns::app::windows::tests -{ - - TEST_CASE("A freshly constructed main window", "[windows]") - { - auto locale = GENERATE("en_US.UTF-8", "de_CH.UTF-8"); - setlocale(LC_ALL, locale); - - auto builder = Gtk::Builder::create_from_resource("/ch/arknet/Turns/windows/main.ui"); - auto instance = Gtk::Builder::get_widget_derived
(builder, "main"); - - SECTION("was successfully constructed") - { - REQUIRE(instance); - } - - SECTION("has a non-empty subtitle") - { - auto widget = builder->get_widget("title"); - auto adw = ADW_WINDOW_TITLE(widget->gobj()); - REQUIRE(adw_window_title_get_subtitle(adw)); - } - - SECTION("has its subtitle set according to the active language") - { - auto widget = builder->get_widget("title"); - auto adw = ADW_WINDOW_TITLE(widget->gobj()); - REQUIRE(adw_window_title_get_subtitle(adw) == Glib::ustring{_(lang::no_active_turn_order)}); - } - - SECTION("has a non-empty title") - { - auto widget = builder->get_widget("title"); - auto adw = ADW_WINDOW_TITLE(widget->gobj()); - REQUIRE(adw_window_title_get_title(adw)); - } - - SECTION("has its title set according to the active language") - { - auto widget = builder->get_widget("title"); - auto adw = ADW_WINDOW_TITLE(widget->gobj()); - REQUIRE(adw_window_title_get_title(adw) == Glib::ustring{_(lang::turns)}); - } - - SECTION("has its add_participant button's tooltip set according to the active language") - { - auto widget = builder->get_widget("add_participant"); - REQUIRE(widget->get_tooltip_text() == Glib::ustring{_(lang::add_participant)}); - } - - SECTION("as its open_main_menu button's tooltip set according to the active language") - { - auto widget = builder->get_widget("open_main_menu"); - REQUIRE(widget->get_tooltip_text() == Glib::ustring{_(lang::main_menu)}); - } - } - -} // namespace turns::app::windows::tests \ No newline at end of file -- cgit v1.2.3