Merge commit 'v7.10.23' into WebGUI8. Tests need fixing.
This commit is contained in:
commit
a2a821822d
72 changed files with 578 additions and 132 deletions
|
|
@ -162,9 +162,6 @@ $storage->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('lamp.jpg'))
|
|||
$storage->addFileFromFilesystem(WebGUI::Test->getTestCollateralPath('littleTextFile'));
|
||||
my $attachment_loop = $post1->getTemplateVars()->{attachment_loop};
|
||||
|
||||
use Data::Dumper;
|
||||
diag Dumper($attachment_loop);
|
||||
|
||||
my @extensions = map { [ $_->{filename}, $_->{extension} ] } @{ $attachment_loop };
|
||||
|
||||
cmp_bag(
|
||||
|
|
|
|||
|
|
@ -16,8 +16,9 @@ use lib "$FindBin::Bin/../../lib";
|
|||
use Test::MockTime qw/:all/; ##Must be loaded before all other code
|
||||
use WebGUI::Test;
|
||||
use WebGUI::Session;
|
||||
use Test::More tests => 3; # increment this value for each test you create
|
||||
use Test::More tests => 5; # increment this value for each test you create
|
||||
use WebGUI::Asset::Wobject::Layout;
|
||||
use WebGUI::Asset::Template;
|
||||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
|
|
@ -64,4 +65,25 @@ set_relative_time(-100);
|
|||
$snip1 = $snip1->addRevision({ title => 'titular', }, 18);
|
||||
is $page->getContentLastModifiedBy, $revised_user1->userId, '... check that a new revision tracks';
|
||||
|
||||
# inheriting mobileStyleTemplateId and mobileTemplateId; from ``Mobile template is not being inherited (#12246)''
|
||||
|
||||
my $importNode = WebGUI::Asset::Template->getImportNode($session);
|
||||
my $template1 = $importNode->addChild({className=>"WebGUI::Asset::Template"});
|
||||
my $template2 = $importNode->addChild({className=>"WebGUI::Asset::Template"});
|
||||
WebGUI::Test->addToCleanup($template1, $template2);
|
||||
|
||||
my $mobileStyleTemplateId = $template1->getId;
|
||||
my $mobileTemplateId = $template2->getId;
|
||||
$page->update({ mobileStyleTemplateId => $mobileStyleTemplateId, mobileTemplateId => $mobileTemplateId });
|
||||
my $url = $page->get('url') . '/layout_child_test';
|
||||
my $html = WebGUI::Test->getPage($page, "www_add", {
|
||||
userId => 3,
|
||||
formParams => {
|
||||
class => 'WebGUI::Asset::Wobject::Layout',
|
||||
url => $page->get('url') . '/layout_child_test',
|
||||
},
|
||||
});
|
||||
|
||||
like $html, qr/name="mobileTemplateId" value="$mobileTemplateId"/, 'child PageLayout inherited parents mobileTempaleId';
|
||||
like $html, qr/name="mobileStyleTemplateId" value="$mobileStyleTemplateId"/, 'child PageLayout inherited parents mobileStyleTempaleId';
|
||||
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ is $session->db->quickScalar('select count(*) from assetIndex where assetId=?',[
|
|||
|
||||
my $record;
|
||||
|
||||
$record = $session->db->quickHashRef('select * from assetIndex where assetId=?',[$thingy->getId]);
|
||||
$record = $session->db->quickHashRef('select * from assetIndex where assetId=? AND subId IS NOT NULL',[$thingy->getId]);
|
||||
cmp_deeply(
|
||||
$record,
|
||||
superhashof({
|
||||
subId => 'THING_RECORD',
|
||||
url => $thingy->getUrl('func=search;thingId=THING_RECORD'),
|
||||
url => $session->url->append($thingy->get('url'), 'func=search;thingId=THING_RECORD'),
|
||||
title => 'Label',
|
||||
groupIdView => 2,
|
||||
keywords => all(
|
||||
|
|
@ -165,7 +165,7 @@ cmp_deeply(
|
|||
score => ignore(),
|
||||
synopsis => ignore(),
|
||||
title => 'Label', ##From the Thing's label
|
||||
url => $thingy->getUrl('func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
|
||||
url => $session->url->append($thingy->get('url'), 'func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
|
||||
}
|
||||
],
|
||||
'Checking indexed data for the thingData'
|
||||
|
|
@ -214,7 +214,7 @@ cmp_deeply(
|
|||
score => ignore(),
|
||||
synopsis => ignore(),
|
||||
title => '8/16/2001', ##From viewScreenTitle, which is $birthday in user's preferred date format
|
||||
url => $thingy->getUrl('func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
|
||||
url => $session->url->append($thingy->get('url'), 'func=viewThingData;thingId='.$thingId.';thingDataId=THING_DATA'),
|
||||
}
|
||||
],
|
||||
'Checking indexed data for the thingData'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue