Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Add missing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Happy-Ferret committed Apr 22, 2022
1 parent 021e663 commit 6c48ea1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions window_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestWindow_Actions(t *testing.T) {
testObjectAction(t, func() error { return w.Resize(1, 2) }, w.object, wrt, "{\"name\":\""+EventNameWindowCmdResize+"\",\"targetID\":\""+w.id+"\",\"windowOptions\":{\"height\":2,\"width\":1}}\n", EventNameWindowEventResize)
testObjectAction(t, func() error { return w.ResizeContent(1, 2) }, w.object, wrt, "{\"name\":\""+EventNameWindowCmdResizeContent+"\",\"targetID\":\""+w.id+"\",\"windowOptions\":{\"height\":2,\"width\":1}}\n", EventNameWindowEventResizeContent)
testObjectAction(t, func() error { return w.Restore() }, w.object, wrt, "{\"name\":\""+EventNameWindowCmdRestore+"\",\"targetID\":\""+w.id+"\"}\n", EventNameWindowEventRestore)
testObjectAction(t, func() error { return w.SetAlwaysOnTop(true) }, w.object, wrt, "{\"name\":\""+EventNameWindowCmdSetAlwaysOnTop+"\",\"targetID\":\""+w.id+"\"}\n", EventNameWindowEventAlwaysOnTopChanged)
testObjectAction(t, func() error { return w.Show() }, w.object, wrt, "{\"name\":\""+EventNameWindowCmdShow+"\",\"targetID\":\""+w.id+"\"}\n", EventNameWindowEventShow)
assert.Equal(t, true, w.IsShown())
testObjectAction(t, func() error { return w.UpdateCustomOptions(WindowCustomOptions{HideOnClose: astikit.BoolPtr(true)}) }, w.object, wrt, "{\"name\":\""+EventNameWindowCmdUpdateCustomOptions+"\",\"targetID\":\""+w.id+"\",\"windowOptions\":{\"height\":2,\"show\":true,\"width\":1,\"x\":4,\"y\":6,\"custom\":{\"hideOnClose\":true}}}\n", EventNameWindowEventUpdatedCustomOptions)
Expand Down

0 comments on commit 6c48ea1

Please sign in to comment.