Skip to content

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

fix: test TST0114 - Use as thumbnail for parent folder [minio,s3,electron,_pro]

Ilian Sapundshiev79bae7244a0a
diff --git a/tests/e2e/folder.pw.e2e.js b/tests/e2e/folder.pw.e2e.js
index 055daff83..62457077b 100644
--- a/tests/e2e/folder.pw.e2e.js
+++ b/tests/e2e/folder.pw.e2e.js
@@ -14,8 +14,7 @@ import {
openFolder,
reloadDirectory,
selectorFile,
- setInputValue,
- waitUntilChanged
+ setInputValue
} from './general.helpers';
import {
createFileS3,
@@ -281,6 +280,15 @@ test.describe('TST01 - Folder management', () => {
await clickOn('[data-tid=confirmCopyFiles]');
await clickOn('[data-tid=uploadCloseAndClearTID]');
+ const fileName2 = 'sample.jpg';
+ await openContextEntryMenu(
+ getGridFileSelector(fileName2),
+ 'fileMenuMoveCopyFile',
+ );
+ await clickOn('[data-tid=MoveTargetempty_folder]');
+ await clickOn('[data-tid=confirmCopyFiles]');
+ await clickOn('[data-tid=uploadCloseAndClearTID]');
+
await openContextEntryMenu(
getGridFileSelector('empty_folder'),
'showProperties',
@@ -290,6 +298,7 @@ test.describe('TST01 - Folder management', () => {
'openDirectory',
);
await expectElementExist(getGridFileSelector(fileName), true, 5000);
+
const folderThumbStyle = await getAttribute(
'[data-tid=folderThumbTID]',
'style',
@@ -298,17 +307,17 @@ test.describe('TST01 - Folder management', () => {
'[data-tid=folderThumbTID]',
);
- await openContextEntryMenu(getGridFileSelector(fileName), 'setAsThumbTID');
- const newStyle = await waitUntilChanged(
- '[data-tid=folderThumbTID]',
- folderThumbStyle,
- 'style',
- );
- //console.log('style changed:' + newStyle); style changed:border-radius: 10px; height: 100px; width: 140px; background-image: url("http://127.0.0.1:9000/supported-filestypes/empty_folder/.ts/tst.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=minioadmin%2F20250317%2Fauto%2Fs3%2Faws4_request&X-Amz-Date=20250317T112107Z&X-Amz-Expires=900&X-Amz-Signature=c0ccb39b79e20291b3c889c728e27b989119b5a542ba8b304e0e2486f20b4d47&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject"); background-size: cover; background-repeat: no-repeat; background-position: center center; position: absolute; top: 0px; right: 0px;
+ // removing automatically set folder thumbnail
+ await clickOn('[data-tid=changeThumbnailTID]');
+ await clickOn('[data-tid=clearThumbnail]');
- /*if (global.isWin && global.isWeb) {
- await global.client.waitForTimeout(2000); // todo in Web Windows style is changed before thumbnail changes
- }*/
+ await openContextEntryMenu(getGridFileSelector(fileName), 'setAsThumbTID');
+ // await global.client.waitForTimeout(1000);
+ // const newStyle = await waitUntilChanged(
+ // '[data-tid=folderThumbTID]',
+ // folderThumbStyle,
+ // 'style',
+ // );
const withThumbScreenshot = await getElementScreenshot(
'[data-tid=folderThumbTID]',
@@ -324,7 +333,7 @@ test.describe('TST01 - Folder management', () => {
state: 'hidden',
});
- await waitUntilChanged('[data-tid=folderThumbTID]', newStyle, 'style');
+ // await waitUntilChanged('[data-tid=folderThumbTID]', newStyle, 'style');
const thumbRemovedScreenshot = await getElementScreenshot(
'[data-tid=folderThumbTID]',