tests: Test the declarative widget system on wiboxes

This commit is contained in:
Emmanuel Lepage Vallee 2016-08-01 16:02:58 -04:00
parent 220dc4c5e5
commit 3587de5721
1 changed files with 24 additions and 0 deletions

View File

@ -44,4 +44,28 @@ assert(w.foo == "bar")
screen[1].clients = 42
assert(screen[1].clients ~= 42)
-- Test the wibox declarative widget system (drawin proxy)
local w2 = wibox {
visible = true,
wisth = 100,
height = 100
}
w2:setup{
{
text = "Awesomeness!",
id = "main_textbox",
widget = wibox.widget.textbox,
},
id = "main_background",
widget = wibox.container.background
}
assert(w2.main_background)
assert(w2:get_children_by_id("main_background")[1])
assert(w2:get_children_by_id("main_textbox")[1])
assert(w2.main_background.main_textbox)
assert(w2.main_background == w2:get_children_by_id("main_background")[1])
require("_runner").run_steps({ function() return true end })