From 0dc6b2027f075dc952338bf4c8ef0f5d22457d7d Mon Sep 17 00:00:00 2001 From: sunnavy Date: Fri, 22 Mar 2024 09:33:01 -0400 Subject: [PATCH] Load content for mechanize tests that do not support js --- share/html/Widgets/TitleBox | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/html/Widgets/TitleBox b/share/html/Widgets/TitleBox index a36ac06ced..8950fd7652 100644 --- a/share/html/Widgets/TitleBox +++ b/share/html/Widgets/TitleBox @@ -101,7 +101,8 @@ elsif ( my $name = $m->notes('HTMXLoadComponent') ) { $htmx_get = RT->Config->Get('WebPath') . '/Views/Component/' . $name . '?From=' . RT->Config->Get('WebPath') . $m->request_path; } -$content = $m->content unless $htmx_load; +$content = $m->content + unless $htmx_load && ( RT::Interface::Web::RequestENV('HTTP_USER_AGENT') // '' ) !~ /WWW-Mechanize/; $m->callback( CallbackName => "ModifyContent", ARGSRef => \%ARGS, Content => \$content, Class => \$class, HideEmpty => \$hide_empty, HideChrome => \$hide_chrome );