mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
move metadata test in content service where they has to be
This commit is contained in:
@@ -1,329 +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 { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { check } from '../../util/material';
|
||||
|
||||
describe('Aspect oriented config', () => {
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const modelOneName = 'modelOne', emptyAspectName = 'emptyAspect';
|
||||
const defaultModel = 'cm', defaultEmptyPropertiesAspect = 'taggable', aspectName = 'Taggable';
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
const uploadActions = new UploadActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.customModelApi.createCustomModel('ACTIVE', modelOneName, modelOneName, modelOneName, modelOneName);
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
try {
|
||||
await this.alfrescoJsApi.core.customModelApi.createCustomAspect(modelOneName, emptyAspectName, null, emptyAspectName, emptyAspectName);
|
||||
} catch (e) {
|
||||
}
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const uploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
const aspects = await this.alfrescoJsApi.core.nodesApi.getNode(uploadedFile.entry.id);
|
||||
|
||||
aspects.entry.aspectNames.push(modelOneName.concat(':', emptyAspectName));
|
||||
|
||||
aspects.entry.aspectNames.push(defaultModel.concat(':', defaultEmptyPropertiesAspect));
|
||||
|
||||
await this.alfrescoJsApi.core.nodesApi.updateNode(uploadedFile.entry.id, {'aspectNames': aspects.entry.aspectNames});
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(async (done) => {
|
||||
viewerPage.clickCloseButton();
|
||||
contentServicesPage.checkAcsContainer();
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261117] Should be possible restrict the display properties of one an aspect', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: [
|
||||
{
|
||||
title: 'IMAGE',
|
||||
items: [
|
||||
{
|
||||
aspect: 'exif:exif',
|
||||
properties: [
|
||||
'exif:pixelXDimension',
|
||||
'exif:pixelYDimension',
|
||||
'exif:isoSpeedRatings'
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}));
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('IMAGE');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:pixelXDimension', 'textitem');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:pixelYDimension', 'textitem');
|
||||
metadataViewPage.checkPropertyIsNotVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:isoSpeedRatings', 'textitem');
|
||||
});
|
||||
|
||||
it('[C260185] Should ignore not existing aspect when present in the configuration', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: {
|
||||
'exif:exif': '*',
|
||||
'cm:versionable': '*',
|
||||
'not:exists': '*'
|
||||
}
|
||||
}
|
||||
}));
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent('exists');
|
||||
});
|
||||
|
||||
it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C260182] Should show all the aspects if the default configuration contains the star symbol', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: '*'
|
||||
}
|
||||
}));
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C268899] Should be possible use a Translation key as Title of a metadata group', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": {' +
|
||||
' "default": [' +
|
||||
' {' +
|
||||
' "title": "GROUP-TITLE1-TRANSLATION-KEY",' +
|
||||
' "items": [' +
|
||||
' {' +
|
||||
' "aspect": "exif:exif",' +
|
||||
' "properties": "*"' +
|
||||
' }' +
|
||||
' ]' +
|
||||
' },' +
|
||||
' {' +
|
||||
' "title": "GROUP-TITLE2-TRANSLATION-KEY",' +
|
||||
' "items": [' +
|
||||
' {' +
|
||||
' "aspect": "exif:exif",' +
|
||||
' "properties": "*"' +
|
||||
' }' +
|
||||
' ]' +
|
||||
' }' +
|
||||
' ]' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE1-TRANSLATION-KEY');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('GROUP-TITLE2-TRANSLATION-KEY');
|
||||
|
||||
expect(metadataViewPage.getMetadataGroupTitle('GROUP-TITLE1-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION ONE');
|
||||
expect(metadataViewPage.getMetadataGroupTitle('GROUP-TITLE2-TRANSLATION-KEY')).toBe('CUSTOM TITLE TRANSLATION TWO');
|
||||
|
||||
});
|
||||
|
||||
it('[C279968] Should be possible use a custom preset', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": {' +
|
||||
' "custom-preset": {' +
|
||||
' "exif:exif": "*",' +
|
||||
' "cm:versionable": "*"' +
|
||||
' }' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
check(metadataViewPage.presetSwitch);
|
||||
|
||||
metadataViewPage.enterPresetText('custom-preset');
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('Versionable');
|
||||
});
|
||||
|
||||
it('[C299186] The aspect without properties is not displayed', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": { "' + modelOneName +
|
||||
' ": { "' + modelOneName + ':' + emptyAspectName +
|
||||
' ":"*"' +
|
||||
' }' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent(emptyAspectName);
|
||||
});
|
||||
|
||||
it('[C299187] The aspect with empty properties is displayed when edit', async () => {
|
||||
|
||||
await LocalStorageUtil.setConfigField('content-metadata', '{' +
|
||||
' "presets": { "' + defaultModel +
|
||||
' ": { "' + defaultModel + ':' + defaultEmptyPropertiesAspect +
|
||||
' ":"*"' +
|
||||
' }' +
|
||||
' }' +
|
||||
'}');
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent(aspectName);
|
||||
|
||||
metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent(aspectName);
|
||||
});
|
||||
});
|
||||
@@ -1,161 +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 { LoginPage } from '@alfresco/adf-testing';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
|
||||
import { StringUtil } from '@alfresco/adf-testing';
|
||||
import CONSTANTS = require('../../util/constants');
|
||||
|
||||
describe('permissions', () => {
|
||||
|
||||
const METADATA = {
|
||||
DATA_FORMAT: 'mmm dd yyyy',
|
||||
TITLE: 'Details',
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'Properties',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const consumerUser = new AcsUserModel();
|
||||
const collaboratorUser = new AcsUserModel();
|
||||
const contributorUser = new AcsUserModel();
|
||||
let site;
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
const uploadActions = new UploadActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(consumerUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(collaboratorUser);
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(contributorUser);
|
||||
|
||||
site = await this.alfrescoJsApi.core.sitesApi.createSite({
|
||||
title: StringUtil.generateRandomString(),
|
||||
visibility: 'PUBLIC'
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: consumerUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONSUMER
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: collaboratorUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.COLLABORATOR
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.core.sitesApi.addSiteMember(site.entry.id, {
|
||||
id: contributorUser.id,
|
||||
role: CONSTANTS.CS_USER_ROLES.CONTRIBUTOR
|
||||
});
|
||||
|
||||
await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, site.entry.guid);
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterAll(async (done) => {
|
||||
await this.alfrescoJsApi.core.sitesApi.deleteSite(site.entry.id);
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C274692] Should not be possible edit metadata properties when the user is a consumer user', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(consumerUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C279971] Should be possible edit metadata properties when the user is a collaborator user', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
});
|
||||
|
||||
it('[C279972] Should be possible edit metadata properties when the user is a contributor user', async () => {
|
||||
await loginPage.loginToContentServicesUsingUserModel(collaboratorUser);
|
||||
|
||||
navigationBarPage.openContentServicesFolder(site.entry.guid);
|
||||
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
});
|
||||
});
|
||||
@@ -1,189 +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 { LoginPage } from '@alfresco/adf-testing';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { check, uncheck } from '../../util/material';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
|
||||
describe('CardView Component - properties', () => {
|
||||
|
||||
const METADATA = {
|
||||
DATA_FORMAT: 'mmm dd yyyy',
|
||||
TITLE: 'Details',
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'Properties',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
const uploadActions = new UploadActions();
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const pdfUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
Object.assign(pngFileModel, pdfUploadedFile.entry);
|
||||
|
||||
pngFileModel.update(pdfUploadedFile.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
viewerPage.clickCloseButton();
|
||||
});
|
||||
|
||||
it('[C246516] Should show/hide the empty metadata when the property displayEmpty is true/false', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
metadataViewPage.checkPropertyIsNotVisible('properties.exif:model', 'textitem');
|
||||
|
||||
check(metadataViewPage.displayEmptySwitch);
|
||||
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:flash', 'boolean');
|
||||
metadataViewPage.checkPropertyIsVisible('properties.exif:model', 'textitem');
|
||||
});
|
||||
|
||||
it('[C260179] Should not be possible edit the basic property when readOnly is true', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
check(metadataViewPage.readonlySwitch);
|
||||
|
||||
metadataViewPage.editIconIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C268965] Should multi property allow expand multi accordion at the same time when set', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
check(metadataViewPage.multiSwitch);
|
||||
|
||||
metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
|
||||
});
|
||||
|
||||
it('[C280559] Should show/hide the default metadata properties when displayDefaultProperties is true/false', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsNotPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsPresent('EXIF');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('EXIF');
|
||||
|
||||
check(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
metadataViewPage.checkMetadataGroupIsPresent('properties');
|
||||
metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
});
|
||||
|
||||
it('[C280560] Should show/hide the more properties button when displayDefaultProperties is true/false', () => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
|
||||
uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
metadataViewPage.informationButtonIsNotDisplayed();
|
||||
});
|
||||
});
|
||||
@@ -1,338 +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 { LoginPage, LocalStorageUtil } from '@alfresco/adf-testing';
|
||||
import { ContentServicesPage } from '../../pages/adf/contentServicesPage';
|
||||
import { ViewerPage } from '../../pages/adf/viewerPage';
|
||||
import { MetadataViewPage } from '../../pages/adf/metadataViewPage';
|
||||
|
||||
import { AcsUserModel } from '../../models/ACS/acsUserModel';
|
||||
import { FileModel } from '../../models/ACS/fileModel';
|
||||
|
||||
import TestConfig = require('../../test.config');
|
||||
import resources = require('../../util/resources');
|
||||
import dateFormat = require('dateformat');
|
||||
|
||||
import { AlfrescoApiCompatibility as AlfrescoApi } from '@alfresco/js-api';
|
||||
import { UploadActions } from '../../actions/ACS/upload.actions';
|
||||
import { NavigationBarPage } from '../../pages/adf/navigationBarPage';
|
||||
|
||||
describe('Metadata component', () => {
|
||||
|
||||
const METADATA = {
|
||||
DATA_FORMAT: 'mmm dd yyyy',
|
||||
TITLE: 'Details',
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
DEFAULT_ASPECT: 'Properties',
|
||||
MORE_INFO_BUTTON: 'More information',
|
||||
LESS_INFO_BUTTON: 'Less information',
|
||||
ARROW_DOWN: 'keyboard_arrow_down',
|
||||
ARROW_UP: 'keyboard_arrow_up',
|
||||
EDIT_BUTTON_TOOLTIP: 'Edit'
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const contentServicesPage = new ContentServicesPage();
|
||||
const viewerPage = new ViewerPage();
|
||||
const metadataViewPage = new MetadataViewPage();
|
||||
const navigationBarPage = new NavigationBarPage();
|
||||
|
||||
const acsUser = new AcsUserModel();
|
||||
|
||||
const folderName = 'Metadata Folder';
|
||||
|
||||
const pngFileModel = new FileModel({
|
||||
'name': resources.Files.ADF_DOCUMENTS.PNG.file_name,
|
||||
'location': resources.Files.ADF_DOCUMENTS.PNG.file_location
|
||||
});
|
||||
|
||||
const uploadActions = new UploadActions();
|
||||
|
||||
let fileUrl;
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
||||
this.alfrescoJsApi = new AlfrescoApi({
|
||||
provider: 'ECM',
|
||||
hostEcm: TestConfig.adf.url
|
||||
});
|
||||
|
||||
await this.alfrescoJsApi.login(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
await this.alfrescoJsApi.core.peopleApi.addPerson(acsUser);
|
||||
|
||||
await this.alfrescoJsApi.login(acsUser.id, acsUser.password);
|
||||
|
||||
const pngUploadedFile = await uploadActions.uploadFile(this.alfrescoJsApi, pngFileModel.location, pngFileModel.name, '-my-');
|
||||
|
||||
Object.assign(pngFileModel, pngUploadedFile.entry);
|
||||
|
||||
pngFileModel.update(pngUploadedFile.entry);
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
describe('Viewer Metadata', () => {
|
||||
|
||||
beforeAll(async() => {
|
||||
await LocalStorageUtil.setConfigField('content-metadata', JSON.stringify({
|
||||
presets: {
|
||||
default: {
|
||||
'exif:exif': '*'
|
||||
}
|
||||
}
|
||||
}));
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
viewerPage.viewFile(pngFileModel.name);
|
||||
viewerPage.checkFileIsLoaded();
|
||||
fileUrl = await browser.getCurrentUrl();
|
||||
done();
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
viewerPage.clickCloseButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it('[C245652] Should be possible to display a file\'s properties', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
expect(metadataViewPage.getTitle()).toEqual(METADATA.TITLE);
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
expect(metadataViewPage.getExpandedAspectName()).toEqual(METADATA.DEFAULT_ASPECT);
|
||||
expect(metadataViewPage.getName()).toEqual(pngFileModel.name);
|
||||
expect(metadataViewPage.getCreator()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
expect(metadataViewPage.getCreatedDate()).toEqual(dateFormat(pngFileModel.createdAt, METADATA.DATA_FORMAT));
|
||||
expect(metadataViewPage.getModifier()).toEqual(pngFileModel.getCreatedByUser().displayName);
|
||||
expect(metadataViewPage.getModifiedDate()).toEqual(dateFormat(pngFileModel.createdAt, METADATA.DATA_FORMAT));
|
||||
expect(metadataViewPage.getMimetypeName()).toEqual(pngFileModel.getContent().mimeTypeName);
|
||||
expect(metadataViewPage.getSize()).toEqual(pngFileModel.getContent().getSizeInBytes());
|
||||
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
expect(metadataViewPage.getInformationButtonText()).toEqual(METADATA.LESS_INFO_BUTTON);
|
||||
expect(metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_UP);
|
||||
});
|
||||
|
||||
it('[C272769] Should be possible to display more details when clicking on More Information button', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.informationButtonIsDisplayed();
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
expect(metadataViewPage.getInformationButtonText()).toEqual(METADATA.MORE_INFO_BUTTON);
|
||||
expect(metadataViewPage.getInformationIconText()).toEqual(METADATA.ARROW_DOWN);
|
||||
});
|
||||
|
||||
it('[C270952] Should be possible to open/close properties using info icon', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab().informationButtonIsDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.COMMENTS_TAB);
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
expect(metadataViewPage.getEditIconTooltip()).toEqual(METADATA.EDIT_BUTTON_TOOLTIP);
|
||||
});
|
||||
|
||||
it('[C245654] Should be possible edit the basic Metadata Info of a Document', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await metadataViewPage.editIconClick();
|
||||
metadataViewPage.editPropertyIconIsDisplayed('name');
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
metadataViewPage.editPropertyIconIsDisplayed('properties.cm:description');
|
||||
|
||||
expect(metadataViewPage.getPropertyIconTooltip('name')).toEqual('Edit');
|
||||
expect(metadataViewPage.getPropertyIconTooltip('properties.cm:title')).toEqual('Edit');
|
||||
expect(metadataViewPage.getPropertyIconTooltip('properties.cm:description')).toEqual('Edit');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.updatePropertyIconIsDisplayed('name');
|
||||
metadataViewPage.clearPropertyIconIsDisplayed('name');
|
||||
|
||||
metadataViewPage.enterPropertyText('name', 'exampleText');
|
||||
await metadataViewPage.clickClearPropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', 'exampleText.png');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual('exampleText.png');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:title');
|
||||
metadataViewPage.enterPropertyText('properties.cm:title', 'example title');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:title');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
metadataViewPage.enterDescriptionText('example description');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
contentServicesPage.waitForTableBody();
|
||||
|
||||
viewerPage.viewFile('exampleText.png');
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual('exampleText.png');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
});
|
||||
});
|
||||
|
||||
it('[C279960] Should show the last username modifier when modify a File', () => {
|
||||
loginPage.loginToContentServices(TestConfig.adf.adminEmail, TestConfig.adf.adminPassword);
|
||||
|
||||
browser.get(fileUrl);
|
||||
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await metadataViewPage.editIconClick();
|
||||
metadataViewPage.clickEditPropertyIcons('properties.cm:description');
|
||||
metadataViewPage.enterDescriptionText('check author example description');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.cm:description');
|
||||
expect(metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
|
||||
|
||||
loginPage.loginToContentServicesUsingUserModel(acsUser);
|
||||
navigationBarPage.clickContentServicesButton();
|
||||
|
||||
await browser.get(fileUrl);
|
||||
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
expect(metadataViewPage.getPropertyText('modifiedByUser.displayName')).toEqual('Administrator');
|
||||
});
|
||||
});
|
||||
|
||||
it('[C260181] Should be possible edit all the metadata aspect', () => {
|
||||
viewerPage.clickInfoButton();
|
||||
viewerPage.checkInfoSideBarIsDisplayed();
|
||||
metadataViewPage.clickOnPropertiesTab();
|
||||
metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
expect(viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
metadataViewPage.clickOnInformationButton();
|
||||
|
||||
metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.exif:software');
|
||||
metadataViewPage.enterPropertyText('properties.exif:software', 'test custom text software');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:software');
|
||||
expect(metadataViewPage.getPropertyText('properties.exif:software')).toEqual('test custom text software');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.exif:isoSpeedRatings');
|
||||
metadataViewPage.enterPropertyText('properties.exif:isoSpeedRatings', 'test custom text isoSpeedRatings');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:isoSpeedRatings');
|
||||
expect(metadataViewPage.getPropertyText('properties.exif:isoSpeedRatings')).toEqual('test custom text isoSpeedRatings');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('properties.exif:fNumber');
|
||||
metadataViewPage.enterPropertyText('properties.exif:fNumber', 22);
|
||||
await metadataViewPage.clickUpdatePropertyIcon('properties.exif:fNumber');
|
||||
expect(metadataViewPage.getPropertyText('properties.exif:fNumber')).toEqual('22');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
describe('Folder metadata', () => {
|
||||
|
||||
beforeAll(async (done) => {
|
||||
await uploadActions.createFolder(this.alfrescoJsApi, folderName, '-my-');
|
||||
done();
|
||||
});
|
||||
|
||||
beforeEach(async (done) => {
|
||||
await browser.get(TestConfig.adf.url + '/files');
|
||||
done();
|
||||
});
|
||||
|
||||
it('[C261157] Should be possible use the metadata component When the node is a Folder', () => {
|
||||
contentServicesPage.metadataContent(folderName);
|
||||
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
expect(metadataViewPage.getPropertyText('createdByUser.displayName')).toEqual(acsUser.firstName + ' ' + acsUser.lastName);
|
||||
});
|
||||
|
||||
it('[C261158] Should be possible edit the metadata When the node is a Folder', () => {
|
||||
contentServicesPage.metadataContent(folderName);
|
||||
|
||||
browser.controlFlow().execute(async () => {
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', 'newnameFolder');
|
||||
await metadataViewPage.clickClearPropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', 'newnameFolder');
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual('newnameFolder');
|
||||
|
||||
metadataViewPage.clickEditPropertyIcons('name');
|
||||
metadataViewPage.enterPropertyText('name', folderName);
|
||||
await metadataViewPage.clickUpdatePropertyIcon('name');
|
||||
expect(metadataViewPage.getPropertyText('name')).toEqual(folderName);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
Reference in New Issue
Block a user