Drop the screenshot tests and the moon-disc module; just test runs every lib package
- Tests that only wrote PNGs to look at are gone: desktop, overview (and its overview_shot helper), editor, emoji picker, launcher/Icon Desktop and dock screenshots. They were among the slowest in the suite; the behaviour they touched has its own tests. - moon-disc never had source in the tree, so every fresh panel said "Module 'moon-disc' not found". It is out of the default panel, and a saved panel drops it (migrate_panel). The settings module's sample rows and labels no longer mention it. - The settings module lists Show Desktop under "Apps and windows", with a description. - just test ran lib/taskbar, lib/layoutpick and lib/modmgr, which no longer exist, so the wasm lib tests failed to start; it now runs every package in lib/ (83 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2dc2bb930
commit
7ce5b79af2
13 files changed
+20
-270
No files matched your search
@@ -69,22 +69,6 @@ fn load_module(name : String) -> Plasmoid {
|
||||
}
|
||||
}
|
||||
|
||||
///| Like load_module, for a module that may not be built (e.g. moon-disc, which has no source
|
||||
/// in the tree): None, with a skip notice, when it isn't in build/components.
|
||||
fn load_optional_module(name : String) -> Plasmoid? {
|
||||
match load("build/components/" + name + ".wasm", test_tokens()) {
|
||||
Ok(p) => Some(p)
|
||||
Err(_) =>
|
||||
match load("../../build/components/" + name + ".wasm", test_tokens()) {
|
||||
Ok(p) => Some(p)
|
||||
Err(_) => {
|
||||
println("skip: \{name}.wasm is not in build/components (no source in the tree)")
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
fn texts_of(ops : Array[@types.DrawOp]) -> Array[String] {
|
||||
let out : Array[String] = []
|
||||
@@ -199,7 +183,7 @@ test "the settings module's Panel tab lists host modules and asks to load, move,
|
||||
assert_true(p.imports().contains("modules"))
|
||||
let av = Table::new()
|
||||
for m in [
|
||||
("moon-disc", "Moon Phase (disc)", "/m/moon-disc.wasm", 0),
|
||||
("clock-binary", "Binary Clock", "/m/clock-binary.wasm", 0),
|
||||
("tasks", "Task Manager", "/m/tasks.wasm", 1),
|
||||
("clock-digital", "Digital Clock", "/m/clock-digital.wasm", 1),
|
||||
] {
|
||||
@@ -224,7 +208,7 @@ test "the settings module's Panel tab lists host modules and asks to load, move,
|
||||
None => fail("popup should be open")
|
||||
Some(ps) => {
|
||||
let ts = texts_of(ps.ops)
|
||||
assert_true(ts.contains("Moon Phase (disc)"))
|
||||
assert_true(ts.contains("Binary Clock"))
|
||||
assert_true(ts.contains("Clocks"))
|
||||
// The task manager is in the panel and one is enough: it is not offered again. A clock
|
||||
// can go in twice, so it is.
|
||||
@@ -246,7 +230,7 @@ test "the settings module's Panel tab lists host modules and asks to load, move,
|
||||
FaceUnlock(-1), // opening on the Session tab reads the face unlock status
|
||||
MoveInstance("w1", 1),
|
||||
UnloadInstance("w2"),
|
||||
LoadModule("/m/moon-disc.wasm"),
|
||||
LoadModule("/m/clock-binary.wasm"),
|
||||
Browse,
|
||||
])
|
||||
// Keys: Backspace removes the highlighted panel module, PageUp moves it.
|
||||
@@ -268,11 +252,7 @@ test "interface explorer module toggles through the inspector capability" {
|
||||
}
|
||||
|
||||
///|
|
||||
test "moon and digital clock modules render from the clock capability" {
|
||||
if load_optional_module("moon-disc") is Some(m) {
|
||||
assert_true(m.render(36, 36, test_tokens()).length() > 3)
|
||||
m.unload()
|
||||
}
|
||||
test "the digital clock module renders from the clock capability" {
|
||||
let c = load_module("clock-digital")
|
||||
let ts = texts_of(c.render(120, 36, test_tokens()))
|
||||
assert_true(ts[0].has_suffix("AM") || ts[0].has_suffix("PM")) // 12-hour by default
|
||||
|
||||
Reference in new issue
Block a user