Skip to content
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

fix(ui5-tab-container): correct inline mode visualization #8335

Merged
merged 1 commit into from
Feb 23, 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
2 changes: 1 addition & 1 deletion packages/main/src/TabInStrip.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{/if}}

<div class="ui5-tab-strip-itemContent">
{{#unless this._isInline}}
{{#unless this.isInline}}
{{> additionalText}}
{{/unless}}

Expand Down
2 changes: 1 addition & 1 deletion packages/main/test/pages/TabContainer.html
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ <h4>Content with set height: 300px</h4>
<section>
<h2>Icon and Text with tabLayout="Inline"</h2>

<ui5-tabcontainer tab-layout="Inline">
<ui5-tabcontainer tab-layout="Inline" id="tabContainerInlineTab">
<ui5-tab icon="sap-icon://card" text="Tab 1" additional-text="123">
<div class="tabcontainer2auto">
<h4>Content with set height: 300px</h4>
Expand Down
9 changes: 9 additions & 0 deletions packages/main/test/specs/TabContainer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,15 @@ describe("TabContainer general interaction", () => {
assert.ok(productsTabDomRefInStrip.isEqual(productsTabDomRefInStripExpected) , "Tab dom ref in strip should be the first child of the tab container's strip");
});

it("tests inline visualization", async () => {
const tabContainer = await browser.$("#tabContainerInlineTab");
const firstTabItemText = await tabContainer.shadow$(".ui5-tab-strip-itemText");

// Assert
assert.notOk(await tabContainer.shadow$(".ui5-tab-strip-itemAdditionalText").isExisting(), "There is no additional text.");
assert.strictEqual(await firstTabItemText.getProperty("innerText"), "Tab 1 (123)" , "The inline number is added to the text.");
});

});

describe("TabContainer keyboard handling", () => {
Expand Down