Add live show player playback and effects
This commit is contained in:
22
resources/js/guest/lib/__tests__/liveShowEffects.test.ts
Normal file
22
resources/js/guest/lib/__tests__/liveShowEffects.test.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { resolveLiveShowEffect } from '../liveShowEffects';
|
||||
|
||||
describe('resolveLiveShowEffect', () => {
|
||||
it('adds flash overlay for shutter flash preset', () => {
|
||||
const effect = resolveLiveShowEffect('shutter_flash', 80, false);
|
||||
expect(effect.flash).toBeDefined();
|
||||
expect(effect.frame.initial).toBeDefined();
|
||||
expect(effect.frame.animate).toBeDefined();
|
||||
});
|
||||
|
||||
it('keeps light effects simple without flash', () => {
|
||||
const effect = resolveLiveShowEffect('light_effects', 80, false);
|
||||
expect(effect.flash).toBeUndefined();
|
||||
});
|
||||
|
||||
it('honors reduced motion with basic fade', () => {
|
||||
const effect = resolveLiveShowEffect('film_cut', 80, true);
|
||||
expect(effect.flash).toBeUndefined();
|
||||
expect(effect.frame.initial).toEqual({ opacity: 0 });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user