Skip to content

TagSpaces is an offline, open source, document manager with tagging support

add TST0215 Link for internal sharing

sytolkfa102c6e27fd
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsx
index 6bfc7f36c..a9cbcc994 100644
--- a/app/components/EntryProperties.tsx
+++ b/app/components/EntryProperties.tsx
@@ -1099,6 +1099,7 @@ function EntryProperties(props: Props) {
<InputAdornment position="end">
<Tooltip title={i18n.t('core:copyLinkToClipboard')}>
<Button
+ data-tid="copyLinkToClipboardTID"
color="primary"
onClick={() => {
const promise = navigator.clipboard.writeText(
diff --git a/app/perspectives/grid-perspective/components/GridPagination.tsx b/app/perspectives/grid-perspective/components/GridPagination.tsx
index eec35c859..12c200ba6 100644
--- a/app/perspectives/grid-perspective/components/GridPagination.tsx
+++ b/app/perspectives/grid-perspective/components/GridPagination.tsx
@@ -448,7 +448,10 @@ function GridPagination(props: Props) {
color: theme.palette.text.primary
}}
>
- <Tooltip title={i18n.t('core:renameDirectory')}>
+ <Tooltip
+ data-tid={'currentDir_' + folderName}
+ title={i18n.t('core:renameDirectory')}
+ >
<ButtonBase
style={{ fontSize: '1.5rem' }}
onClick={openRenameEntryDialog}
diff --git a/tests/e2e/folderprops.pw.e2e.js b/tests/e2e/folderprops.pw.e2e.js
index c622c28ea..b94c58139 100644
--- a/tests/e2e/folderprops.pw.e2e.js
+++ b/tests/e2e/folderprops.pw.e2e.js
@@ -187,4 +187,29 @@ test.describe('TST02 - Folder properties', () => {
getGridFileSelector('empty_folder')
);
});
+
+ test.skip('TST0215 - Link for internal sharing + copy [web,minio,electron,_pro]', async () => {
+ await clickOn('[data-tid=copyLinkToClipboardTID]');
+
+ await global.client.dblclick('[data-tid=descriptionTID]');
+ await clickOn('[data-tid=descriptionTID]');
+ const editor = await global.client.waitForSelector(
+ '[data-tid=descriptionTID] .milkdown'
+ );
+
+ const clipboardContent = await global.client.evaluate(() =>
+ navigator.clipboard.readText()
+ );
+ await editor.type(
+ '[sharingLink](' + clipboardContent + ' "sharingLinkTitle")'
+ );
+
+ await clickOn('[data-tid=editDescriptionTID]');
+ await clickOn('[title=sharingLinkTitle]');
+ await expectElementExist(
+ '[data-tid=currentDir_empty_folder]',
+ true,
+ 10000
+ );
+ });
});