Upload via GUI (85 Dateien)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert');
|
||||
const { remainingMs, centeredBounds, MIN_SPIN_MS } = require('../src/features/splash.js');
|
||||
|
||||
test('Startanimation: wurde das Logo nie gezeigt, gibt es keine Wartezeit', () => {
|
||||
assert.strictEqual(remainingMs(0, 5000, 1600), 0);
|
||||
});
|
||||
|
||||
test('Startanimation: das Logo dreht sich mindestens minMs', () => {
|
||||
assert.strictEqual(remainingMs(1000, 1300, 1600), 1300);
|
||||
assert.strictEqual(remainingMs(1000, 1000, 1600), 1600);
|
||||
});
|
||||
|
||||
test('Startanimation: nach Ablauf von minMs wird nicht mehr gewartet', () => {
|
||||
assert.strictEqual(remainingMs(1000, 2600, 1600), 0);
|
||||
assert.strictEqual(remainingMs(1000, 9000, 1600), 0);
|
||||
});
|
||||
|
||||
test('Startanimation: Mindestdauer ist wie bei AeroMC 1,6 s', () => {
|
||||
assert.strictEqual(MIN_SPIN_MS, 1600);
|
||||
});
|
||||
|
||||
test('Startanimation: Fenster wird im Arbeitsbereich zentriert', () => {
|
||||
const b = centeredBounds({ x: 0, y: 0, width: 1920, height: 1040 }, 1200, 820);
|
||||
assert.deepStrictEqual(b, { x: 360, y: 110, width: 1200, height: 820 });
|
||||
});
|
||||
|
||||
test('Startanimation: Arbeitsbereich mit Versatz und mehrere Monitore', () => {
|
||||
const b = centeredBounds({ x: -1920, y: 40, width: 1920, height: 1000 }, 1200, 820);
|
||||
assert.deepStrictEqual(b, { x: -1560, y: 130, width: 1200, height: 820 });
|
||||
});
|
||||
|
||||
test('Startanimation: auf kleinen Bildschirmen wird das Fenster begrenzt', () => {
|
||||
const b = centeredBounds({ x: 0, y: 0, width: 1024, height: 700 }, 1200, 820);
|
||||
assert.deepStrictEqual(b, { x: 0, y: 0, width: 1024, height: 700 });
|
||||
});
|
||||
Reference in New Issue
Block a user