mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Remove useless protractor tests (#8998)
* [ci:force] remove useless viewer tests * [ci:force] fix types * [ci:force] remove demo-shell specific tests * fix typo
This commit is contained in:
@@ -25,10 +25,12 @@ import { createApiService,
|
||||
SettingsPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
|
||||
describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList, implicitFlow true', () => {
|
||||
|
||||
@@ -54,7 +56,10 @@ describe('SSO in ADF using ACS and AIS, Download Directive, Viewer, DocumentList
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
});
|
||||
|
||||
let pdfUploadedFile; let pngUploadedFile; let folder; let acsUser;
|
||||
let pdfUploadedFile: NodeEntry;
|
||||
let pngUploadedFile: NodeEntry;
|
||||
let folder: NodeEntry;
|
||||
let acsUser: UserModel;
|
||||
const folderName = StringUtil.generateRandomString(5);
|
||||
|
||||
beforeAll(async () => {
|
||||
|
@@ -60,7 +60,8 @@ describe('Document List Component', () => {
|
||||
});
|
||||
|
||||
describe('Custom Column', () => {
|
||||
let folderName;
|
||||
let folderName: string;
|
||||
|
||||
const pdfFileModel = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_path
|
||||
|
@@ -86,36 +86,6 @@ describe('Enable infinite scrolling', () => {
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
});
|
||||
|
||||
it('[C260484] Should be possible to enable infinite scrolling', async () => {
|
||||
await contentServicesPage.openFolder(folderModel.name);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
|
||||
for (let i = 0; i < nrOfFiles; i++) {
|
||||
await contentServicesPage.checkContentIsDisplayed(fileNames[i]);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C268165] Delete folder when infinite scrolling is enabled', async () => {
|
||||
await contentServicesPage.openFolder(deleteUploaded.entry.name);
|
||||
await contentServicesPage.enableInfiniteScrolling();
|
||||
await infinitePaginationPage.clickLoadMoreButton();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoadedInfinitePagination();
|
||||
|
||||
for (let i = 0; i < nrOfDeletedFiles; i++) {
|
||||
await contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
}
|
||||
await expect(await contentServicesPage.getDocumentList().dataTablePage().numberOfRows()).toEqual(nrOfDeletedFiles);
|
||||
|
||||
await contentServicesPage.deleteContent(deleteFileNames[nrOfDeletedFiles - 1]);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(deleteFileNames[nrOfDeletedFiles - 1]);
|
||||
|
||||
for (let i = 0; i < nrOfDeletedFiles - 1; i++) {
|
||||
await contentServicesPage.checkContentIsDisplayed(deleteFileNames[i]);
|
||||
}
|
||||
});
|
||||
|
||||
it('[C299201] Should use default pagination settings for infinite pagination', async () => {
|
||||
await contentServicesPage.openFolder(folderModel.name);
|
||||
|
||||
|
@@ -74,11 +74,11 @@ export class ContentServicesPage {
|
||||
siteListDropdown = new DropdownPage($(`mat-select[data-automation-id='site-my-files-option']`));
|
||||
sortingDropdown = new DropdownPage($('mat-select[data-automation-id="grid-view-sorting"]'));
|
||||
|
||||
async pressContextMenuActionNamed(actionName): Promise<void> {
|
||||
async pressContextMenuActionNamed(actionName: string): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript(`button[data-automation-id="context-${actionName}"]`);
|
||||
}
|
||||
|
||||
async isContextActionEnabled(actionName): Promise<boolean> {
|
||||
async isContextActionEnabled(actionName: string): Promise<boolean> {
|
||||
const actionButton = $(`button[data-automation-id="context-${actionName}"`);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(actionButton);
|
||||
return actionButton.isEnabled();
|
||||
@@ -239,7 +239,7 @@ export class ContentServicesPage {
|
||||
await this.contentList.doubleClickRow(nodeName);
|
||||
}
|
||||
|
||||
async selectRow(nodeName): Promise<void> {
|
||||
async selectRow(nodeName: string): Promise<void> {
|
||||
await this.contentList.selectRow(nodeName);
|
||||
}
|
||||
|
||||
|
@@ -1,104 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import { NavigationBarPage } from '../../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
let site;
|
||||
const acsUser = new UserModel();
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
||||
const archiveFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.ARCHIVE_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.ARCHIVE_FOLDER.folder_path
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
describe('Archive Folder Uploaded', () => {
|
||||
let uploadedArchives;
|
||||
let archiveFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
archiveFolderUploaded = await uploadActions.createFolder(archiveFolderInfo.name, '-my-');
|
||||
uploadedArchives = await uploadActions.uploadFolder(archiveFolderInfo.location, archiveFolderUploaded.entry.id);
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await uploadActions.deleteFileOrFolder(archiveFolderUploaded.entry.id);
|
||||
});
|
||||
|
||||
it('[C260517] Should be possible to open any Archive file', async () => {
|
||||
await contentServicesPage.doubleClickRow('archive');
|
||||
for (const file of uploadedArchives) {
|
||||
if (file.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(file.entry.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,134 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService, LocalStorageUtil,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FileModel } from '../../../models/ACS/file.model';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import { NavigationBarPage } from '../../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService({ provider: 'ECM', authType: 'BASIC' });
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let site;
|
||||
const acsUser = new UserModel();
|
||||
let pngFileUploaded;
|
||||
|
||||
const pngFileInfo = new FileModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_path
|
||||
});
|
||||
|
||||
const otherFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.OTHER_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.OTHER_FOLDER.folder_path
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await LocalStorageUtil.setStorageItem('providers', 'ECM');
|
||||
await LocalStorageUtil.setStorageItem('authType', 'BASIC');
|
||||
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
|
||||
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
it('[C272813] Should be redirected to site when opening and closing a file in a site', async () => {
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
|
||||
await navigationBarPage.goToSite(site);
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await viewerPage.viewFile(pngFileUploaded.entry.name);
|
||||
|
||||
await viewerPage.checkImgViewerIsDisplayed();
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
describe('Other Folder Uploaded', () => {
|
||||
let uploadedOthers;
|
||||
let otherFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
otherFolderUploaded = await uploadActions.createFolder(otherFolderInfo.name, '-my-');
|
||||
|
||||
uploadedOthers = await uploadActions.uploadFolder(otherFolderInfo.location, otherFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await uploadActions.deleteFileOrFolder(otherFolderUploaded.entry.id);
|
||||
});
|
||||
|
||||
it('[C280012] Should be possible to open any other Document supported extension', async () => {
|
||||
await contentServicesPage.doubleClickRow('other');
|
||||
for (const file of uploadedOthers) {
|
||||
if (file.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(file.entry.name);
|
||||
await viewerPage.checkFileIsLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,100 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
let site;
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const excelFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.EXCEL_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.EXCEL_FOLDER.folder_path
|
||||
});
|
||||
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
describe('Excel Folder Uploaded', () => {
|
||||
let uploadedExcels;
|
||||
let excelFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
excelFolderUploaded = await uploadActions.createFolder(excelFolderInfo.name, '-my-');
|
||||
|
||||
uploadedExcels = await uploadActions.uploadFolder(excelFolderInfo.location, excelFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C280008] Should be possible to open any Excel file', async () => {
|
||||
await contentServicesPage.doubleClickRow('excel');
|
||||
|
||||
for (const currentFile of uploadedExcels) {
|
||||
if (currentFile.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,117 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
const usersActions = new UsersActions(apiService);
|
||||
|
||||
let site;
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const imgFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.IMG_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.IMG_FOLDER.folder_path
|
||||
});
|
||||
|
||||
const imgRenditionFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.IMG_RENDITION_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.IMG_RENDITION_FOLDER.folder_path
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
describe('Image Folder Uploaded', () => {
|
||||
let uploadedImages; let uploadedImgRenditionFolderInfo;
|
||||
let imgFolderUploaded; let imgFolderRenditionUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
imgFolderUploaded = await uploadActions.createFolder(imgFolderInfo.name, '-my-');
|
||||
|
||||
uploadedImages = await uploadActions.uploadFolder(imgFolderInfo.location, imgFolderUploaded.entry.id);
|
||||
|
||||
imgFolderRenditionUploaded = await uploadActions.createFolder(imgRenditionFolderInfo.name, imgFolderUploaded.entry.id);
|
||||
|
||||
uploadedImgRenditionFolderInfo = await uploadActions.uploadFolder(imgRenditionFolderInfo.location, imgFolderRenditionUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C279966] Should be possible to open any Image supported extension', async () => {
|
||||
await contentServicesPage.doubleClickRow('images');
|
||||
for (const image of uploadedImages) {
|
||||
if (image.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(image.entry.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
await contentServicesPage.doubleClickRow('images-rendition');
|
||||
for (const item of uploadedImgRenditionFolderInfo) {
|
||||
if (item.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(item.entry.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,102 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import { browser } from 'protractor';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const pptFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.PPT_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.PPT_FOLDER.folder_path
|
||||
});
|
||||
|
||||
let site;
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
describe('PowerPoint Folder Uploaded', () => {
|
||||
let uploadedPpt;
|
||||
let pptFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
pptFolderUploaded = await uploadActions.createFolder(pptFolderInfo.name, '-my-');
|
||||
|
||||
uploadedPpt = await uploadActions.uploadFolder(pptFolderInfo.location, pptFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C280009] Should be possible to open any PowerPoint file', async () => {
|
||||
await contentServicesPage.doubleClickRow('ppt');
|
||||
|
||||
for (const currentFile of uploadedPpt) {
|
||||
if (currentFile.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,99 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let site;
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const textFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.TEXT_FOLDER.folder_path
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
});
|
||||
|
||||
describe('Text Folder Uploaded', () => {
|
||||
let uploadedTexts;
|
||||
let textFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
textFolderUploaded = await uploadActions.createFolder(textFolderInfo.name, '-my-');
|
||||
|
||||
uploadedTexts = await uploadActions.uploadFolder(textFolderInfo.location, textFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C280010] Should be possible to open any Text file', async () => {
|
||||
await contentServicesPage.doubleClickRow('text');
|
||||
for (const currentFile of uploadedTexts) {
|
||||
if (currentFile.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
@@ -1,103 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { browser } from 'protractor';
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../../core/pages/content-services.page';
|
||||
import { FolderModel } from '../../../models/ACS/folder.model';
|
||||
import { NavigationBarPage } from '../../../core/pages/navigation-bar.page';
|
||||
import CONSTANTS = require('../../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
describe('Viewer', () => {
|
||||
|
||||
const viewerPage = new ViewerPage();
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const apiService = createApiService();
|
||||
const usersActions = new UsersActions(apiService);
|
||||
const uploadActions = new UploadActions(apiService);
|
||||
let site;
|
||||
const acsUser = new UserModel();
|
||||
|
||||
const wordFolderInfo = new FolderModel({
|
||||
name: browser.params.resources.Files.ADF_DOCUMENTS.WORD_FOLDER.folder_name,
|
||||
location: browser.params.resources.Files.ADF_DOCUMENTS.WORD_FOLDER.folder_path
|
||||
});
|
||||
|
||||
beforeAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
await usersActions.createUser(acsUser);
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
|
||||
site = await sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(8),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await sitesApi.createSiteMembership(site.entry.id, {
|
||||
id: acsUser.username,
|
||||
role: CONSTANTS.CS_USER_ROLES.MANAGER
|
||||
});
|
||||
|
||||
await apiService.login(acsUser.username, acsUser.password);
|
||||
});
|
||||
|
||||
afterAll(async () => {
|
||||
await apiService.loginWithProfile('admin');
|
||||
|
||||
const sitesApi = new SitesApi(apiService.getInstance());
|
||||
await sitesApi.deleteSite(site.entry.id, { permanent: true });
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
});
|
||||
|
||||
describe('Word Folder Uploaded', () => {
|
||||
let uploadedWords;
|
||||
let wordFolderUploaded;
|
||||
|
||||
beforeAll(async () => {
|
||||
wordFolderUploaded = await uploadActions.createFolder(wordFolderInfo.name, '-my-');
|
||||
|
||||
uploadedWords = await uploadActions.uploadFolder(wordFolderInfo.location, wordFolderUploaded.entry.id);
|
||||
|
||||
await loginPage.login(acsUser.username, acsUser.password);
|
||||
await contentServicesPage.goToDocumentList();
|
||||
});
|
||||
|
||||
it('[C280011] Should be possible to open any Word file', async () => {
|
||||
await contentServicesPage.doubleClickRow('word');
|
||||
for (const currentFile of uploadedWords) {
|
||||
if (currentFile.entry.name !== '.DS_Store') {
|
||||
await contentServicesPage.doubleClickRow(currentFile.entry.name);
|
||||
await viewerPage.waitTillContentLoaded();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user