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
This commit is contained in:
Dan Brown
2026-05-19 13:29:26 +01:00
parent b5d3ba2726
commit 5ebfa65a46

View File

@@ -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' => '<p>My new comment</p>'
]);
$comment = $entities['page']->comments()->orderBy('id', 'desc')->first();
$comment = $entities['page']->comments()->reorder('id', 'desc')->first();
$this->asAdmin()->post("/comment/{$entities['page']->id}", [
'html' => '<p>My new comment response</p>',