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
This commit is contained in:
Engineer PRAutoBlogger
2026-06-12 10:45:09 +00:00
parent 72bfd232a4
commit 91dea0501a

View File

@@ -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 ────────────────────────────────────────────────────────