Skip to content
Snippets Groups Projects
Unverified Commit 455013c3 authored by GretaD's avatar GretaD Committed by John Molakvoæ (skjnldsv)
Browse files

fix the folder share

parent 57997fef
No related branches found
No related tags found
No related merge requests found
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
......@@ -42,29 +42,33 @@
<!-- create permission -->
<ActionCheckbox
v-if="isFolder"
ref="canCreate"
:checked.sync="canCreate"
:value="permissionsCreate"
:disabled="saving">
{{ t('files_sharing', 'Allow creating') }}
</ActionCheckbox>
<!-- reshare permission -->
<ActionCheckbox
ref="canReshare"
:checked.sync="canReshare"
:value="permissionsShare"
:disabled="saving">
{{ t('files_sharing', 'Allow resharing') }}
</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"
:checked.sync="canReshare"
:value="permissionsShare"
:disabled="saving">
{{ t('files_sharing', 'Allow resharing') }}
</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}
......
......@@ -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");
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment