mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[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
This commit is contained in:
committed by
GitHub
parent
32f2bf995d
commit
e675a12dfd
@@ -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);
|
||||
|
||||
|
@@ -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');
|
||||
|
@@ -46,6 +46,8 @@ export class MetadataViewPage {
|
||||
|
||||
private getMetadataGroupLocator = async (groupName: string): Promise<ElementFinder> =>
|
||||
$(`[data-automation-id="adf-metadata-group-${groupName}"]`);
|
||||
private getMetadataGroupEditIconLocator = async (groupName: string): Promise<ElementFinder> =>
|
||||
$(`[data-automation-id="adf-metadata-group-${groupName}"]`).$(this.editIcon.locator().value);
|
||||
private getExpandedMetadataGroupLocator = async (groupName: string): Promise<ElementFinder> =>
|
||||
$(`[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<void> {
|
||||
await BrowserActions.clickExecuteScript('button[data-automation-id="meta-data-card-toggle-edit"]');
|
||||
}
|
||||
|
||||
async clickEditIconGeneral(): Promise<void> {
|
||||
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<void> {
|
||||
const group = await this.getMetadataGroupEditIconLocator(groupName);
|
||||
await BrowserActions.click(group);
|
||||
}
|
||||
|
||||
async checkMetadataGroupIsPresent(groupName: string): Promise<void> {
|
||||
const group = await this.getMetadataGroupLocator(groupName);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(group);
|
||||
|
@@ -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",
|
||||
|
@@ -204,9 +204,9 @@
|
||||
<div *ngFor="let group of groupedProperties; let first = first" class="adf-metadata-grouped-properties-container">
|
||||
<mat-expansion-panel
|
||||
[attr.data-automation-id]="'adf-metadata-group-' + group.title"
|
||||
[expanded]="currentPanel.panelTitle === group.title && currentPanel.expanded"
|
||||
(opened)="expandPanel(group.title)"
|
||||
(closed)="closePanel(group.title)"
|
||||
[expanded]="multi ? !displayDefaultProperties && first || group.expanded : !displayDefaultProperties && first || currentPanel.panelTitle === group.title && currentPanel.expanded"
|
||||
(opened)="expandPanel(group.title); group.expanded = true"
|
||||
(closed)="closePanel(group.title); group.expanded = false"
|
||||
class="adf-content-metadata-panel"
|
||||
hideToggle>
|
||||
<mat-expansion-panel-header
|
||||
|
@@ -831,6 +831,18 @@ describe('ContentMetadataComponent', () => {
|
||||
it('should have displayDefaultProperties input param as true by default', () => {
|
||||
expect(component.displayDefaultProperties).toBe(true);
|
||||
});
|
||||
|
||||
it('should set default properties as active panel on displayDefaultProperties toggle', () => {
|
||||
component.displayDefaultProperties = false;
|
||||
component.currentPanel.panelTitle = 'test';
|
||||
component.currentPanel.expanded = false;
|
||||
|
||||
component.ngOnChanges({ displayDefaultProperties: new SimpleChange(false, true, false) });
|
||||
|
||||
fixture.detectChanges();
|
||||
expect(component.currentPanel.panelTitle).toBe(component.DefaultPanels.PROPERTIES);
|
||||
expect(component.currentPanel.expanded).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Display properties with aspect oriented config', () => {
|
||||
|
@@ -247,6 +247,10 @@ export class ContentMetadataComponent implements OnChanges, OnInit, OnDestroy {
|
||||
this.currentPanel.expanded = true;
|
||||
}
|
||||
|
||||
if (changes.displayDefaultProperties?.currentValue) {
|
||||
this.expandPanel(this.DefaultPanels.PROPERTIES);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
|
Reference in New Issue
Block a user