From b80ef74102210209a11a6ed96735967fd34988e3 Mon Sep 17 00:00:00 2001 From: mostafa Date: Sun, 1 Nov 2026 20:02:17 +0200 Subject: [PATCH] Tests: the simpler post box --- tests/integration/GrowPanelTest.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/integration/GrowPanelTest.php b/tests/integration/GrowPanelTest.php index 3f39eed..fb88f00 100644 --- a/tests/integration/GrowPanelTest.php +++ b/tests/integration/GrowPanelTest.php @@ -137,18 +137,17 @@ public function test_the_grow_route_answers_each_card_with_its_own_state() { $this->assertCount( $n, $this->calls ); } - public function test_the_post_box_shows_clicks_revenue_lost_links_and_the_last_change_escaped() { + public function test_the_post_box_shows_scores_google_numbers_and_one_link_escaped() { $id = $this->post(); wp_set_current_user( $this->user( 'administrator' ) ); $res = rest_do_request( new \WP_REST_Request( 'GET', '/monoranks/v1/admin/post/' . $id ) ); $this->assertSame( 200, $res->get_status() ); $html = $res->get_data()['html']; - $this->assertStringContainsString( 'Google search, 28 days', $html ); + $this->assertStringContainsString( 'title="Google, 28 days"', $html ); $this->assertMatchesRegularExpression( '#
75
#', $html ); - $this->assertStringContainsString( '340', $html ); - $this->assertStringContainsString( '1 lost link to win back', $html ); - $this->assertStringContainsString( 'Last change MonoRanks saw', $html ); - $this->assertStringContainsString( '
  • Title
  • ', $html ); + // The simpler box (0.2.0) leaves visits, lost links and the last change to MonoRanks. + $this->assertStringNotContainsString( 'lost link', $html ); + $this->assertStringNotContainsString( 'Last change MonoRanks saw', $html ); $this->assertStringNotContainsString( '