Skip to content

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

fix indexer

sytolk3bf44a9a02ab
diff --git a/package-lock.json b/package-lock.json
index 6565d6ce0..4b928e390 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -22,10 +22,10 @@
"@mui/lab": "6.0.0-beta.31",
"@mui/material": "^6.4.8",
"@mui/x-date-pickers": "^7.26.0",
- "@tagspaces/tagspaces-common": "4.5.67",
- "@tagspaces/tagspaces-common-aws3": "4.5.67",
- "@tagspaces/tagspaces-common-cordova": "4.5.67",
- "@tagspaces/tagspaces-indexer": "4.5.69",
+ "@tagspaces/tagspaces-common": "4.5.71",
+ "@tagspaces/tagspaces-common-aws3": "4.5.71",
+ "@tagspaces/tagspaces-common-cordova": "4.5.71",
+ "@tagspaces/tagspaces-indexer": "4.5.71",
"aws-amplify": "^4.3.8",
"clone": "^2.1.2",
"coordinate-parser": "^1.0.7",
@@ -19265,9 +19265,9 @@
}
},
"node_modules/@tagspaces/tagspaces-common": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.67.tgz",
- "integrity": "sha512-307Sk01+YoBIkkr1jy9BkZldjzUS7IgTdK7JGDjXXhR1DjoPUZT/bWMhOhQBziBRdmFETsjV8vcLyfdP8orogA==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.71.tgz",
+ "integrity": "sha512-IffL4VRH1ileg23eESk4PK5ctMUqRlaQNt0YLoJKJ7ZBmvIBzc1oFCuq6PQ3pvRtxaydGWaZp2y2ce+TiJNUPA==",
"license": "MIT",
"dependencies": {
"dompurify": "^3.2.3",
@@ -19279,25 +19279,25 @@
}
},
"node_modules/@tagspaces/tagspaces-common-aws3": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-aws3/-/tagspaces-common-aws3-4.5.67.tgz",
- "integrity": "sha512-OmgxG/3PTYzAeaom5eBTzF4T/ggCRm3Xk2DQ7klJs1uBmAhghS2m6JkCisjLuh+jCK7hcevLuLntIUnSjyK9+Q==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-aws3/-/tagspaces-common-aws3-4.5.71.tgz",
+ "integrity": "sha512-hYLABzR1ZDUxunrlNlKCeHvGLgUdQYlsQ4y3ECDSHhLrrAJF5N6RxWiuEl69+ZagyjyX2r8f3j300pPhHjNHpQ==",
"license": "MIT",
"dependencies": {
"@aws-sdk/client-s3": "^3.665.0",
"@aws-sdk/lib-storage": "^3.665.0",
"@aws-sdk/s3-request-presigner": "^3.665.0",
- "@tagspaces/tagspaces-common": "^4.5.67",
+ "@tagspaces/tagspaces-common": "^4.5.71",
"crypto-js": "^4.2.0"
}
},
"node_modules/@tagspaces/tagspaces-common-cordova": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-cordova/-/tagspaces-common-cordova-4.5.67.tgz",
- "integrity": "sha512-CIjnKfPIa/3iSxsDnAxIKzi+ac+e0V/+e4DhFvSHE/VF9AQFfw0QOFm00Dsa2oZFpp6E+oERcIM6PXRlYigZcg==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-cordova/-/tagspaces-common-cordova-4.5.71.tgz",
+ "integrity": "sha512-6luHTxUTUG+cJdmlvB6FB0kOsyVBaHzGOjPSX3TP9LVBWO4EOT7fV64JDjJ6wnu9CwOoCQm3OVZwwAq/2Swhww==",
"license": "MIT",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.67"
+ "@tagspaces/tagspaces-common": "^4.5.71"
}
},
"node_modules/@tagspaces/tagspaces-common/node_modules/cssstyle": {
@@ -19504,12 +19504,12 @@
}
},
"node_modules/@tagspaces/tagspaces-indexer": {
- "version": "4.5.69",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.69.tgz",
- "integrity": "sha512-LAk6fhu3/9mSzP8lStfqFwxYa3A9n47NOu6Pzj4AZ1eTa4BXogWeDCkzQLniDtanRLrdvLmkv6LFT4lUUTQFKw==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.71.tgz",
+ "integrity": "sha512-ij6bAa2cBVgZw6ytrNfLAPCyxA0gOAvYq36tlJMsnNa6xKunRLiXFasQVa3GE91U3Yzf3u+/PjA66+t5tFoNiQ==",
"license": "MIT",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.67"
+ "@tagspaces/tagspaces-common": "^4.5.71"
}
},
"node_modules/@tagspacespro/tagspacespro": {
diff --git a/package.json b/package.json
index b7632a8e4..c9e3a5f24 100644
--- a/package.json
+++ b/package.json
@@ -173,10 +173,10 @@
"@mui/lab": "6.0.0-beta.31",
"@mui/material": "^6.4.8",
"@mui/x-date-pickers": "^7.26.0",
- "@tagspaces/tagspaces-common": "4.5.67",
- "@tagspaces/tagspaces-common-aws3": "4.5.67",
- "@tagspaces/tagspaces-common-cordova": "4.5.67",
- "@tagspaces/tagspaces-indexer": "4.5.69",
+ "@tagspaces/tagspaces-common": "4.5.71",
+ "@tagspaces/tagspaces-common-aws3": "4.5.71",
+ "@tagspaces/tagspaces-common-cordova": "4.5.71",
+ "@tagspaces/tagspaces-indexer": "4.5.71",
"aws-amplify": "^4.3.8",
"clone": "^2.1.2",
"coordinate-parser": "^1.0.7",
diff --git a/release/app/package-lock.json b/release/app/package-lock.json
index f5d8ee8c8..2c399a6f1 100644
--- a/release/app/package-lock.json
+++ b/release/app/package-lock.json
@@ -12,8 +12,8 @@
"dependencies": {
"@elife/pm2": "3.6.1",
"@tagspaces/extensions": "1.0.190",
- "@tagspaces/tagspaces-common-node": "4.5.67",
- "@tagspaces/tagspaces-ws": "4.5.69",
+ "@tagspaces/tagspaces-common-node": "4.5.71",
+ "@tagspaces/tagspaces-ws": "4.5.71",
"sharp": "0.32.6",
"ws": "8.18.1"
},
@@ -159,9 +159,9 @@
}
},
"node_modules/@tagspaces/tagspaces-common": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.67.tgz",
- "integrity": "sha512-307Sk01+YoBIkkr1jy9BkZldjzUS7IgTdK7JGDjXXhR1DjoPUZT/bWMhOhQBziBRdmFETsjV8vcLyfdP8orogA==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.71.tgz",
+ "integrity": "sha512-IffL4VRH1ileg23eESk4PK5ctMUqRlaQNt0YLoJKJ7ZBmvIBzc1oFCuq6PQ3pvRtxaydGWaZp2y2ce+TiJNUPA==",
"dependencies": {
"dompurify": "^3.2.3",
"dotenv": "^16.0.2",
@@ -172,22 +172,22 @@
}
},
"node_modules/@tagspaces/tagspaces-common-node": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.67.tgz",
- "integrity": "sha512-JNMEWmx4spTuHInzCv703lPcAoynKe8wNpvkyyR3BtEHg0rdP21U5+BQohm/LhOQf8DcKaMGC8vxTEi7GvwwFA==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.71.tgz",
+ "integrity": "sha512-O2ol9Mjx1KbYjHrAfSnq7PtPmeSa/hNILc/XjxrcUocP+MfLZStHYVacLL/xn8m3EE8i6UeSl9UImJ2ACrIFxQ==",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.67",
+ "@tagspaces/tagspaces-common": "^4.5.71",
"adm-zip": "0.5.10",
"fs-extra": "^10.0.0",
"klaw": "^4.1.0"
}
},
"node_modules/@tagspaces/tagspaces-indexer": {
- "version": "4.5.69",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.69.tgz",
- "integrity": "sha512-LAk6fhu3/9mSzP8lStfqFwxYa3A9n47NOu6Pzj4AZ1eTa4BXogWeDCkzQLniDtanRLrdvLmkv6LFT4lUUTQFKw==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.71.tgz",
+ "integrity": "sha512-ij6bAa2cBVgZw6ytrNfLAPCyxA0gOAvYq36tlJMsnNa6xKunRLiXFasQVa3GE91U3Yzf3u+/PjA66+t5tFoNiQ==",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.67"
+ "@tagspaces/tagspaces-common": "^4.5.71"
}
},
"node_modules/@tagspaces/tagspaces-pdf-extraction": {
@@ -208,25 +208,25 @@
}
},
"node_modules/@tagspaces/tagspaces-workers": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.67.tgz",
- "integrity": "sha512-DIOI6wu/td3vWJwjMeYUOiBDViNhqQoMufRGuF8ejVQfK9xiYBvZsbKlE+sPCC6IDky2UkBrnUKIaXgpZKYerg==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.71.tgz",
+ "integrity": "sha512-2wz7KIcwBThJTzdJ/OPFDldQW6ZiM9r3h3KSndh7/FcvKnkcyTUMCVaH9HAsrfTIzyAS2nGope+SsKn6dDluTQ==",
"dependencies": {
- "@tagspaces/tagspaces-common": "^4.5.67",
- "@tagspaces/tagspaces-common-node": "^4.5.67",
+ "@tagspaces/tagspaces-common": "^4.5.71",
+ "@tagspaces/tagspaces-common-node": "^4.5.71",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.53",
"@tagspaces/tagspaces-thumbgen-image": "^4.5.60",
"fswin": "^3.24.829"
}
},
"node_modules/@tagspaces/tagspaces-ws": {
- "version": "4.5.69",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.69.tgz",
- "integrity": "sha512-+jRZ6qwe16KPyYPYqa2j6E2gDgCtL3LLWkcq27/MAVaVAAkwFZbFud3kgmrEEZ/KN5lBcCkd0QhNEnXpARYgYQ==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.71.tgz",
+ "integrity": "sha512-3VJNYcwiRg+G7ao6CtepbJd+BUwJhxZKzra/tih0teEtWNhAhBZDZPKJfhJgW8Pbrcwij+OvYsejcW1mHGO8Tg==",
"dependencies": {
- "@tagspaces/tagspaces-indexer": "^4.5.69",
+ "@tagspaces/tagspaces-indexer": "^4.5.71",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.53",
- "@tagspaces/tagspaces-workers": "^4.5.67",
+ "@tagspaces/tagspaces-workers": "^4.5.71",
"find-free-ports": "^3.1.1",
"jsonwebtoken": "^8.5.1",
"ws": "^8.15.1"
@@ -1786,9 +1786,9 @@
}
},
"@tagspaces/tagspaces-common": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.67.tgz",
- "integrity": "sha512-307Sk01+YoBIkkr1jy9BkZldjzUS7IgTdK7JGDjXXhR1DjoPUZT/bWMhOhQBziBRdmFETsjV8vcLyfdP8orogA==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.5.71.tgz",
+ "integrity": "sha512-IffL4VRH1ileg23eESk4PK5ctMUqRlaQNt0YLoJKJ7ZBmvIBzc1oFCuq6PQ3pvRtxaydGWaZp2y2ce+TiJNUPA==",
"requires": {
"dompurify": "^3.2.3",
"dotenv": "^16.0.2",
@@ -1799,22 +1799,22 @@
}
},
"@tagspaces/tagspaces-common-node": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.67.tgz",
- "integrity": "sha512-JNMEWmx4spTuHInzCv703lPcAoynKe8wNpvkyyR3BtEHg0rdP21U5+BQohm/LhOQf8DcKaMGC8vxTEi7GvwwFA==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.5.71.tgz",
+ "integrity": "sha512-O2ol9Mjx1KbYjHrAfSnq7PtPmeSa/hNILc/XjxrcUocP+MfLZStHYVacLL/xn8m3EE8i6UeSl9UImJ2ACrIFxQ==",
"requires": {
- "@tagspaces/tagspaces-common": "^4.5.67",
+ "@tagspaces/tagspaces-common": "^4.5.71",
"adm-zip": "0.5.10",
"fs-extra": "^10.0.0",
"klaw": "^4.1.0"
}
},
"@tagspaces/tagspaces-indexer": {
- "version": "4.5.69",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.69.tgz",
- "integrity": "sha512-LAk6fhu3/9mSzP8lStfqFwxYa3A9n47NOu6Pzj4AZ1eTa4BXogWeDCkzQLniDtanRLrdvLmkv6LFT4lUUTQFKw==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.5.71.tgz",
+ "integrity": "sha512-ij6bAa2cBVgZw6ytrNfLAPCyxA0gOAvYq36tlJMsnNa6xKunRLiXFasQVa3GE91U3Yzf3u+/PjA66+t5tFoNiQ==",
"requires": {
- "@tagspaces/tagspaces-common": "^4.5.67"
+ "@tagspaces/tagspaces-common": "^4.5.71"
}
},
"@tagspaces/tagspaces-pdf-extraction": {
@@ -1835,25 +1835,25 @@
}
},
"@tagspaces/tagspaces-workers": {
- "version": "4.5.67",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.67.tgz",
- "integrity": "sha512-DIOI6wu/td3vWJwjMeYUOiBDViNhqQoMufRGuF8ejVQfK9xiYBvZsbKlE+sPCC6IDky2UkBrnUKIaXgpZKYerg==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.5.71.tgz",
+ "integrity": "sha512-2wz7KIcwBThJTzdJ/OPFDldQW6ZiM9r3h3KSndh7/FcvKnkcyTUMCVaH9HAsrfTIzyAS2nGope+SsKn6dDluTQ==",
"requires": {
- "@tagspaces/tagspaces-common": "^4.5.67",
- "@tagspaces/tagspaces-common-node": "^4.5.67",
+ "@tagspaces/tagspaces-common": "^4.5.71",
+ "@tagspaces/tagspaces-common-node": "^4.5.71",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.53",
"@tagspaces/tagspaces-thumbgen-image": "^4.5.60",
"fswin": "^3.24.829"
}
},
"@tagspaces/tagspaces-ws": {
- "version": "4.5.69",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.69.tgz",
- "integrity": "sha512-+jRZ6qwe16KPyYPYqa2j6E2gDgCtL3LLWkcq27/MAVaVAAkwFZbFud3kgmrEEZ/KN5lBcCkd0QhNEnXpARYgYQ==",
+ "version": "4.5.71",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.5.71.tgz",
+ "integrity": "sha512-3VJNYcwiRg+G7ao6CtepbJd+BUwJhxZKzra/tih0teEtWNhAhBZDZPKJfhJgW8Pbrcwij+OvYsejcW1mHGO8Tg==",
"requires": {
- "@tagspaces/tagspaces-indexer": "^4.5.69",
+ "@tagspaces/tagspaces-indexer": "^4.5.71",
"@tagspaces/tagspaces-pdf-extraction": "^4.5.53",
- "@tagspaces/tagspaces-workers": "^4.5.67",
+ "@tagspaces/tagspaces-workers": "^4.5.71",
"find-free-ports": "^3.1.1",
"jsonwebtoken": "^8.5.1",
"ws": "^8.15.1"
diff --git a/release/app/package.json b/release/app/package.json
index 8b882ad2e..a70ab1d77 100644
--- a/release/app/package.json
+++ b/release/app/package.json
@@ -19,8 +19,8 @@
"dependencies": {
"@elife/pm2": "3.6.1",
"@tagspaces/extensions": "1.0.190",
- "@tagspaces/tagspaces-common-node": "4.5.67",
- "@tagspaces/tagspaces-ws": "4.5.69",
+ "@tagspaces/tagspaces-common-node": "4.5.71",
+ "@tagspaces/tagspaces-ws": "4.5.71",
"sharp": "0.32.6",
"ws": "8.18.1"
},
diff --git a/src/main/main.ts b/src/main/main.ts
index b5c1b67a4..153fc307a 100644
--- a/src/main/main.ts
+++ b/src/main/main.ts
@@ -62,7 +62,9 @@ if (process.env.NODE_ENV === 'production') {
const isDebug =
process.env.NODE_ENV === 'development' || process.env.DEBUG_PROD === 'true';
-if (isDebug) {
+const testMode = process.env.NODE_ENV === 'test';
+
+if (isDebug || testMode) {
require('electron-debug')({ showDevTools: false });
if (isMacLike) {
// temp fix https://github.com/electron/electron/issues/43415#issuecomment-2359194469
@@ -72,8 +74,6 @@ if (isDebug) {
console.log = () => {};
}
-const testMode = process.env.NODE_ENV === 'test';
-
let startupFilePath;
let portableMode;
@@ -432,7 +432,7 @@ const getAssetPath = (...paths: string[]): string => {
};*/
async function findPort() {
- if (isDebug) {
+ if (isDebug || testMode) {
return 2000;
}
const defaultWSPort = settings.getInitWsPort();
diff --git a/src/renderer/components/EditDescriptionButtons.tsx b/src/renderer/components/EditDescriptionButtons.tsx
index 4f2dd664b..974b000c3 100644
--- a/src/renderer/components/EditDescriptionButtons.tsx
+++ b/src/renderer/components/EditDescriptionButtons.tsx
@@ -112,6 +112,7 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({ getHtml }) => {
const descrChangedMarker = isDescriptionChanged ? (
<Tooltip title={t('core:fileChanged')}>
<span
+ data-tid="descriptionChangedTID"
style={{
color: theme.palette.text.primary,
marginLeft: 3,
@@ -148,7 +149,11 @@ const EditDescriptionButtons: React.FC<ButtonsProps> = ({ getHtml }) => {
)}
<ProTooltip tooltip={!isEditDescriptionMode && t('editDescription')}>
<TsButton
- data-tid="editDescriptionTID"
+ data-tid={
+ isEditDescriptionMode
+ ? 'saveDescriptionTID'
+ : 'editDescriptionTID'
+ }
disabled={
!Pro ||
isEditMode ||
diff --git a/src/renderer/hooks/LocationIndexContextProvider.tsx b/src/renderer/hooks/LocationIndexContextProvider.tsx
index 832d1ecce..f28148ca5 100644
--- a/src/renderer/hooks/LocationIndexContextProvider.tsx
+++ b/src/renderer/hooks/LocationIndexContextProvider.tsx
@@ -409,7 +409,7 @@ export const LocationIndexContextProvider = ({
ignorePatterns: Array<string> = [],
isWalking = () => true,
): Promise<TS.FileSystemEntry[]> {
- const mode = ['extractThumbPath'];
+ const mode = ['loadMeta'];
if (extractText) {
mode.push('extractTextContent');
if (loc.extractLinks) {
diff --git a/src/renderer/services/utils-io.ts b/src/renderer/services/utils-io.ts
index 75632b721..ce535b647 100644
--- a/src/renderer/services/utils-io.ts
+++ b/src/renderer/services/utils-io.ts
@@ -934,12 +934,14 @@ export function createThumbnailsInWorker(
export function getDirProperties(path): Promise<TS.DirProp> {
if (AppConfig.isElectron) {
- return window.electronIO.ipcRenderer.invoke('getDirProperties', path);
+ try {
+ return window.electronIO.ipcRenderer.invoke('getDirProperties', path);
+ } catch (e) {
+ return Promise.reject(e);
+ }
} else {
return Promise.reject(
- new Error(
- 'platformDirProperties is supported on Electron local storage.',
- ),
+ new Error('getDirProperties is supported on Electron local storage.'),
);
}
}
diff --git a/tests/e2e/folderprops.pw.e2e.js b/tests/e2e/folderprops.pw.e2e.js
index 9f36b3b3e..c4f3518fa 100644
--- a/tests/e2e/folderprops.pw.e2e.js
+++ b/tests/e2e/folderprops.pw.e2e.js
@@ -253,7 +253,7 @@ test.describe('TST02 - Folder properties', () => {
//expect(propsTags).toContain(tagName);
});
- test('TST0213 - Add description to folder [web,electron,_pro]', async () => {
+ test('TST0213 - Add description to folder [web,minio,electron,_pro]', async () => {
await addDescription('testDescription');
await expectElementExist(
'[data-tid=gridCellDescription]',
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.js
index f0bf30446..fa52e071f 100644
--- a/tests/e2e/general.helpers.js
+++ b/tests/e2e/general.helpers.js
@@ -484,6 +484,7 @@ export async function createLocation(
locationPath = '',
locationName = defaultLocationName,
isDefault = false,
+ fullTextIndexing = false,
expectFolderExist = 'empty_folder',
) {
await clickOn('[data-tid=locationManager]');
@@ -496,6 +497,7 @@ export async function createLocation(
pathLib.join(testDataDir, locationPath),
locationName,
isDefault,
+ fullTextIndexing,
);
}
await clickOn('[data-tid=location_' + locationName + ']');
@@ -897,11 +899,12 @@ export async function expectLocalFileContain(
const contentN = normalized(content);
const txtToContainN = normalized(txtToContain);
- // Playwright assertion
- expect(contentN).toContain(
- txtToContainN,
- `Expected file "${filePath}" to contain "${txtToContainN}", but it did not: "${contentN}"`,
- );
+ /* if (!contentN.includes(txtToContainN)) {
+ throw new Error(
+ `Expected file ${filePath} to contain ${txtToContainN}, but it did not: ${contentN}`
+ );
+ }*/
+ expect(contentN).toContain(txtToContainN);
}
export async function expectFileContain(
@@ -964,15 +967,19 @@ export async function addDescription(desc) {
const editor = await global.client.waitForSelector(
'[data-tid=descriptionTID] [contenteditable=true]',
);
- await editor.type(desc);
+ try {
+ await editor.fill(desc);
+ } catch (e) {
+ await editor.type(desc);
+ }
+ await expectElementExist('[data-tid=descriptionChangedTID]');
/*
// editorContent is empty on web
const editorContent = await editor.innerText();
await expect(editorContent).toBe(desc);
*/
- await clickOn('[data-tid=editDescriptionTID]');
- await clickOn('[data-tid=editDescriptionTID]');
- await clickOn('[data-tid=editDescriptionTID]');
+ // await global.client.waitForTimeout(80000);
+ await clickOn('[data-tid=saveDescriptionTID]');
}
export async function createFile(
@@ -1141,7 +1148,7 @@ export async function createNewDirectory(dirName = testFolder) {
// set new dir name
await setInputKeys('directoryName', dirName);
await clickOn('[data-tid=confirmCreateNewDirectory]');
- await expectElementExist(getGridFileSelector(dirName), true, 5000);
+ await expectElementExist(getGridFileSelector(dirName), true, 50000);
// await waitForNotification();
return dirName;
}
diff --git a/tests/e2e/hook.js b/tests/e2e/hook.js
index af554d8e6..8e106b46b 100644
--- a/tests/e2e/hook.js
+++ b/tests/e2e/hook.js
@@ -257,6 +257,20 @@ export async function startTestingApp(
global.app.on('console', (msg) => {
console.log(`[Electron Main] ${msg.type()}: ${msg.text()}`);
});
+ /* const mainProcess = global.app.process();
+
+ // 3. Pipe its stdout / stderr to your Playwright test’s console
+ mainProcess.stdout.on("data", (chunk) => {
+ // chunk is a Buffer; convert to string
+ const text = chunk.toString("utf-8").trim();
+ if (text)
+ console.log(`[main stdout] ${text}`);
+ });*/
+ /* mainProcess.stderr.on("data", (chunk) => {
+ const text = chunk.toString("utf-8").trim();
+ if (text)
+ console.error(`[main stderr] ${text}`);
+ });*/
// Get the Electron context.
global.context = await global.app.context();
diff --git a/tests/e2e/location.helpers.js b/tests/e2e/location.helpers.js
index 8c3824a42..afd6b20f1 100644
--- a/tests/e2e/location.helpers.js
+++ b/tests/e2e/location.helpers.js
@@ -106,6 +106,7 @@ export async function createPwLocation(
locationPath,
locationName,
isDefault = false,
+ fullTextIndexing = false,
) {
//await clickOn('[data-tid=locationManager]');
const lastLocationTID = await getPwLocationTid(-1);
@@ -122,9 +123,12 @@ export async function createPwLocation(
);
if (isDefault) {
- await clickOn('[data-tid=switchAdvancedModeTID]');
+ //await clickOn('[data-tid=switchAdvancedModeTID]');
await global.client.check('[data-tid=locationIsDefault] input');
}
+ if (fullTextIndexing) {
+ await global.client.check('[data-tid=changeFullTextIndex] input');
+ }
await global.client.click('[data-tid=confirmLocationCreation]');
}
}
diff --git a/tests/e2e/location.pw.e2e.js b/tests/e2e/location.pw.e2e.js
index 188480345..6c5b3f84e 100644
--- a/tests/e2e/location.pw.e2e.js
+++ b/tests/e2e/location.pw.e2e.js
@@ -17,6 +17,7 @@ import {
createNewDirectory,
expectElementExist,
expectMetaFileContain,
+ getGridFileSelector,
openFile,
openFolder,
openFolderProp,
@@ -148,20 +149,22 @@ test.describe('TST03 - Testing locations:', () => {
expect(lastLocation).toBe(testLocationName);
});
- test('TST0328 - Creating location index [electron]', async ({
+ test('TST0328 - Creating location index WS [electron]', async ({
isS3,
isMinio,
testDataDir,
}) => {
+ test.setTimeout(520000);
const props = { isS3, isMinio, testDataDir };
- const file1 = 'test_file1.txt';
- const file1content = 'test file 1';
+ const file1 = 'test_file1[tag1 tag2].md'; // todo sidecar tags + ids
+ const file1content = 'test md file 1';
const file1desc = 'test file 1 desc';
- const file2 = 'test_file2.txt';
- const file2content = 'test file 2';
+ const file2 = 'test_file2[tag3 tag4].txt';
+ const file2content = 'test txt file 2';
const file2desc = 'test file 2 desc';
const locationFolderName = 'indexingLocation';
+ //await createFile(props, 'tsm.json', '{id=f998c4e9349044288c93f096f5cebca8}', '.ts');
await createNewDirectory(locationFolderName);
await createFile(props, file1, file1content, locationFolderName);
@@ -173,6 +176,12 @@ test.describe('TST03 - Testing locations:', () => {
await openFolderProp(testFolder);
await addDescription(folderDesc);
+ await expectElementExist(
+ '[data-tid=gridCellDescription]',
+ true,
+ 10000,
+ getGridFileSelector(testFolder),
+ );
await openFile(file1, 'showPropertiesTID');
await addDescription(file1desc);
await openFile(file2, 'showPropertiesTID');
@@ -182,14 +191,17 @@ test.describe('TST03 - Testing locations:', () => {
locationFolderName,
locationFolderName,
true,
+ true,
testFolder,
);
await openLocationMenu(locationFolderName);
await clickOn('[data-tid=indexLocation]');
+ await global.client.waitForTimeout(880000);
const indexFileContent =
- '[{"name":"testFolder","path":"testFolder","tags":[],"meta":{},"isFile":false,"size":0,"lmdt":1748619717688,"uuid":"e3f0f0909cd84b4d9b96a137ecd906d0","extension":""},{"name":"test_file1.txt","path":"test_file1.txt","tags":[],"meta":{"id":"c5d7bca3c5264bdca9c5780fea3af871"},"isFile":true,"size":11,"lmdt":1748619714668,"uuid":"c5d7bca3c5264bdca9c5780fea3af871","extension":"txt"},{"name":"test_file2.txt","path":"test_file2.txt","tags":[],"meta":{"id":"745272ca0ec84be1b689ebfeae0ef0a8"},"isFile":true,"size":11,"lmdt":1748619714668,"uuid":"745272ca0ec84be1b689ebfeae0ef0a8","extension":"txt"}]';
+ '[{"name":"testFolder","path":"testFolder","tags":[],"meta":{},"isFile":false,"size":96,"extension":""},{"name":"test_file1[tag1 tag2].md","path":"test_file1[tag1 tag2].md","tags":[{"title":"tag1","type":"plain"},{"title":"tag2","type":"plain"}],"meta":{,"description":"test file 1 desc\\n"},"isFile":true,"size":14,"textContent":"test md file 1","extension":"md"},{"name":"test_file2[tag3 tag4].txt","path":"test_file2[tag3 tag4].txt","tags":[{"title":"tag3","type":"plain"},{"title":"tag4","type":"plain"}],"meta":{,"description":"test file 2 desc\\n"},"isFile":true,"size":15,"textContent":"test txt file 2","extension":"txt"}]';
//await setFileTypeExtension('json');
const rootFolder = locationFolderName + '/' + AppConfig.metaFolder;
+ //await global.client.waitForTimeout(180000);
await expectMetaFileContain(
{ testDataDir },
'tsi.json',