LazyRun v1.0.0: shortcut maker untuk executable dan PWA
- Fungsi A: shortcut dari file executable (ELF/AppImage/script) - Fungsi B: shortcut PWA/URL dengan deteksi browser (native, /opt, Flatpak) - Checkbox Menu Aplikasi / Desktop, desktop-only pakai NoDisplay=true - List + uninstall + deteksi shortcut yang file .desktop-nya hilang - Metadata ~/.config/lazyrun/shortcuts.json, refresh cache XDG/KDE - AppImage + zsync update info via build.sh
This commit is contained in:
1 parent
9cd5a1f82d
commit
da31f7d7d7
31 files changed
+2916
No files matched your search
@@ -0,0 +1,35 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"fyne.io/fyne/v2/test"
|
||||
|
||||
"lazyrun/internal/store"
|
||||
)
|
||||
|
||||
func TestBuildMainWindow(t *testing.T) {
|
||||
a := test.NewApp()
|
||||
defer a.Quit()
|
||||
|
||||
ui, err := build(a, "test")
|
||||
if err != nil {
|
||||
t.Fatalf("build(): %v", err)
|
||||
}
|
||||
if ui.win.Content() == nil {
|
||||
t.Fatal("window tanpa content")
|
||||
}
|
||||
|
||||
// dialog harus bisa dibuka tanpa panic
|
||||
ui.showExecutableDialog()
|
||||
ui.showWebAppDialog()
|
||||
ui.checkUpdates()
|
||||
}
|
||||
|
||||
func TestDescribe(t *testing.T) {
|
||||
sc := store.Shortcut{Type: store.TypeWebApp, Targets: store.Targets{Menu: true}, DesktopPath: "/nonexistent/x.desktop"}
|
||||
got := describe(sc)
|
||||
if got != "Web · Application menu · missing" && got != "Web · Menu aplikasi · hilang" {
|
||||
t.Errorf("describe() = %q", got)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user