mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 17:06:15 -08:00
test(dashboard): pin the hero progress fill to its custom property
The hero moved into DashboardHeroComponent (#1738); its progress bar gets the same transform fill as the rail cards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0b5e874a06
commit
7aa3412cdc
1 file changed
+13
@@ -254,6 +254,19 @@ describe('DashboardHeroComponent', () => {
|
||||
).toBe('/workspace/a');
|
||||
});
|
||||
|
||||
it('positions the progress fill through a custom property, never its width', () => {
|
||||
// Animating width re-lays out the page on every live-EPG tick; the
|
||||
// stylesheet slides the fill with a transform driven by this property.
|
||||
slides.set([
|
||||
{ ...slide('a', 'Live'), contentType: 'live', progress: 42 },
|
||||
]);
|
||||
render();
|
||||
|
||||
const fill = host().querySelector<HTMLElement>('.hero__progress i');
|
||||
expect(fill?.style.getPropertyValue('--hero-progress')).toBe('42');
|
||||
expect(fill?.style.width).toBe('');
|
||||
});
|
||||
|
||||
it('renders nothing when there is nothing to feature', () => {
|
||||
slides.set([]);
|
||||
render();
|
||||
|
||||
Reference in new issue
Block a user