9e58e72bf6
clang-format had no config here, so adopting the submodule's puts both repos on the same pointer alignment. .editorconfig is what lua-language-server reads on save, which is why the Lua tree had drifted between tabs and two widths.
26 lines
987 B
Lua
26 lines
987 B
Lua
-- 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/.lua/lib/?.lua;test/?.lua;" .. package.path
|
|
|
|
local device = require("fake_device").install()
|
|
|
|
dofile "sdcard/.lua/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"
|