-- Run: lua test/settings_busy.lua -- The scan and keyboard screens announce themselves before work that blocks the loop for -- seconds. on_tick runs before draw in the same pass, so anything left for draw() to paint -- appears only after the blocking call returns -- on a panel ui.screen() has already -- cleared. These assert the announcement is built and painted by the tap itself. -- -- Where the notice lands is layout: test/ui_layout_test.cpp asserts centring against the -- same C++ the panel runs. package.path = "sdcard/lib/?.lua;test/?.lua;" .. package.path local device = require("fake_device").install() dofile("sdcard/apps/Settings/main.lua") init() device.tap("WiFi") local drawnBefore = device.drawn device.tap("scan networks") -- Built and drawn by the tap, with no draw() in between. assert(device.labelled("scanning"), "the scan screen did not build its notice") assert(device.drawn > drawnBefore, "the scan notice was left for the next draw()") print("ok")