fix: Default advanced-camera-card-icon to display: block (#2737)

- Inspired by @tieskuh and #2734
This commit is contained in:
Dermot Duffy
2026-08-30 13:40:35 -07:00
committed by GitHub
parent fc7e09952f
commit f2e8681daf
5 changed files with 26 additions and 9 deletions
+25
View File
@@ -0,0 +1,25 @@
import { describe, expect, it } from 'vitest';
import { deepQuery } from '../browser/dom';
import {
createTestFrigateEvent,
EVENT_TIME_NEWER,
mountCardWithFrigate,
} from '../browser/fake-frigate';
import { waitForThumbnails } from '../browser/test-utils';
describe('AdvancedCameraCardIcon', () => {
it('should be block level so it does not sit on a line of text', async () => {
const events = [createTestFrigateEvent('newer', EVENT_TIME_NEWER)];
const { card } = await mountCardWithFrigate(events, { view: { default: 'clips' } });
await waitForThumbnails(card, events.length);
// The drawer control is an icon alone in a block container that declares no
// display of its own, so what it computes to is the component's own
// default.
const icon = deepQuery(card.card, 'advanced-camera-card-icon.control');
expect(icon).not.toBeNull();
expect(icon && getComputedStyle(icon).display).toBe('block');
});
});