aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-06-22 14:37:57 +0200
committerAngelo Naselli <anaselli@linux.it>2014-06-22 14:37:57 +0200
commitc3ba250aa16957de5cf583ee1c6e2d269d686736 (patch)
tree36617277f38e64d4835e96fefc2e70c445642111
parent6339816696c279e95d13764b4091452718f216ca (diff)
downloadmanatools-c3ba250aa16957de5cf583ee1c6e2d269d686736.tar
manatools-c3ba250aa16957de5cf583ee1c6e2d269d686736.tar.gz
manatools-c3ba250aa16957de5cf583ee1c6e2d269d686736.tar.bz2
manatools-c3ba250aa16957de5cf583ee1c6e2d269d686736.tar.xz
manatools-c3ba250aa16957de5cf583ee1c6e2d269d686736.zip
Added test for ask_fromTreeList
-rw-r--r--t/03-Shared_GUI.t41
1 files changed, 25 insertions, 16 deletions
diff --git a/t/03-Shared_GUI.t b/t/03-Shared_GUI.t
index ce2bf5be..01a5772d 100644
--- a/t/03-Shared_GUI.t
+++ b/t/03-Shared_GUI.t
@@ -18,7 +18,7 @@ BEGIN {
SKIP: {
#remember to skip the righ number of tests
- skip "You didn't say yes...", 10, unless ( $a eq "y" );
+ skip "You didn't say yes...", 11, unless ( $a eq "y" );
ok( $gui->warningMsgBox({text => "Warning message! (no title, no richtext)<br> line two"}), 'wmb1');
@@ -35,25 +35,34 @@ BEGIN {
cmp_ok($btn = $gui->ask_YesOrNo({title => "Question on tests", text => "Did these tests all pass?"}), ">=", 0, 'ask_YesOrNo');
diag "ask_YesOrNo got: < " . ($btn == 1 ? "Yes": "No"). " >";
-
+
#TODO cancel makes this test failing
- ok(my $item = $gui->ask_fromList({title => "Choose from list", header => "Which one do you select?", default_button => 1,
- list => ['item 1', 'item 2', 'item 3', 'item 4']}), 'ask_fromList');
+ ok(my $item = $gui->ask_fromList({title => "Choose from list", header => "Which one do you select?", default_button => 1,
+ list => ['item 1', 'item 2', 'item 3', 'item 4']}), 'ask_fromList');
diag "ask_fromList got: < " . ($item ? $item : "none") . " >";
+
+ #TODO cancel makes this test failing
+ ok($item = $gui->ask_fromTreeList({title => "Choose from list", header => "Which one do you select?", default_button => 1,
+ default_item => 'leaf 2',
+ list => ['item 1/item 2/item 3', 'item 1/item 2/leaf 1', 'item 1/item 2/leaf 2', 'item 4/leaf 3', 'item 5']}),
+ 'ask_fromTreeList');
+ diag "ask_fromTreeList got: < " . ($item ? $item : "none") . " >";
+
ok($gui->AboutDialog({ name => "Shared::GUI TABBED",
- version => $AdminPanel::Shared::VERSION,
- credits => "Copyright (C) 2014 Angelo Naselli",
- license => $AdminPanel::Shared::License,
- authors => "Angelo Naselli <anaselli\@linux.it>\nMatteo Pasotti <matteo.pasotti\@gmail.com>",
- }), 'AboutDialog');
+ version => $AdminPanel::Shared::VERSION,
+ credits => "Copyright (C) 2014 Angelo Naselli",
+ license => 'GPLv2',
+ authors => "Angelo Naselli <anaselli\@linux.it>\nMatteo Pasotti <matteo.pasotti\@gmail.com>",
+ }), 'AboutDialog');
ok($gui->AboutDialog({ name => "Shared::GUI CLASSIC",
- version => $AdminPanel::Shared::VERSION,
- credits => "Copyright (C) 2014 Angelo Naselli",
- license => $AdminPanel::Shared::License,
- authors => "Angelo Naselli <anaselli\@linux.it>\nMatteo Pasotti <matteo.pasotti\@gmail.com>",
- dialog_mode => 1,
- }), 'ClassicAboutDialog');
+ version => $AdminPanel::Shared::VERSION,
+ credits => "Copyright (C) 2014 Angelo Naselli",
+ license => 'GPLv2',
+ authors => "Angelo Naselli <anaselli\@linux.it>\nMatteo Pasotti <matteo.pasotti\@gmail.com>",
+ dialog_mode => 1,
+ }), 'ClassicAboutDialog');
}
-
+
+
done_testing;