fix(tests): Sort activities by id to get the last one

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/51458/head
Côme Chilliet 10 months ago committed by Côme Chilliet
parent c9938e54a6
commit da9b6e376d
  1. 2
      build/integration/features/bootstrap/Activity.php
  2. 2
      build/integration/sharing_features/sharing-activity.feature

@ -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]);

@ -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 |

Loading…
Cancel
Save