[ADF-5366] initialize discovery and version compatibility service for oauth based session (#6864)

* [ADF-5366] initialize discovery and version compatibility service for oauth based session

* better error message

* * fix spaces

* * revert the search service

* * fix build

* * check properties after type update

* * check properties after type update

* * check properties after type update

* * fix infinite loop

* * fix test without title

* * wait for options

* * wait for session

* Update metadata-content-type.e2e.ts

* Update metadata-content-type.e2e.ts

* Update protractor.excludes.json

* Update protractor.excludes.json
This commit is contained in:
Dharan
2021-04-29 18:10:49 +05:30
committed by GitHub
parent c0b5935b43
commit 8b5e45f4eb
28 changed files with 532 additions and 345 deletions

View File

@@ -90,34 +90,41 @@ describe('Permissions Component', () => {
let roleConsumerFolder, roleCoordinatorFolder, roleContributorFolder, roleCollaboratorFolder, roleEditorFolder;
beforeAll(async () => {
await apiService.loginWithProfile('admin');
await usersActions.createUser(fileOwnerUser);
await usersActions.createUser(filePermissionUser);
await apiService.getInstance().core.groupsApi.createGroup(groupBody);
try {
await apiService.loginWithProfile('admin');
await usersActions.createUser(fileOwnerUser);
await usersActions.createUser(filePermissionUser);
await apiService.getInstance().core.groupsApi.createGroup(groupBody);
// to sync user in acs
await searchService.isUserSearchable(filePermissionUser);
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
roleConsumerFolder = await uploadActions.createFolder(roleConsumerFolderModel.name, '-my-');
roleCoordinatorFolder = await uploadActions.createFolder(roleCoordinatorFolderModel.name, '-my-');
roleContributorFolder = await uploadActions.createFolder(roleContributorFolderModel.name, '-my-');
roleCollaboratorFolder = await uploadActions.createFolder(roleCollaboratorFolderModel.name, '-my-');
roleEditorFolder = await uploadActions.createFolder(roleEditorFolderModel.name, '-my-');
await apiService.login(fileOwnerUser.username, fileOwnerUser.password);
roleConsumerFolder = await uploadActions.createFolder(roleConsumerFolderModel.name, '-my-');
roleCoordinatorFolder = await uploadActions.createFolder(roleCoordinatorFolderModel.name, '-my-');
roleContributorFolder = await uploadActions.createFolder(roleContributorFolderModel.name, '-my-');
roleCollaboratorFolder = await uploadActions.createFolder(roleCollaboratorFolderModel.name, '-my-');
roleEditorFolder = await uploadActions.createFolder(roleEditorFolderModel.name, '-my-');
await uploadActions.uploadFile(fileModel.location, 'RoleConsumer' + fileModel.name, roleConsumerFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleContributor' + fileModel.name, roleContributorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleCoordinator' + fileModel.name, roleCoordinatorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleConsumer' + fileModel.name, roleConsumerFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleContributor' + fileModel.name, roleContributorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleCoordinator' + fileModel.name, roleCoordinatorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleCollaborator' + fileModel.name, roleCollaboratorFolder.entry.id);
await uploadActions.uploadFile(fileModel.location, 'RoleEditor' + fileModel.name, roleEditorFolder.entry.id);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Consumer', roleConsumerFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Collaborator', roleCollaboratorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Coordinator', roleCoordinatorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Contributor', roleContributorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Editor', roleEditorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Consumer', roleConsumerFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Collaborator', roleCollaboratorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Coordinator', roleCoordinatorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Contributor', roleContributorFolder);
await permissionActions.addRoleForUser(filePermissionUser.username, 'Editor', roleEditorFolder);
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
// to sync user in acs
try {
await searchService.isUserSearchable(filePermissionUser);
} catch (e) {
console.error(`*****\n Failed to sync user \n*****`);
}
await browser.sleep(browser.params.testConfig.timeouts.index_search); // wait search index previous file/folder uploaded
} catch (e) {
fail('Failed to set up permission : \n' + JSON.stringify(e, null, 2));
}
});
describe('Inherit and assigning permissions', () => {
@@ -209,6 +216,7 @@ describe('Permissions Component', () => {
await permissionsPage.addPermissionsDialog.checkAddPermissionDialogIsDisplayed();
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
await permissionsPage.addPermissionsDialog.searchUserOrGroup(filePermissionUser.firstName);
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
await permissionsPage.addPermissionsDialog.clickUserOrGroup(filePermissionUser.firstName);
await permissionsPage.addPermissionsDialog.selectRole(filePermissionUser.fullName, 'Contributor');
await expect(await permissionsPage.addPermissionsDialog.addButtonIsEnabled()).toBe(true, 'button should be enabled');

View File

@@ -20,7 +20,7 @@ import {
ApiService,
BrowserActions,
LoginPage,
NotificationHistoryPage,
NotificationHistoryPage, SearchService,
StringUtil,
UploadActions,
UserModel,
@@ -42,6 +42,7 @@ describe('Permissions Component', () => {
const apiService = new ApiService();
const uploadActions = new UploadActions(apiService);
const searchService = new SearchService(apiService);
const loginPage = new LoginPage();
const contentServicesPage = new ContentServicesPage();
@@ -89,71 +90,81 @@ describe('Permissions Component', () => {
const usersActions = new UsersActions(apiService);
beforeAll(async () => {
await apiService.loginWithProfile('admin');
await usersActions.createUser(folderOwnerUser);
await usersActions.createUser(siteConsumerUser);
await usersActions.createUser(consumerUser);
await usersActions.createUser(contributorUser);
await usersActions.createUser(collaboratorUser);
await usersActions.createUser(managerUser);
await apiService.login(folderOwnerUser.username, folderOwnerUser.password);
try {
await apiService.loginWithProfile('admin');
await usersActions.createUser(folderOwnerUser);
await usersActions.createUser(siteConsumerUser);
await usersActions.createUser(consumerUser);
await usersActions.createUser(contributorUser);
await usersActions.createUser(collaboratorUser);
await usersActions.createUser(managerUser);
await apiService.login(folderOwnerUser.username, folderOwnerUser.password);
await browser.sleep(browser.params.testConfig.timeouts.index_search);
const publicSiteName = `PUBLIC_TEST_SITE_${StringUtil.generateRandomString(5)}`;
const publicSiteName = `PUBLIC_TEST_SITE_${StringUtil.generateRandomString(5)}`;
const privateSiteName = `PRIVATE_TEST_SITE_${StringUtil.generateRandomString(5)}`;
const privateSiteName = `PRIVATE_TEST_SITE_${StringUtil.generateRandomString(5)}`;
folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}`;
folderName = `MEESEEKS_${StringUtil.generateRandomString(5)}`;
const publicSiteBody = { visibility: 'PUBLIC', title: publicSiteName };
const privateSiteBody = { visibility: 'PRIVATE', title: privateSiteName };
const publicSiteBody = { visibility: 'PUBLIC', title: publicSiteName };
const privateSiteBody = { visibility: 'PRIVATE', title: privateSiteName };
const sitesApi = new SitesApi(apiService.getInstance());
const sitesApi = new SitesApi(apiService.getInstance());
publicSite = await sitesApi.createSite(publicSiteBody);
privateSite = await sitesApi.createSite(privateSiteBody);
publicSite = await sitesApi.createSite(publicSiteBody);
privateSite = await sitesApi.createSite(privateSiteBody);
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: siteConsumerUser.username,
role: CONSTANTS.CS_USER_ROLES.CONSUMER
});
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: collaboratorUser.username,
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
});
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: contributorUser.username,
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
});
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: managerUser.username,
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
await sitesApi.createSiteMembership(privateSite.entry.id, {
id: managerUser.username,
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
siteFolder = await uploadActions.createFolder(folderName, publicSite.entry.guid);
privateSiteFile = await uploadActions.uploadFile(fileModel.location, 'privateSite' + fileModel.name, privateSite.entry.guid);
await apiService.getInstance().core.nodesApi.updateNode(privateSiteFile.entry.id,
{
permissions: {
locallySet: [{
authorityId: managerUser.username,
name: 'SiteConsumer',
accessStatus: 'ALLOWED'
}]
}
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: siteConsumerUser.username,
role: CONSTANTS.CS_USER_ROLES.CONSUMER
});
await uploadActions.uploadFile(fileModel.location, 'Site' + fileModel.name, siteFolder.entry.id);
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: collaboratorUser.username,
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
});
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: contributorUser.username,
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
});
await sitesApi.createSiteMembership(publicSite.entry.id, {
id: managerUser.username,
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
await sitesApi.createSiteMembership(privateSite.entry.id, {
id: managerUser.username,
role: CONSTANTS.CS_USER_ROLES.MANAGER
});
siteFolder = await uploadActions.createFolder(folderName, publicSite.entry.guid);
privateSiteFile = await uploadActions.uploadFile(fileModel.location, 'privateSite' + fileModel.name, privateSite.entry.guid);
await apiService.getInstance().core.nodesApi.updateNode(privateSiteFile.entry.id,
{
permissions: {
locallySet: [{
authorityId: managerUser.username,
name: 'SiteConsumer',
accessStatus: 'ALLOWED'
}]
}
});
await uploadActions.uploadFile(fileModel.location, 'Site' + fileModel.name, siteFolder.entry.id);
// to sync user in acs
try {
await searchService.isUserSearchable(consumerUser);
} catch (e) {
console.error(`*****\n Failed to sync user \n*****`);
}
await browser.sleep(browser.params.testConfig.timeouts.index_search);
} catch (error) {
fail('Failed to setup site permission : ' + JSON.stringify(error, null, 2));
}
});
afterAll(async () => {
@@ -192,6 +203,7 @@ describe('Permissions Component', () => {
await permissionsPage.addPermissionsDialog.checkSearchUserInputIsDisplayed();
await permissionsPage.addPermissionsDialog.searchUserOrGroup(consumerUser.username);
await permissionsPage.addPermissionsDialog.checkResultListIsDisplayed();
await permissionsPage.addPermissionsDialog.clickUserOrGroup(consumerUser.firstName);
await permissionsPage.addPermissionsDialog.selectRole(consumerUser.fullName, 'Site Collaborator');

View File

@@ -20,6 +20,7 @@ import {
BrowserActions,
LoginPage,
ModelActions,
StringUtil,
UploadActions,
UserModel,
UsersActions,
@@ -30,26 +31,31 @@ import { FileModel } from '../../models/ACS/file.model';
import { browser } from 'protractor';
import { MetadataViewPage } from '../../core/pages/metadata-view.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { ContentServicesPage } from '../../core/pages/content-services.page';
describe('content type', () => {
const apiService = new ApiService();
const usersActions = new UsersActions(apiService);
const modelActions = new ModelActions(apiService);
const uploadActions = new UploadActions(apiService);
const viewerPage = new ViewerPage();
const metadataViewPage = new MetadataViewPage();
const navigationBarPage = new NavigationBarPage();
const contentServicesPage = new ContentServicesPage();
const loginPage = new LoginPage();
const randomString = StringUtil.generateRandomString();
const model: CustomModel = {
name: 'test',
namespaceUri: 'http://www.customModel.com/model/e2e/1.0',
namespacePrefix: 'e2e',
name: `test-${randomString}`,
namespaceUri: `http://www.customModel.com/model/${randomString}/1.0`,
namespacePrefix: `e2e-${randomString}`,
author: 'E2e Automation User',
description: 'Custom type e2e model',
status: 'DRAFT'
};
const type: CustomType = { name: 'test', parentName: 'cm:content', title: 'Test type' };
const type: CustomType = { name: `test-type-${randomString}`, parentName: 'cm:content', title: `Test type - ${randomString}` };
const property = { name: `test-property-${randomString}`, title: `Test property - ${randomString}`, dataType: 'd:text', defaultValue: randomString };
const pdfFile = new FileModel({ name: browser.params.resources.Files.ADF_DOCUMENTS.PDF.file_name });
const docxFileModel = new FileModel({
name: browser.params.resources.Files.ADF_DOCUMENTS.TEST.file_name,
@@ -60,81 +66,105 @@ describe('content type', () => {
beforeAll( async () => {
try {
await apiService.loginWithProfile('admin');
const typePaging = await modelActions.listTypes({where: `(namespaceUri matches('http://www.customModel.*'))`});
if (typePaging.list.pagination.count === 0) {
await modelActions.createModel(model);
await modelActions.createType(model.name, type);
await modelActions.activateCustomModel(model.name);
}
await modelActions.createModel(model);
await modelActions.createType(model.name, type);
await modelActions.addPropertyToType(model.name, type.name, [property]);
await modelActions.activateCustomModel(model.name);
await modelActions.isCustomTypeSearchable(type.title);
acsUser = await usersActions.createUser();
await apiService.login(acsUser.username, acsUser.password);
const uploadActions = new UploadActions(apiService);
const filePdfNode = await uploadActions.uploadFile(pdfFile.location, pdfFile.name, '-my-');
pdfFile.id = filePdfNode.entry.id;
const docsNode = await uploadActions.uploadFile(docxFileModel.location, docxFileModel.name, '-my-');
docxFileModel.id = docsNode.entry.id;
await loginPage.login(acsUser.username, acsUser.password);
} catch (e) {
console.error('Failed to setup custom types', JSON.stringify(e, null, 2));
fail();
fail('Failed to setup custom types :: ' + JSON.stringify(e, null, 2));
}
});
afterAll(async () => {
await apiService.login(acsUser.username, acsUser.password);
await uploadActions.deleteFileOrFolder(pdfFile.id);
await uploadActions.deleteFileOrFolder(docxFileModel.id);
try {
await apiService.loginWithProfile('admin');
await modelActions.deactivateCustomModel(model.name);
await modelActions.deleteCustomModel(model.name);
} catch (e) {
console.error('failed to delete the model', e);
}
});
beforeEach( async () => {
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await browser.sleep(8000); // wait for sso session to initiate
});
afterEach( async () => {
await navigationBarPage.clickLogoutButton();
});
it('[C593560] Should the user be able to select a new content type and save it only after the confirmation dialog', async () => {
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pdfFile.id}/view)`);
await viewerPage.checkFileIsLoaded(pdfFile.name);
await viewerPage.clickInfoButton();
await viewerPage.checkInfoSideBarIsDisplayed();
await metadataViewPage.clickOnPropertiesTab();
await metadataViewPage.editIconIsDisplayed();
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
await metadataViewPage.hasContentType('Content');
const defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
await expect(defaultType).toBe(true, 'Content type not found');
await metadataViewPage.editIconClick();
await metadataViewPage.changeContentType(type.title);
await expect(await metadataViewPage.changeContentType(type.title)).toBe(true, 'Failed to update node type.');
await metadataViewPage.clickSaveMetadata();
await metadataViewPage.checkConfirmDialogDisplayed();
await metadataViewPage.applyNodeProperties();
await expect(await metadataViewPage.checkPropertyDisplayed(`properties.${model.namespacePrefix}:${property.name}`))
.toContain(property.defaultValue, 'Custom property not found');
await navigationBarPage.clickLogoutButton();
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await viewerPage.viewFile(pdfFile.name);
await viewerPage.checkFileIsLoaded();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${pdfFile.id}/view)`);
await viewerPage.checkFileIsLoaded(pdfFile.name);
await viewerPage.clickInfoButton();
await viewerPage.checkInfoSideBarIsDisplayed();
await metadataViewPage.clickOnPropertiesTab();
await metadataViewPage.editIconIsDisplayed();
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
await metadataViewPage.hasContentType(type.title);
const customType = (await metadataViewPage.hasContentType(type.title)) || (await metadataViewPage.hasContentType(`${model.namespacePrefix}:${type.name}`));
await expect(customType).toBe(true, 'Custom type not found');
await expect(await metadataViewPage.getPropertyText(`properties.${model.namespacePrefix}:${property.name}`)).toContain(property.defaultValue);
await viewerPage.clickCloseButton();
});
it('[C593559] Should the user be able to select a new content type and not save it when press cancel in the confirmation dialog', async () => {
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${docxFileModel.id}/view)`);
await viewerPage.checkFileIsLoaded(docxFileModel.name);
await viewerPage.clickInfoButton();
await viewerPage.checkInfoSideBarIsDisplayed();
await metadataViewPage.clickOnPropertiesTab();
await metadataViewPage.editIconIsDisplayed();
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
await metadataViewPage.hasContentType('Content');
let defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
await expect(defaultType).toBe(true, 'Content type not found');
await metadataViewPage.editIconClick();
await metadataViewPage.changeContentType(type.title);
await expect(await metadataViewPage.changeContentType(type.title)).toBe(true, 'Failed to update node type.');
await metadataViewPage.clickSaveMetadata();
await metadataViewPage.checkConfirmDialogDisplayed();
@@ -143,18 +173,17 @@ describe('content type', () => {
await navigationBarPage.clickLogoutButton();
await loginPage.login(acsUser.username, acsUser.password);
await navigationBarPage.navigateToContentServices();
await viewerPage.viewFile(docxFileModel.name);
await viewerPage.checkFileIsLoaded();
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
await BrowserActions.getUrl(browser.baseUrl + `/(overlay:files/${docxFileModel.id}/view)`);
await viewerPage.checkFileIsLoaded(docxFileModel.name);
await viewerPage.clickInfoButton();
await viewerPage.checkInfoSideBarIsDisplayed();
await metadataViewPage.clickOnPropertiesTab();
await metadataViewPage.editIconIsDisplayed();
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
await metadataViewPage.hasContentType('Content');
defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
await expect(defaultType).toBe(true, 'Content type not found');
await viewerPage.clickCloseButton();
});
});

View File

@@ -15,8 +15,8 @@
* limitations under the License.
*/
import { Locator, by, element, Key, protractor } from 'protractor';
import { BrowserVisibility, BrowserActions, DropdownPage, TestElement } from '@alfresco/adf-testing';
import { by, element, Key, Locator, protractor } from 'protractor';
import { BrowserActions, BrowserVisibility, DropdownPage, TestElement, Logger } from '@alfresco/adf-testing';
export class MetadataViewPage {
@@ -216,18 +216,60 @@ export class MetadataViewPage {
await BrowserVisibility.waitUntilElementIsVisible(property);
}
async hasContentType(contentType: string): Promise<string> {
const nodeType = TestElement.byText('div[data-automation-id="header-nodeType"] .adf-property-value', contentType);
return nodeType.waitVisible();
async hasContentType(contentType: string, attempt = 0, maxAttempt = 3): Promise<boolean> {
const contentTypeSelector = '[data-automation-id="select-readonly-value-nodeType"]';
const type = TestElement.byText(contentTypeSelector, contentType);
try {
if (attempt > maxAttempt) {
return false;
}
await type.waitVisible();
const isPresent = type.isPresent();
if (isPresent) {
return true;
}
return this.hasContentType(contentType, attempt + 1, maxAttempt);
} catch (e) {
Logger.log(`re trying content type attempt :: ${attempt}`);
return this.hasContentType(contentType, attempt + 1, maxAttempt);
}
}
async changeContentType(option: string): Promise<void> {
const nodeType = TestElement.byCss('div[data-automation-id="header-nodeType"] mat-form-field');
await nodeType.waitPresent();
await nodeType.click();
const typesDropDownPage = new DropdownPage(nodeType.elementFinder);
await typesDropDownPage.checkOptionIsDisplayed(option);
await typesDropDownPage.selectOption(option);
async checkPropertyDisplayed(propertyName: string, type?: string, attempt = 0, maxAttempt = 3): Promise<string> {
try {
if (attempt > maxAttempt) {
return '';
}
const propertyType = type || 'textitem';
await TestElement.byCss('[data-automation-id="card-' + propertyType + '-value-' + propertyName + '"]').waitVisible();
return this.getPropertyText(propertyName);
} catch (e) {
Logger.log(`re trying custom property attempt :: ${attempt}`);
return this.checkPropertyDisplayed(propertyName, type, attempt + 1, maxAttempt);
}
}
async changeContentType(option: string, attempt = 0, maxAttempt = 3): Promise<boolean> {
const nodeType = TestElement.byCss('div[data-automation-id="header-nodeType"] .mat-select-trigger');
if (attempt > maxAttempt) {
console.error(`content type select option not found. check acs version may be lesser than 7.0.0`);
return false;
}
try {
await nodeType.waitVisible();
if (await nodeType.isPresent()) {
await nodeType.click();
const typesDropDownPage = new DropdownPage(nodeType.elementFinder);
await typesDropDownPage.checkOptionIsDisplayed(option);
await typesDropDownPage.selectOption(option);
return true;
}
return this.changeContentType(option, attempt + 1, maxAttempt);
} catch (error) {
Logger.log(`re trying content type options attempt :: ${attempt}`);
await BrowserActions.closeMenuAndDialogs();
return this.changeContentType(option, attempt + 1, maxAttempt);
}
}
async checkConfirmDialogDisplayed(): Promise<void> {
@@ -246,8 +288,7 @@ export class MetadataViewPage {
}
async checkPropertyIsNotVisible(propertyName: string, type: string): Promise<void> {
const property = element(by.css('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]'));
await BrowserVisibility.waitUntilElementIsNotVisible(property);
await TestElement.byCss('div[data-automation-id="card-' + type + '-label-' + propertyName + '"]').waitNotVisible();
}
async clickCloseButton(): Promise<void> {

View File

@@ -250,13 +250,30 @@ exports.config = {
})
);
function disableCSSAnimation() {
const css = '* {' +
'-webkit-transition-duration: 0s !important;' +
'transition-duration: 0s !important;' +
'-webkit-animation-duration: 0s !important;' +
'animation-duration: 0s !important;' +
'}';
const head = document.head || document.getElementsByTagName('head')[0];
const style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
head.appendChild(style);
}
// @ts-ignore
await browser.driver.executeScript(disableCSSAnimation);
// @ts-ignore
await browser.waitForAngularEnabled(false);
await browser.get(`${HOST}/#/settings`);
await browser.waitForAngularEnabled(true);
if (typeof LocalStorageUtil.clearStorage === "function") {
try {
await LocalStorageUtil.clearStorage();
// @ts-ignore
await LocalStorageUtil.setStorageItem('ecmHost', browser.params.testConfig.appConfig.ecmHost);
@@ -280,26 +297,10 @@ exports.config = {
await LocalStorageUtil.apiReset();
} else {
} catch (error) {
Logger.error(`====== Demo shell not able to start ======`);
process.exit();
}
function disableCSSAnimation() {
const css = '* {' +
'-webkit-transition-duration: 0s !important;' +
'transition-duration: 0s !important;' +
'-webkit-animation-duration: 0s !important;' +
'animation-duration: 0s !important;' +
'}';
const head = document.head || document.getElementsByTagName('head')[0];
const style = document.createElement('style');
style.type = 'text/css';
style.appendChild(document.createTextNode(css));
head.appendChild(style);
}
},
afterLaunch: async function (statusCode) {

View File

@@ -4,7 +4,8 @@
"C279932": "login problem APS not basic",
"C279931": "login problem APS not basic",
"C279930": "login problem APS not basic",
"C593560": "https://alfresco.atlassian.net/browse/ADF-5366",
"C593560": "https://alfresco.atlassian.net/browse/ADF-5388",
"C593559": "https://alfresco.atlassian.net/browse/ADF-5388",
"C269081": "https://alfresco.atlassian.net/browse/ADF-5385",
"C272819": "https://alfresco.atlassian.net/browse/ADF-5385",
"C290069": "https://alfresco.atlassian.net/browse/ADF-5387"