From 42cd78fbd8f4854f6bc808e976c78facc22454a0 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Fri, 10 Jan 2025 18:08:58 +0000 Subject: [PATCH] Don't "find" app files for dialog tests --- dialog/file.go | 4 ++++ dialog/file_test.go | 1 + 2 files changed, 5 insertions(+) diff --git a/dialog/file.go b/dialog/file.go index 08f7429955..0310409471 100644 --- a/dialog/file.go +++ b/dialog/file.go @@ -924,6 +924,10 @@ func getFavoriteOrder() []string { } func hasAppFiles(a fyne.App) bool { + if a.UniqueID() == "testApp" { + return false + } + return len(a.Storage().List()) > 0 } diff --git a/dialog/file_test.go b/dialog/file_test.go index a667282502..2be5abf822 100644 --- a/dialog/file_test.go +++ b/dialog/file_test.go @@ -675,6 +675,7 @@ func TestViewPreferences(t *testing.T) { } func TestFileFavorites(t *testing.T) { + _ = test.NewApp() win := test.NewTempWindow(t, widget.NewLabel("Content")) dlg := NewFileOpen(func(reader fyne.URIReadCloser, err error) {