diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index cc3308049..e523f5150 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -28,6 +28,7 @@ - fixed #11179: user.CanStartThread missing from help - fixed #11183: Calendar List View - fixed #11135: Tree Navigation menu template shows a drop down fly-out menu + - fixed #10984: Edit Survey Screen isn't right in demo 7.8.2 - Added scheduled vendor payout workflow activity. (Special thanks to Martin @ Oqapi) diff --git a/docs/upgrades/packages-7.8.3/root_import_survey_default-survey-edit.wgpkg b/docs/upgrades/packages-7.8.3/root_import_survey_default-survey-edit.wgpkg new file mode 100644 index 000000000..bc776e75f Binary files /dev/null and b/docs/upgrades/packages-7.8.3/root_import_survey_default-survey-edit.wgpkg differ diff --git a/t/rawHrefUrls.t b/t/rawHrefUrls.t index 43f4dc428..4d20286b6 100644 --- a/t/rawHrefUrls.t +++ b/t/rawHrefUrls.t @@ -26,11 +26,6 @@ use Test::More; # increment this value for each test you create my $numTests = 0; my $session = WebGUI::Test->session; -my $lib = WebGUI::Test->lib; - -##Find the name of the International macro in the user's config file. - -#note "International macro name = $international"; ##Regexp setup for parsing out the Macro calls. my $macro = qr{ @@ -43,19 +38,28 @@ my $macro = qr{ $numTests = $session->db->quickScalar('select count(distinct(assetId)) from template'); -plan tests => $numTests; +plan tests => 2*$numTests; my $validLinks = 0; +my $nonRootLink = qr{ + ^ + \s* #Optional whitespace + (?: \^ (?: / | Extras)) #Gateway or Extras macro + | # OR + {href}) { - if ($attrs->{href} !~ /\s*\^(?:\/|Extras)/) { + diag sprintf '%s: %s', $tag, $attrs->{href}; + if ($attrs->{href} !~ $nonRootLink) { $validLinks = 0; } } elsif ($tag eq 'script' && $attrs->{src}) { - if ($attrs->{src} !~ /\s*\^(?:\/|Extras)/) { + if ($attrs->{src} !~ $nonRootLink) { $validLinks = 0; } } @@ -70,15 +74,22 @@ my $parser = HTML::Parser->new( my $getATemplate = WebGUI::Asset::Template->getIsa($session); TEMPLATE: while (my $templateAsset = $getATemplate->()) { - my $template = $templateAsset->get('template'); my $header = $templateAsset->get('extraHeadTags'); if(! $header) { - ok(1, sprintf "%s: %s (%s) has no rooted link urls", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); - next TEMPLATE; + ok(1, sprintf "%s: %s (%s) has no rooted link urls in the head tags", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); + } + else { + $validLinks = 1; + $parser->parse($header); + ok($validLinks, sprintf "%s: %s (%s) has no rooted link urls in the head tags", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); + } + my $template = $templateAsset->get('template'); + if(! $template) { + ok(1, sprintf "%s: %s (%s) has no rooted link urls in the template", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); + } + else { + $validLinks = 1; + $parser->parse($template); + ok($validLinks, sprintf "%s: %s (%s) has no rooted link urls in the template", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); } - $validLinks = 1; - $parser->parse($header); - ok($validLinks, sprintf "%s: %s (%s) has no rooted link urls", $templateAsset->getTitle, $templateAsset->getId, $templateAsset->getUrl); } - -