From 490fade32cbf29c188cf2973110bc4c5df4b9134 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Tue, 21 Jul 2020 23:22:45 +0100 Subject: [PATCH] Fix timing issue on dialog theme test --- dialog/base_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dialog/base_test.go b/dialog/base_test.go index e045f60403..0a62038e1b 100644 --- a/dialog/base_test.go +++ b/dialog/base_test.go @@ -12,8 +12,7 @@ import ( ) func TestShowCustom_ApplyTheme(t *testing.T) { - a := test.NewApp() - a.Settings().SetTheme(theme.DarkTheme()) + test.ApplyTheme(t, theme.DarkTheme()) w := test.NewWindow(canvas.NewRectangle(color.Transparent)) w.Resize(fyne.NewSize(300, 200)) d := NewCustom("Title", "OK", widget.NewLabel("Content"), w) @@ -21,6 +20,6 @@ func TestShowCustom_ApplyTheme(t *testing.T) { d.Show() test.AssertImageMatches(t, "dialog-custom-dark.png", w.Canvas().Capture()) - a.Settings().SetTheme(theme.LightTheme()) + test.ApplyTheme(t, theme.LightTheme()) test.AssertImageMatches(t, "dialog-custom-light.png", w.Canvas().Capture()) }