From 304112b0ad9963648313057134fce45dc98b0e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 18 Mar 2025 15:53:47 +0100 Subject: [PATCH] fix(tests): Sort activities by id to get the last one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- build/integration/features/bootstrap/Activity.php | 2 ++ build/integration/sharing_features/sharing-activity.feature | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/build/integration/features/bootstrap/Activity.php b/build/integration/features/bootstrap/Activity.php index 466b2dde14e..4172776304d 100644 --- a/build/integration/features/bootstrap/Activity.php +++ b/build/integration/features/bootstrap/Activity.php @@ -22,6 +22,8 @@ trait Activity { $this->theHTTPStatusCodeShouldBe('200'); $data = json_decode($this->response->getBody()->getContents(), true); $activities = $data['ocs']['data']; + /* Sort by id */ + uasort($activities, fn ($a, $b) => $a['activity_id'] <=> $b['activity_id']); $lastActivity = array_pop($activities); foreach ($activity->getRowsHash() as $key => $value) { Assert::assertEquals($value, $lastActivity[$key]); diff --git a/build/integration/sharing_features/sharing-activity.feature b/build/integration/sharing_features/sharing-activity.feature index 5757b210134..016b376488b 100644 --- a/build/integration/sharing_features/sharing-activity.feature +++ b/build/integration/sharing_features/sharing-activity.feature @@ -10,7 +10,7 @@ Feature: sharing And Logging in using web as "user0" And Sending a "POST" to "/apps/activity/settings" with requesttoken | public_links_notification | 1 | - | public_links_upload_email | 1 | + | public_links_upload_notification | 1 | | notify_setting_batchtime | 0 | | activity_digest | 0 |