Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cms-integration-tests/cms/content-packages/Full/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"name" : "Full",
"timestamp" : 1782394919,
"id" : ""
}
1 change: 1 addition & 0 deletions cms-integration-tests/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ services:
- ./cms/commands:/cms/scheduler-commands
- ./cms/conf:/cms/conf
- ./cms/packages:/cms/packages:x
- ./cms/content-packages:/cms/content-packages
- ./cms/logs:/cms/logs:x

healthcheck:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Editor User Interface: The regression of missing item status icons in Content Staging mode has been fixed.
53 changes: 52 additions & 1 deletion cms-ui/apps/editor-ui/e2e/list-loading.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { AccessControlledType, GcmsPermission, Node, PageCopyResponse, User } from '@gentics/cms-models';
import { AccessControlledType, GcmsPermission, Node, PageCopyResponse, User, Variant } from '@gentics/cms-models';
import {
createClient,
isVariant,
EntityImporter,
FOLDER_T,
GroupImportData,
Expand All @@ -20,6 +21,8 @@ import {
setupUserDataRerouting,
TestSize,
UserImportData,
openContext,
clickModalAction,
} from '@gentics/e2e-utils';
import { expect, Locator, Page, test } from '@playwright/test';
import { AUTH } from './common';
Expand Down Expand Up @@ -297,4 +300,52 @@ test.describe('List Loading', () => {
}
});
});

test.describe('Content Staging', () => {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As usual, the UT won't work until the fix is released and packed into the container.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can run the tests locally, with full UI to test with npm run e2e editor-ui -- --ui

test.skip(() => !isVariant(Variant.ENTERPRISE), 'Requires Enterpise features');

test.beforeEach(async ({ page }) => {
// Pagination data may be loaded from the server stored user-data
// This will simply return empty data for the user
await setupUserDataRerouting(page);

await navigateToApp(page);
await loginWithForm(page, AUTH.admin);
await selectNode(page, IMPORTER.get(NODE_FULL)!.id);
});

test('should load content under staging mode, displaying items\' staging status', {
annotation: [{
type: 'ticket',
description: 'SUP-19876',
}],
}, async ({ page }) => {
const actionMenu = await openContext(page.locator('gtx-actions-selector > [data-context-id="actions-menu"]'));
await actionMenu.locator('.action-buttons-dropdown-content button[data-action-id="content-staging"]').click();

const modal = page.locator('gtx-content-staging-modal');
await modal.locator('gtx-content-package-list gtx-contents-list-item gtx-checkbox label').click();
await clickModalAction(modal, 'confirm');

// Expect the leave content-staging mode button to be visible
await page.locator('gtx-button.staging-mode-leaver').isVisible();

const folderList = findList(page, 'folder');
const folderItems = await folderList.locator('item-list-row').all();
for (const item of folderItems) {
const status = item.locator('.status-label.staging');
await expect(status).toBeVisible();
await expect(status).not.toContainClass('included');
}

const pageList = findList(page, 'page');
const pageItems = await pageList.locator('item-list-row').all();
for (const item of pageItems) {
const status = item.locator('.status-label.staging');
await expect(status).toBeVisible();
await expect(status).not.toContainClass('included');
}
});

});
});
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ <h5>{{ 'modal.select_content_package_title' | i18n }}</h5>
<gtx-button
type="secondary"
flat
data-action="close"
(click)="closeFn()"
>{{ 'modal.close' | i18n }}</gtx-button>
</ng-container>
Expand All @@ -24,11 +25,13 @@ <h5>{{ 'modal.select_content_package_title' | i18n }}</h5>
<gtx-button
type="secondary"
flat
data-action="cancel"
(click)="closeFn()"
>{{ 'modal.cancel' | i18n }}</gtx-button>

<gtx-button
type="primary"
data-action="confirm"
(click)="updatePackageInState()"
>{{ (activePackage ? 'modal.confirm_content_package_select' : 'modal.leave_content_staging_mode') | i18n }}</gtx-button>
</ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@
<i class="material-icons" [attr.translate]="'no'">open_in_new</i>
</gtx-button>
</a>
<item-status-label *ngIf="uiMode === UIMode.STAGING"
[item]="item"
[activeNodeId]="activeNode?.id"
[uiMode]="uiMode"
[stagingMap]="stagingMap"
></item-status-label>
<file-status-label *ngIf="uiMode === UIMode.EDIT" [item]="item"></file-status-label>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,8 @@
></a>
</ng-template>

<ng-container *ngIf="uiMode === UIMode.EDIT && item">
<ng-container *ngIf="item">
<item-status-label
*ngIf="item.type === 'page' || item.type === 'form'"
[item]="item"
[nodeLanguages]="nodeLanguages"
[activeNodeId]="activeNode?.id"
Expand All @@ -90,7 +89,7 @@
></item-status-label>

<file-status-label
*ngIf="item.type === 'image' || item.type === 'file'"
*ngIf="(item.type === 'image' || item.type === 'file') && uiMode === UIMode.EDIT"
[item]="item"
></file-status-label>
</ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
</gtx-dropdown-list>

<ng-template #stagingLabel let-included="included">
<div class="status-label" [class.included]="included">
<div class="status-label staging" [class.included]="included">
<icon>{{ included ? 'check' : 'close' }}</icon>
{{ (included ? 'common.staging_status_included' : 'common.staging_status_excluded') | i18n }}
</div>
Expand Down