Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-03-21 14:40:45 +0300
committerJoas Schilling <coding@schilljs.com>2022-03-21 20:00:51 +0300
commit56e4f85badb296d4dbd61614850237b7f1503a6b (patch)
tree854a607d58a27249bc07fb3108b68184832ab594
parent6c6c7d7b8a1ca189ae79d202436a4af7312ea2b6 (diff)
Only check the share_with_link for talk shares
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r--tests/integration/features/bootstrap/SharingContext.php18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/integration/features/bootstrap/SharingContext.php b/tests/integration/features/bootstrap/SharingContext.php
index d8eb2295a..44e9078fe 100644
--- a/tests/integration/features/bootstrap/SharingContext.php
+++ b/tests/integration/features/bootstrap/SharingContext.php
@@ -597,9 +597,14 @@ class SharingContext implements Context {
'file_source' => 'A_NUMBER',
'file_parent' => 'A_NUMBER',
'mail_send' => '0',
- 'share_with_link' => 'URL',
];
- $expectedFields = array_merge($defaultExpectedFields, $body->getRowsHash());
+
+ $fields = $body->getRowsHash();
+ if (isset($fields['share_type']) && ($fields['share_type'] === '10' || $fields['share_type'] === '11')) {
+ $defaultExpectedFields['share_with_link'] = 'URL';
+ }
+
+ $expectedFields = array_merge($defaultExpectedFields, $fields);
if (!array_key_exists('uid_file_owner', $expectedFields) &&
array_key_exists('uid_owner', $expectedFields)) {
@@ -621,8 +626,13 @@ class SharingContext implements Context {
}
}
- if ($expectedFields['share_with_link'] === 'URL') {
- $expectedFields['share_with_link'] = $this->baseUrl . 'index.php/call/' . $expectedFields['share_with'];
+ if (array_key_exists('share_with_link', $expectedFields) &&
+ $expectedFields['share_with_link'] === 'URL') {
+ if (array_key_exists('share_with', $expectedFields)) {
+ $expectedFields['share_with_link'] = $this->baseUrl . 'index.php/call/' . $expectedFields['share_with'];
+ } else {
+ $expectedFields['share_with_link'] = 'REGEXP ' . '/\/call\//';
+ }
}
foreach ($expectedFields as $field => $value) {