Skip to content

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

add TST5904 - Play mp3

sytolke335c89b7ce3
diff --git a/tests/e2e/perspective-grid-right-button.pw.e2e.js b/tests/e2e/perspective-grid-right-button.pw.e2e.js
index 03df2d4fa..49eaae3be 100644
--- a/tests/e2e/perspective-grid-right-button.pw.e2e.js
+++ b/tests/e2e/perspective-grid-right-button.pw.e2e.js
@@ -70,16 +70,13 @@ describe('TST50** - Right button on a file', () => {
// await closeFileProperties();
});
- /**
- * todo web file content is slow loaded in web and innerText is empty string
- */
test('TST5016 - Open file [web,minio,electron]', async () => {
// await searchEngine('txt');
await openContextEntryMenu(
'[data-tid="fsEntryName_sample.txt"]', // perspectiveGridTable + firstFile,
'fileMenuOpenFile'
);
- await takeScreenshot('fileMenuOpenFile');
+ // await takeScreenshot('fileMenuOpenFile');
await pExpect
.poll(
async () => {
@@ -94,7 +91,7 @@ describe('TST50** - Right button on a file', () => {
}
)
.toBe(true);
- await takeScreenshot('bodyTxt_fileMenuOpenFile');
+ // await takeScreenshot('bodyTxt_fileMenuOpenFile');
/*const containTID = toContainTID(bodyTxt);
if (!containTID) {
diff --git a/tests/e2e/viewer-audiovideo.pw.e2e.js b/tests/e2e/viewer-audiovideo.pw.e2e.js
index c009fddf9..1ac389acd 100644
--- a/tests/e2e/viewer-audiovideo.pw.e2e.js
+++ b/tests/e2e/viewer-audiovideo.pw.e2e.js
@@ -1,13 +1,14 @@
/*
* 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, isDisplayed } from './general.helpers';
+import { clickOn, frameLocator, isDisplayed } from './general.helpers';
import { startTestingApp, stopSpectronApp, testDataRefresh } from './hook';
import { openContextEntryMenu, toContainTID } from './test-utils';
@@ -63,6 +64,29 @@ describe('TST59 - Media player', () => {
expect(aboutNotExists).toBeTruthy();
});
+ test('TST5904 - Play mp3 [web,minio,electron]', async () => {
+ await openContextEntryMenu(
+ '[data-tid="fsEntryName_sample.mp3"]',
+ 'fileMenuOpenFile'
+ );
+
+ await pExpect
+ .poll(
+ async () => {
+ const fLocator = await frameLocator();
+ const progressSeek = await fLocator.locator('[data-plyr=seek]');
+ const ariaValueNow = await progressSeek.getAttribute('aria-valuenow');
+ return parseFloat(ariaValueNow) > 0;
+ },
+ {
+ message: 'progress of file is not greater that 0', // custom error message
+ // Poll for 10 seconds; defaults to 5 seconds. Pass 0 to disable timeout.
+ timeout: 10000
+ }
+ )
+ .toBe(true);
+ });
+
test('TST5905 - Play mp4 [web,minio,electron]', async () => {
await openContextEntryMenu(
'[data-tid="fsEntryName_sample.mp4"]',