[ACS-5761] Demo Shell Cleanup (part 2) (#8807)

cleanup demo shell
This commit is contained in:
Denys Vuika
2023-08-10 22:18:21 +01:00
committed by GitHub
parent ca60b392d4
commit f201efd56a
203 changed files with 1005 additions and 10703 deletions

View File

@@ -22,7 +22,6 @@ import {
createApiService,
BrowserActions, Logger,
LoginPage,
NotificationHistoryPage,
PermissionActions,
SearchService,
StringUtil,
@@ -37,7 +36,7 @@ import { FolderModel } from '../../models/ACS/folder.model';
import { MetadataViewPage } from '../../core/pages/metadata-view.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { UploadDialogPage } from '../../core/pages/dialog/upload-dialog.page';
import { GroupsApi } from '@alfresco/js-api';
import { GroupsApi, NodeEntry } from '@alfresco/js-api';
describe('Permissions Component', () => {
@@ -56,7 +55,6 @@ describe('Permissions Component', () => {
const contentList = contentServicesPage.getDocumentList();
const viewerPage = new ViewerPage();
const metadataViewPage = new MetadataViewPage();
const notificationHistoryPage = new NotificationHistoryPage();
const uploadDialog = new UploadDialogPage();
let file;
const fileModel = new FileModel({
@@ -89,11 +87,11 @@ describe('Permissions Component', () => {
const roleContributorFolderModel = new FolderModel({ name: 'roleContributor' + StringUtil.generateRandomString() });
const roleEditorFolderModel = new FolderModel({ name: 'roleEditor' + StringUtil.generateRandomString() });
let roleConsumerFolder;
let roleCoordinatorFolder;
let roleContributorFolder;
let roleCollaboratorFolder;
let roleEditorFolder;
let roleConsumerFolder: NodeEntry;
let roleCoordinatorFolder: NodeEntry;
let roleContributorFolder: NodeEntry;
let roleCollaboratorFolder: NodeEntry;
let roleEditorFolder: NodeEntry;
beforeAll(async () => {
try {
@@ -305,11 +303,9 @@ describe('Permissions Component', () => {
await contentList.checkActionMenuIsNotDisplayed();
await contentServicesPage.metadataContent('RoleConsumer' + fileModel.name);
await expect(await snackbarPage.getSnackBarMessage()).toEqual('You don\'t have access to do this.');
await notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
await browser.sleep(3000);
await contentServicesPage.uploadFile(fileLocation);
await expect(await snackbarPage.getSnackBarMessage()).toEqual('You don\'t have the create permission to upload the content');
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
});
it('[C276996] Role Contributor', async () => {
@@ -324,7 +320,6 @@ describe('Permissions Component', () => {
await BrowserActions.closeMenuAndDialogs();
await contentList.checkActionMenuIsNotDisplayed();
await contentServicesPage.metadataContent('RoleContributor' + fileModel.name);
await notificationHistoryPage.checkNotifyContains('You don\'t have access to do this.');
await contentServicesPage.uploadFile(testFileModel.location);
await contentServicesPage.checkContentIsDisplayed(testFileModel.name);
await uploadDialog.fileIsUploaded(testFileModel.name);
@@ -351,7 +346,6 @@ describe('Permissions Component', () => {
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('newTitle1');
await metadataViewPage.clickCloseButton();
await contentServicesPage.uploadFile(fileLocation);
await notificationHistoryPage.checkNotifyContains('You don\'t have the create permission to upload the content');
});
it('[C277003] Role Collaborator', async () => {