Skip to content

Commit 06a88f5

Browse files
authored
fix(VariantManagement): fix hideApplyAutomatically (#6624)
Fixes #6618
1 parent a5bb25a commit 06a88f5

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

packages/main/src/components/VariantManagement/ManageViewsDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const ManageViewsDialog = (props: ManageViewsDialogPropTypes) => {
103103
{defaultHeaderText}
104104
</TableHeaderCell>
105105
)}
106-
{TableHeaderCell && (
106+
{showApplyAutomatically && (
107107
<TableHeaderCell minWidth={hasApplyAutomaticallyText ? '25rem' : '5rem'}>
108108
{applyAutomaticallyHeaderText}
109109
</TableHeaderCell>

packages/main/src/components/VariantManagement/VariantManagement.cy.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,15 @@ describe('VariantManagement', () => {
337337
cy.get('[text="Apply Automatically"]').should('be.visible');
338338
cy.get('[ui5-checkbox]').should('have.length', 3);
339339

340+
cy.realPress('Escape');
341+
342+
cy.get('[icon="navigation-down-arrow"]').click();
343+
cy.findByText('Manage').click();
344+
cy.get('[ui5-table]').contains('Apply Automatically').should('be.visible');
345+
cy.get('[ui5-table]').contains('Default').should('be.visible');
346+
cy.get('[ui5-table]').contains('Sharing').should('be.visible');
347+
cy.get('[ui5-table]').contains('Created By').should('be.visible');
348+
340349
cy.mount(
341350
<VariantManagement hideApplyAutomatically hideSetAsDefault hideShare hideCreatedBy>
342351
{TwoVariantItems}
@@ -348,6 +357,15 @@ describe('VariantManagement', () => {
348357
cy.get('[text="Public"]', { timeout: 50 }).should('not.exist');
349358
cy.get('[text="Apply Automatically"]', { timeout: 50 }).should('not.exist');
350359
cy.get('[ui5-checkbox]').should('not.exist');
360+
361+
cy.realPress('Escape');
362+
363+
cy.get('[icon="navigation-down-arrow"]').click();
364+
cy.findByText('Manage').click();
365+
cy.get('[ui5-table]').contains('Apply Automatically').should('not.exist');
366+
cy.get('[ui5-table]').contains('Default').should('not.exist');
367+
cy.get('[ui5-table]').contains('Sharing').should('not.exist');
368+
cy.get('[ui5-table]').contains('Created By').should('not.exist');
351369
});
352370

353371
it('Save As', () => {

0 commit comments

Comments
 (0)