Add video node visualization

This commit is contained in:
Joey Yakimowich-Payne 2026-01-31 08:59:32 -07:00
commit 8a8b039dcc
4 changed files with 56 additions and 7 deletions

View file

@ -18,6 +18,8 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.hpp>
#include <cmath>
namespace {
warppipe::ConnectionOptions TestOptions() {
@ -1093,7 +1095,8 @@ TEST_CASE("setNodeVolumeState syncs inline widget") {
ns.mute = true;
model.setNodeVolumeState(qtId, ns);
REQUIRE(vol->volume() == 70);
// Cubic scaling: slider = cbrt(0.7) * 100 ≈ 89
REQUIRE(vol->volume() == static_cast<int>(std::round(std::cbrt(0.7f) * 100.0f)));
REQUIRE(vol->isMuted());
}
@ -1139,6 +1142,8 @@ TEST_CASE("preset saves and loads volume state") {
}
REQUIRE(found);
tc.client->Test_SetNodeVolume(warppipe::NodeId{100650}, 1.0f, false);
WarpGraphModel model2(tc.client.get());
model2.refreshFromClient();
auto qtId2 = model2.qtNodeIdForPw(100650);