mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +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:
@@ -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