mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
test: Add test selector on sharing and versions components
Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
29a60ac7a9
commit
bd88ecf534
3 changed files with 34 additions and 9 deletions
|
|
@ -46,6 +46,7 @@
|
|||
@open-sharing-details="openShareDetailsForCustomSettings(share)" />
|
||||
</div>
|
||||
<NcButton class="sharing-entry__action"
|
||||
data-cy-files-sharing-share-actions
|
||||
:aria-label="t('files_sharing', 'Open Sharing Details')"
|
||||
type="tertiary"
|
||||
@click="openSharingDetails(share)">
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
<div ref="quickPermissions" class="sharingTabDetailsView__quick-permissions">
|
||||
<div>
|
||||
<NcCheckboxRadioSwitch :button-variant="true"
|
||||
data-cy-files-sharing-share-permissions-bundle="read-only"
|
||||
:checked.sync="sharingPermission"
|
||||
:value="bundledPermissions.READ_ONLY.toString()"
|
||||
name="sharing_permission_radio"
|
||||
|
|
@ -31,6 +32,7 @@
|
|||
</template>
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch :button-variant="true"
|
||||
data-cy-files-sharing-share-permissions-bundle="upload-edit"
|
||||
:checked.sync="sharingPermission"
|
||||
:value="bundledPermissions.ALL.toString()"
|
||||
name="sharing_permission_radio"
|
||||
|
|
@ -48,6 +50,7 @@
|
|||
</template>
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch v-if="allowsFileDrop"
|
||||
data-cy-files-sharing-share-permissions-bundle="file-drop"
|
||||
:button-variant="true"
|
||||
:checked.sync="sharingPermission"
|
||||
:value="bundledPermissions.FILE_DROP.toString()"
|
||||
|
|
@ -62,6 +65,7 @@
|
|||
</template>
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch :button-variant="true"
|
||||
data-cy-files-sharing-share-permissions-bundle="custom"
|
||||
:checked.sync="sharingPermission"
|
||||
:value="'custom'"
|
||||
name="sharing_permission_radio"
|
||||
|
|
@ -145,7 +149,10 @@
|
|||
@update:checked="queueUpdate('hideDownload')">
|
||||
{{ t('files_sharing', 'Hide download') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch v-if="!isPublicShare" :disabled="!canSetDownload" :checked.sync="canDownload">
|
||||
<NcCheckboxRadioSwitch v-if="!isPublicShare"
|
||||
:disabled="!canSetDownload"
|
||||
:checked.sync="canDownload"
|
||||
data-cy-files-sharing-share-permissions-checkbox="download">
|
||||
{{ t('files_sharing', 'Allow download') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch :checked.sync="writeNoteToRecipientIsChecked">
|
||||
|
|
@ -162,21 +169,30 @@
|
|||
</NcCheckboxRadioSwitch>
|
||||
<section v-if="setCustomPermissions" class="custom-permissions-group">
|
||||
<NcCheckboxRadioSwitch :disabled="!allowsFileDrop && share.type === SHARE_TYPES.SHARE_TYPE_LINK"
|
||||
:checked.sync="hasRead">
|
||||
:checked.sync="hasRead"
|
||||
data-cy-files-sharing-share-permissions-checkbox="read">
|
||||
{{ t('files_sharing', 'Read') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch v-if="isFolder" :disabled="!canSetCreate" :checked.sync="canCreate">
|
||||
<NcCheckboxRadioSwitch v-if="isFolder"
|
||||
:disabled="!canSetCreate"
|
||||
:checked.sync="canCreate"
|
||||
data-cy-files-sharing-share-permissions-checkbox="create">
|
||||
{{ t('files_sharing', 'Create') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch :disabled="!canSetEdit" :checked.sync="canEdit">
|
||||
<NcCheckboxRadioSwitch :disabled="!canSetEdit"
|
||||
:checked.sync="canEdit"
|
||||
data-cy-files-sharing-share-permissions-checkbox="update">
|
||||
{{ t('files_sharing', 'Edit') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch v-if="config.isResharingAllowed && share.type !== SHARE_TYPES.SHARE_TYPE_LINK"
|
||||
:disabled="!canSetReshare"
|
||||
:checked.sync="canReshare">
|
||||
:checked.sync="canReshare"
|
||||
data-cy-files-sharing-share-permissions-checkbox="share">
|
||||
{{ t('files_sharing', 'Share') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
<NcCheckboxRadioSwitch :disabled="!canSetDelete" :checked.sync="canDelete">
|
||||
<NcCheckboxRadioSwitch :disabled="!canSetDelete"
|
||||
:checked.sync="canDelete"
|
||||
data-cy-files-sharing-share-permissions-checkbox="delete">
|
||||
{{ t('files_sharing', 'Delete') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
</section>
|
||||
|
|
@ -199,10 +215,13 @@
|
|||
|
||||
<div class="sharingTabDetailsView__footer">
|
||||
<div class="button-group">
|
||||
<NcButton @click="$emit('close-sharing-details')">
|
||||
<NcButton data-cy-files-sharing-share-editor-action="cancel"
|
||||
@click="$emit('close-sharing-details')">
|
||||
{{ t('files_sharing', 'Cancel') }}
|
||||
</NcButton>
|
||||
<NcButton type="primary" @click="saveShare">
|
||||
<NcButton type="primary"
|
||||
data-cy-files-sharing-share-editor-action="save"
|
||||
@click="saveShare">
|
||||
{{ shareButtonText }}
|
||||
<template v-if="creating" #icon>
|
||||
<NcLoadingIcon />
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<NcListItem class="version"
|
||||
:name="versionLabel"
|
||||
:force-display-actions="true"
|
||||
data-files-versions-version
|
||||
:data-files-versions-version="version.fileVersion"
|
||||
@click="click">
|
||||
<!-- Icon -->
|
||||
<template #icon>
|
||||
|
|
@ -52,6 +52,7 @@
|
|||
<!-- Actions -->
|
||||
<template #actions>
|
||||
<NcActionButton v-if="enableLabeling && hasUpdatePermissions"
|
||||
data-cy-files-versions-version-action="label"
|
||||
:close-after-click="true"
|
||||
@click="labelUpdate">
|
||||
<template #icon>
|
||||
|
|
@ -60,6 +61,7 @@
|
|||
{{ version.label === '' ? t('files_versions', 'Name this version') : t('files_versions', 'Edit version name') }}
|
||||
</NcActionButton>
|
||||
<NcActionButton v-if="!isCurrent && canView && canCompare"
|
||||
data-cy-files-versions-version-action="compare"
|
||||
:close-after-click="true"
|
||||
@click="compareVersion">
|
||||
<template #icon>
|
||||
|
|
@ -68,6 +70,7 @@
|
|||
{{ t('files_versions', 'Compare to current version') }}
|
||||
</NcActionButton>
|
||||
<NcActionButton v-if="!isCurrent && hasUpdatePermissions"
|
||||
data-cy-files-versions-version-action="restore"
|
||||
:close-after-click="true"
|
||||
@click="restoreVersion">
|
||||
<template #icon>
|
||||
|
|
@ -76,6 +79,7 @@
|
|||
{{ t('files_versions', 'Restore version') }}
|
||||
</NcActionButton>
|
||||
<NcActionLink v-if="isDownloadable"
|
||||
data-cy-files-versions-version-action="download"
|
||||
:href="downloadURL"
|
||||
:close-after-click="true"
|
||||
:download="downloadURL">
|
||||
|
|
@ -85,6 +89,7 @@
|
|||
{{ t('files_versions', 'Download version') }}
|
||||
</NcActionLink>
|
||||
<NcActionButton v-if="!isCurrent && enableDeletion && hasDeletePermissions"
|
||||
data-cy-files-versions-version-action="delete"
|
||||
:close-after-click="true"
|
||||
@click="deleteVersion">
|
||||
<template #icon>
|
||||
|
|
|
|||
Loading…
Reference in a new issue