Added test for sending share invitation with wrong sharetype

This commit is contained in:
Prarup Gurung
2024-01-26 09:49:58 +05:45
parent 48610091ad
commit b8d1a278c6
2 changed files with 105 additions and 7 deletions
@@ -163,12 +163,10 @@ class SharingNgContext implements Context {
$sharees = array_map('trim', explode(',', $rows['sharee']));
$shareTypes = array_map('trim', explode(',', $rows['shareType']));
foreach ($sharees as $index => $sharee) {
$shareType = $shareTypes[$index];
foreach ($sharees as $sharee) {
// for non-exiting group or user, generate random id
$shareeIds[] = (($shareType === 'user')
? $this->featureContext->getAttributeOfCreatedUser($sharee, 'id')
: $this->featureContext->getAttributeOfCreatedGroup($sharee, 'id')) ?: WebDavHelper::generateUUIDv4();
$shareeIds[] = $this->featureContext->getAttributeOfCreatedUser($sharee, 'id')
?: ($this->featureContext->getAttributeOfCreatedGroup($sharee, 'id') ?: WebDavHelper::generateUUIDv4());
}
}