mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6666] e2e migration for info drawer file folder properties tests (#3623)
* [ACS-5882] infoDrawer comments tests migrated to Playwright * [ACS-5882] fixed issues from pull request comments * [ACS-5882] 2nd part of fixed issues from pull request comments * [ACS-6666] E2E test migration - infoDrawer - File Folder Properties * [ACS-6666] Few changes + small test fixes * [ACS-6666] Deleted unused method * [ACS-5882] infoDrawer comments tests migrated to Playwright * [ACS-5882] fixed issues from pull request comments * [ACS-5882] 2nd part of fixed issues from pull request comments * [ACS-6666] Sonar fix * [ACS-6666] Small locators change + timeout increased
This commit is contained in:
@@ -18,5 +18,6 @@
|
||||
"C213666": "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C280490": "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C280491": "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C213217": "https://alfresco.atlassian.net/browse/ACS-6710"
|
||||
"C213217": "https://alfresco.atlassian.net/browse/ACS-6710",
|
||||
"C213245": "https://alfresco.atlassian.net/browse/ACS-6717"
|
||||
}
|
||||
|
@@ -68,33 +68,37 @@ test.describe('Remember sorting', () => {
|
||||
let nodeActionUser1: NodesApi;
|
||||
|
||||
test.beforeAll(async () => {
|
||||
test.setTimeout(timeouts.extendedTest);
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username: user1 });
|
||||
await apiClientFactory.createUser({ username: user2 });
|
||||
const fileActionUser1 = await FileActionsApi.initialize(user1, user1);
|
||||
const fileActionUser2 = await FileActionsApi.initialize(user2, user2);
|
||||
const favoritesActions = await FavoritesPageApi.initialize(user1, user1);
|
||||
nodeActionUser1 = await NodesApi.initialize(user1, user1);
|
||||
const filesIdsUser1: { [key: string]: string } = {};
|
||||
const filesIdsUser2: { [key: string]: string } = {};
|
||||
await Promise.all(
|
||||
testData.user1.files.pdf.map(
|
||||
async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id)
|
||||
)
|
||||
);
|
||||
await Promise.all(
|
||||
testData.user1.files.jpg.map(
|
||||
async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.JPG_FILE.path, i, '-my-')).entry.id)
|
||||
)
|
||||
);
|
||||
await Promise.all(
|
||||
testData.user2.files.map(
|
||||
async (i) => (filesIdsUser2[i] = (await fileActionUser2.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id)
|
||||
)
|
||||
);
|
||||
await favoritesActions.addFavoritesByIds('file', [filesIdsUser1[pdfFileNames[0]], filesIdsUser1[pdfFileNames[1]]]);
|
||||
try {
|
||||
test.setTimeout(timeouts.extendedTest);
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username: user1 });
|
||||
await apiClientFactory.createUser({ username: user2 });
|
||||
const fileActionUser1 = await FileActionsApi.initialize(user1, user1);
|
||||
const fileActionUser2 = await FileActionsApi.initialize(user2, user2);
|
||||
const favoritesActions = await FavoritesPageApi.initialize(user1, user1);
|
||||
nodeActionUser1 = await NodesApi.initialize(user1, user1);
|
||||
const filesIdsUser1: { [key: string]: string } = {};
|
||||
const filesIdsUser2: { [key: string]: string } = {};
|
||||
await Promise.all(
|
||||
testData.user1.files.pdf.map(
|
||||
async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id)
|
||||
)
|
||||
);
|
||||
await Promise.all(
|
||||
testData.user1.files.jpg.map(
|
||||
async (i) => (filesIdsUser1[i] = (await fileActionUser1.uploadFileWithRename(TEST_FILES.JPG_FILE.path, i, '-my-')).entry.id)
|
||||
)
|
||||
);
|
||||
await Promise.all(
|
||||
testData.user2.files.map(
|
||||
async (i) => (filesIdsUser2[i] = (await fileActionUser2.uploadFileWithRename(TEST_FILES.PDF.path, i, '-my-')).entry.id)
|
||||
)
|
||||
);
|
||||
await favoritesActions.addFavoritesByIds('file', [filesIdsUser1[pdfFileNames[0]], filesIdsUser1[pdfFileNames[1]]]);
|
||||
} catch (error) {
|
||||
console.error(`beforeAll failed : ${error}`);
|
||||
}
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ loginPage, personalFiles }) => {
|
||||
|
@@ -66,8 +66,12 @@ test.describe('Trash', () => {
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await nodesApi.deleteCurrentUserNodes();
|
||||
await siteActionsAdmin.deleteSites([siteName]);
|
||||
try {
|
||||
await nodesApi.deleteCurrentUserNodes();
|
||||
await siteActionsAdmin.deleteSites([siteName]);
|
||||
} catch (error) {
|
||||
console.error(`Main afterAll failed: ${error}`);
|
||||
}
|
||||
});
|
||||
|
||||
test.describe(`Regular user's personal files`, () => {
|
||||
|
Reference in New Issue
Block a user