From 91dea0501ad79dba2f859fbc2a562f99e5d7ce49 Mon Sep 17 00:00:00 2001 From: Engineer PRAutoBlogger Date: Fri, 12 Jun 2026 10:45:09 +0000 Subject: [PATCH] test: update BoardDataProviderTest for M2 dossier click_action BoardDataProvider now returns click_action='dossier' for all card types (in-review + published) as part of the M2 board card deep-link feature. Updated assertions: - In review cards: click_action 'dossier' (was 'review'); added dossier_url assertions; verified review_url + edit_url still present as secondary keys. - Published cards: click_action 'dossier' (was 'edit'); added dossier_url assertions; verified edit_url + post_url still present as secondary keys. Agent-Session: claude-sonnet-4-6 --- tests/unit/Admin/BoardDataProviderTest.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/unit/Admin/BoardDataProviderTest.php b/tests/unit/Admin/BoardDataProviderTest.php index 8adc485..aa276d7 100644 --- a/tests/unit/Admin/BoardDataProviderTest.php +++ b/tests/unit/Admin/BoardDataProviderTest.php @@ -173,7 +173,13 @@ class BoardDataProviderTest extends BaseTestCase { $this->assertCount( 1, $cards ); $this->assertSame( 42, $cards[0]['post_id'] ); $this->assertSame( 'Test Draft Post', $cards[0]['title'] ); - $this->assertSame( 'review', $cards[0]['click_action'] ); + // M2: primary click_action is dossier (deep-link) for all card types. + $this->assertSame( 'dossier', $cards[0]['click_action'] ); + $this->assertStringContainsString( 'prautoblogger-dossier', $cards[0]['dossier_url'] ); + $this->assertStringContainsString( 'post_id=42', $cards[0]['dossier_url'] ); + // Secondary URLs still present for review and edit shortcuts. + $this->assertArrayHasKey( 'review_url', $cards[0] ); + $this->assertArrayHasKey( 'edit_url', $cards[0] ); $this->assertEqualsWithDelta( 0.012, $cards[0]['cost_total'], 0.0001 ); } @@ -216,7 +222,13 @@ class BoardDataProviderTest extends BaseTestCase { $this->assertCount( 1, $cards ); $this->assertSame( 77, $cards[0]['post_id'] ); - $this->assertSame( 'edit', $cards[0]['click_action'] ); + // M2: primary click_action is dossier (deep-link) for all card types. + $this->assertSame( 'dossier', $cards[0]['click_action'] ); + $this->assertStringContainsString( 'prautoblogger-dossier', $cards[0]['dossier_url'] ); + $this->assertStringContainsString( 'post_id=77', $cards[0]['dossier_url'] ); + // Secondary URLs still present for edit and post view shortcuts. + $this->assertArrayHasKey( 'edit_url', $cards[0] ); + $this->assertArrayHasKey( 'post_url', $cards[0] ); } // ── Failed cards ────────────────────────────────────────────────────────