Skip to content

Commit

Permalink
Fix timing issue on dialog theme test
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 23, 2020
1 parent 8a0015b commit 490fade
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dialog/base_test.go
Expand Up @@ -12,15 +12,14 @@ 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)

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())
}

0 comments on commit 490fade

Please sign in to comment.