Skip to content

Commit

Permalink
fix: display filter button on the overview page for non-variants with…
Browse files Browse the repository at this point in the history
… one group(#18975)

In mobile resolution
  • Loading branch information
Larisa-Staroverova authored Jun 18, 2024
1 parent aa6a86c commit 6f22b90
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<ng-container
*ngIf="
!(isDisplayOnlyVariant() | async) &&
!(isDisplayOnlyVariant() | async) ||
configurationWithOv.overview.possibleGroups?.length !== 1
"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,21 @@ describe('ConfigurationOverviewFilterButtonComponent', () => {
expect(htmlElem.classList.contains('ghost')).toBeFalsy();
});

it('should render no filter button for variant', () => {
it('should render filter button for variant in case there is more than one group', () => {
isDisplayOnlyVariant = true;
ovConfig.overview.possibleGroups = [];
fixture.detectChanges();

CommonConfiguratorTestUtilsService.expectElementPresent(
expect,
htmlElem,
'.cx-config-filter-button'
);
});

it('should render no filter button for variant in case there is only one group', () => {
isDisplayOnlyVariant = true;
ovConfig.overview.possibleGroups =
ovConfig.overview.possibleGroups.slice(1);
fixture.detectChanges();

CommonConfiguratorTestUtilsService.expectElementNotPresent(
Expand Down

0 comments on commit 6f22b90

Please sign in to comment.