mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACS-6907] enable exclude test (#3676)
* [ACS-6907] enable exclude test * [ACS-6907] test fix * [ACS-6907] test fix * remove hruser dependancy * remove protractor duplicate tests * review fix
This commit is contained in:
@@ -1,3 +1 @@
|
||||
{
|
||||
"C260970": "https://alfresco.atlassian.net/browse/ACS-6688"
|
||||
}
|
||||
{}
|
||||
|
@@ -23,29 +23,27 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, getUserState, NodesApi, test, Utils, LoginPage, timeouts } from '@alfresco/playwright-shared';
|
||||
import { ApiClientFactory, LoginPage, NodesApi, test, users, Utils } from '@alfresco/playwright-shared';
|
||||
|
||||
test.use({ storageState: getUserState('admin') });
|
||||
test.describe('as admin', () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
test.describe.configure({ mode: 'serial' });
|
||||
const userFolder = `userFolder-${Utils.random()}`;
|
||||
const username = `userAdmin-${Utils.random()}`;
|
||||
let userFolderId: string;
|
||||
let nodesApi: NodesApi;
|
||||
|
||||
test.beforeAll(async () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username });
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
nodesApi = await NodesApi.initialize('admin');
|
||||
const node = await nodesApi.createFolder(userFolder);
|
||||
userFolderId = node.entry.id;
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
test.setTimeout(timeouts.extendedTest);
|
||||
test.beforeEach(async ({ page, personalFiles }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
await personalFiles.navigate();
|
||||
await loginPage.loginUser(
|
||||
{ username, password: username },
|
||||
{ username: users.admin.username, password: users.admin.password },
|
||||
{
|
||||
withNavigation: true,
|
||||
waitForLoading: true
|
||||
|
@@ -23,11 +23,13 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { getUserState, test, Utils } from '@alfresco/playwright-shared';
|
||||
import { ApiClientFactory, LoginPage, NodesApi, SitesApi, test, timeouts, Utils } from '@alfresco/playwright-shared';
|
||||
import { Site } from '@alfresco/js-api';
|
||||
|
||||
test.use({ storageState: getUserState('hruser') });
|
||||
test.describe('viewer action file', () => {
|
||||
let nodesApi: NodesApi;
|
||||
let siteActions: SitesApi;
|
||||
const username = `user-${Utils.random()}`;
|
||||
const parent = `parent-${Utils.random()}`;
|
||||
let parentId: string;
|
||||
const subFolder1 = `subFolder1-${Utils.random()}`;
|
||||
@@ -52,27 +54,44 @@ test.describe('viewer action file', () => {
|
||||
let folder1Id: string;
|
||||
const folder1Renamed = `renamed-${Utils.random()}`;
|
||||
|
||||
test.beforeAll(async ({ nodesApiAction, sitesApiAction }) => {
|
||||
const parentNode = await nodesApiAction.createFolder(parent);
|
||||
test.beforeAll(async () => {
|
||||
test.setTimeout(timeouts.extendedTest);
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username });
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
siteActions = await SitesApi.initialize(username, username);
|
||||
const parentNode = await nodesApi.createFolder(parent);
|
||||
parentId = parentNode.entry.id;
|
||||
subFolder1Id = (await nodesApiAction.createFolder(subFolder1, parentId)).entry.id;
|
||||
subFolder2Id = (await nodesApiAction.createFolder(subFolder2, subFolder1Id)).entry.id;
|
||||
await nodesApiAction.createFile(fileName1, subFolder2Id);
|
||||
subFolder1Id = (await nodesApi.createFolder(subFolder1, parentId)).entry.id;
|
||||
subFolder2Id = (await nodesApi.createFolder(subFolder2, subFolder1Id)).entry.id;
|
||||
await nodesApi.createFile(fileName1, subFolder2Id);
|
||||
|
||||
parent2Id = (await nodesApiAction.createFolder(parent2)).entry.id;
|
||||
folder1Id = (await nodesApiAction.createFolder(folder1, parent2Id)).entry.id;
|
||||
parent2Id = (await nodesApi.createFolder(parent2)).entry.id;
|
||||
folder1Id = (await nodesApi.createFolder(folder1, parent2Id)).entry.id;
|
||||
|
||||
await sitesApiAction.createSite(siteName, Site.VisibilityEnum.PUBLIC);
|
||||
docLibId = await sitesApiAction.getDocLibId(siteName);
|
||||
parentFromSiteId = (await nodesApiAction.createFolder(parentFromSite, docLibId)).entry.id;
|
||||
subFolder1FromSiteId = (await nodesApiAction.createFolder(subFolder1FromSite, parentFromSiteId)).entry.id;
|
||||
subFolder2FromSiteId = (await nodesApiAction.createFolder(subFolder2FromSite, subFolder1FromSiteId)).entry.id;
|
||||
await nodesApiAction.createFile(fileName1FromSite, subFolder2FromSiteId);
|
||||
await siteActions.createSite(siteName, Site.VisibilityEnum.PUBLIC);
|
||||
docLibId = await siteActions.getDocLibId(siteName);
|
||||
parentFromSiteId = (await nodesApi.createFolder(parentFromSite, docLibId)).entry.id;
|
||||
subFolder1FromSiteId = (await nodesApi.createFolder(subFolder1FromSite, parentFromSiteId)).entry.id;
|
||||
subFolder2FromSiteId = (await nodesApi.createFolder(subFolder2FromSite, subFolder1FromSiteId)).entry.id;
|
||||
await nodesApi.createFile(fileName1FromSite, subFolder2FromSiteId);
|
||||
});
|
||||
|
||||
test.afterAll(async ({ nodesApiAction, sitesApiAction }) => {
|
||||
await nodesApiAction.deleteNodes([parentId, parent2Id], true);
|
||||
await sitesApiAction.deleteSites([docLibId]);
|
||||
test.beforeEach(async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
await loginPage.loginUser(
|
||||
{ username, password: username },
|
||||
{
|
||||
withNavigation: true,
|
||||
waitForLoading: true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await nodesApi.deleteNodes([parentId, parent2Id], true);
|
||||
await siteActions.deleteSites([docLibId]);
|
||||
});
|
||||
|
||||
test('[C260964] Personal Files breadcrumb main node', async ({ personalFiles }) => {
|
||||
|
@@ -23,14 +23,26 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, APP_ROUTES, getUserState, SIDEBAR_LABELS, test } from '@alfresco/playwright-shared';
|
||||
import { ApiClientFactory, APP_ROUTES, LoginPage, SIDEBAR_LABELS, test, Utils } from '@alfresco/playwright-shared';
|
||||
|
||||
test.use({ storageState: getUserState('hruser') });
|
||||
test.describe('Sidebar', () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
const username = `user-${Utils.random()}`;
|
||||
|
||||
test.beforeAll(async () => {
|
||||
await apiClientFactory.setUpAcaBackend('hruser');
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username });
|
||||
});
|
||||
|
||||
test.beforeEach(async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
await loginPage.loginUser(
|
||||
{ username, password: username },
|
||||
{
|
||||
withNavigation: true,
|
||||
waitForLoading: true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
test('[C289901] navigate to My Libraries', async ({ personalFiles, myLibrariesPage }) => {
|
||||
|
@@ -23,12 +23,11 @@
|
||||
*/
|
||||
|
||||
import { expect } from '@playwright/test';
|
||||
import { ApiClientFactory, getUserState, test, Utils } from '@alfresco/playwright-shared';
|
||||
import { ApiClientFactory, LoginPage, NodesApi, SitesApi, test, Utils } from '@alfresco/playwright-shared';
|
||||
|
||||
test.use({ storageState: getUserState('hruser') });
|
||||
test.describe('Single click on item name', () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
|
||||
let nodesApi: NodesApi;
|
||||
const username = `user-${Utils.random()}`;
|
||||
const folder1 = `folder1-${Utils.random()}`;
|
||||
let folder1Id: string;
|
||||
const folderSearch = `folder1-${Utils.random()}`;
|
||||
@@ -42,21 +41,36 @@ test.describe('Single click on item name', () => {
|
||||
const siteName = `site-${Utils.random()}`;
|
||||
const fileSite = `fileSite-${Utils.random()}.txt`;
|
||||
|
||||
test.beforeAll(async ({ nodesApiAction, sitesApiAction }) => {
|
||||
await apiClientFactory.setUpAcaBackend('hruser');
|
||||
const node = await apiClientFactory.nodes.createNode('-my-', { name: folder1, nodeType: 'cm:folder', relativePath: '/' });
|
||||
test.beforeAll(async () => {
|
||||
const apiClientFactory = new ApiClientFactory();
|
||||
await apiClientFactory.setUpAcaBackend('admin');
|
||||
await apiClientFactory.createUser({ username });
|
||||
nodesApi = await NodesApi.initialize(username, username);
|
||||
const siteActions = await SitesApi.initialize(username, username);
|
||||
const node = await nodesApi.createFolder(folder1);
|
||||
folder1Id = node.entry.id;
|
||||
folderSearchId = (await nodesApiAction.createFolder(folderSearch)).entry.id;
|
||||
deletedFile1Id = (await nodesApiAction.createFile(deletedFile1)).entry.id;
|
||||
deletedFolder1Id = (await nodesApiAction.createFolder(deletedFolder1)).entry.id;
|
||||
folderSearchId = (await nodesApi.createFolder(folderSearch)).entry.id;
|
||||
deletedFile1Id = (await nodesApi.createFile(deletedFile1)).entry.id;
|
||||
deletedFolder1Id = (await nodesApi.createFolder(deletedFolder1)).entry.id;
|
||||
|
||||
await sitesApiAction.createSite(siteName);
|
||||
const docLibId = await sitesApiAction.getDocLibId(siteName);
|
||||
await nodesApiAction.createFile(fileSite, docLibId);
|
||||
await siteActions.createSite(siteName);
|
||||
const docLibId = await siteActions.getDocLibId(siteName);
|
||||
await nodesApi.createFile(fileSite, docLibId);
|
||||
});
|
||||
|
||||
test.afterAll(async ({ nodesApiAction }) => {
|
||||
await nodesApiAction.deleteNodes([deletedFolder1Id, deletedFile1Id, folder1Id, folderSearchId], true);
|
||||
test.beforeEach(async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
await loginPage.loginUser(
|
||||
{ username, password: username },
|
||||
{
|
||||
withNavigation: true,
|
||||
waitForLoading: true
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
test.afterAll(async () => {
|
||||
await nodesApi.deleteNodes([deletedFolder1Id, deletedFile1Id, folder1Id, folderSearchId], true);
|
||||
});
|
||||
|
||||
test('[C284899] Hyperlink does not appear for items in the Trash', async ({ trashPage }) => {
|
||||
|
Reference in New Issue
Block a user