Skip to content

fix(VariantManagement): fix hideApplyAutomatically #6624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 18, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const ManageViewsDialog = (props: ManageViewsDialogPropTypes) => {
{defaultHeaderText}
</TableHeaderCell>
)}
{TableHeaderCell && (
{showApplyAutomatically && (
<TableHeaderCell minWidth={hasApplyAutomaticallyText ? '25rem' : '5rem'}>
{applyAutomaticallyHeaderText}
</TableHeaderCell>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,15 @@ describe('VariantManagement', () => {
cy.get('[text="Apply Automatically"]').should('be.visible');
cy.get('[ui5-checkbox]').should('have.length', 3);

cy.realPress('Escape');

cy.get('[icon="navigation-down-arrow"]').click();
cy.findByText('Manage').click();
cy.get('[ui5-table]').contains('Apply Automatically').should('be.visible');
cy.get('[ui5-table]').contains('Default').should('be.visible');
cy.get('[ui5-table]').contains('Sharing').should('be.visible');
cy.get('[ui5-table]').contains('Created By').should('be.visible');

cy.mount(
<VariantManagement hideApplyAutomatically hideSetAsDefault hideShare hideCreatedBy>
{TwoVariantItems}
Expand All @@ -348,6 +357,15 @@ describe('VariantManagement', () => {
cy.get('[text="Public"]', { timeout: 50 }).should('not.exist');
cy.get('[text="Apply Automatically"]', { timeout: 50 }).should('not.exist');
cy.get('[ui5-checkbox]').should('not.exist');

cy.realPress('Escape');

cy.get('[icon="navigation-down-arrow"]').click();
cy.findByText('Manage').click();
cy.get('[ui5-table]').contains('Apply Automatically').should('not.exist');
cy.get('[ui5-table]').contains('Default').should('not.exist');
cy.get('[ui5-table]').contains('Sharing').should('not.exist');
cy.get('[ui5-table]').contains('Created By').should('not.exist');
});

it('Save As', () => {
Expand Down
Loading