make test more robust to handle multiple toolbars
This commit is contained in:
parent
2b73d1ee2d
commit
ab502e84d8
1 changed files with 14 additions and 6 deletions
|
|
@ -141,13 +141,21 @@ is($anchorTag, undef, "moveDown: no anchor tag when disabled is set");
|
|||
#
|
||||
####################################################
|
||||
|
||||
my $toolbarOptions = $session->icon->getToolbarOptions();
|
||||
my $expectedOptions = {
|
||||
useLanguageDefault => $i18n->get('1084', 'WebGUI'),
|
||||
bullet => 'bullet',
|
||||
};
|
||||
my $toolbarDir = join '/', $session->config->get('extrasPath'), 'toolbar';
|
||||
my $dirOpened = opendir my $tbdir, $toolbarDir or diag "uh-oh: $!";
|
||||
|
||||
SKIP: {
|
||||
|
||||
skip 'No toolbar dir', 1 unless $dirOpened;
|
||||
my @toolbarDirs = grep {! /^\./ } readdir $tbdir;
|
||||
push @toolbarDirs, 'useLanguageDefault';
|
||||
|
||||
my $toolbarOptions = $session->icon->getToolbarOptions();
|
||||
my @toolbarOptionDirs = keys %{ $toolbarOptions };
|
||||
|
||||
cmp_bag(\@toolbarDirs, \@toolbarOptionDirs, 'getToolbarOptions');
|
||||
}
|
||||
|
||||
cmp_deeply($expectedOptions, $toolbarOptions, 'getToolbarOptions');
|
||||
|
||||
sub linkAndText {
|
||||
my ($text, $tag, @params) = @_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue