-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[tests-only][full-ci] adding test for editing shared file(OCM) by the share receiver #10523
base: master
Are you sure you want to change the base?
Conversation
a2752ac
to
3ffcfad
Compare
3ffcfad
to
4e5fa4d
Compare
4e5fa4d
to
b1c0684
Compare
b1c0684
to
cbe1360
Compare
Quality Gate passedIssues Measures |
$this->featureContext->uploadFileWithContent( | ||
$user, | ||
$content, | ||
$share, | ||
$spaceId | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what happens with the share param in this function? is it used in the request?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is ignored.
ocis/tests/acceptance/TestHelpers/WebDavHelper.php
Lines 730 to 753 in cbe1360
if ($path === null) { | |
$path = ""; | |
} | |
// get space id if testing with spaces dav | |
if ($spaceId === null && $davPathVersionToUse === self::DAV_VERSION_SPACES && !\in_array($type, ["public-files", "versions"])) { | |
$path = \ltrim($path, "/"); | |
if (\str_starts_with($path, "Shares/")) { | |
$spaceId = self::getSharesSpaceIdForUser( | |
$baseUrl, | |
$user, | |
$password, | |
$xRequestId | |
); | |
$path = "/" . preg_replace("/^Shares\//", "", $path); | |
} else { | |
$spaceId = self::getPersonalSpaceIdForUserOrFakeIfNotFound( | |
$baseUrl, | |
$user, | |
$password, | |
$xRequestId | |
); | |
} | |
} |
but leaving it in the step can make the step more clear or i can just delete it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if statement should not be triggered, right? because we send some value to $spaceId
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see this url being hit:
https://localhost:10200/remote.php/dav/spaces/89f37a33-858b-45fa-8890-a1f2b27d90e1$f1c7b05d-38c4-4822-b30c-7c484b8ac287!L3RleHRmaWxlLnR4dA==/textfile.txt
but this should also work and this is what we want to do
https://localhost:10200/remote.php/dav/spaces/89f37a33-858b-45fa-8890-a1f2b27d90e1$f1c7b05d-38c4-4822-b30c-7c484b8ac287!L3RleHRmaWxlLnR4dA==/
you can send the empty string in that param
string $share, | ||
string $content, | ||
): void { | ||
$spaceId = $this->featureContext->spacesContext->getSharesRemoteItemId($user, $share); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$spaceId = $this->featureContext->spacesContext->getSharesRemoteItemId($user, $share); | |
$spaceId = $this->getSharesRemoteItemId($user, $share); |
Description
adding test for editing shared file(OCM) by the share receiver
bug coverage of #10358
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: