-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: display tooltips over notifications (#6074)
* fix: display tooltips over notifications * set manual mode via attribute
- Loading branch information
1 parent
a0b56f4
commit 171b663
Showing
3 changed files
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { expect } from '@esm-bundle/chai'; | ||
import { fixtureSync, nextRender } from '@vaadin/testing-helpers'; | ||
import '@vaadin/notification'; | ||
import '@vaadin/tooltip'; | ||
|
||
describe('notification and tooltip', () => { | ||
beforeEach(async () => { | ||
const wrapper = fixtureSync(` | ||
<div> | ||
<vaadin-notification></vaadin-notification> | ||
<div id="target"></div> | ||
<vaadin-tooltip for="target" text="Tooltip" manual></vaadin-tooltip> | ||
</div> | ||
`); | ||
const notification = wrapper.querySelector('vaadin-notification'); | ||
const tooltip = wrapper.querySelector('vaadin-tooltip'); | ||
notification.opened = true; | ||
tooltip.opened = true; | ||
await nextRender(); | ||
}); | ||
|
||
it('should show tooltips above notifications', () => { | ||
const notificationContainer = document.querySelector('vaadin-notification-container'); | ||
const tooltipOverlay = document.querySelector('vaadin-tooltip-overlay'); | ||
|
||
const notificationZIndex = parseInt(getComputedStyle(notificationContainer).zIndex); | ||
const tooltipZIndex = parseInt(getComputedStyle(tooltipOverlay).zIndex); | ||
|
||
expect(tooltipZIndex).to.be.above(notificationZIndex); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters