Skip to content

Commit

Permalink
Wrong order of elements in productswitcher item (#4058)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesDoberer authored Dec 13, 2024
1 parent 91e0edb commit 5b395a6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,23 +77,22 @@ describe('create luigi-compound-container dynamically', () => {
cy.get('.content').invoke('append', scriptCode);
cy.get('luigi-compound-container')
.shadow()
.then($container => {
.then(($container) => {
return cy
.wrap($container)
.find(
'luigi-wc-68747470733a2f2f6c75696769776562636f6d706f6e656e74732e6769746c61622e696f2f6e6573746564322e6a73'
)
.shadow();
})
.then($innerContainer => {
.then(($innerContainer) => {
cy.wrap($innerContainer)
.get(
'luigi-wc-68747470733a2f2f6c75696769776562636f6d706f6e656e74732e6769746c61622e696f2f6c756967692d77632d6d66652f6d61696e2e6a73'
)
.should('exist')
.shadow()
.find('section')
.should('contain.text', 'This is a luigi micro frontend, based on web components.');
.should('not.exist'); // ShadowRoot in 'closed' mode
});
});
it('luigi compound container invalid JSON in context property', () => {
Expand Down Expand Up @@ -171,9 +170,7 @@ describe('create luigi-compound-container dynamically', () => {
cy.visit(tetsPage);
cy.get('.content').invoke('append', scriptCode);

cy.get('luigi-compound-container')
.shadow()
.should('not.exist');
cy.get('luigi-compound-container').shadow().should('not.exist');
});
it('luigi compound container with no shadow dom', () => {
const scriptCode = `
Expand Down Expand Up @@ -249,8 +246,6 @@ describe('create luigi-compound-container dynamically', () => {
cy.on('window:alert', stub);
cy.visit(tetsPage);
cy.get('.content').invoke('append', scriptCode);
cy.get('luigi-compound-container')
.shadow()
.should('not.exist');
cy.get('luigi-compound-container').shadow().should('not.exist');
});
});
2 changes: 1 addition & 1 deletion core/src/navigation/MobileTopNavDropDown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
data-e2e="mobile-topnav-item"
data-testid={NavigationHelpers.getTestId(node)}
>
<div class="lui-product-switch__icon">
<div class="lui-product-switch__icon fd-product-switch__icon sap-icon">
{#if hasOpenUIicon(node)}
<i class="sap-icon {node.icon && hasOpenUIicon(node) ? getSapIconStr(node.icon) : ''}" />
{:else}
Expand Down
8 changes: 6 additions & 2 deletions core/src/navigation/ProductSwitcher.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
}}
class="fd-menu__link"
>
<div class="lui-product-switch__icon">
<div class="lui-product-switch__icon fd-product-switch__icon sap-icon">
{#if hasOpenUIicon(productSwitcherItem)}
<i
class="sap-icon {productSwitcherItem.icon && hasOpenUIicon(productSwitcherItem)
Expand All @@ -159,7 +159,7 @@
</div>
</a>
{:else}
<div class="lui-product-switch__icon">
<div class="lui-product-switch__icon fd-product-switch__icon sap-icon">
{#if hasOpenUIicon(productSwitcherItem)}
<i
class="sap-icon {productSwitcherItem.icon && hasOpenUIicon(productSwitcherItem)
Expand Down Expand Up @@ -213,4 +213,8 @@
color: var(--sapShell_InteractiveTextColor, #d1e8ff);
}
}
.fd-product-switch__item .fd-menu__link {
display: block;
}
</style>

0 comments on commit 5b395a6

Please sign in to comment.