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
@@ -223,9 +223,7 @@ keep pixels on the host rather than copying them through the component.
|
||||
* Not done yet: lock screen, notifications daemon, system tray, virtual desktops, multi-monitor
|
||||
configuration, idle-inhibit (a playing video doesn't keep the screen on), lid and power-button
|
||||
actions (logind's defaults apply), VPN and enterprise Wi-Fi.
|
||||
* Desktop Pulse (`compositor/wasm/testdata/pulse.component.wasm`) and the `moon-disc` panel
|
||||
module have no source in the tree, so `scripts/build-modules.sh` skips moon-disc and a fresh
|
||||
panel shows a "Module 'moon-disc' not found" notice (remove it in Settings, Panel tab).
|
||||
* Desktop Pulse (`compositor/wasm/testdata/pulse.component.wasm`) has no source in the tree.
|
||||
|
||||
## Layout
|
||||
|
||||
|
||||
@@ -173,9 +173,9 @@ let categories : Array[String] = ["Apps and windows", "System", "Clocks", "Other
|
||||
///| Which group a module (by id, its file stem) belongs to; modules we don't know go in "Other".
|
||||
fn category_of(id : String) -> String {
|
||||
match id {
|
||||
"launcher" | "dock" | "layout" => "Apps and windows"
|
||||
"launcher" | "dock" | "layout" | "show-desktop" => "Apps and windows"
|
||||
"session-settings" | "network" | "battery" | "screenshot" | "rotate" | "osk" => "System"
|
||||
"clock-digital" | "clock-binary" | "moon-disc" => "Clocks"
|
||||
"clock-digital" | "clock-binary" => "Clocks"
|
||||
_ => "Other"
|
||||
}
|
||||
}
|
||||
@@ -194,7 +194,7 @@ fn description_of(id : String) -> String {
|
||||
"osk" => "Show or hide the on-screen keyboard"
|
||||
"clock-digital" => "The time, 12 or 24-hour"
|
||||
"clock-binary" => "The time in binary"
|
||||
"moon-disc" => "Tonight's moon phase"
|
||||
"show-desktop" => "Hide every window to show the desktop"
|
||||
"inspector" => "Inspect the shell's interface"
|
||||
_ => ""
|
||||
}
|
||||
|
||||
@@ -426,65 +426,3 @@ test "editor: a region screenshot opens at full size when it fits" {
|
||||
assert_eq((v.w, v.h), (400, 300))
|
||||
tap(comp, 1U, 30U)
|
||||
}
|
||||
|
||||
///| Headless pictures of the editor for the docs: written when CHANDRA_EDITOR_SHOTS names a folder.
|
||||
test "editor: headless screenshots" {
|
||||
let out = @sys.getenv("CHANDRA_EDITOR_SHOTS")
|
||||
if out.length() == 0 {
|
||||
return
|
||||
}
|
||||
let socket_path = "/tmp/wayland-moon-edshots-" + @sys.getpid().to_string() + ".sock"
|
||||
let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap()
|
||||
comp.shot_dir = "/tmp/chandra-edshots-" + @sys.getpid().to_string()
|
||||
ignore(open_and_configure_client(comp, socket_path, "Notes", "notes"))
|
||||
ignore(open_and_configure_client(comp, socket_path, "Terminal", "term"))
|
||||
ignore(comp.compose_frame())
|
||||
key(comp, 99U, true, 1U)
|
||||
key(comp, 99U, false, 2U)
|
||||
ignore(comp.compose_frame())
|
||||
// An arrow, a rectangle, a blur, a redaction, a highlight, text and two markers.
|
||||
tap(comp, 30U, 10U)
|
||||
edit_drag(comp, 200, 560, 420, 380, 20U)
|
||||
tap(comp, 19U, 30U)
|
||||
tap(comp, 6U, 31U) // blue
|
||||
edit_drag(comp, 430, 200, 760, 360, 40U)
|
||||
tap(comp, 48U, 50U)
|
||||
edit_drag(comp, 750, 628, 1275, 674, 60U) // the notification
|
||||
tap(comp, 32U, 70U)
|
||||
tap(comp, 8U, 71U) // black
|
||||
edit_drag(comp, 895, 12, 1025, 42, 80U) // a title
|
||||
tap(comp, 45U, 85U)
|
||||
edit_drag(comp, 930, 686, 1060, 719, 86U) // the clock
|
||||
tap(comp, 35U, 90U)
|
||||
tap(comp, 4U, 91U) // yellow
|
||||
let (h0, h1) = on_screen(comp, 436, 590)
|
||||
let (h2, h3) = on_screen(comp, 640, 590)
|
||||
drag(comp, h0, h1, h2, h3, 100U)
|
||||
tap(comp, 49U, 110U)
|
||||
tap(comp, 2U, 111U) // red
|
||||
let (m0, m1) = on_screen(comp, 450, 190)
|
||||
click_at(comp, m0, m1, 120U)
|
||||
let (m2, m3) = on_screen(comp, 810, 110)
|
||||
click_at(comp, m2, m3, 130U)
|
||||
tap(comp, 20U, 140U)
|
||||
tap(comp, 9U, 141U) // white
|
||||
let (t0, t1) = on_screen(comp, 440, 590)
|
||||
click_at(comp, t0, t1, 150U)
|
||||
for c in [20U, 35U, 18U, 57U, 48U, 22U, 34U, 57U, 23U, 31U, 57U, 35U, 18U, 19U, 18U] {
|
||||
tap(comp, c, 160U)
|
||||
}
|
||||
tap(comp, 28U, 170U)
|
||||
// A crop being drawn.
|
||||
tap(comp, 46U, 180U)
|
||||
let (c0, c1) = on_screen(comp, 60, 60)
|
||||
let (c2, c3) = on_screen(comp, 1220, 690)
|
||||
comp.handle_input(@nested.InputEvent::PointerMove(c0.to_double(), c1.to_double()), 190U)
|
||||
comp.handle_input(@nested.InputEvent::PointerButton(272U, true), 191U)
|
||||
comp.handle_input(@nested.InputEvent::PointerMove(c2.to_double(), c3.to_double()), 192U)
|
||||
let frame = comp.compose_frame()
|
||||
ignore(@sys.mkdir_p(out))
|
||||
assert_eq(@sys.write_file_bytes(out + "/screenshot-editor.png", @renderer.encode_png_compressed(frame)), 0)
|
||||
comp.handle_input(@nested.InputEvent::PointerButton(272U, false), 193U)
|
||||
let saved = comp.screenshot_editor().unwrap().export()
|
||||
assert_eq(@sys.write_file_bytes(out + "/screenshot-editor-saved.png", @renderer.encode_png_compressed(saved)), 0)
|
||||
}
|
||||
@@ -264,41 +264,6 @@ test "reload brings the desktop module back from disk with its settings" {
|
||||
assert_eq(comp.shell.desktop_module().unwrap().module_id, "starfield")
|
||||
}
|
||||
|
||||
///|
|
||||
test "desktop screenshots: icons, starfield, the Desktop tab" {
|
||||
let comp = desk_comp("shots", fake_apps=false)
|
||||
assert_true(comp.shell.set_desktop("icon-desktop"))
|
||||
comp.shell.set_module_setting("desktop", "count", "All")
|
||||
ignore(comp.compose_frame())
|
||||
// Hover one icon and select another with the keyboard.
|
||||
click_at(comp, 900, 300, 10U)
|
||||
comp.handle_input(@nested.InputEvent::Key(106U, true), 20U) // Right: selects the first
|
||||
comp.handle_input(@nested.InputEvent::Key(108U, true), 21U) // Down
|
||||
comp.handle_input(@nested.InputEvent::PointerMove(68.0, 68.0), 22U)
|
||||
ignore(@sys.write_file_bytes("_build/desktop_icons.png", @renderer.encode_png(comp.compose_frame())))
|
||||
assert_true(comp.shell.set_desktop("starfield"))
|
||||
comp.shell.set_module_setting("desktop", "speed", "Normal")
|
||||
comp.handle_input(@nested.InputEvent::PointerMove(900.0, 250.0), 30U)
|
||||
for _ in 0..<6 {
|
||||
@sys.sleep_ms(34)
|
||||
ignore(comp.compose_frame())
|
||||
}
|
||||
ignore(@sys.write_file_bytes("_build/desktop_starfield.png", @renderer.encode_png(comp.compose_frame())))
|
||||
// Warp pulse: a click streaks the stars.
|
||||
click_at(comp, 900, 250, 40U)
|
||||
for _ in 0..<3 {
|
||||
@sys.sleep_ms(34)
|
||||
ignore(comp.compose_frame())
|
||||
}
|
||||
ignore(@sys.write_file_bytes("_build/desktop_warp.png", @renderer.encode_png(comp.compose_frame())))
|
||||
assert_true(comp.shell.open_settings(Desktop))
|
||||
for _ in 0..<10 {
|
||||
@sys.sleep_ms(40) // the popup slides in
|
||||
ignore(comp.compose_frame())
|
||||
}
|
||||
ignore(@sys.write_file_bytes("_build/desktop_settings.png", @renderer.encode_png(comp.compose_frame())))
|
||||
}
|
||||
|
||||
///|
|
||||
test "mobile tap on desktop icon with finger drift launches without moving any icon" {
|
||||
let socket_path = "/tmp/wayland-moon-desk-mobile-" + @sys.getpid().to_string() + ".sock"
|
||||
|
||||
@@ -1,45 +1,4 @@
|
||||
///| The dock drawn in a real frame, for a look at it: writes _build/dock_hover.png (an icon under
|
||||
/// the pointer, magnified, with its name above) and _build/dock_menu.png (an app's right-click
|
||||
/// menu). Uses the machine's own .desktop files and icon theme, so what it shows varies.
|
||||
|
||||
///|
|
||||
test "dock screenshots: hover label and an app's menu" {
|
||||
let socket_path = "/tmp/wayland-moon-dockshot-" + @sys.getpid().to_string() + ".sock"
|
||||
let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap()
|
||||
ignore(comp.compose_frame())
|
||||
let slot = comp.shell.slot_of("dock")
|
||||
// Room for the dock's running apps on a 1280-wide screen.
|
||||
for s in comp.shell.slots() {
|
||||
let m = comp.shell.slot_module(s)
|
||||
if m == "inspector" || m == "layout" || m == "screenshot" {
|
||||
ignore(comp.shell.unload_slot(s))
|
||||
}
|
||||
}
|
||||
comp.shell.set_module_setting(
|
||||
slot, "pinned", "libreoffice-writer;libreoffice-calc;libreoffice-impress;debian-xterm;vim",
|
||||
)
|
||||
// Icons only, to see the magnification (titles are the default).
|
||||
comp.shell.set_module_setting(slot, "titles", "off")
|
||||
let _a = open_and_configure_client(comp, socket_path, "Report.odt", "libreoffice-writer")
|
||||
let _b = open_and_configure_client(comp, socket_path, "Notes.odt", "libreoffice-writer")
|
||||
let _c = open_and_configure_client(comp, socket_path, "Terminal", "xterm")
|
||||
let _e = open_and_configure_client(comp, socket_path, "Notes 2", "org.example.Notes")
|
||||
let _d = open_and_configure_client(comp, socket_path, "Notes", "org.example.Notes")
|
||||
ignore(comp.compose_frame())
|
||||
ignore(comp.compose_frame())
|
||||
let r = comp.shell.slot_rect(slot)
|
||||
let cy = r.y + r.h / 2
|
||||
// Hover the second icon (Calc).
|
||||
comp.handle_input(@nested.InputEvent::PointerMove((r.x + 6 + 30 + 12).to_double(), cy.to_double()), 1U)
|
||||
let frame = comp.compose_frame()
|
||||
assert_true(comp.shell.dock_hover_name().length() > 0)
|
||||
ignore(@sys.write_file_bytes("_build/dock_hover.png", @renderer.encode_png(frame)))
|
||||
// Right-click the first (Writer, two windows).
|
||||
click_at(comp, r.x + 6 + 12, cy, 10U, btn=273U)
|
||||
assert_true(comp.shell.menu_open)
|
||||
assert_true(comp.shell.menu_rows.map(m => m.label).contains("Close 2 windows"))
|
||||
ignore(@sys.write_file_bytes("_build/dock_menu.png", @renderer.encode_png(comp.compose_frame())))
|
||||
}
|
||||
///| The dock as the panel's task manager, driven through real frames.
|
||||
|
||||
///| Pick row `label` of the open right-click menu (rows: 26px title, then 28px each).
|
||||
fn dock_pick(comp : @host.ChandraCompositor, label : String, t : UInt) -> Unit raise {
|
||||
|
||||
@@ -218,36 +218,3 @@ test "recent emoji and the skin tone are kept in state.edn" {
|
||||
assert_eq(q.items().map(i => i.text), ["🍕", "👍🏽"])
|
||||
}
|
||||
}
|
||||
|
||||
///| CHANDRA_EMOJI_SHOTS=<dir>: pictures of the picker over a window (docs, the thread).
|
||||
test "screenshots of the picker" {
|
||||
let dir = @sys.getenv("CHANDRA_EMOJI_SHOTS")
|
||||
if dir.length() > 0 {
|
||||
ignore(@sys.mkdir_p(dir))
|
||||
let socket_path = "/tmp/wayland-moon-emojishots-" + @sys.getpid().to_string() + ".sock"
|
||||
let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap()
|
||||
let (a, shm_a, surf_a, xdg_a, _, _) = open_and_configure_client(comp, socket_path, "Notes", "notes")
|
||||
commit_shm_frame(comp, a, shm_a, surf_a, xdg_a, 1UL)
|
||||
let (ti, _) = text_input_for(comp, a)
|
||||
text_input_state(comp, a, ti, true, 120, 90, 18)
|
||||
let shot = fn(name : String) raise {
|
||||
let frame = comp.compose_frame()
|
||||
assert_eq(@sys.write_file_bytes(dir + "/" + name, @renderer.encode_png_compressed(frame)), 0)
|
||||
}
|
||||
press_super_period(comp, 10U)
|
||||
shot("picker-smileys.png")
|
||||
type_keys(comp, [35U, 18U, 30U, 19U, 20U], 20U) // h e a r t
|
||||
shot("picker-search.png")
|
||||
type_keys(comp, [14U, 14U, 14U, 14U, 14U, 15U], 40U) // clear, then Tab: People
|
||||
comp.handle_input(@nested.InputEvent::Modifiers(4U, 0U, 0U, 0U), 60U)
|
||||
type_keys(comp, [106U, 106U, 106U], 61U) // Ctrl+Right x3: medium skin tone
|
||||
comp.handle_input(@nested.InputEvent::Modifiers(0U, 0U, 0U, 0U), 70U)
|
||||
type_keys(comp, [106U, 108U], 71U)
|
||||
shot("picker-people-tone.png")
|
||||
// The clipboard notice: the app turns its text field off, then an emoji is chosen.
|
||||
text_input_state(comp, a, ti, false, 0, 0, 0)
|
||||
type_keys(comp, [28U], 80U)
|
||||
shot("picker-copied-notice.png")
|
||||
comp.close()
|
||||
}
|
||||
}
|
||||
@@ -77,36 +77,3 @@ test "the open Applications menu gets its rows' icons and draws them" {
|
||||
assert_false(comp.shell.icon_app_ids().contains("app5"))
|
||||
comp.shell.shutdown()
|
||||
}
|
||||
|
||||
///| For a look: the menu and the Icon Desktop with theme icons (whatever the machine's hicolor
|
||||
/// theme has for these names; letter tiles or the generic icon where it has nothing). Writes
|
||||
/// _build/launcher_icons_themed.png and _build/desktop_icons_themed.png.
|
||||
test "screenshots: Applications menu and Icon Desktop with theme icons" {
|
||||
let comp = desk_comp("ishot")
|
||||
let apps = [
|
||||
("org.libreoffice.Writer", "Writer", "Word processor", "libreoffice-writer"),
|
||||
("org.libreoffice.Calc", "Calc", "Spreadsheets", "libreoffice-calc"),
|
||||
("org.libreoffice.Impress", "Impress", "Presentations", "libreoffice-impress"),
|
||||
("org.libreoffice.Draw", "Draw", "Drawings and diagrams", "libreoffice-draw"),
|
||||
("xterm", "XTerm", "Terminal emulator", "xterm-color"),
|
||||
("gvim", "GVim", "Text editor", "gvim"),
|
||||
]
|
||||
comp.shell.apps.clear()
|
||||
for a in apps {
|
||||
comp.shell.apps.push({ id: a.0, name: a.1, comment: a.2, category: "", glyph: "" })
|
||||
comp.shell.exec.set(a.0, a.0)
|
||||
comp.shell.icon_names.set(a.0, a.3)
|
||||
comp.shell.icon_handles.remove(a.0)
|
||||
}
|
||||
comp.shell.apps_dirty = true
|
||||
assert_true(comp.shell.set_desktop("icon-desktop"))
|
||||
ignore(comp.compose_frame())
|
||||
ignore(@sys.write_file_bytes("_build/desktop_icons_themed.png", @renderer.encode_png(comp.compose_frame())))
|
||||
comp.shell.toggle_launcher()
|
||||
for _ in 0..<10 {
|
||||
@sys.sleep_ms(30)
|
||||
ignore(comp.compose_frame())
|
||||
}
|
||||
ignore(@sys.write_file_bytes("_build/launcher_icons_themed.png", @renderer.encode_png(comp.compose_frame())))
|
||||
comp.shell.shutdown()
|
||||
}
|
||||
@@ -399,33 +399,6 @@ test "middle click closes a window from the overview and it stays open" {
|
||||
assert_true(drain_msgs(clients[ci]).iter().any(m => m.1 == 1U))
|
||||
}
|
||||
|
||||
///|
|
||||
fn overview_shot(n : Int, dark : Bool) -> Unit raise {
|
||||
let tag = "ovshot" + n.to_string() + (if dark { "d" } else { "l" })
|
||||
let socket_path = "/tmp/wayland-moon-" + tag + "-" + @sys.getpid().to_string() + ".sock"
|
||||
let comp = @host.ChandraCompositor::new(socket_path, @scene.ThemeTokens::moon_night(), 1280, 720).unwrap()
|
||||
comp.shell.dark_mode = dark
|
||||
comp.apply_theme()
|
||||
ignore(comp.compose_frame())
|
||||
ignore(open_windows(comp, socket_path, n))
|
||||
comp.handle_input(@nested.InputEvent::Key(125U, true), 1U)
|
||||
comp.handle_input(@nested.InputEvent::Key(125U, false), 2U)
|
||||
ov_settle(comp)
|
||||
// Hover the first window to show the highlight and close button.
|
||||
let (_, r) = comp.overview_places()[0]
|
||||
comp.handle_input(@nested.InputEvent::PointerMove((r.x + r.w / 2).to_double(), (r.y + r.h / 2).to_double()), 3U)
|
||||
let px = comp.compose_frame()
|
||||
ignore(@sys.write_file_bytes("_build/overview_" + n.to_string() + (if dark { "_dark" } else { "_light" }) + ".png", @renderer.encode_png(px)))
|
||||
}
|
||||
|
||||
///|
|
||||
test "overview screenshots: 1, 4 and 9 windows, dark and light" {
|
||||
for n in [1, 4, 9] {
|
||||
overview_shot(n, true)
|
||||
overview_shot(n, false)
|
||||
}
|
||||
}
|
||||
|
||||
///|
|
||||
test "no overview while the Interface Explorer inspects the launcher" {
|
||||
let comp = new_comp("ov-inspect")
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
///| Modules loaded into a fresh panel, in order. The dock (pinned and running apps, the task
|
||||
/// manager) stretches, so what follows it packs right.
|
||||
let default_panel : Array[String] = [
|
||||
"launcher", "inspector", "layout", "dock", "moon-disc", "network", "clock-digital", "screenshot",
|
||||
"session-settings",
|
||||
"launcher", "inspector", "layout", "dock", "network", "clock-digital", "screenshot", "session-settings",
|
||||
]
|
||||
|
||||
///| A fresh panel's modules: the defaults, plus the battery before the clock on a machine that
|
||||
@@ -334,6 +333,9 @@ fn migrate_panel(entries : Array[String]) -> Array[String] {
|
||||
if !has_settings && !out.contains("session-settings") {
|
||||
out.push("session-settings")
|
||||
}
|
||||
} else if e == "moon-disc" {
|
||||
// The moon phase disc never had source in the tree: a saved panel drops it.
|
||||
continue
|
||||
} else if e == "logout" {
|
||||
if !has_launcher && !out.contains("launcher") {
|
||||
out.push("launcher")
|
||||
@@ -353,6 +355,11 @@ test "a saved panel's wallpaper button becomes the settings module" {
|
||||
assert_eq(migrate_panel(["clock"]), ["clock"])
|
||||
}
|
||||
|
||||
///|
|
||||
test "a saved panel drops the moon-disc module, which has no source" {
|
||||
assert_eq(migrate_panel(["launcher", "moon-disc", "clock-digital"]), ["launcher", "clock-digital"])
|
||||
}
|
||||
|
||||
///|
|
||||
test "a saved panel's task list and dock become one dock, in the task list's place" {
|
||||
assert_eq(migrate_panel(["launcher", "tasks", "clock-digital", "dock"]), ["launcher", "dock", "clock-digital"])
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -107,7 +107,7 @@ capability's `desktops`, `current-desktop` and `set-desktop` (`wit/capabilities.
|
||||
|
||||
`compositor/host/desktop_test.mbt`: choosing and listing, input routing (windows and the panel
|
||||
win, drags stay with the module), the right-click menu, resize, idle and animation pacing,
|
||||
reload, and screenshots (`_build/desktop_*.png`). Run with:
|
||||
and reload. Run with:
|
||||
|
||||
```
|
||||
scripts/test-native.py -p compositor/host desktop
|
||||
|
||||
@@ -76,7 +76,3 @@ overlay, rather than being a separate component window:
|
||||
52% for the same app on the desktop.
|
||||
- A picture saved unchanged is encoded by the host (`snapshot-png`), as before. An edited one is
|
||||
encoded with `@renderer.encode_png_compressed`.
|
||||
|
||||
Headless pictures of the editor: run the host tests with `CHANDRA_EDITOR_SHOTS=<folder>` set,
|
||||
and the test "editor: headless screenshots" writes `screenshot-editor.png` (the editor) and
|
||||
`screenshot-editor-saved.png` (what it would save) there.
|
||||
@@ -156,7 +156,7 @@ remote-build *targets:
|
||||
# Compositor + wasm component + lib tests.
|
||||
test: modules emoji-font
|
||||
scripts/test-native.py
|
||||
moon test --target wasm --warn-list -a lib/shell lib/panel lib/clock lib/launcher lib/wm lib/taskbar lib/layoutpick lib/modmgr
|
||||
moon test --target wasm --warn-list -a $(ls -d lib/*/ | sed "s,/$,,")
|
||||
|
||||
# Native tests whose file or name contains one of WORDS (all without any), in parallel: `just t touch`.
|
||||
t *words:
|
||||
|
||||
Reference in new issue
Block a user