mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-18 18:23:43 +08:00
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.
47 lines
1.3 KiB
TypeScript
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);
|
|
});
|