diff --git a/tests/integration/features/bootstrap/SharingContext.php b/tests/integration/features/bootstrap/SharingContext.php index bc42cdcdd1f..2c98eb33ba2 100644 --- a/tests/integration/features/bootstrap/SharingContext.php +++ b/tests/integration/features/bootstrap/SharingContext.php @@ -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); } } diff --git a/tests/integration/features/sharing-4/transfer-ownership.feature b/tests/integration/features/sharing-4/transfer-ownership.feature index cbf5963443c..a968f8bb526 100644 --- a/tests/integration/features/sharing-4/transfer-ownership.feature +++ b/tests/integration/features/sharing-4/transfer-ownership.feature @@ -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 @@ -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 |