Skip to content

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

TST6901 - Open and render md file

Stanimir5739b778aad5
diff --git a/tests/e2e/markdown-editor.pw.e2e.js b/tests/e2e/markdown-editor.pw.e2e.js
new file mode 100644
index 000000000..898db7ee8
--- /dev/null
+++ b/tests/e2e/markdown-editor.pw.e2e.js
@@ -0,0 +1,55 @@
+/*
+ * 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 { startTestingApp, stopSpectronApp, testDataRefresh } from './hook';
+import { openContextEntryMenu, toContainTID } from './test-utils';
+
+describe('TST69 - Markdown editor', () => {
+ beforeAll(async () => {
+ await startTestingApp();
+ });
+
+ afterAll(async () => {
+ await stopSpectronApp();
+ await testDataRefresh();
+ });
+ beforeEach(async () => {
+ if (global.isMinio) {
+ await createPwMinioLocation('', defaultLocationName, true);
+ } else {
+ await createPwLocation(defaultLocationPath, defaultLocationName, true);
+ }
+ await clickOn('[data-tid=location_' + defaultLocationName + ']');
+ // If its have opened file
+ // await closeFileProperties();
+ });
+
+ test('TST6901 - Open and render md file [web,minio,electron]', async () => {
+ await openContextEntryMenu(
+ '[data-tid="fsEntryName_sample.md"]',
+ 'fileMenuOpenFile'
+ );
+ await pExpect
+ .poll(
+ async () => {
+ const fLocator = await frameLocator();
+ const bodyTxt = await fLocator.locator('body').innerText();
+ return toContainTID(bodyTxt);
+ },
+ {
+ message: 'make sure bodyTxt contain etete&5435', // custom error message
+ // Poll for 10 seconds; defaults to 5 seconds. Pass 0 to disable timeout.
+ timeout: 10000
+ }
+ )
+ .toBe(true);
+ });
+});
diff --git a/tests/e2e/viewer-audiovideo.pw.e2e.js b/tests/e2e/viewer-audiovideo.pw.e2e.js
new file mode 100644
index 000000000..42b84b18d
--- /dev/null
+++ b/tests/e2e/viewer-audiovideo.pw.e2e.js
@@ -0,0 +1,36 @@
+/*
+ * 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 { startTestingApp, stopSpectronApp, testDataRefresh } from './hook';
+import { openContextEntryMenu, toContainTID } from './test-utils';
+
+describe('TST59 - Media player', () => {
+ beforeAll(async () => {
+ await startTestingApp();
+ });
+
+ afterAll(async () => {
+ await stopSpectronApp();
+ await testDataRefresh();
+ });
+ beforeEach(async () => {
+ if (global.isMinio) {
+ await createPwMinioLocation('', defaultLocationName, true);
+ } else {
+ await createPwLocation(defaultLocationPath, defaultLocationName, true);
+ }
+ await clickOn('[data-tid=location_' + defaultLocationName + ']');
+ // If its have opened file
+ // await closeFileProperties();
+ });
+
+ test.skip('TST5903 - Open and close about dialog', async () => {});
+});