From 5ebfa65a46a0ee0d1ef9c54140ac2bbd3dbd59e6 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Tue, 19 May 2026 13:29:26 +0100 Subject: [PATCH] Testing: Changed ordering in tests to help prevent flaky test Think it would primariy use the created_at ordering based in the relation which could cause trouble in CI test environment. This better forces Id based ordering --- tests/Activity/WatchTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Activity/WatchTest.php b/tests/Activity/WatchTest.php index 8be09f890..dc78e8942 100644 --- a/tests/Activity/WatchTest.php +++ b/tests/Activity/WatchTest.php @@ -218,10 +218,10 @@ class WatchTest extends TestCase $notifications = Notification::fake(); - $this->actingAs($editor)->post("/comment/{$entities['page']->id}", [ + $resp = $this->actingAs($editor)->post("/comment/{$entities['page']->id}", [ 'html' => '

My new comment

' ]); - $comment = $entities['page']->comments()->orderBy('id', 'desc')->first(); + $comment = $entities['page']->comments()->reorder('id', 'desc')->first(); $this->asAdmin()->post("/comment/{$entities['page']->id}", [ 'html' => '

My new comment response

',