feat: boost pagination and sorting links with htmx

This commit is contained in:
fromme committed 2026-10-16 10:39:47 +02:00
1 parent 493a43d952
commit 13e5b6c3af
8 files changed
+37 -11

No files matched your search

+13
View File
@@ -169,6 +169,19 @@ class BpnAuthenticatorTest extends TestCase
$this->assertFalse($request->getSession()->has('_security.main.target_path'));
}
public function testABoostedHtmxRequestIsKeptAsTheDeeplink(): void
{
// a paginator or sort link fetches a whole page, so it is worth landing on after the login
$request = $this->createRequest();
$request->headers->set('HX-Request', 'true');
$request->headers->set('HX-Boosted', 'true');
$request->getSession()->set('_security.main.target_path', 'https://team.example.com/administrative/assignment?page=3');
$this->createAuthenticator()->start($request);
$this->assertSame('https://team.example.com/administrative/assignment?page=3', $request->getSession()->get('_security.main.target_path'));
}
public function testAPageRequestIsKeptAsTheDeeplink(): void
{
$request = $this->createRequest();