feat(files): sync Source panel browser with chosen save directory
This commit is contained in:
@@ -28,3 +28,16 @@ def test_recorded_live_file_flagged_as_recording(qapp, tmp_path):
|
||||
files_by_name = {Path(row["fileName"]).name: row for row in browser.files}
|
||||
assert files_by_name["live_P00001_20260706_143022.csv"]["isRecording"] is True
|
||||
assert files_by_name["P00002-20260706_143500.csv"]["isRecording"] is False
|
||||
|
||||
|
||||
def test_set_current_directory_updates_dir_and_refreshes(qapp, tmp_path):
|
||||
"""setCurrentDirectory (no native dialog) is how the Status tab's save-dir
|
||||
picker keeps the Source panel pointed at the same folder."""
|
||||
_write_csv(tmp_path / "P00003-20260706_143500.csv")
|
||||
|
||||
browser = FileBrowser()
|
||||
browser.setCurrentDirectory(str(tmp_path))
|
||||
|
||||
assert browser.currentDirectory == str(tmp_path)
|
||||
assert len(browser.files) == 1
|
||||
assert Path(browser.files[0]["fileName"]).name == "P00003-20260706_143500.csv"
|
||||
|
||||
Reference in New Issue
Block a user