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
20 changes: 10 additions & 10 deletions packages/main/src/components/ObjectPage/ObjectPage.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe('ObjectPage', () => {
cy.get('[ui5-tabcontainer]').findUi5TabByText('Section 15').should('have.attr', 'aria-selected', 'true');

if (mode === ObjectPageMode.Default) {
cy.findByTestId('op').scrollTo(0, 4660);
cy.findByTestId('op').scrollTo(0, 4750);

cy.findByText('Content 7').should('be.visible');
cy.get('[ui5-tabcontainer]').findUi5TabByText('Section 7').should('have.attr', 'aria-selected', 'true');
Expand All @@ -124,7 +124,7 @@ describe('ObjectPage', () => {
for (let i = 0; i < 15; i++) {
cy.findByText('Add').click();
}
cy.findByTestId('op').scrollTo(0, 4660);
cy.findByTestId('op').scrollTo(0, 4750);

cy.findByText('Content 7').should('be.visible');
cy.get('[ui5-tabcontainer]').findUi5TabByText('Section 7').should('have.attr', 'aria-selected', 'true');
Expand Down Expand Up @@ -712,19 +712,19 @@ describe('ObjectPage', () => {
};
cy.mount(<TestComp height="2000px" mode={ObjectPageMode.Default} />);
cy.findByText('Update Heights').click();
cy.findByText('{"offset":1080,"scroll":2270}').should('exist');
cy.findByText('{"offset":1080,"scroll":2290}').should('exist');

cy.findByTestId('op').scrollTo('bottom');
cy.findByText('Update Heights').click({ force: true });
cy.findByText('{"offset":1080,"scroll":2270}').should('exist');
cy.findByText('{"offset":1080,"scroll":2290}').should('exist');

cy.mount(<TestComp height="2000px" withFooter mode={ObjectPageMode.Default} />);
cy.findByText('Update Heights').click();
cy.findByText('{"offset":1080,"scroll":2320}').should('exist');
cy.findByText('{"offset":1080,"scroll":2330}').should('exist');

cy.findByTestId('op').scrollTo('bottom');
cy.findByText('Update Heights').click({ force: true });
cy.findByText('{"offset":1080,"scroll":2320}').should('exist');
cy.findByText('{"offset":1080,"scroll":2330}').should('exist');

cy.mount(<TestComp height="400px" mode={ObjectPageMode.Default} />);
cy.findByText('Update Heights').click();
Expand Down Expand Up @@ -809,19 +809,19 @@ describe('ObjectPage', () => {
};
cy.mount(<TestComp height="2000px" mode={ObjectPageMode.IconTabBar} />);
cy.findByText('Update Heights').click();
cy.findByText('{"offset":1080,"scroll":2270}').should('exist');
cy.findByText('{"offset":1080,"scroll":2290}').should('exist');

cy.findByTestId('op').scrollTo('bottom');
cy.findByText('Update Heights').click({ force: true });
cy.findByText('{"offset":1080,"scroll":2270}').should('exist');
cy.findByText('{"offset":1080,"scroll":2290}').should('exist');

cy.mount(<TestComp height="2000px" withFooter mode={ObjectPageMode.IconTabBar} />);
cy.findByText('Update Heights').click();
cy.findByText('{"offset":1080,"scroll":2330}').should('exist');
cy.findByText('{"offset":1080,"scroll":2350}').should('exist');

cy.findByTestId('op').scrollTo('bottom');
cy.findByText('Update Heights').click({ force: true });
cy.findByText('{"offset":1080,"scroll":2330}').should('exist');
cy.findByText('{"offset":1080,"scroll":2350}').should('exist');

cy.mount(<TestComp height="400px" mode={ObjectPageMode.IconTabBar} />);
cy.findByText('Update Heights').click();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
&:first-of-type {
margin-block-start: 1px;
}
margin-block-end: 1rem;
}

.section [data-component-name='ObjectPageSubSection']:not(:first-child) {
padding-block-start: 0.5rem;
padding-block-start: 1rem;
}

.section:focus {
Expand All @@ -28,8 +29,8 @@
}

.title {
height: var(--_ui5wcr_ObjectPage_SectionTitleHeight);
line-height: var(--_ui5wcr_ObjectPage_SectionTitleLineHeight);
height: 2.25rem;
line-height: 2.25rem;
color: var(--sapGroup_TitleTextColor);
font-size: var(--sapFontHeader4Size);
display: inline-block;
Expand Down Expand Up @@ -62,7 +63,7 @@
}

.sectionContentInner {
padding-block: 0.5rem;
padding-block-start: 1rem;
font-family: var(--sapFontFamily);
height: 100%;
box-sizing: border-box;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
.subSectionContent {
background-color: var(--_ui5wcr_ObjectPage_SubSectionBackgroundColor);
border-radius: var(--_ui5wcr_ObjectPage_SubSectionBorderRadius);
padding-block: 1rem;
padding-block: 0.5rem;
}

.spacer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ describe('ThemeProvider', () => {

it('injects css via JS', () => {
cy.mount(<span>Hello World</span>);
cy.get('html').should('have.css', '--_ui5wcr_ObjectPage_SectionTitleLineHeight', '4rem');
cy.get('html').should('have.css', '--_ui5wcr_Scrollbar_Border', 'none');
});

it('does not inject CSS when staticCssInjected is true', () => {
cy.mount(<span>Hello World</span>, { themeProviderProps: { staticCssInjected: true } });
cy.get('html').should('not.have.css', '--_ui5wcr_ObjectPage_SectionTitleLineHeight');
cy.get('html').should('not.have.css', '--_ui5wcr_Scrollbar_Border');
});
});
1 change: 1 addition & 0 deletions packages/main/src/themes/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
--_ui5wcr_ActionSheet_MobileHeaderBoxShadow: none;
--_ui5wcr_ActionSheet_MobileHeaderTextColor: var(--sapContent_ContrastTextColor);
--_ui5wcr_ObjectPage_SectionTitleFontFamily: var(--sapFontFamily);
/*ToDo: no used anymore - remove in next major version */
--_ui5wcr_ObjectPage_SectionTitleLineHeight: 2.25rem;
--_ui5wcr_ObjectPage_SubSectionBorderRadius: 0;
--_ui5wcr_Splitter_BarBorderHighContrastFix: var(--sapContent_FocusWidth) solid var(--sapContent_FocusColor);
Expand Down
1 change: 0 additions & 1 deletion packages/main/src/themes/sap_horizon.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
--_ui5wcr_ActionSheet_MobileHeaderBoxShadow: var(--sapContent_Shadow2);
--_ui5wcr_ActionSheet_MobileHeaderTextColor: var(--sapPageHeader_TextColor);
--_ui5wcr_ObjectPage_SectionTitleFontFamily: var(--sapFontBoldFamily);
--_ui5wcr_ObjectPage_SectionTitleLineHeight: 4rem;
--_ui5wcr_ObjectPage_SubSectionBorderRadius: var(--sapElement_BorderCornerRadius);
--_ui5wcr_ActionSheet_MobileHeaderBackground: var(--sapPageHeader_Background);
--_ui5wcr_ActionSheet_MobileHeaderBorderRadius: var(--sapPopover_BorderCornerRadius);
Expand Down
1 change: 0 additions & 1 deletion packages/main/src/themes/sap_horizon_dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
--_ui5wcr_ActionSheet_MobileHeaderBoxShadow: var(--sapContent_Shadow2);
--_ui5wcr_ActionSheet_MobileHeaderTextColor: var(--sapPageHeader_TextColor);
--_ui5wcr_ObjectPage_SectionTitleFontFamily: var(--sapFontBoldFamily);
--_ui5wcr_ObjectPage_SectionTitleLineHeight: 4rem;
--_ui5wcr_ObjectPage_SubSectionBorderRadius: var(--sapElement_BorderCornerRadius);
--_ui5wcr_ActionSheet_MobileHeaderBackground: var(--sapPageHeader_Background);
--_ui5wcr_ActionSheet_MobileHeaderBorderRadius: var(--sapPopover_BorderCornerRadius);
Expand Down
Loading