Skip to content

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

e2e fix

Stanimirc6de536e1ff5
diff --git a/playwright.config.common.js b/playwright.config.common.js
index c4e12ccaa..45df3c2eb 100644
--- a/playwright.config.common.js
+++ b/playwright.config.common.js
@@ -40,6 +40,8 @@ const pwConfig = {
['list', { printSteps: true }],
],
workers: 1,
+ // this helps show why the process is still alive
+ //debug: { openHandles: true },
};
export default pwConfig;
diff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsx
index d086664fe..547710919 100644
--- a/src/renderer/hooks/IOActionsContextProvider.tsx
+++ b/src/renderer/hooks/IOActionsContextProvider.tsx
@@ -1738,7 +1738,9 @@ export const IOActionsContextProvider = ({
})
.catch(() => {
if (
- path.indexOf(location.getDirSeparator() + AppConfig.metaFolder) === -1
+ path.indexOf(location.getDirSeparator() + AppConfig.metaFolder) ===
+ -1 &&
+ path.indexOf(AppConfig.metaFolder + location.getDirSeparator()) === -1
) {
// create new meta id to not be changed -> next time listDirectory will get the same id for the file from meta
const mataData = { id: id };
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.js
index 9e1f0e3de..84806c94f 100644
--- a/tests/e2e/general.helpers.js
+++ b/tests/e2e/general.helpers.js
@@ -1010,7 +1010,7 @@ export async function addDescription(desc) {
} catch (e) {
await editor.type(desc);
}
- await expectElementExist('[data-tid=descriptionChangedTID]');
+ await expectElementExist('[data-tid=descriptionChangedTID]', true, 8000);
/*
// editorContent is empty on web
const editorContent = await editor.innerText();
@@ -1180,7 +1180,7 @@ export async function reloadDirectory() {
}
export async function createNewDirectory(dirName = testFolder) {
- await isDisplayed('[data-tid=folderContainerOpenDirMenu]');
+ await isDisplayed('[data-tid=folderContainerOpenDirMenu]', true, 3000);
await clickOn('[data-tid=folderContainerOpenDirMenu]');
await clickOn('[data-tid=newSubDirectory]');
// set new dir name