remove unused module from help tests, add more templates to check, make help_related output more verbose to make debugging easier
This commit is contained in:
parent
9a368956e7
commit
4d98283489
3 changed files with 27 additions and 4 deletions
|
|
@ -14,7 +14,6 @@ use lib '../lib';
|
|||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
use File::Find;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
#The goal of this test is to verify that all entries in the lib/WebGUI/Help
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ use lib '../lib';
|
|||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
use File::Find;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
#The goal of this test is to verify that all entries in the lib/WebGUI/Help
|
||||
|
|
@ -43,6 +42,10 @@ my @relatedHelp = ();
|
|||
foreach my $topic ( keys %helpTable ) {
|
||||
foreach my $entry ( keys %{ $helpTable{$topic} }) {
|
||||
my @related = @{ $helpTable{$topic}{$entry}{related} };
|
||||
foreach my $relHash (@related) {
|
||||
$relHash->{parentEntry} = $entry;
|
||||
$relHash->{parentTopic} = $topic;
|
||||
}
|
||||
push @relatedHelp, @related;
|
||||
$numTests += scalar @related;
|
||||
}
|
||||
|
|
@ -55,8 +58,8 @@ plan tests => $numTests;
|
|||
##Each array element is a hash with two keys, tag (entry) and namespace (topic).
|
||||
|
||||
foreach my $related (@relatedHelp) {
|
||||
my ($topic, $entry) = @{ $related }{'namespace', 'tag'};
|
||||
ok( exists $helpTable{$topic}{$entry}, "Help entry: $topic -> $entry");
|
||||
my ($topic, $entry, $parentTopic, $parentEntry) = @{ $related }{'namespace', 'tag', 'parentTopic', 'parentEntry'};
|
||||
ok( exists $helpTable{$topic}{$entry}, "Help entry: $topic -> $entry from $parentTopic -> $parentEntry");
|
||||
}
|
||||
|
||||
# put your tests here
|
||||
|
|
|
|||
|
|
@ -53,6 +53,27 @@ my @tmplVarTable = (
|
|||
id => 'PBtmplHelp000000000001',
|
||||
vars => [ qw(body fields) ],
|
||||
},
|
||||
## Login, account and password templates
|
||||
{
|
||||
id => 'PBtmpl0000000000000010',
|
||||
vars => [ ],
|
||||
},
|
||||
{
|
||||
id => 'PBtmpl0000000000000011',
|
||||
vars => [ ],
|
||||
},
|
||||
{
|
||||
id => 'PBtmpl0000000000000012',
|
||||
vars => [ ],
|
||||
},
|
||||
{
|
||||
id => 'PBtmpl0000000000000013',
|
||||
vars => [ ],
|
||||
},
|
||||
{
|
||||
id => 'PBtmpl0000000000000014',
|
||||
vars => [ ],
|
||||
},
|
||||
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue