From 3587de5721131b95cde560e9f10d4eb6caff5647 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 1 Aug 2016 16:02:58 -0400 Subject: [PATCH] tests: Test the declarative widget system on wiboxes --- tests/test-miss-handlers.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/test-miss-handlers.lua b/tests/test-miss-handlers.lua index 46cfad2c..8a894818 100644 --- a/tests/test-miss-handlers.lua +++ b/tests/test-miss-handlers.lua @@ -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 })