mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6572] break dependency on adf-testing (#3594)
* remove Logger dependency * remove BrowserVisibility dependency * remove BrowserActions dependency * remove ViewerPage dependency * remove ApiUtil dependency * remove StringUtil dependency * remove adf-testing dependency * bug fixes
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
|
||||
import { ApiClientFactory, test, Utils, PersonalFilesPage, NodesApi, LoginPage } from '@alfresco/playwright-shared';
|
||||
import { expect } from '@playwright/test';
|
||||
import { Logger } from '@alfresco/adf-testing';
|
||||
|
||||
test.describe('Copy actions', () => {
|
||||
let nodesApi: NodesApi;
|
||||
@@ -45,17 +44,13 @@ test.describe('Copy actions', () => {
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username });
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
} catch (error) {
|
||||
Logger.error(`beforeAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test.afterAll(async ({ nodesApiAction }) => {
|
||||
try {
|
||||
await nodesApiAction.deleteCurrentUserNodes();
|
||||
} catch (error) {
|
||||
Logger.error(`afterAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ personalFiles, page }) => {
|
||||
@@ -79,9 +74,7 @@ test.describe('Copy actions', () => {
|
||||
sourceFileId = (await nodesApi.createFile(sourceFile)).entry.id;
|
||||
|
||||
await personalFiles.navigate();
|
||||
} catch (error) {
|
||||
Logger.error(`beforeEach failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
const copyContentInPersonalFiles = async (personalFilesPage: PersonalFilesPage, sourceFileList: string[], destinationName: string) => {
|
||||
|
@@ -25,7 +25,6 @@
|
||||
import { ApiClientFactory, MyLibrariesPage, NodesApi, SitesApi, test, Utils } from '@alfresco/playwright-shared';
|
||||
import { expect } from '@playwright/test';
|
||||
import { Site } from '@alfresco/js-api';
|
||||
import { Logger } from '@alfresco/adf-testing';
|
||||
|
||||
test.describe('Copy Move actions', () => {
|
||||
let nodesApi: NodesApi;
|
||||
@@ -63,18 +62,14 @@ test.describe('Copy Move actions', () => {
|
||||
|
||||
await nodesApi.createFile(sourceFile, docLibId);
|
||||
await nodesApi.createFolder(destinationFolder, docLibId);
|
||||
} catch (error) {
|
||||
Logger.error(`beforeAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
try {
|
||||
await nodesApi.deleteCurrentUserNodes();
|
||||
await sitesApi.deleteSites([siteId]);
|
||||
} catch (error) {
|
||||
Logger.error(`afterAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
const copyContentInMyLibraries = async (myLibrariesPage: MyLibrariesPage) => {
|
||||
|
@@ -24,7 +24,6 @@
|
||||
|
||||
import { ApiClientFactory, test, Utils, PersonalFilesPage, NodesApi, LoginPage } from '@alfresco/playwright-shared';
|
||||
import { expect } from '@playwright/test';
|
||||
import { Logger } from '@alfresco/adf-testing';
|
||||
|
||||
test.describe('Move actions', () => {
|
||||
let nodesApi: NodesApi;
|
||||
@@ -45,17 +44,13 @@ test.describe('Move actions', () => {
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username });
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
} catch (error) {
|
||||
Logger.error(`beforeAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test.afterAll(async ({ nodesApiAction }) => {
|
||||
try {
|
||||
await nodesApiAction.deleteCurrentUserNodes();
|
||||
} catch (error) {
|
||||
Logger.error(`afterAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ personalFiles, page }) => {
|
||||
@@ -79,9 +74,7 @@ test.describe('Move actions', () => {
|
||||
sourceFileId = (await nodesApi.createFile(sourceFile)).entry.id;
|
||||
|
||||
await personalFiles.navigate();
|
||||
} catch (error) {
|
||||
Logger.error(`beforeEach failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
const moveContentInPersonalFiles = async (personalFilesPage: PersonalFilesPage, sourceFileList: string[], destinationName: string) => {
|
||||
|
@@ -25,7 +25,6 @@
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, FileActionsApi, LoginPage, NodesApi, SitesApi, test, TEST_FILES, Utils } from '@alfresco/playwright-shared';
|
||||
import { SiteBodyCreate } from '@alfresco/js-api';
|
||||
import { Logger } from '@alfresco/adf-testing';
|
||||
|
||||
test.describe('from File Libraries', () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
@@ -50,9 +49,7 @@ test.describe('from File Libraries', () => {
|
||||
const node = await nodesApi.createFolder(destination);
|
||||
destinationId = node.entry.id;
|
||||
await fileApi.uploadFile(TEST_FILES.XLSX.path, xlsxLibraries, docLibId);
|
||||
} catch (error) {
|
||||
Logger.error(`beforeAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
@@ -70,9 +67,7 @@ test.describe('from File Libraries', () => {
|
||||
try {
|
||||
await sitesApi.deleteSites([siteName]);
|
||||
await nodesApi.deleteNodes([destinationId]);
|
||||
} catch (error) {
|
||||
Logger.error(`afterAll failed : ${error}`);
|
||||
}
|
||||
} catch {}
|
||||
});
|
||||
|
||||
test('[C286371] Move action from File Libraries', async ({ myLibrariesPage, personalFiles }) => {
|
||||
|
Reference in New Issue
Block a user