mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5645] Property Panel Feature (#8995)
* [ACS-5645]Added edit functionality for each panel and updated test cases * metadata e2e fix * [ACS-5725]fixed failing e2es * added unit test cases for new functionality * minor fixes * minor fixes * minor fixes * [ACS-5645]code modification * [ACS-5645]removed unwanted code * [ACS-5645]modified the changes * [ACS-5645]removed unwanted space * [ACS-5645]removed unwanted code * [ACS-5645]Implemented changes as per the review comments * linting fixes * [ACS-5645]minor fixes * [ACS-5645] removed unwanted code * [ACS-5645]modified the change * [ACS-5645]aligned input * [ACS-5645]modified changes * [ACS-5645]Implemented the changes as per the review comments * [ACS-5645]linting fixes * [ACS-5645]fixed sonarcloud issue * [ACS-5645]fixed errors * [ACS-5645]rename the function * [ACS-5645]fixes linting * [ACS-5540]lint fixes * [ACS-5645]Implemented the changes as per review comments * [ACS-5645] Removed unused code * [ACS-5645]linting fixes * [ACS-5645]fixes for lint * [ACS-5645] e2e fixes * [ACS-5645]Added translation * [ACS-5645]fixes for e2e * [ACS-5645]fixes for e2e * [ACS-5645]e2e fixes * [ACS-5645] Renamed the theme * [ACS-5645]modified changes * [ACS-5645] fixed lock-file bug * [ACS-5645] added tooltips for save and cancel icons * [ACS-5645] Modified the changes * [ACS-5645]Modified the changes * [ACS-5645] Implemented the changes as per the review comments * [ACS-5645] Implemented the changes as per the review comments * [ACS-5645]Modified the changes * [ACS-5645] added group panel lock changes * [ACS-5645] Resolved sonarcloud issue * [ACS-5645] added test cases for tags component * [ACS-5645] updated the documentation * [ACS-5645] updated the documentation * [ACS-5645] updated the documentation * [ACS-5645] Implemented changes as per review comments * [ACS-5645] lint fixes * [ACS-5645] Implemented the review comments * [ACS-5645] added focus * [ACS-5645] modified the changes * [ACS-5645] Lint fixes * [ACS-5645] Lint fixes * [ACS-5645] Lint fixes * [ACS-5645] Removed unwanted code * [ACS-5645] fixed sonarcloud issue * [ACS-5645] Added missing translation key * [ACS-5645] renamed the methods * [ACS-5645]Added edit functionality for each panel and updated test cases * [ACS-5645]code modification * [ACS-5645]removed unwanted code * [ACS-5645]Implemented changes as per the review comments * [ACS-5645]Implemented the changes as per review comments * [ACS-5645]linting fixes * [ACS-5645] fixed lock-file bug * [ACS-5645] Modified the changes * [ACS-5645] added group panel lock changes * [ACS-5645]Added edit functionality for each panel and updated test cases * minor fixes * [ACS-5645] Modified the changes * [ACS-5645] added group panel lock changes * [ACS-5645]Added edit functionality for each panel and updated test cases * metadata e2e fix * [ACS-5725]fixed failing e2es * minor fixes * [ACS-5645]removed unwanted code * [ACS-5645]Implemented changes as per the review comments * [ACS-5551] property panel design * [ACS-5551] minor changes * [ACS-5551]minor change * [ACS-5551] updated checks for non -editable field * [ACS-5551] modified the changes * [ACS-5551] modified changes * [ACS-5551] content-metadata updated * [ACS-5551] code updated * [ACS-5551] remove extra space * fixed scrollbar issue * [ACS-5551] margin adjusted * Fixed ACS-6110 * [ACS-5551] design updated * [ACCS-5551] unit test added * [ACS-5551] margin issue fixed * scroll issue fixed * [ACS-5551] color updated * [ACS-5551] design modify * [ACS-5551] add missing methods * [ACS-5654] translation added * [ACS-5645] style updated * [ACS-5654] hide toggle button for aspects * [ACS-5645] theme updated * [ACS-5645] tags and category tyle update * [ACS-5645] unit test update * [ACS-5645] code updated as per comments * [ACS-5645] linting issue fix * [ACS-5645] fixed the failed unit test cases * [ACS-5645] e2e fixes * [ACS-5645] e2e modify * [ACS-5645] aspect issue resolved * [ACS-5645] Address the comments * [ACS-5645] Address the comments * [ACS-5645] tags list design modify * [ACS-5645] design modify for chips * [ACS-5645] Removed unused property * [ACS-5645] Stop reload on panel cancel changes * [ACS-5645] Linting issue fixed * revert file change * [ACS-5645] update aspect issue fix * Revert "[ACS-5645] update aspect issue fix" This reverts commit 5212112f2293ad4c29afdd7c7faaf897cd3d00f6. * reduce layout duplicates, header panel component * code improvements * remove useless logging * cleanup css, remove mat-divider, fix tests * remove useless styles * cleanup e2e * cleanup useless events * rename nodeIcon to just icon * disable transition animation for tabs * remove "editable" hacks * improved naming for state properties * bug fixes for process cloud * css stylelint fixes * rework component, cleanup useless code * fix allowable operations and readonly state * wait for button * cleanup css, disable e2e * remove demo-shell only content, fix metadata * restore reset date functionality * fix incorrect styling * fix clear date button styles * cleanup text item styles * remove useless classes * text item rework, code cleanup * style bug fixes * cleanup useless tests * fix styles and tests * bug fixes for select item styles, revert PR changes * rework categories styles * rework tags creator styles * rollback divider module * fix css variable naming * fix issue with hidden properties * fix key value pairs layout and styles * fix tag creator validation * remove incorrect styles, raise proper errors * fix unit tests * fix theme vars naming * remove css hacks for date items * fix error borders * fix css bugs * reduce code * cleanup e2e and en.json * fix css linting * cleanup unused template refs * remove useless div for metadata container * cleanup expanders api * cleanup and remove useless tests * cleanup i18n * cleanup tests * cleanup css * cleanup css * [ACS-5654] added the missing theme variables * review comments resolved * fixed css issue * [ACS-5654] removesd extra div * [ACS-5654] save and cancel button bug fix * [ACS-5654] unit test fix for expand the panel * [ACS-5645] design issues fix * [ACS-5654] cards design fixed * [ACS-5654] node icon added to thumbnail service * [ACS-5645] linting issue fixed * [ACS-5645] thumbnail unit test updated * [ACS-5645] linting updated * [ACS-5645] removed extra div * [ACS-5645] important removed * [ACS-5645] tags text issue fix * [ACS-5645] add missed class * [ACS-5645] removed unused classes * [ACS-5645] removed unused code * revert flags to original state * fix missing semicolon * fix linting issues * reduce code duplication * code cleanup * [ACS-5645] unit test fix * [ACS-5645] e2e fix for edit button * fix linting issue for e2e * Replaced getNodeIcon from thumbnail to content service * fix indentation * refactor css variable * use rgba color value --------- Co-authored-by: Yasa-Nataliya <yasa.nataliya@globallogic.com> Co-authored-by: pkundu <priyanka.kundu@hyland.com> Co-authored-by: rbahirsheth <raviraj.bahirsheth@globallogic.com> Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
@@ -426,9 +426,9 @@ describe('Content Services Viewer', () => {
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await viewerPage.clickOnTab('Properties');
|
||||
await viewerPage.checkTabIsActive('Properties');
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.clickEditIconGeneral();
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', newName);
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await metadataViewPage.clickSaveGeneralMetadata();
|
||||
await viewerPage.clickCloseButton();
|
||||
}
|
||||
});
|
||||
|
@@ -114,16 +114,16 @@ describe('content type', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('Properties');
|
||||
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.clickEditIconGeneral();
|
||||
|
||||
await expect(await metadataViewPage.changeContentType(type.title)).toBe(true, 'Failed to update node type.');
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await metadataViewPage.clickSaveGeneralMetadata();
|
||||
await metadataViewPage.checkConfirmDialogDisplayed();
|
||||
await metadataViewPage.applyNodeProperties();
|
||||
|
||||
@@ -139,9 +139,9 @@ describe('content type', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('Properties');
|
||||
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);
|
||||
@@ -155,16 +155,16 @@ describe('content type', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('Properties');
|
||||
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.clickEditIconGeneral();
|
||||
|
||||
await expect(await metadataViewPage.changeContentType(type.title)).toBe(true, 'Failed to update node type.');
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await metadataViewPage.clickSaveGeneralMetadata();
|
||||
|
||||
await metadataViewPage.checkConfirmDialogDisplayed();
|
||||
await metadataViewPage.cancelNodeProperties();
|
||||
@@ -178,9 +178,9 @@ describe('content type', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('PROPERTIES');
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('Properties');
|
||||
defaultType = (await metadataViewPage.hasContentType('Content')) || (await metadataViewPage.hasContentType('cm:content'));
|
||||
await expect(defaultType).toBe(true, 'Content type not found');
|
||||
await viewerPage.clickCloseButton();
|
||||
|
@@ -15,14 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
LoginPage,
|
||||
StringUtil,
|
||||
UploadActions,
|
||||
UserModel,
|
||||
UsersActions,
|
||||
ViewerPage
|
||||
} from '@alfresco/adf-testing';
|
||||
import { createApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions, ViewerPage } from '@alfresco/adf-testing';
|
||||
import { MetadataViewPage } from '../../core/pages/metadata-view.page';
|
||||
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
|
||||
import { FileModel } from '../../models/ACS/file.model';
|
||||
@@ -31,20 +24,6 @@ import CONSTANTS = require('../../util/constants');
|
||||
import { SitesApi } from '@alfresco/js-api';
|
||||
|
||||
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();
|
||||
@@ -130,9 +109,7 @@ describe('permissions', () => {
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('Properties');
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
@@ -150,9 +127,7 @@ describe('permissions', () => {
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
await expect(await viewerPage.getActiveTab()).toEqual('Properties');
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
|
@@ -34,13 +34,9 @@ describe('CardView Component - properties', () => {
|
||||
const METADATA = {
|
||||
DATA_FORMAT: 'mmm dd yyyy',
|
||||
TITLE: 'Details',
|
||||
COMMENTS_TAB: 'COMMENTS',
|
||||
PROPERTY_TAB: 'PROPERTIES',
|
||||
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'
|
||||
};
|
||||
|
||||
@@ -90,7 +86,6 @@ describe('CardView Component - properties', () => {
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
@@ -108,11 +103,9 @@ describe('CardView Component - properties', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await CheckboxPage.check(metadataViewPage.readonlySwitch);
|
||||
|
||||
await metadataViewPage.editIconIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C268965] Should multi property allow expand multi accordion at the same time when set', async () => {
|
||||
@@ -121,15 +114,9 @@ describe('CardView Component - properties', () => {
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('properties');
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('properties');
|
||||
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
await metadataViewPage.checkMetadataGroupIsExpand('properties');
|
||||
await metadataViewPage.checkMetadataGroupIsNotExpand('EXIF');
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
@@ -168,11 +155,7 @@ describe('CardView Component - properties', () => {
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
|
||||
await CheckboxPage.uncheck(metadataViewPage.defaultPropertiesSwitch);
|
||||
|
||||
await metadataViewPage.informationButtonIsNotDisplayed();
|
||||
});
|
||||
|
||||
it('[C307975] Should be able to choose which aspect to show expanded in the info-drawer', async () => {
|
||||
|
@@ -36,14 +36,9 @@ describe('Metadata component', () => {
|
||||
const METADATA = {
|
||||
DATA_FORMAT: 'PP',
|
||||
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'
|
||||
COMMENTS_TAB: 'Comments',
|
||||
PROPERTY_TAB: 'Properties',
|
||||
DEFAULT_ASPECT: 'General info'
|
||||
};
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
@@ -103,7 +98,7 @@ describe('Metadata component', () => {
|
||||
await contentServicesPage.waitForTableBody();
|
||||
});
|
||||
|
||||
it("[C245652] Should be possible to display a file's properties", async () => {
|
||||
it('[C245652] Should be possible to display a file properties', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
@@ -129,36 +124,12 @@ describe('Metadata component', () => {
|
||||
expect(modifiedDate).toEqual(format(new Date(pngFileModel.createdAt), METADATA.DATA_FORMAT), pngFileModel.createdAt);
|
||||
expect(mimeTypeName).toEqual(pngFileModel.getContent().mimeTypeName);
|
||||
expect(size).toEqual(pngFileModel.getContent().getSizeInBytes());
|
||||
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
|
||||
const informationButtonText = await metadataViewPage.getInformationButtonText();
|
||||
const informationIconText = await metadataViewPage.getInformationIconText();
|
||||
|
||||
expect(informationButtonText).toEqual(METADATA.MORE_INFO_BUTTON);
|
||||
expect(informationIconText).toEqual(METADATA.ARROW_DOWN);
|
||||
});
|
||||
|
||||
it('[C272769] Should be possible to display more details when clicking on More Information button', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
const informationButtonText = await metadataViewPage.getInformationButtonText();
|
||||
const informationIconText = await metadataViewPage.getInformationIconText();
|
||||
|
||||
expect(informationButtonText).toEqual(METADATA.LESS_INFO_BUTTON);
|
||||
expect(informationIconText).toEqual(METADATA.ARROW_UP);
|
||||
});
|
||||
|
||||
it('[C270952] Should be possible to open/close properties using info icon', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.informationButtonIsDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsNotDisplayed();
|
||||
await viewerPage.clickInfoButton();
|
||||
@@ -166,25 +137,17 @@ describe('Metadata component', () => {
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.COMMENTS_TAB);
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
await expect(await metadataViewPage.getEditIconTooltip()).toEqual(METADATA.EDIT_BUTTON_TOOLTIP);
|
||||
});
|
||||
|
||||
it('[C245654] Should be possible edit the basic Metadata Info of a Document', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:name');
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:title');
|
||||
await metadataViewPage.editPropertyIconIsDisplayed('properties.cm:description');
|
||||
|
||||
await expect(await metadataViewPage.getPropertyIconTooltip('properties.cm:name')).toEqual('Edit');
|
||||
await expect(await metadataViewPage.getPropertyIconTooltip('properties.cm:title')).toEqual('Edit');
|
||||
await expect(await metadataViewPage.getPropertyIconTooltip('properties.cm:description')).toEqual('Edit');
|
||||
await metadataViewPage.clickEditIconGeneral();
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', 'exampleText');
|
||||
await metadataViewPage.clickResetMetadata();
|
||||
@@ -192,14 +155,15 @@ describe('Metadata component', () => {
|
||||
browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name
|
||||
);
|
||||
|
||||
await metadataViewPage.clickEditIconGeneral();
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', 'exampleText.png');
|
||||
await metadataViewPage.enterPropertyText('properties.cm:title', 'example title');
|
||||
await metadataViewPage.enterDescriptionText('example description');
|
||||
await metadataViewPage.clickSaveGeneralMetadata();
|
||||
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual('exampleText.png');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
|
||||
await viewerPage.clickCloseButton();
|
||||
await contentServicesPage.waitForTableBody();
|
||||
@@ -208,32 +172,26 @@ describe('Metadata component', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual('exampleText.png');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:title')).toEqual('example title');
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('example description');
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.clickEditIconGeneral();
|
||||
await metadataViewPage.enterPropertyText('properties.cm:name', browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name);
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:name')).toEqual(
|
||||
browser.params.resources.Files.ADF_DOCUMENTS.PNG.file_name
|
||||
);
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await metadataViewPage.clickSaveGeneralMetadata();
|
||||
});
|
||||
|
||||
it('[C260181] Should be possible edit all the metadata aspect', async () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
await metadataViewPage.clickOnInformationButton();
|
||||
|
||||
await metadataViewPage.clickMetadataGroup('EXIF');
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
|
||||
await metadataViewPage.enterPropertyText('properties.exif:software', 'test custom text software');
|
||||
@@ -255,14 +213,14 @@ describe('Metadata component', () => {
|
||||
await viewerPage.clickInfoButton();
|
||||
await viewerPage.checkInfoSideBarIsDisplayed();
|
||||
await metadataViewPage.clickOnPropertiesTab();
|
||||
await metadataViewPage.editIconIsDisplayed();
|
||||
await metadataViewPage.isEditGeneralIconDisplayed();
|
||||
|
||||
await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB);
|
||||
|
||||
await metadataViewPage.editIconClick();
|
||||
await metadataViewPage.clickEditIconGeneral();
|
||||
|
||||
await metadataViewPage.enterDescriptionText('check author example description');
|
||||
await metadataViewPage.clickSaveMetadata();
|
||||
await metadataViewPage.clickSaveGeneralMetadata();
|
||||
await expect(await metadataViewPage.getPropertyText('properties.cm:description')).toEqual('check author example description');
|
||||
|
||||
await navigationBarPage.clickLogoutButton();
|
||||
|
@@ -32,9 +32,7 @@ export class MetadataViewPage {
|
||||
description = $(`span[data-automation-id='card-textitem-value-properties.cm:description']`);
|
||||
author = $(`[data-automation-id='card-textitem-value-properties.cm:author']`);
|
||||
editIcon = $(`button[data-automation-id='meta-data-card-toggle-edit']`);
|
||||
informationButton = $(`button[data-automation-id='meta-data-card-toggle-expand']`);
|
||||
informationSpan = $(`span[data-automation-id='meta-data-card-toggle-expand-label']`);
|
||||
informationIcon = $(`span[data-automation-id='meta-data-card-toggle-expand-label'] ~ mat-icon`);
|
||||
editIconGeneral = $(`button[data-automation-id='meta-data-general-info-edit']`);
|
||||
displayEmptySwitch = $(`#adf-metadata-empty`);
|
||||
readonlySwitch = $(`#adf-metadata-readonly`);
|
||||
multiSwitch = $(`#adf-metadata-multi`);
|
||||
@@ -43,6 +41,7 @@ export class MetadataViewPage {
|
||||
displayAspect = $(`input[data-placeholder='Display Aspect']`);
|
||||
applyAspect = element(by.cssContainingText(`button span.mat-button-wrapper`, 'Apply Aspect'));
|
||||
saveMetadataButton = $(`[data-automation-id='save-metadata']`);
|
||||
saveGeneralMetadataButton = $(`[data-automation-id='save-general-info-metadata']`);
|
||||
resetMetadataButton = $(`[data-automation-id='reset-metadata']`);
|
||||
|
||||
private getMetadataGroupLocator = async (groupName: string): Promise<ElementFinder> =>
|
||||
@@ -102,28 +101,17 @@ export class MetadataViewPage {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.editIcon);
|
||||
}
|
||||
|
||||
async isEditGeneralIconDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral);
|
||||
}
|
||||
|
||||
async editIconClick(): Promise<void> {
|
||||
await BrowserActions.clickExecuteScript('button[data-automation-id="meta-data-card-toggle-edit"]');
|
||||
}
|
||||
|
||||
async informationButtonIsDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsClickable(this.informationButton);
|
||||
}
|
||||
|
||||
async informationButtonIsNotDisplayed(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.informationButton);
|
||||
}
|
||||
|
||||
async clickOnInformationButton(): Promise<void> {
|
||||
await BrowserActions.click(this.informationButton);
|
||||
}
|
||||
|
||||
async getInformationButtonText(): Promise<string> {
|
||||
return BrowserActions.getText(this.informationSpan);
|
||||
}
|
||||
|
||||
async getInformationIconText(): Promise<string> {
|
||||
return BrowserActions.getText(this.informationIcon);
|
||||
async clickEditIconGeneral(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral);
|
||||
await BrowserActions.click(this.editIconGeneral);
|
||||
}
|
||||
|
||||
async clickOnPropertiesTab(): Promise<void> {
|
||||
@@ -137,11 +125,6 @@ export class MetadataViewPage {
|
||||
return BrowserActions.getAttribute(this.editIcon, 'title');
|
||||
}
|
||||
|
||||
async editPropertyIconIsDisplayed(propertyName: string) {
|
||||
const editPropertyIcon = $('[data-automation-id="header-' + propertyName + '"] .adf-textitem-edit-icon');
|
||||
await BrowserVisibility.waitUntilElementIsPresent(editPropertyIcon);
|
||||
}
|
||||
|
||||
async enterPropertyText(propertyName: string, text: string | number): Promise<void> {
|
||||
const textField = $('input[data-automation-id="card-textitem-value-' + propertyName + '"]');
|
||||
await BrowserActions.clearSendKeys(textField, text.toString());
|
||||
@@ -161,11 +144,6 @@ export class MetadataViewPage {
|
||||
return BrowserActions.getInputValue(textField);
|
||||
}
|
||||
|
||||
async getPropertyIconTooltip(propertyName: string): Promise<string> {
|
||||
const editPropertyIcon = $('[data-automation-id="header-' + propertyName + '"] .adf-textitem-edit-icon');
|
||||
return BrowserActions.getAttribute(editPropertyIcon, 'title');
|
||||
}
|
||||
|
||||
async clickMetadataGroup(groupName: string): Promise<void> {
|
||||
const group = await this.getMetadataGroupLocator(groupName);
|
||||
await BrowserActions.click(group);
|
||||
@@ -286,4 +264,8 @@ export class MetadataViewPage {
|
||||
async clickResetMetadata(): Promise<void> {
|
||||
await BrowserActions.click(this.resetMetadataButton);
|
||||
}
|
||||
|
||||
async clickSaveGeneralMetadata(): Promise<void> {
|
||||
await BrowserActions.click(this.saveGeneralMetadataButton);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user