TagSpaces is an offline, open source, document manager with tagging support
fix e2e search.pw.e2e.js
sytolk7ebd26e240b8
diff --git a/tests/e2e/search.helpers.js b/tests/e2e/search.helpers.jsindex 32b27671a..99d0755ac 100644--- a/tests/e2e/search.helpers.js+++ b/tests/e2e/search.helpers.js@@ -32,6 +32,8 @@ export async function addSearchCommand(command, executeSearch = true) {if (executeSearch) {await global.client.keyboard.press('Enter');await global.client.keyboard.press('Enter');+ } else {+ await global.client.keyboard.press('ArrowDown');}}/**diff --git a/tests/e2e/search.pw.e2e.js b/tests/e2e/search.pw.e2e.jsindex 0ad5fd9ea..5c2215695 100644--- a/tests/e2e/search.pw.e2e.js+++ b/tests/e2e/search.pw.e2e.js@@ -146,7 +146,7 @@ test.describe('TST06 - Test Search in file structure:', () => {);await closeFileProperties();- await searchEngine('h:', {}, false);+ await addSearchCommand('h:', false);await clickOn('#textQuery-option-0');await expectElementExist('[data-tid=OpenedTID' + dataTidFormat(file) + ']',@@ -165,7 +165,7 @@ test.describe('TST06 - Test Search in file structure:', () => {await clickOn('[data-tid=toggleBookmarkTID]');await clickOn('[data-tid=fileContainerCloseOpenedFile]');- await searchEngine('b:', {}, false);+ await addSearchCommand('b:', false);await clickOn('#textQuery-option-0');await expectElementExist('[data-tid=OpenedTID' + dataTidFormat(bookmarkFileTitle) + ']',@@ -224,16 +224,23 @@ test.describe('TST06 - Test Search in file structure:', () => {await expectElementExist(getFileName(file1, tags1), true, 5000);await expectElementExist(getFileName(file2, tags2), true, 5000);await expectElementExist(getFileName(file3, tags3), false, 5000);+ // Search for - tag+ await addSearchCommand('-' + tags2[1], true);+ await expectElementExist(getFileName(file1, tags1), true, 5000);+ await expectElementExist(getFileName(file2, tags2), false, 5000);+ await expectElementExist(getFileName(file3, tags3), false, 5000);++ await clickOn('#clearSearchID');// Search for | tag - tag+ await addSearchCommand('|' + tags1[0], false);await addSearchCommand('|' + tags2[1], true);- await expectElementExist(getFileName(file1, tags1), false, 5000);+ await expectElementExist(getFileName(file1, tags1), true, 5000);await expectElementExist(getFileName(file2, tags2), true, 5000);- await expectElementExist(getFileName(file3, tags3), false, 5000);+ await expectElementExist(getFileName(file3, tags3), true, 5000);- // Search for - tagawait addSearchCommand('-' + tags3[1], true);- await expectElementExist(getFileName(file1, tags1), false, 5000);+ await expectElementExist(getFileName(file1, tags1), true, 5000);await expectElementExist(getFileName(file2, tags2), true, 5000);await expectElementExist(getFileName(file3, tags3), false, 5000);});