Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/integration/features/bootstrap/SharingContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,15 @@ public function shareXIsReturnedWith(int $number, TableNode $body) {
// Fix XML parsing fails
$share[$field] = '';
}

if (in_array($field, ['path', 'storage_id'], true)
&& preg_match('/Transferred from [^ ]* on (\d{4}-\d{2}-\d{2} \d{2}-\d{2}-\d{2})/', $share[$field], $matches)) {
// We have to replace strings like
// "Transferred from participant1-displayname on 2025-06-30 12-31-32"
// with something neutral that works in tests
$share[$field] = str_replace($matches[1], '{{DATE AND TIME}}', $share[$field]);
}

$this->assertFieldIsInReturnedShare($field, $value, $share);
}
}
Expand Down
10 changes: 5 additions & 5 deletions tests/integration/features/sharing-4/transfer-ownership.feature
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,11 @@ Feature: transfer-ownership
| displayname_owner | participant2-displayname |
| uid_file_owner | participant3 |
| displayname_file_owner | participant3-displayname |
| path | /welcome (2).txt |
| path | /Talk/welcome (2).txt |
| item_type | file |
| mimetype | text/plain |
| storage_id | shared::/welcome (2).txt |
| file_target | /welcome (2).txt |
| storage_id | shared::/Talk/welcome (2).txt |
| file_target | /Talk/welcome (2).txt |
| share_with | group room |
| share_with_displayname | Group room |
And user "participant2" gets last share
Expand All @@ -78,10 +78,10 @@ Feature: transfer-ownership
| displayname_owner | participant2-displayname |
| uid_file_owner | participant3 |
| displayname_file_owner | participant3-displayname |
| path | /Talk/welcome (2).txt |
| path | /Transferred from participant1-displayname on {{DATE AND TIME}}/welcome (2).txt |
| item_type | file |
| mimetype | text/plain |
| storage_id | shared::/Talk/welcome (2).txt |
| storage_id | shared::/Transferred from participant1-displayname on {{DATE AND TIME}}/welcome (2).txt |
| file_target | /Talk/welcome (2).txt |
| share_with | group room |
| share_with_displayname | Group room |
Expand Down
Loading