fix the folder share

Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
GretaD 2019-12-16 17:12:20 +01:00 committed by John Molakvoæ (skjnldsv)
parent 57997fefa2
commit 455013c309
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
4 changed files with 28 additions and 16 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -42,12 +42,24 @@
<!-- create permission -->
<ActionCheckbox
v-if="isFolder"
ref="canCreate"
:checked.sync="canCreate"
:value="permissionsCreate"
:disabled="saving">
{{ t('files_sharing', 'Allow creating') }}
</ActionCheckbox>
<!-- delete permission -->
<ActionCheckbox
v-if="isFolder"
ref="canDelete"
:checked.sync="canDelete"
:value="permissionsDelete"
:disabled="saving">
{{ t('files_sharing', 'Allow deleting') }}
</ActionCheckbox>
<!-- reshare permission -->
<ActionCheckbox
ref="canReshare"
@ -57,14 +69,6 @@
{{ t('files_sharing', 'Allow resharing') }}
</ActionCheckbox>
<!-- delete permission -->
<ActionCheckbox
ref="canDelete"
:checked.sync="canDelete"
:value="permissionsDelete"
:disabled="saving">
{{ t('files_sharing', 'Allow deleting') }}
</ActionCheckbox>
<!-- expiration date -->
<ActionCheckbox :checked.sync="hasExpirationDate"
:disabled="config.isDefaultExpireDateEnforced || saving"
@ -255,6 +259,14 @@ export default {
},
},
/**
* Is the current share a folder ?
* @returns {boolean}
*/
isFolder() {
return this.fileInfo.type === 'dir'
},
/**
* Does the current share have an expiration date
* @returns {boolean}

View File

@ -108,18 +108,18 @@ class FilesAppSharingContext implements Context, ActorAwareInterface {
// forThe()->checkbox("Can reshare") can not be used here; that would
// return the checkbox itself, but the element that the user interacts
// with is the label.
return Locator::forThe()->xpath("//label[normalize-space() = 'Can reshare']")->
return Locator::forThe()->xpath("//label[normalize-space() = 'Allow resharing']")->
descendantOf(self::shareWithMenu($sharedWithName))->
describedAs("Can reshare checkbox in the share with $sharedWithName menu in the details view in Files app");
describedAs("Allow resharing checkbox in the share with $sharedWithName menu in the details view in Files app");
}
/**
* @return Locator
*/
public static function canReshareCheckboxInput($sharedWithName) {
return Locator::forThe()->checkbox("Can reshare")->
return Locator::forThe()->checkbox("Allow resharing")->
descendantOf(self::shareWithMenu($sharedWithName))->
describedAs("Can reshare checkbox input in the share with $sharedWithName menu in the details view in Files app");
describedAs("Allow resharing checkbox input in the share with $sharedWithName menu in the details view in Files app");
}
/**