Skip to content

Commit

Permalink
Load content for mechanize tests that do not support js
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnavy committed Mar 22, 2024
1 parent 95dc40f commit 0dc6b20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion share/html/Widgets/TitleBox
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit 0dc6b20

Please sign in to comment.