Fix Read .grbl
This commit is contained in:
@@ -82,6 +82,22 @@ test('Stepping ohne aktives Programm → auto-lädt Default (leer → EMPTY_PROG
|
||||
expect(a.programId).toBe(cfg.defaultProgramId); // Default wurde geladen
|
||||
});
|
||||
|
||||
test('FShow ohne FLoad → auto-lädt Default und liefert volle Zeilenliste', async () => {
|
||||
await store.write(cfg.defaultProgramId, {
|
||||
name: 'log',
|
||||
lines: [
|
||||
'G90 G1 x0 y300 z0 a90.00 b-90.00 c0.00 e0.00 f1000 ;1',
|
||||
'G90 G1 x10 y300 z0 a0.00 b-90.00 c0.00 e0.00 f1000 ;2',
|
||||
],
|
||||
});
|
||||
const a = new ActiveState();
|
||||
const state = await a.show(); // frisch, ohne vorheriges FLoad/FPoint
|
||||
expect(state.programId).toBe(cfg.defaultProgramId);
|
||||
expect(state.lineCount).toBe(2);
|
||||
expect(state.lines).toHaveLength(2); // volle Liste für die Anzeige
|
||||
expect(state.lines[0]).toContain('a90.00'); // in Grad, wie gespeichert
|
||||
});
|
||||
|
||||
test('Stepping nach Neustart liest Default-Programm von Disk (FFirst ohne FLoad)', async () => {
|
||||
// Simuliert: log.gcode liegt auf Disk, frischer ActiveState (wie nach Container-Neustart)
|
||||
await store.write(cfg.defaultProgramId, {
|
||||
|
||||
Reference in New Issue
Block a user