3
0
mirror of https://github.com/hyprwm/Hyprland.git synced 2025-10-30 03:41:16 +00:00

tests: add a few more workspace tests

This commit is contained in:
Vaxry 2025-07-23 20:41:32 +02:00
parent 55f2daa21e
commit c51c6e38ac
No known key found for this signature in database
GPG Key ID: 665806380871D640

View File

@ -21,6 +21,8 @@ using namespace Hyprutils::Memory;
static bool test() {
NLog::log("{}Testing workspaces", Colors::GREEN);
EXPECT(Tests::windowCount(), 0);
// test on workspace "window"
NLog::log("{}Switching to workspace 1", Colors::YELLOW);
OK(getFromSocket("/dispatch workspace 1"));
@ -65,6 +67,11 @@ static bool test() {
NLog::log("{}Switching to workspace 1", Colors::YELLOW);
OK(getFromSocket("/dispatch workspace 1"));
{
auto str = getFromSocket("/workspaces");
EXPECT_NOT_CONTAINS(str, "workspace ID 2 (2)");
}
NLog::log("{}Switching to workspace m+1", Colors::YELLOW);
OK(getFromSocket("/dispatch workspace m+1"));