Skip to content

Commit 06dd8e6

Browse files
come-ncbackportbot[bot]
authored andcommitted
fix(tests): Sort activities by id to get the last one
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com> [skip ci]
1 parent db9755e commit 06dd8e6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

build/integration/features/bootstrap/Activity.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public function lastActivityIs(TableNode $activity): void {
2222
$this->theHTTPStatusCodeShouldBe('200');
2323
$data = json_decode($this->response->getBody()->getContents(), true);
2424
$activities = $data['ocs']['data'];
25+
/* Sort by id */
26+
uasort($activities, fn ($a, $b) => $a['activity_id'] <=> $b['activity_id']);
2527
$lastActivity = array_pop($activities);
2628
foreach ($activity->getRowsHash() as $key => $value) {
2729
Assert::assertEquals($value, $lastActivity[$key]);

build/integration/sharing_features/sharing-activity.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Feature: sharing
1010
And Logging in using web as "user0"
1111
And Sending a "POST" to "/apps/activity/settings" with requesttoken
1212
| public_links_notification | 1 |
13-
| public_links_upload_email | 1 |
13+
| public_links_upload_notification | 1 |
1414
| notify_setting_batchtime | 0 |
1515
| activity_digest | 0 |
1616

0 commit comments

Comments
 (0)