Skip to content

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

fix e2e

sytolk583b695eea8c
diff --git a/tests/e2e/hook.js b/tests/e2e/hook.js
index 8e106b46b..9ce9e19e2 100644
--- a/tests/e2e/hook.js
+++ b/tests/e2e/hook.js
@@ -343,7 +343,7 @@ export async function testDataRefresh(isS3, testDataDir) {
export async function createFileS3(
fileName = 'empty_file.html',
- fileContent = undefined,
+ fileContent = '',
rootFolder = 'empty_folder',
) {
const filePath = pathLib.join(
@@ -355,7 +355,7 @@ export async function createFileS3(
rootFolder,
fileName,
);
- await uploadFile(filePath, fileContent || 'test content');
+ await uploadFile(filePath, fileContent); //test content');
}
export async function createLocalFile(
testDataDir,
diff --git a/tests/e2e/search.pw.e2e.js b/tests/e2e/search.pw.e2e.js
index 38f4d329c..d48f2aff6 100644
--- a/tests/e2e/search.pw.e2e.js
+++ b/tests/e2e/search.pw.e2e.js
@@ -323,23 +323,22 @@ test.describe('TST06 - Test Search in file structure:', () => {
});
test('TST0629 - Search q. comp - file size [web,electron,_pro]', async () => {
- await global.client.dblclick('[data-tid=fsEntryName_empty_folder]');
+ /*await openFolder('empty_folder');
await expectElementExist(
getGridFileSelector('empty_file.html'),
true,
- 5000,
- );
- //await openLocationMenu(defaultLocationName);
- //await clickOn('[data-tid=indexLocation]');
+ 8000,
+ );*/
await addSearchCommand('si:', false);
await clickOn('#textQuery-option-0');
await global.client.keyboard.press('Enter');
await global.client.keyboard.press('Enter');
+ //await global.client.waitForTimeout(180000);
await expectElementExist(
getGridFileSelector('empty_file.html'),
true,
- 5000,
+ 8000,
);
});
diff --git a/tests/s3rver/S3DataRefresh.js b/tests/s3rver/S3DataRefresh.js
index 9afcf1d6a..5dfdf314f 100644
--- a/tests/s3rver/S3DataRefresh.js
+++ b/tests/s3rver/S3DataRefresh.js
@@ -90,7 +90,8 @@ async function deleteAllObjects(bucketName) {
}
function uploadFile(filePath, content = undefined) {
- const fileContent = content ? content : fs.readFileSync(filePath);
+ const fileContent =
+ content !== undefined ? content : fs.readFileSync(filePath);
const key = path.relative(directoryPath, filePath).replace(/\\/g, '/'); // Normalize path separators