Skip to content

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

Add TST5903 - Open and close about dialog

sytolkc21a5a6e0fa9
diff --git a/tests/e2e/viewer-audiovideo.pw.e2e.js b/tests/e2e/viewer-audiovideo.pw.e2e.js
index 42b84b18d..3bdbeda72 100644
--- a/tests/e2e/viewer-audiovideo.pw.e2e.js
+++ b/tests/e2e/viewer-audiovideo.pw.e2e.js
@@ -1,14 +1,13 @@
/*
* Copyright (c) 2016-present - TagSpaces UG (Haftungsbeschraenkt). All rights reserved.
*/
-import { expect as pExpect } from '@playwright/test';
import {
defaultLocationPath,
defaultLocationName,
createPwMinioLocation,
createPwLocation
} from './location.helpers';
-import { clickOn, frameLocator } from './general.helpers';
+import { clickOn, isDisplayed } from './general.helpers';
import { startTestingApp, stopSpectronApp, testDataRefresh } from './hook';
import { openContextEntryMenu, toContainTID } from './test-utils';
@@ -32,5 +31,35 @@ describe('TST59 - Media player', () => {
// await closeFileProperties();
});
- test.skip('TST5903 - Open and close about dialog', async () => {});
+ test('TST5903 - Open and close about dialog [web,minio,electron]', async () => {
+ await openContextEntryMenu(
+ '[data-tid="fsEntryName_sample.mp4"]',
+ 'fileMenuOpenFile'
+ );
+
+ // Access the iframe
+ const iframeElement = await global.client.waitForSelector('iframe');
+ const frame = await iframeElement.contentFrame();
+
+ // Click on the desired element within the iframe
+ await frame.click('[data-tid=mediaPlayerMenuTID]');
+ await frame.click('[data-tid=mediaPlayerAboutTID]');
+ const aboutExists = await isDisplayed(
+ '[data-tid=AboutDialogTID]',
+ true,
+ 2000,
+ frame
+ );
+ expect(aboutExists).toBeTruthy();
+
+ await frame.click('[data-tid=AboutDialogOkTID]');
+ const aboutNotExists = await isDisplayed(
+ '[data-tid=AboutDialogTID]',
+ false,
+ 2000,
+ frame
+ );
+ // Expect that the element of AboutDialog not exist within the iframe
+ expect(aboutNotExists).toBeTruthy();
+ });
});