Skip to content

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

fix e2e web

sytolk2dbf4dc830d6
diff --git a/playwright.config.common.js b/playwright.config.common.js
index e3e3cd94c..b9d9b294e 100644
--- a/playwright.config.common.js
+++ b/playwright.config.common.js
@@ -7,7 +7,7 @@ const pwConfig = {
// grep: /.*\.pw\.js$/,
testMatch: /.*\.pw\.e2e\.js/,
// Set the timeout for each test
- timeout: process.env.CI ? 60000 : 30000,
+ timeout: process.env.CI ? 60000 : 300000,
// (3 hours) Maximum time in milliseconds the whole test suite can run. Useful on CI to prevent broken setup from running too long and wasting resources.
globalTimeout: process.env.CI ? 3 * 60 * 60 * 1000 : undefined,
ignoreSnapshots: !process.env.CI,
diff --git a/tests/e2e/search.helpers.js b/tests/e2e/search.helpers.js
index 99d0755ac..1565e1817 100644
--- a/tests/e2e/search.helpers.js
+++ b/tests/e2e/search.helpers.js
@@ -23,7 +23,11 @@ export const testFilename = 'sample.desktop';
export const emptyFolderName = 'empty_folder';
export const firstTagButton = '/tbody/tr[1]/td[3]/button[1]';
-export async function addSearchCommand(command, executeSearch = true) {
+export async function addSearchCommand(
+ command,
+ executeSearch = true,
+ forceOpenMenu = true
+) {
if (!(await isDisplayed('#textQuery'))) {
await clickOn('[data-tid=toggleSearch]');
}
@@ -32,7 +36,7 @@ export async function addSearchCommand(command, executeSearch = true) {
if (executeSearch) {
await global.client.keyboard.press('Enter');
await global.client.keyboard.press('Enter');
- } else {
+ } else if (forceOpenMenu) {
await global.client.keyboard.press('ArrowDown');
}
}
diff --git a/tests/e2e/search.pw.e2e.js b/tests/e2e/search.pw.e2e.js
index 5c2215695..791cd5350 100644
--- a/tests/e2e/search.pw.e2e.js
+++ b/tests/e2e/search.pw.e2e.js
@@ -233,7 +233,7 @@ test.describe('TST06 - Test Search in file structure:', () => {
await clickOn('#clearSearchID');
// Search for | tag - tag
- await addSearchCommand('|' + tags1[0], false);
+ await addSearchCommand('|' + tags1[0], false, false);
await addSearchCommand('|' + tags2[1], true);
await expectElementExist(getFileName(file1, tags1), true, 5000);
await expectElementExist(getFileName(file2, tags2), true, 5000);