Skip to content

Commit 1acde45

Browse files
author
hhaensel
committed
support Window in notify_test()
1 parent e294dff commit 1acde45

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/GenieTest.jl

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,17 @@ function notify_test(model::ReactiveModel, test::Test.Result, test_str::Abstract
343343
notify(model, "$test_str $(success ? "succeeded!" : "failed!")", type = success ? "positive" : "negative")
344344
end
345345
346+
function notify_test(win::Window, test::Test.Result, test_str::AbstractString = "Test")
347+
success = test isa Test.Pass
348+
notify(win, "$test_str $(success ? "succeeded!" : "failed!")", type = success ? "positive" : "negative")
349+
end
350+
346351
function notify_test(app::App, test::Test.Result, test_str::AbstractString = "Test")
347-
notify_test(app.__model__, test, test_str)
352+
if app.__model__ !== nothing
353+
notify_test(app.__model__, test, test_str)
354+
elseif app.__window__ !== nothing
355+
notify_test(app.__window__, test, test_str)
356+
end
348357
end
349358
350359
function connect!(app::App; timeout = nothing, port = nothing, isready::Function = app -> app.isready === true)

0 commit comments

Comments
 (0)