[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:
Akash Rathod
2024-03-04 17:06:06 +05:30
committed by GitHub
parent 262645629e
commit c883e16d2b
11 changed files with 94 additions and 294 deletions

View File

@@ -1,23 +1,4 @@
{
"C213173": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213178": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213668": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297653": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297659": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213168": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213171": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213174": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213176": "https://alfresco.atlassian.net/browse/ACS-6688",
"C280486": "https://alfresco.atlassian.net/browse/ACS-6688",
"C280487": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213116": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213113": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213115": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213117": "https://alfresco.atlassian.net/browse/ACS-6688",
"C213118": "https://alfresco.atlassian.net/browse/ACS-6688",
"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",
"C213245": "https://alfresco.atlassian.net/browse/ACS-6717",
"C261153": "https://alfresco.atlassian.net/browse/AAE-7517",

View File

@@ -1,3 +1 @@
{
"C260970": "https://alfresco.atlassian.net/browse/ACS-6688"
}
{}

View File

@@ -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

View File

@@ -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 }) => {

View File

@@ -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 }) => {

View File

@@ -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 }) => {

View File

@@ -1,3 +1 @@
{
"C286326": "https://alfresco.atlassian.net/browse/ACS-6688"
}
{}

View File

@@ -1,23 +1 @@
{
"C326658": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326659": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326660": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326661": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326662": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297655": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297658": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326663": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297651": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297662": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297665": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297652": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297660": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297653": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297659": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297666": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297667": "https://alfresco.atlassian.net/browse/ACS-6688",
"C297672": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326674": "https://alfresco.atlassian.net/browse/ACS-6688",
"C326675": "https://alfresco.atlassian.net/browse/ACS-6688"
}
{}

View File

@@ -1,5 +1 @@
{
"C286379": "https://alfresco.atlassian.net/browse/ACS-5601",
"C284636": "https://alfresco.atlassian.net/browse/ACS-6688",
"C284635": "https://alfresco.atlassian.net/browse/ACS-6688"
}
{}