TagSpaces is an offline, open source, document manager with tagging support
e2e fix
sytolkc70632b98ed1
diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.jsindex 93167200f..8967146af 100644--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js@@ -278,7 +278,7 @@ test.describe('TST50** - Right button on a file', () => {* TODO web sometimes: stale element reference: stale element reference: element is not attached to the page document* TODO minio sometimes: stale element reference: stale element reference: element is not attached to the page document*/- test('TST5025 - Add - Remove tags (file menu) [web,electron]', async () => {+ test('TST5025 - Add - Remove tags (file menu) [web,minio,electron]', async () => {// await searchEngine('desktop');const fileName = 'sample';const fileExt = 'desktop';@@ -402,13 +402,11 @@ test.describe('TST50** - Right button on a file', () => {await openContextEntryMenu(selectorFolder, 'renameDirectory');const oldDirName = await setInputKeys('renameEntryDialogInput', newDirName);await clickOn('[data-tid=confirmRenameEntry]');- await waitForNotification();// turn dir name backawait openContextEntryMenu(selectorFolder, 'renameDirectory');const renamedDir = await setInputKeys('renameEntryDialogInput', oldDirName);await clickOn('[data-tid=confirmRenameEntry]');- await waitForNotification();expect(renamedDir).toBe(newDirName);});@@ -438,7 +436,7 @@ test.describe('TST50** - Right button on a file', () => {await expectElementExist('[data-tid=fileNameProperties]', true, 5000);});- test('TST5037 - Show sub folders [TST5037,web,minio,electron]', async () => {+ test('TST5037 - Show sub folders [web,minio,electron]', async () => {// click on hide directoriesawait setGridOptions('grid', false);@@ -510,7 +508,7 @@ test.describe('TST50** - Right button on a file', () => {);});- test('TST5040 - Create file [TST5040,web,minio,electron]', async () => {+ test('TST5040 - Create file [web,minio,electron]', async () => {// Open empty folderawait global.client.dblclick(selectorFolder);diff --git a/tests/e2e/perspective-grid.pw.e2e.js b/tests/e2e/perspective-grid.pw.e2e.jsindex 82d5e8c09..34cf96978 100644--- a/tests/e2e/perspective-grid.pw.e2e.js+++ b/tests/e2e/perspective-grid.pw.e2e.js@@ -41,7 +41,6 @@ test.beforeAll(async () => {test.afterAll(async () => {await stopApp();- await testDataRefresh();});test.afterEach(async ({ page }, testInfo) => {@@ -49,6 +48,7 @@ test.afterEach(async ({ page }, testInfo) => {await takeScreenshot(testInfo);}await clearDataStorage();+ await testDataRefresh();});test.beforeEach(async () => {@@ -135,7 +135,7 @@ test.describe('TST50 - Perspective Grid', () => {/*** todo in [web] its need more time to wait for removed files*/- test('TST5007 - Remove all tags from selected files [minio,electron]', async () => {+ test('TST5007 - Remove all tags from selected files [web,minio,electron]', async () => {const selectedIds = await selectRowFiles([0, 1, 2]);const tags = ['test-tag1', 'test-tag2', 'test-tag3'];await AddRemoveTagsToSelectedFiles('list', tags, true);@@ -163,30 +163,35 @@ test.describe('TST50 - Perspective Grid', () => {});test('TST5008 - Copy file [web,minio,electron]', async () => {- const sampleFileName = 'sample.txt';- // Electron path: ./testdata-tmp/file-structure/supported-filestypes/empty_folder- /*const copyLocationPath = global.isElectron- ? defaultLocationPath + '/empty_folder'- : 'empty_folder';*/- // const fileName = await getFirstFileName();-- // select file- await clickOn(getGridFileSelector(sampleFileName));- // open Copy File Dialog+ const fileName = 'sample.svg';+ await clickOn(getGridFileSelector(fileName));+ //Toggle Properties+ await clickOn('[data-tid=fileContainerToggleProperties]');+ // add meta json to file+ await setSettings('[data-tid=settingsSetPersistTagsInSidecarFile]', true);+ await AddRemovePropertiesTags(['test-tag1', 'test-tag2'], {+ add: true,+ remove: false+ });+ // open Copy/Move File Dialogawait clickOn('[data-tid=gridPerspectiveCopySelectedFiles]');- //await setInputKeys('targetPathInput', copyLocationPath);await clickOn('[data-tid=MoveTargetempty_folder]');await clickOn('[data-tid=confirmCopyFiles]');- //await waitForNotification();- await global.client.dblclick(selectorFolder);- await global.client.waitForSelector(selectorFile);- await expectElementExist(selectorFile, true);- // const firstFileName = await getGridFileName(0);- // expect(firstFileName).toBe(sampleFileName);- // cleanup- await deleteFileFromMenu();- await expectElementExist(selectorFile, false);+ await global.client.dblclick(getGridFileSelector('empty_folder'));+ await expectElementExist(getGridFileSelector(fileName));++ const arrayMeta =+ global.isWeb || global.isMinio+ ? [fileName + '.json'] // check meta, thumbnails are not created on web or minio+ : [fileName + '.json', fileName + '.jpg']; // check meta and thumbnail++ await expectMetaFilesExist(arrayMeta, true);++ await clickOn('[data-tid=gridPerspectiveOnBackButton]');++ await expectElementExist(getGridFileSelector(fileName), true);+ await expectMetaFilesExist(arrayMeta, true);});test.skip('TST5009 - Copy file on different partition [manual]', async () => {});