committed by
GitHub
3 changed files with 39 additions and 1 deletions
@ -0,0 +1,5 @@ |
|||||
|
--- |
||||
|
'@vben/layouts': patch |
||||
|
--- |
||||
|
|
||||
|
fix(@vben/layouts): keep the notification status indicator circular across theme radii |
||||
@ -0,0 +1,33 @@ |
|||||
|
import type { App } from 'vue'; |
||||
|
|
||||
|
import { createApp, h } from 'vue'; |
||||
|
|
||||
|
import { afterEach, describe, expect, it } from 'vitest'; |
||||
|
|
||||
|
import Notification from '../notification.vue'; |
||||
|
|
||||
|
let activeApp: App | undefined; |
||||
|
|
||||
|
afterEach(() => { |
||||
|
activeApp?.unmount(); |
||||
|
activeApp = undefined; |
||||
|
document.body.innerHTML = ''; |
||||
|
}); |
||||
|
|
||||
|
describe('notification popup', () => { |
||||
|
it('renders the notification status indicator as a circle', () => { |
||||
|
const host = document.createElement('div'); |
||||
|
document.body.append(host); |
||||
|
|
||||
|
activeApp = createApp({ |
||||
|
render: () => h(Notification, { dot: true }), |
||||
|
}); |
||||
|
activeApp.mount(host); |
||||
|
|
||||
|
const indicator = host.querySelector<HTMLElement>('.bell-button > span'); |
||||
|
|
||||
|
expect(indicator).not.toBeNull(); |
||||
|
expect(indicator?.classList).toContain('rounded-full'); |
||||
|
expect(indicator?.classList).not.toContain('rounded-sm'); |
||||
|
}); |
||||
|
}); |
||||
Loading…
Reference in new issue