Skip to content

Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.

UI tests: wait_idle waits for an update check too (wait counts frames, so a real download outlived it)

islandmeda8da3be1c5d8
diff --git a/src/app/UiTest.cpp b/src/app/UiTest.cpp
index bc89eb41..0bbab85d 100644
--- a/src/app/UiTest.cpp
+++ b/src/app/UiTest.cpp
@@ -28,7 +28,7 @@
// run COMMANDS sculptforge-cli commands, e.g. run new_sphere subdivisions=4
// drop FILE as if FILE were dropped onto the window (relative to the script's folder)
// env NAME VALUE set an environment variable; $SCRIPT_DIR is the script's folder
-// wait SECONDS / wait_idle [TIMEOUT] (AI requests, thumbnails and other background jobs) / wait_for LABEL [TIMEOUT]
+// wait SECONDS / wait_idle [TIMEOUT] (AI requests, thumbnails, update checks and other background jobs) / wait_for LABEL [TIMEOUT]
// expect LABEL / expect_not LABEL
// expect_text TEXT / expect_no_text TEXT any text drawn this frame contains TEXT
// expect_status TEXT the status bar message contains TEXT
@@ -778,7 +778,7 @@ bool Demo::parseStep(int line, const std::vector<std::string>& w, std::string& e
const bool idle = !busy(app_.pendingBrush_) && !busy(app_.pendingGenerator_) && !busy(app_.pendingModels_) &&
!busy(app_.pendingUnreal_) && !busy(app_.pendingComfyCheck_) && !app_.galleryBusy() &&
!app_.thumbs_.busy() && !app_.libraryScanner_.busy() && !app_.autoUv_ &&
- !app_.bakeBusy() && !app_.qremesh_ && !app_.voxelRemesh_;
+ !app_.bakeBusy() && !app_.qremesh_ && !app_.voxelRemesh_ && !app_.updateJob_;
*idleFrames = idle ? *idleFrames + 1 : 0;
if (*idleFrames >= 4) return true;
if (idle) return false;
diff --git a/tests/ui/update_check.sfui b/tests/ui/update_check.sfui
index 6bb8bc15..ab80d5fb 100644
--- a/tests/ui/update_check.sfui
+++ b/tests/ui/update_check.sfui
@@ -5,7 +5,7 @@ run new_sphere subdivisions=3
env SF_UPDATE_FEED $SCRIPT_DIR/data/update_newer.json
click "Help##palette.help"
click "Check for updates##help.check_updates"
-wait_for "Skip this version" 10
+wait_idle 20
expect_text "SculptForge 99.0.0 is available"
expect_text "Twice as fast"
expect "Download"
@@ -16,12 +16,12 @@ expect_not "Skip this version"
env SF_UPDATE_FEED $SCRIPT_DIR/data/update_older.json
click "Help##palette.help"
click "Check for updates##help.check_updates"
-wait 1
+wait_idle 20
expect_status "is the newest version"
expect_not "Skip this version"
env SF_UPDATE_FEED $SCRIPT_DIR/data/no_such_feed.json
click "Help##palette.help"
click "Check for updates##help.check_updates"
-wait 1
+wait_idle 20
expect_status "Couldn't check for updates"