feat: AudioEditorDialog scaffold + Edit-clip entry point (ops stubbed)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-02 18:09:54 +02:00
co-authored by Claude Opus 4.8
parent 1553d7faf0
commit a11e4859dd
2 changed files with 143 additions and 2 deletions
+21
View File
@@ -637,3 +637,24 @@ def test_merge_double_click_last_is_noop(win, tmp_path):
win._merge_list.clear(); win._merge_add_paths([str(a)])
win._on_merge_item_double_clicked(win._merge_list.item(0)) # only/last -> no dialog, no raise
assert win._merge_list.count() == 1
def test_audio_editor_dialog_scaffold(win):
import main as win_module
from PyQt6.QtWidgets import QPushButton
dlg = win_module.AudioEditorDialog("/nonexistent.wav", parent=win)
# version stack starts with the initial file
assert dlg._versions == ["/nonexistent.wav"]
assert dlg._ver_idx == 0
assert dlg._current() == "/nonexistent.wav"
# widgets present
assert dlg._wave is not None
for name in ("_btn_delete", "_btn_silence", "_btn_reverse", "_btn_trim",
"_btn_undo", "_btn_redo", "_btn_save_as"):
assert isinstance(getattr(dlg, name), QPushButton)
# undo disabled at the base version, redo disabled with no forward history
assert not dlg._btn_undo.isEnabled()
assert not dlg._btn_redo.isEnabled()
# a bad path decodes to an empty waveform without crashing
dlg._reload()
dlg.close()