TagSpaces is an offline, open source, document manager with tagging support
Fix the tests maxInstances (#1412)
Stanimir1beaa0045282
diff --git a/app/components/Search.tsx b/app/components/Search.tsxindex 37254b37d..608f492f0 100644--- a/app/components/Search.tsx+++ b/app/components/Search.tsx@@ -519,7 +519,7 @@ const Search = React.memo((props: Props) => {style={{ marginBottom: 10, alignSelf: 'center' }}value={searchType}>- <ToggleButton value="fussy">+ <ToggleButton value="fussy" data-tid="fussySearchTID"><Tooltiparrowtitle={i18n.t(@@ -529,7 +529,7 @@ const Search = React.memo((props: Props) => {<div>{i18n.t('fussy')}</div></Tooltip></ToggleButton>- <ToggleButton value="semistrict">+ <ToggleButton value="semistrict" data-tid="semiStrictSearchTID"><Tooltiparrowtitle={i18n.t(@@ -539,7 +539,7 @@ const Search = React.memo((props: Props) => {<div>{i18n.t('semistrict')}</div></Tooltip></ToggleButton>- <ToggleButton value="strict">+ <ToggleButton value="strict" data-tid="strictSearchTID"><Tooltip arrow title="Same as semistrict but case sensitive"><div>{i18n.t('strict')}</div></Tooltip>diff --git a/tests/e2e/hook.js b/tests/e2e/hook.jsindex 0baa62f3e..cbfba91a8 100644--- a/tests/e2e/hook.js+++ b/tests/e2e/hook.js@@ -120,6 +120,7 @@ export async function startSpectronApp() {// startTimeout: 500,waitTimeout: 1000,waitforInterval: 50,+ maxInstances: 1,chromeDriverArgs: chromeDriverArgs});await global.app.start();diff --git a/tests/e2e/perspective-grid-right-button.e2e.js b/tests/e2e/perspective-grid-right-button.e2e.jsindex 58571d8db..fd27a1434 100644--- a/tests/e2e/perspective-grid-right-button.e2e.js+++ b/tests/e2e/perspective-grid-right-button.e2e.js@@ -277,7 +277,7 @@ describe('TST50** - Right button on a file', () => {/*** TODO github minio (expected selector to exist=false after 5s)*/- test('TST5028 - Move - Copy file (file menu) [minio,electron]', async () => {+ test('TST5028 - Move - Copy file (file menu) [web,minio,electron]', async () => {// Move file in child folderconst fileExtension = 'pdf'; //'eml' -> todo search found extra files (.gitkeep) with fuseOptions = {threshold: 0.4,await searchEngine(fileExtension);@@ -296,6 +296,9 @@ describe('TST50** - Right button on a file', () => {await global.client.pause(500);await doubleClickOn(perspectiveGridTable + firstFolder);await searchEngine(fileExtension, { reindexing: true }); // TODO temp fix: https://trello.com/c/ZfcGGvOM/527-moved-files-is-not-indexing-not-found-in-search+ if (global.isWeb) {+ await global.client.pause(500);+ }let firstFileName = await getGridFileName(0);expect(firstFileName).toBe('sample.' + fileExtension);diff --git a/tests/e2e/search.helpers.js b/tests/e2e/search.helpers.jsindex 142feee83..4ee13e212 100644--- a/tests/e2e/search.helpers.js+++ b/tests/e2e/search.helpers.js@@ -38,6 +38,11 @@ export async function searchEngine(filename, options = {}) {if (options.reindexing) {await clickOn('[data-tid=forceIndexingTID]');}+ if (options.searchType) {+ await clickOn('[data-tid=' + options.searchType + ']');+ } else {+ await clickOn('[data-tid=strictSearchTID]');+ }if (options.resetSearchButton) {await clickOn('#resetSearchButton');