merge back with HEAD for 7.7.0
This commit is contained in:
parent
426bc41b04
commit
04105713f0
23 changed files with 120 additions and 60 deletions
|
|
@ -47,6 +47,9 @@ SKIP: {
|
|||
|
||||
skip "Unable to load WebGUI::AdSpace", $numTests-1 unless $loaded;
|
||||
|
||||
local $ENV{REMOTE_ADDR} = '10.0.0.1';
|
||||
local $ENV{HTTP_USER_AGENT} = 'Mozilla/5.0';
|
||||
|
||||
$adSpace = WebGUI::AdSpace->create($session, {name=>"Alfred"});
|
||||
|
||||
isa_ok($adSpace, 'WebGUI::AdSpace');
|
||||
|
|
|
|||
|
|
@ -54,6 +54,10 @@ $imageStorage->addFileFromScalar('foo.bmp', 'This is not really an image');
|
|||
SKIP: {
|
||||
|
||||
skip "Unable to load WebGUI::AdSpace::Ad", $numTests-1 unless $loaded;
|
||||
|
||||
local $ENV{REMOTE_ADDR} = '10.0.0.1';
|
||||
local $ENV{HTTP_USER_AGENT} = 'Mozilla/5.0';
|
||||
|
||||
$adSpace = WebGUI::AdSpace->create($session, {name=>"Alfred"});
|
||||
$ad=WebGUI::AdSpace::Ad->create($session, $adSpace->getId, {"type" => "text"});
|
||||
isa_ok($ad,"WebGUI::AdSpace::Ad");
|
||||
|
|
@ -115,11 +119,11 @@ SKIP: {
|
|||
|
||||
##Link checks
|
||||
$token = $textP->get_tag("a");
|
||||
my $href = $token->[1]{href};
|
||||
my $href = $token->[1]{onclick};
|
||||
like($href, qr/op=clickAd/, 'ad link has correct operation');
|
||||
|
||||
my $adId = $textAd->getId;
|
||||
like($href, qr/id=$adId/, 'ad link has correct ad id');
|
||||
like($href, qr/id=\Q$adId\E/, 'ad link has correct ad id');
|
||||
|
||||
$style = $token->[1]{style};
|
||||
like($style, qr/background-color:white/, 'ad link background is white');
|
||||
|
|
@ -159,11 +163,11 @@ SKIP: {
|
|||
|
||||
##Link checks
|
||||
$token = $textP->get_tag("a");
|
||||
my $href = $token->[1]{href};
|
||||
my $href = $token->[1]{onclick};
|
||||
like($href, qr/op=clickAd/, 'ad link has correct operation, image');
|
||||
|
||||
$adId = $imageAd->getId;
|
||||
like($href, qr/id=$adId/, 'ad link has correct ad id, image');
|
||||
like($href, qr/id=\Q$adId\E/, 'ad link has correct ad id, image');
|
||||
|
||||
$token = $textP->get_tag("img");
|
||||
$style = $token->[1]{src};
|
||||
|
|
|
|||
|
|
@ -1883,7 +1883,7 @@ cmp_deeply(
|
|||
verbatim => $index == 4 ? 1 : 0,
|
||||
recordedAnswer => $index++,
|
||||
})
|
||||
} 'Democratic party', 'Republican party (or GOP)', 'Independant party', 'Other party (verbatim)',
|
||||
} 'Democratic party', 'Republican party (or GOP)', 'Independent party', 'Other party (verbatim)',
|
||||
],
|
||||
'updateQuestionAnswers: Party type'
|
||||
);
|
||||
|
|
|
|||
|
|
@ -31,7 +31,10 @@ my $categories = WebGUI::ProfileCategory->getCategories($session);
|
|||
|
||||
my @labels = map { $_->getLabel } @{ $categories };
|
||||
|
||||
$categories->[0]->set({ visible => 0});
|
||||
my %originalProperties = %{ $categories->[0]->get };
|
||||
my %properties = %originalProperties;
|
||||
$properties{visible} = 0;
|
||||
$categories->[0]->set(\%properties);
|
||||
|
||||
my $newCategories = WebGUI::ProfileCategory->getCategories($session);
|
||||
my @newLabels = map { $_->getLabel } @{ $newCategories };
|
||||
|
|
@ -39,4 +42,5 @@ my @newLabels = map { $_->getLabel } @{ $newCategories };
|
|||
cmp_bag(\@newLabels, \@labels, 'Setting a category to not be visible does not change its availability through getCategories, with no options');
|
||||
|
||||
END {
|
||||
$categories->[0]->set(\%originalProperties);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue