Skip to content

Commit

Permalink
GH-12358: fix integration tests, css changes documentation, change fo…
Browse files Browse the repository at this point in the history
…nt size, delete cxFeatureLevel
  • Loading branch information
Changsuwan committed May 31, 2021
1 parent 4937193 commit 2ee7c8c
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
26 changes: 26 additions & 0 deletions docs/migration/css-changes-in-version-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,34 @@ title: Changes to Styles in 4.0

* `padding` set to 20px on `%cx-configurator-overview-form` for `cx-no-attribute-value-pair` selector to align spacing between the configuration overview no attribute value pairs.

* `font-size` set to 1.75rem on `%cx-configurator-overview-form` for `topLevel` selector to adjust the attribute header according to the new styling requirement

* `font-weight` set to 700 on `%cx-configurator-overview-form` for `topLevel` selector to adjust the attribute header according to the new styling requirement

* `border-bottom` set to solid 1px var(--cx-color-light) on `%cx-configurator-overview-form` for `topLevel` selector to create the bottom border of the attribute header

* `border-top` set to solid 1px var(--cx-color-light) on `%cx-configurator-overview-form` for `topLevel` selector to create the top border of the attribute header

* `border-left-style` set to none on `%cx-configurator-overview-form` for `topLevel` selector to achieve top-bottom border

* `border-right-style` set to none on `%cx-configurator-overview-form` for `topLevel` selector to achieve top-bottom border

* `background` set to none on `%cx-configurator-overview-form` for `topLevel` to make the header background transparent

* `text-transform` set to none on `%cx-configurator-overview-form` for `topLevel` to prevent the header form transforming to uppercase

* `margin-bottom` set to -60px on `%cx-configurator-overview-form` for `subgroupTopLevel` to eliminate the space between the top-level attribute header and its subgroups

* `background-color` set to var(--cx-color-background) on `%cx-configurator-overview-form` for `cx-group h2` to set the background color of the subgroup headers

* `font-size` set to 16px on `%cx-configurator-overview-form` for `cx-group h2` to specify the font size of the subgroup headers

* `text-transform` set to uppercase on `%cx-configurator-overview-form` for `cx-group h2` to transform the subgroup header into uppercase

## Changes in Configurator Overview Attribute Component

* `width` set to 40% on `%cx-configurator-overview-attribute` for `cx-attribute-value` selector to use only 40% of the width for the small widgets.

* `width` set to 60% on `%cx-configurator-overview-attribute` for `cx-attribute-label` selector to use only 60% of the width for the small widgets.

* `font-weight` set to 700 on `%cx-configurator-overview-attribute` for `cx-attribute-value` to make the attribute values bold
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ <h2>{{ 'configurator.overviewForm.noAttributeHeader' | cxTranslate }}</h2>
[class.subgroupTopLevel]="level === 1 && group.subGroups?.length > 0"
>
<h2>
<ng-container *cxFeatureLevel="'!3.3'">
<ng-container>
{{ group.groupDescription }}
</ng-container>
<ng-container *cxFeatureLevel="'3.3'">
<ng-container>
<span>{{ group.groupDescription }}</span>
</ng-container>
</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ const convertedOverview: Configurator.Overview = {
value: 'V1',
},
],
},
{
id: '11',
groupDescription: undefined,
attributes: [],
subGroups: [
{
id: '11',
groupDescription: undefined,
attributes: [],
},
],
},
{
id: '2',
Expand Down Expand Up @@ -74,16 +76,17 @@ Object.freeze(group3);
const subGroups: OccConfigurator.GroupOverview[] = [group3];
Object.freeze(subGroups);

const subgroup: OccConfigurator.GroupOverview = { id: '11' };
const group1: OccConfigurator.GroupOverview = {
id: '1',
groupDescription: groupDescription,
subGroups: [{ id: '11' }],
characteristicValues: [
{
characteristic: 'C1',
value: 'V1',
},
],
subGroups: [subgroup],
};
Object.freeze(group1);

Expand Down Expand Up @@ -158,7 +161,7 @@ describe('OccConfiguratorVariantNormalizer', () => {

it('should cover sub groups', () => {
const result = occConfiguratorVariantOverviewNormalizer.convert(overview);
expect(result.groups.length).toBe(3);
expect(result.groups?.length).toBe(2);
});

it('should be able to handle groups without attributes', () => {
Expand All @@ -181,7 +184,7 @@ describe('OccConfiguratorVariantNormalizer', () => {
const result = occConfiguratorVariantOverviewNormalizer.convertGroup(
groupWithSubgroups
);
expect(result.length).toBe(5);
expect(result.length).toBe(1);
});
it('should set description for a general group', () => {
const generalTargetGroup: Configurator.GroupOverview = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

&.topLevel {
h2 {
font-size: 16px;
font-size: 1.75rem;
font-weight: 700;
border-bottom: solid 1px var(--cx-color-light);
border-top: solid 1px var(--cx-color-light);
Expand Down

0 comments on commit 2ee7c8c

Please sign in to comment.