[ADF-3372] Added toggle and global configuration to display metadata (#3636)

* [ADF-3372] Added toggle and global configuration to display metadata

* [ADF-3372] Fixed typo in shcema.json

* [ADF-3372] Removed unnecessary variables and variable name changed

* [ADF-3372] Fixed unit test

* [ADF-3372] Improved logic

* [ADF-3372] Improved Metadata component html logic

* [ADF-3372] Demoshell variable from app.config.json removed

* [ADF-3372] fixed bugs and tests

* [ADF-3372] fixed some error in tests

* [ADF-3372] fixed some wrong compilation in test

* [ADF-3372] fixed wrong locator

* [ADF-3372] fixed randomly failing tests
This commit is contained in:
davidcanonieto
2018-08-07 23:56:56 +02:00
committed by Eugenio Romano
parent 5b0b6e83bc
commit 409acbcc9e
12 changed files with 129 additions and 36 deletions

View File

@@ -31,6 +31,7 @@ import resources = require('../../util/resources');
import AlfrescoApi = require('alfresco-js-api-node');
import { UploadActions } from '../../actions/ACS/upload.actions';
import ContentServicesPage = require('../../pages/adf/contentServicesPage');
describe('Aspect oriented config', () => {
@@ -39,6 +40,7 @@ describe('Aspect oriented config', () => {
const metadataViewPage = new CardViewPage();
const navigationBarPage = new NavigationBarPage();
const configEditorPage = new ConfigEditorPage();
let contentServicesPage = new ContentServicesPage();
let acsUser = new AcsUserModel();
@@ -69,15 +71,21 @@ describe('Aspect oriented config', () => {
done();
});
afterEach(() => {
beforeEach(async(done) => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
done();
});
afterEach(async(done) => {
viewerPage.clickCloseButton();
contentServicesPage.checkAcsContainer();
browser.refresh();
contentServicesPage.checkAcsContainer();
done();
});
it('[C261117] Should be possible restrict the display properties of one an aspect', () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
configEditorPage.enterMetadataConfiguration('{ "presets": {' +
' "default": [{' +
@@ -98,11 +106,10 @@ describe('Aspect oriented config', () => {
viewerPage.clickInfoButton();
viewerPage.checkInfoSideBarIsDisplayed();
metadataViewPage.clickOnPropertiesTab();
metadataViewPage.informationButtonIsDisplayed();
metadataViewPage.clickOnInformationButton();
metadataViewPage.clickMetadatGroup('IMAGE');
metadataViewPage.checkPopertyIsVisible('properties.exif:pixelXDimension', 'textitem');
metadataViewPage.checkPopertyIsVisible('properties.exif:pixelYDimension', 'textitem');
metadataViewPage.checkPopertyIsNotVisible('properties.exif:isoSpeedRatings', 'textitem');
@@ -113,9 +120,6 @@ describe('Aspect oriented config', () => {
});
it('[C260185] Should ignore not existing aspect when present in the configuration', () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
configEditorPage.enterMetadataConfiguration(' {' +
' "presets": {' +
@@ -135,7 +139,7 @@ describe('Aspect oriented config', () => {
viewerPage.clickInfoButton();
viewerPage.checkInfoSideBarIsDisplayed();
metadataViewPage.clickOnPropertiesTab();
metadataViewPage.informationButtonIsDisplayed();
metadataViewPage.clickOnInformationButton();
metadataViewPage.checkkMetadatGroupIsPresent('EXIF');
@@ -145,9 +149,6 @@ describe('Aspect oriented config', () => {
});
it('[C260183] Should show all the aspect if the content-metadata configuration is NOT provided' , () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
configEditorPage.enterMetadataConfiguration('{ }');
@@ -159,7 +160,7 @@ describe('Aspect oriented config', () => {
viewerPage.clickInfoButton();
viewerPage.checkInfoSideBarIsDisplayed();
metadataViewPage.clickOnPropertiesTab();
metadataViewPage.informationButtonIsDisplayed();
metadataViewPage.clickOnInformationButton();
metadataViewPage.checkkMetadatGroupIsPresent('EXIF');
@@ -172,9 +173,6 @@ describe('Aspect oriented config', () => {
});
it('[C260182] Should show all the aspects if the default configuration contains the * symbol' , () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
configEditorPage.enterMetadataConfiguration('{' +
' "presets": {' +
@@ -191,6 +189,7 @@ describe('Aspect oriented config', () => {
viewerPage.checkInfoSideBarIsDisplayed();
metadataViewPage.clickOnPropertiesTab();
metadataViewPage.informationButtonIsDisplayed();
metadataViewPage.clickOnInformationButton();
metadataViewPage.checkkMetadatGroupIsPresent('EXIF');
@@ -203,9 +202,6 @@ describe('Aspect oriented config', () => {
});
it('[C268899] Should be possible use a Translation key as Title of a metadata group' , () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
configEditorPage.enterMetadataConfiguration('{' +
' "presets": {' +
@@ -244,6 +240,7 @@ describe('Aspect oriented config', () => {
viewerPage.checkInfoSideBarIsDisplayed();
metadataViewPage.clickOnPropertiesTab();
metadataViewPage.informationButtonIsDisplayed();
metadataViewPage.clickOnInformationButton();
metadataViewPage.checkkMetadatGroupIsPresent('GROUP-TITLE1-TRANSLATION-KEY');
@@ -255,9 +252,6 @@ describe('Aspect oriented config', () => {
});
it('[C279968] Should be possible use a custom preset' , () => {
navigationBarPage.clickConfigEditorButton();
configEditorPage.clickClearMetadataButton();
configEditorPage.enterMetadataConfiguration('{' +
' "presets": {' +
@@ -278,8 +272,10 @@ describe('Aspect oriented config', () => {
metadataViewPage.clickOnPropertiesTab();
metadataViewPage.enablePreset();
metadataViewPage.enterPresetText('custom-preset');
metadataViewPage.informationButtonIsDisplayed();
metadataViewPage.clickOnInformationButton();
metadataViewPage.checkkMetadatGroupIsPresent('properties');