* fix protractor conf

* remove update env

* fix cli error script cs

* change screenshot plugin

* remove unused param

* fix

* fix

* fix

* moment comment nvm

* fix

* fix

* fix

* fix

* remove adf redirect

* fix

* fix

* save remote report

* report fix

* improve save result

* fix folder save

* fix folder save

* fix placeholder pointer , they needs refactor later

* fix

* fix lint

* fix

* remove test already covered by unit
fix the test in core needed
exclude the one impossible to make it works without APS basic support

* lint

* fix some logout missing

* fix

* Fix the custom-tasks-filters.e2e

* fix lint

* fix

* fix

* fix

* Fix wait on start process  and on process definition options

* Fix logout before login again

* fix uplaod test

* fix

* Fix infodrawer with check detail and sleep

* lint

* increase list of excluded test

* fix

* fix lint

* change wait method datatable

* fix

* fix

* revert check value

* fix

* fix

* change tag test

Co-authored-by: maurizio vitale <maurizio.vitale@alfresco.com>
This commit is contained in:
Eugenio Romano
2020-09-04 13:27:55 +01:00
committed by GitHub
parent f17270621b
commit a630cfb390
132 changed files with 1109 additions and 1850 deletions

View File

@@ -17,7 +17,7 @@
import { browser } from 'protractor';
import {
ApiService,
ApiService, LocalStorageUtil,
LoginPage,
StringUtil,
UploadActions,
@@ -38,7 +38,7 @@ describe('Viewer', () => {
const contentServicesPage = new ContentServicesPage();
const navigationBarPage = new NavigationBarPage();
const apiService = new ApiService();
const apiService = new ApiService({ authType: 'ECM', provider: 'ECM' });
const uploadActions = new UploadActions(apiService);
const usersActions = new UsersActions(apiService);
@@ -57,6 +57,9 @@ describe('Viewer', () => {
});
beforeAll(async () => {
await LocalStorageUtil.setStorageItem('providers', 'ECM');
await LocalStorageUtil.setStorageItem('authType', 'BASIC');
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
await usersActions.createUser(acsUser);

View File

@@ -1,103 +0,0 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* 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 {
ApiService,
LoginPage,
StringUtil,
UploadActions,
UserModel,
UsersActions,
ViewerPage
} from '@alfresco/adf-testing';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { ContentServicesPage } from '../../core/pages/content-services.page';
import { FileModel } from '../../models/ACS/file.model';
import CONSTANTS = require('../../util/constants');
describe('Info Drawer', () => {
const viewerPage = new ViewerPage();
const navigationBarPage = new NavigationBarPage();
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
const apiService = new ApiService();
const usersActions = new UsersActions(apiService);
const uploadActions = new UploadActions(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
});
beforeAll(async () => {
await apiService.getInstance().login(browser.params.testConfig.admin.email, browser.params.testConfig.admin.password);
await usersActions.createUser(acsUser);
site = await apiService.getInstance().core.sitesApi.createSite({
title: StringUtil.generateRandomString(8),
visibility: 'PUBLIC'
});
await apiService.getInstance().core.sitesApi.addSiteMember(site.entry.id, {
id: acsUser.email,
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
await apiService.getInstance().login(acsUser.email, acsUser.password);
pngFileUploaded = await uploadActions.uploadFile(pngFileInfo.location, pngFileInfo.name, site.entry.guid);
});
afterAll(async () => {
await apiService.getInstance().login(acsUser.email, acsUser.password);
await uploadActions.deleteFileOrFolder(pngFileUploaded.entry.id);
await apiService.getInstance().core.sitesApi.deleteSite(site.entry.id, { permanent: true });
});
beforeEach(async() => {
await loginPage.login(acsUser.email, acsUser.password);
await navigationBarPage.goToSite(site);
await contentServicesPage.checkAcsContainer();
});
it('[C277251] Should display the icon when the icon property is defined', async () => {
await viewerPage.viewFile(pngFileUploaded.entry.name);
await viewerPage.clickLeftSidebarButton();
await viewerPage.enableShowTabWithIcon();
await viewerPage.enableShowTabWithIconAndLabel();
await viewerPage.checkTabHasNoIcon(0);
await expect(await viewerPage.getTabIconById(1)).toBe('face');
await expect(await viewerPage.getTabIconById(2)).toBe('comment');
});
it('[C277252] Should display the label when the label property is defined', async () => {
await viewerPage.viewFile(pngFileUploaded.entry.name);
await viewerPage.clickLeftSidebarButton();
await viewerPage.enableShowTabWithIcon();
await viewerPage.enableShowTabWithIconAndLabel();
await expect(await viewerPage.getTabLabelById(0)).toBe('SETTINGS');
await viewerPage.checkTabHasNoLabel(1);
await expect(await viewerPage.getTabLabelById(2)).toBe('COMMENTS');
});
});