Skip to content

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

add e2e TST4909 - move with copy/move file dialog

Stanimire2160c7c2b1c
diff --git a/tests/e2e/perspective-kanban.pw.e2e.js b/tests/e2e/perspective-kanban.pw.e2e.js
new file mode 100644
index 000000000..0c018216b
--- /dev/null
+++ b/tests/e2e/perspective-kanban.pw.e2e.js
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2016-present - TagSpaces UG (Haftungsbeschraenkt). All rights reserved.
+ */
+import { test } from '@playwright/test';
+import {
+ defaultLocationPath,
+ defaultLocationName,
+ createPwMinioLocation,
+ createPwLocation,
+} from './location.helpers';
+import {
+ clickOn,
+ expectElementExist,
+ getGridFileSelector,
+ takeScreenshot,
+} from './general.helpers';
+import { startTestingApp, stopApp, testDataRefresh } from './hook';
+import { clearDataStorage } from './welcome.helpers';
+import { openContextEntryMenu } from './test-utils';
+
+test.beforeAll(async () => {
+ await startTestingApp('extconfig.js');
+ //await clearDataStorage();
+});
+
+test.afterAll(async () => {
+ await stopApp();
+});
+
+test.afterEach(async ({ page }, testInfo) => {
+ if (testInfo.status !== testInfo.expectedStatus) {
+ await takeScreenshot(testInfo);
+ }
+ await clearDataStorage();
+ await testDataRefresh();
+});
+
+test.beforeEach(async () => {
+ if (global.isMinio) {
+ await createPwMinioLocation('', defaultLocationName, true);
+ } else {
+ await createPwLocation(defaultLocationPath, defaultLocationName, true);
+ }
+ await clickOn('[data-tid=location_' + defaultLocationName + ']');
+ await clickOn('[data-tid=openKanbanPerspective]');
+});
+
+test.describe('TST49 - Perspective KanBan', () => {
+ test('TST4909 - move with copy/move file dialog [web,minio,electron,_pro]', async () => {
+ const fileName = 'sample.bmp';
+
+ await openContextEntryMenu(
+ getGridFileSelector(fileName),
+ 'fileMenuMoveCopyFile',
+ );
+ await clickOn('[data-tid=MoveTargetempty_folder]');
+ await clickOn('[data-tid=confirmMoveFiles]');
+ await expectElementExist(getGridFileSelector(fileName), false);
+ await openContextEntryMenu(
+ getGridFileSelector('empty_folder'),
+ 'openDirectory',
+ );
+ await expectElementExist(getGridFileSelector(fileName), true);
+ });
+});