mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +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:
parent
262645629e
commit
c883e16d2b
@ -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",
|
||||
|
@ -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 }) => {
|
||||
|
@ -1,3 +1 @@
|
||||
{
|
||||
"C286326": "https://alfresco.atlassian.net/browse/ACS-6688"
|
||||
}
|
||||
{}
|
||||
|
@ -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"
|
||||
}
|
||||
|
||||
{}
|
||||
|
@ -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"
|
||||
}
|
||||
{}
|
||||
|
@ -21,31 +21,5 @@
|
||||
"C307106" : "date test fail migrate to playwright https://alfresco.atlassian.net/browse/ACS-6185 ",
|
||||
"C269003" : "date test fail migrate to playwright https://alfresco.atlassian.net/browse/ACS-6185 ",
|
||||
"C290018" : "https://alfresco.atlassian.net/browse/ACA-4731",
|
||||
"C277727" : "https://alfresco.atlassian.net/browse/ACS-6672",
|
||||
"C277728" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C277740" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C277738" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C277734" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C277736" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C277732" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C299189" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C299195" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"MNT-21058" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C286384" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C286379" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297551" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297552" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297553" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297554" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297556" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297555" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297557" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297558" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297559" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297560" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297561" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297562" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297563" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297564" : "https://alfresco.atlassian.net/browse/ACS-6688",
|
||||
"C297571" : "https://alfresco.atlassian.net/browse/ACS-6688"
|
||||
"C277727" : "https://alfresco.atlassian.net/browse/ACS-6672"
|
||||
}
|
||||
|
@ -32,11 +32,9 @@ import {
|
||||
Utils,
|
||||
Viewer,
|
||||
ContentNodeSelectorDialog,
|
||||
ShareDialog,
|
||||
UploadNewVersionDialog,
|
||||
UploadFilesDialog
|
||||
} from '@alfresco/aca-testing-shared';
|
||||
import { By, element } from 'protractor';
|
||||
|
||||
describe('Viewer actions', () => {
|
||||
const username = `user-${Utils.random()}`;
|
||||
@ -56,14 +54,12 @@ describe('Viewer actions', () => {
|
||||
const viewer = new Viewer();
|
||||
const { toolbar } = viewer;
|
||||
const copyMoveDialog = new ContentNodeSelectorDialog();
|
||||
const shareDialog = new ShareDialog();
|
||||
const uploadNewVersionDialog = new UploadNewVersionDialog();
|
||||
|
||||
const adminApiActions = new AdminActions();
|
||||
const userActions = new UserActions();
|
||||
|
||||
const uploadFilesDialog = new UploadFilesDialog();
|
||||
const shareButton = element(By.css(`adf-viewer [data-automation-id="share-action-button"]`));
|
||||
|
||||
beforeAll(async () => {
|
||||
await adminApiActions.createUser({ username });
|
||||
@ -252,168 +248,4 @@ describe('Viewer actions', () => {
|
||||
await apis.user.nodes.deleteNodeChildren(destinationId);
|
||||
});
|
||||
});
|
||||
|
||||
describe('from Shared Files', () => {
|
||||
const parent = `parentSF-${Utils.random()}`;
|
||||
let parentId: string;
|
||||
const destination = `destSF-${Utils.random()}`;
|
||||
let destinationId: string;
|
||||
|
||||
const docxSharedFiles = `docxSF-${Utils.random()}.docx`;
|
||||
let docxFileId: string;
|
||||
|
||||
const xlsxSharedFiles = `xlsxSF-${Utils.random()}.xlsx`;
|
||||
let xlsxFileId: string;
|
||||
const pdfSharedFiles = `pdfSF-${Utils.random()}.pdf`;
|
||||
let pdfFileId: string;
|
||||
let fileSharedId: string;
|
||||
|
||||
const fileForEditOffline = `file1-${Utils.random()}.docx`;
|
||||
let fileForEditOfflineId: string;
|
||||
const fileForCancelEditing = `file2-${Utils.random()}.docx`;
|
||||
let fileForCancelEditingId: string;
|
||||
const fileForUploadNewVersion = `file3-${Utils.random()}.docx`;
|
||||
let fileForUploadNewVersionId;
|
||||
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
parentId = (await apis.user.nodes.createFolder(parent)).entry.id;
|
||||
destinationId = (await apis.user.nodes.createFolder(destination)).entry.id;
|
||||
docxFileId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, docxSharedFiles)).entry.id;
|
||||
|
||||
xlsxFileId = (await apis.user.upload.uploadFileWithRename(xlsxFileForMove, parentId, xlsxSharedFiles)).entry.id;
|
||||
pdfFileId = (await apis.user.upload.uploadFileWithRename(pdfFileForDelete, parentId, pdfSharedFiles)).entry.id;
|
||||
fileSharedId = (await apis.user.upload.uploadFile(docxFile2, parentId)).entry.id;
|
||||
|
||||
fileForEditOfflineId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, fileForEditOffline)).entry.id;
|
||||
fileForCancelEditingId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, fileForCancelEditing)).entry.id;
|
||||
fileForUploadNewVersionId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, fileForUploadNewVersion)).entry.id;
|
||||
|
||||
await userActions.lockNodes([fileForCancelEditingId, fileForUploadNewVersionId]);
|
||||
|
||||
await apis.user.shared.shareFilesByIds([
|
||||
docxFileId,
|
||||
xlsxFileId,
|
||||
pdfFileId,
|
||||
fileForCancelEditingId,
|
||||
fileForEditOfflineId,
|
||||
fileForUploadNewVersionId,
|
||||
fileSharedId
|
||||
]);
|
||||
await apis.user.shared.waitForFilesToBeShared([
|
||||
docxFileId,
|
||||
xlsxFileId,
|
||||
pdfFileId,
|
||||
fileForCancelEditingId,
|
||||
fileForEditOfflineId,
|
||||
fileForUploadNewVersionId,
|
||||
fileSharedId
|
||||
]);
|
||||
|
||||
await loginPage.loginWith(username);
|
||||
} catch {}
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await page.clickSharedFilesAndWait();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
try {
|
||||
await page.closeOpenDialogs();
|
||||
await Utils.pressEscape();
|
||||
await uploadFilesDialog.closeUploadDialog();
|
||||
} catch {}
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await userActions.login(username, username);
|
||||
await apis.user.nodes.deleteNodesById([parentId, destinationId]);
|
||||
await userActions.emptyTrashcan();
|
||||
} catch {}
|
||||
});
|
||||
|
||||
it('[C286379] Favorite action', async () => {
|
||||
await dataTable.doubleClickOnRowByName(docxSharedFiles);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
|
||||
await toolbar.clickMoreActionsFavorite();
|
||||
await viewer.closeButton.click();
|
||||
await page.clickFavoritesAndWait();
|
||||
expect(await apis.user.favorites.isFavorite(docxFileId)).toBe(true, 'Item is not favorite');
|
||||
expect(await dataTable.isItemPresent(docxSharedFiles)).toBe(true, 'Item is not present in Favorites list');
|
||||
});
|
||||
});
|
||||
|
||||
describe('from Favorites', () => {
|
||||
const parent = `parentFav-${Utils.random()}`;
|
||||
let parentId: string;
|
||||
const destination = `destFav-${Utils.random()}`;
|
||||
let destinationId: string;
|
||||
|
||||
const docxFavorites = `docxFav-${Utils.random()}.docx`;
|
||||
const xlsxFavorites = `xlsxFav-${Utils.random()}.xlsx`;
|
||||
const pdfFavorites = `pdfFav-${Utils.random()}.pdf`;
|
||||
const fileForEditOffline = `file1-${Utils.random()}.docx`;
|
||||
const fileForCancelEditing = `file2-${Utils.random()}.docx`;
|
||||
const fileForUploadNewVersion = `file3-${Utils.random()}.docx`;
|
||||
|
||||
beforeAll(async () => {
|
||||
try {
|
||||
parentId = (await apis.user.nodes.createFolder(parent)).entry.id;
|
||||
destinationId = (await apis.user.nodes.createFolder(destination)).entry.id;
|
||||
const docxFileId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, docxFavorites)).entry.id;
|
||||
|
||||
const xlsxFileId = (await apis.user.upload.uploadFileWithRename(xlsxFileForMove, parentId, xlsxFavorites)).entry.id;
|
||||
const pdfFileId = (await apis.user.upload.uploadFileWithRename(pdfFileForDelete, parentId, pdfFavorites)).entry.id;
|
||||
const fileFavId = (await apis.user.upload.uploadFile(docxFile2, parentId)).entry.id;
|
||||
|
||||
const fileForEditOfflineId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, fileForEditOffline)).entry.id;
|
||||
const fileForCancelEditingId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, fileForCancelEditing)).entry.id;
|
||||
const fileForUploadNewVersionId = (await apis.user.upload.uploadFileWithRename(docxFile, parentId, fileForUploadNewVersion)).entry.id;
|
||||
|
||||
await userActions.lockNodes([fileForCancelEditingId, fileForUploadNewVersionId]);
|
||||
|
||||
await apis.user.favorites.addFavoritesByIds('file', [
|
||||
docxFileId,
|
||||
xlsxFileId,
|
||||
pdfFileId,
|
||||
fileForEditOfflineId,
|
||||
fileForCancelEditingId,
|
||||
fileForUploadNewVersionId,
|
||||
fileFavId
|
||||
]);
|
||||
await apis.user.favorites.waitForApi({ expect: 7 });
|
||||
|
||||
await loginPage.loginWith(username);
|
||||
} catch {}
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
await page.clickFavoritesAndWait();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
await Utils.pressEscape();
|
||||
await uploadFilesDialog.closeUploadDialog();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
try {
|
||||
await userActions.login(username, username);
|
||||
await apis.user.nodes.deleteNodesById([parentId, destinationId]);
|
||||
await userActions.emptyTrashcan();
|
||||
} catch {}
|
||||
});
|
||||
|
||||
it('[C286395] Share action', async () => {
|
||||
await dataTable.doubleClickOnRowByName(docxFavorites);
|
||||
expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened');
|
||||
|
||||
await shareButton.click();
|
||||
expect(await shareDialog.isDialogOpen()).toBe(true, 'Dialog is not open');
|
||||
await shareDialog.clickClose();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user