Files
KVideo/verification/tests/regression/player-cursor-visibility.test.ts
kuekhaoyang 3771b63332 feat: add self-contained strict verification chain
Keep every post-59948b5 change inside verification/. The verifier owns its npm working directory and sanitized Docker context, so no release metadata or root Docker configuration is modified.
2026-08-02 06:11:13 +08:00

47 lines
1.3 KiB
TypeScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { shouldHidePlayerCursor } from '../../../lib/player/cursor-visibility';
// GH-ISSUE: 114,191
test('shouldHidePlayerCursor hides the cursor during unobstructed fullscreen playback', () => {
assert.equal(shouldHidePlayerCursor({
isFullscreen: true,
isPlaying: true,
showControls: false,
}), true);
});
test('shouldHidePlayerCursor keeps the cursor visible outside fullscreen', () => {
assert.equal(shouldHidePlayerCursor({
isFullscreen: false,
isPlaying: true,
showControls: false,
}), false);
});
test('shouldHidePlayerCursor keeps the cursor visible while paused', () => {
assert.equal(shouldHidePlayerCursor({
isFullscreen: true,
isPlaying: false,
showControls: false,
}), false);
});
test('shouldHidePlayerCursor keeps the cursor visible while controls are shown', () => {
assert.equal(shouldHidePlayerCursor({
isFullscreen: true,
isPlaying: true,
showControls: true,
}), false);
});
test('shouldHidePlayerCursor keeps the cursor visible while an interactive overlay is open', () => {
assert.equal(shouldHidePlayerCursor({
isFullscreen: true,
isPlaying: true,
showControls: false,
hasInteractiveOverlay: true,
}), false);
});