From 45ffaee09361110c018e962dbb3d93f7f1ee8e09 Mon Sep 17 00:00:00 2001 From: Nikolai Nechaev Date: Thu, 30 Apr 2026 02:32:06 +0900 Subject: tests: Fix more tests failing on CI (#14159) * tests: Relax color management requirements in the colors test This continues the work from d4dd299 (#14142): - Fixes a missed check assuming a fixed value for `colorManagementPreset` - Stricten checks to require that the expected keywords are present as json keys * tests: Refactor `Tests::getAttribute` (was `Tests::getWindowAttribute`) - Improve ergonomics by consistently handling attribute name; - Remove 'window' from the function name, since it is compatible with other responses too; - Document the function. * tests: Fix solitary test assuming it knows the complete set of blockers The test was failing on the CI because new blockers appeared, which were not expected by the text. Fix the test, so that it just checks the set of expected blockers is a subset of actual blockers --- hyprtester/src/tests/main/dwindle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hyprtester/src/tests/main/dwindle.cpp') diff --git a/hyprtester/src/tests/main/dwindle.cpp b/hyprtester/src/tests/main/dwindle.cpp index 5641f8ac..e962efd1 100644 --- a/hyprtester/src/tests/main/dwindle.cpp +++ b/hyprtester/src/tests/main/dwindle.cpp @@ -204,7 +204,7 @@ TEST_CASE(dwindleForceSplitOnMoveToWorkspace) { OK(getFromSocket("/dispatch hl.dsp.focus({ workspace = '1' })")); ASSERT(!!Tests::spawnKitty("kitty"), true); - std::string posBefore = Tests::getWindowAttribute(getFromSocket("/activewindow"), "at:"); + std::string posBefore = "at: " + Tests::getAttribute(getFromSocket("/activewindow"), "at"); OK(getFromSocket("/eval hl.config({ dwindle = { force_split = 2 } })")); OK(getFromSocket("/dispatch hl.dsp.cursor.move_to_corner({ corner = 3 })")); // top left -- cgit v1.2.3