Skip to content

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

fix e2e

sytolkb2916338dbd8
diff --git a/tests/e2e/general.helpers.js b/tests/e2e/general.helpers.js
index a6c83ef7c..2eb158d98 100644
--- a/tests/e2e/general.helpers.js
+++ b/tests/e2e/general.helpers.js
@@ -322,6 +322,10 @@ export async function isDisabled(selector) {
return element.isDisabled();
}
+export async function frameLocator(selector = 'iframe') {
+ return await global.client.frameLocator(selector);
+}
+
export async function isDisplayed(selector, displayed = true, timeout = 500) {
if (global.isPlaywright) {
try {
diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.js
index d5057ce15..7485c9d94 100644
--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js
+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js
@@ -31,7 +31,8 @@ import {
setInputKeys,
setGridOptions,
showFilesWithTag,
- waitForNotification
+ waitForNotification,
+ frameLocator
} from './general.helpers';
import { AddRemoveTagsToSelectedFiles } from './perspective-grid.helpers';
import { startTestingApp, stopSpectronApp, testDataRefresh } from './hook';
@@ -72,9 +73,16 @@ describe('TST50** - Right button on a file', () => {
'[data-tid="fsEntryName_sample.txt"]', // perspectiveGridTable + firstFile,
'fileMenuOpenFile'
);
+ const fLocator = await frameLocator();
+ const bodyTxt = await fLocator.locator('body').innerText();
+ const containTID = toContainTID(bodyTxt);
+ if (!containTID) {
+ console.debug('no containTID in:' + bodyTxt);
+ }
+ expect(containTID).toBe(true);
// Check if the file is opened
// await delay(1500);
- await expectElementExist('#FileViewer', true, 2000);
+ /*await expectElementExist('#FileViewer', true, 2000);
const webViewer = await global.client.waitForSelector('#FileViewer');
// await webViewer.waitForDisplayed();
// await delay(5000);
@@ -88,7 +96,7 @@ describe('TST50** - Right button on a file', () => {
if (!containTID) {
console.debug('no containTID in:' + bodyTxt);
}
- expect(containTID).toBe(true);
+ expect(containTID).toBe(true);*/
});
test('TST5017 - Rename file [web,minio,electron]', async () => {