tests: Test naughty.notification.ignore_suspend

This commit is contained in:
Emmanuel Lepage Vallee 2021-10-14 13:59:45 -07:00
parent 0b075761e3
commit 187b766cbe
1 changed files with 36 additions and 0 deletions

View File

@ -103,4 +103,40 @@ table.insert(steps, function()
return true return true
end) end)
-- Test `ignore_suspend`.
table.insert(steps, function()
naughty.suspended = true
display_count = 0
notifs[1] = notification {
title = "test3",
ignore_suspend = true,
}
notifs[2] = notification {
title = "test4"
}
return true
end)
table.insert(steps, function()
if display_count ~= 1 then return end
notifs[2]:destroy()
naughty.suspended = false
return true
end)
table.insert(steps, function()
if display_count ~= 1 then return end
notifs[1]:destroy()
return true
end)
require("_runner").run_steps(steps) require("_runner").run_steps(steps)