Skip to content

Commit

Permalink
VOXEDIT: added ui test for normal palette panel
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhardy committed Feb 21, 2025
1 parent 1408e7d commit 832fdb4
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@
*/

#include "../NormalPalettePanel.h"
#include "../ViewMode.h"
#include "util/VarUtil.h"
#include "voxedit-util/Config.h"
#include "voxedit-util/SceneManager.h"

namespace voxedit {

void NormalPalettePanel::registerUITests(ImGuiTestEngine *engine, const char *id) {
IM_REGISTER_TEST(engine, testCategory(), "none")->TestFunc = [=](ImGuiTestContext *ctx) {
// Activate viewmode Command&Conquer to see the normal palette panel
util::ScopedVarChange viewMode(cfg::VoxEditViewMode, (int)ViewMode::CommandAndConquer);
ctx->Yield(); // allow the cvar change to propagate to the ui

IM_CHECK(focusWindow(ctx, id));
};
}

} // namespace voxedit

0 comments on commit 832fdb4

Please sign in to comment.