From e675a12dfddee049ad5bc0b34e550e10ce346598 Mon Sep 17 00:00:00 2001 From: Mykyta Maliarchuk <84377976+nikita-web-ua@users.noreply.github.com> Date: Wed, 13 Mar 2024 15:40:04 +0100 Subject: [PATCH] [ACS-6233] Enable metadata e2es (#9391) * [ACS-6233] enable metadata e2es * [ACS-6233][ci:force] * [ACS-6233] cr fix * [ACS-6233] cr fix * [ACS-6233] fix e2e C260181 --- .../metadata/metadata-properties.e2e.ts | 4 ++-- .../metadata/metadata-smoke-tests.e2e.ts | 3 +-- e2e/core/pages/metadata-view.page.ts | 11 +++++++---- e2e/protractor.excludes.json | 7 ------- .../content-metadata/content-metadata.component.html | 6 +++--- .../content-metadata.component.spec.ts | 12 ++++++++++++ .../content-metadata/content-metadata.component.ts | 4 ++++ 7 files changed, 29 insertions(+), 18 deletions(-) diff --git a/e2e/content-services/metadata/metadata-properties.e2e.ts b/e2e/content-services/metadata/metadata-properties.e2e.ts index 629cd93720..59287ec7c3 100644 --- a/e2e/content-services/metadata/metadata-properties.e2e.ts +++ b/e2e/content-services/metadata/metadata-properties.e2e.ts @@ -140,8 +140,8 @@ describe('CardView Component - properties', () => { await CheckboxPage.uncheck(metadataViewPage.defaultPropertiesSwitch); await metadataViewPage.checkMetadataGroupIsNotPresent('properties'); - await metadataViewPage.checkMetadataGroupIsPresent('EXIF'); - await metadataViewPage.checkMetadataGroupIsExpand('EXIF'); + await metadataViewPage.checkMetadataGroupIsPresent('Versionable'); + await metadataViewPage.checkMetadataGroupIsExpand('Versionable'); await CheckboxPage.check(metadataViewPage.defaultPropertiesSwitch); diff --git a/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts b/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts index ff66f84ecd..f3578beaf1 100644 --- a/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts +++ b/e2e/content-services/metadata/metadata-smoke-tests.e2e.ts @@ -191,8 +191,7 @@ describe('Metadata component', () => { await metadataViewPage.clickOnPropertiesTab(); await expect(await viewerPage.getActiveTab()).toEqual(METADATA.PROPERTY_TAB); - await metadataViewPage.clickMetadataGroup('EXIF'); - await metadataViewPage.editIconClick(); + await metadataViewPage.clickMetadataGroupEditIcon('EXIF'); await metadataViewPage.enterPropertyText('properties.exif:software', 'test custom text software'); await metadataViewPage.enterPropertyText('properties.exif:isoSpeedRatings', 'test custom text isoSpeedRatings'); diff --git a/e2e/core/pages/metadata-view.page.ts b/e2e/core/pages/metadata-view.page.ts index 95e4aaadf6..77a52eaf09 100644 --- a/e2e/core/pages/metadata-view.page.ts +++ b/e2e/core/pages/metadata-view.page.ts @@ -46,6 +46,8 @@ export class MetadataViewPage { private getMetadataGroupLocator = async (groupName: string): Promise => $(`[data-automation-id="adf-metadata-group-${groupName}"]`); + private getMetadataGroupEditIconLocator = async (groupName: string): Promise => + $(`[data-automation-id="adf-metadata-group-${groupName}"]`).$(this.editIcon.locator().value); private getExpandedMetadataGroupLocator = async (groupName: string): Promise => $(`[data-automation-id="adf-metadata-group-${groupName}"] > ${materialLocators.Expansion.panel.header.root}`); @@ -105,10 +107,6 @@ export class MetadataViewPage { await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral); } - async editIconClick(): Promise { - await BrowserActions.clickExecuteScript('button[data-automation-id="meta-data-card-toggle-edit"]'); - } - async clickEditIconGeneral(): Promise { await BrowserVisibility.waitUntilElementIsVisible(this.editIconGeneral); await BrowserActions.click(this.editIconGeneral); @@ -149,6 +147,11 @@ export class MetadataViewPage { await BrowserActions.click(group); } + async clickMetadataGroupEditIcon(groupName: string): Promise { + const group = await this.getMetadataGroupEditIconLocator(groupName); + await BrowserActions.click(group); + } + async checkMetadataGroupIsPresent(groupName: string): Promise { const group = await this.getMetadataGroupLocator(groupName); await BrowserVisibility.waitUntilElementIsVisible(group); diff --git a/e2e/protractor.excludes.json b/e2e/protractor.excludes.json index 38cbb541bb..f317d316c0 100644 --- a/e2e/protractor.excludes.json +++ b/e2e/protractor.excludes.json @@ -12,13 +12,6 @@ "C311319-2": "https://alfresco.atlassian.net/browse/APPS-2254", "C311319-4": "https://alfresco.atlassian.net/browse/APPS-2254", "C297691": "https://alfresco.atlassian.net/browse/APPS-2254", - "C246516": "https://alfresco.atlassian.net/browse/ACS-6233", - "C268965": "https://alfresco.atlassian.net/browse/ACS-6233", - "C280559": "https://alfresco.atlassian.net/browse/ACS-6233", - "C307975": "https://alfresco.atlassian.net/browse/ACS-6233", - "C279971": "https://alfresco.atlassian.net/browse/ACS-6233", - "C279972": "https://alfresco.atlassian.net/browse/ACS-6233", - "C260181": "https://alfresco.atlassian.net/browse/ACS-6233", "C297692": "https://alfresco.atlassian.net/browse/ACS-6244", "C260418": "https://alfresco.atlassian.net/browse/ACS-6425", "C268070": "https://alfresco.atlassian.net/browse/ACS-6425", diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html index 9d64f3022d..57f6e2e62d 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html @@ -204,9 +204,9 @@