Add File Manager and enhanced Queue features

File Manager:
- Add full File Manager page for browsing local library files
- Implement folder hierarchy with create/rename/delete operations
- Add file uploads with drag-and-drop support
- Enable adding sliced files directly to print queue
- Add linked folders with external path mounting

Queue Enhancements:
- Add plate selection for multi-plate 3MF files
- Add print options (bed levelling, flow calibration, vibration
  calibration, layer inspection, timelapse, use AMS)
- Fix print_count increment to only occur on actual prints

Testing:
- Add backend integration tests for library API (15 tests)
- Add backend integration tests for queue print options (8 tests)
- Add frontend tests for EditQueueItemModal (10 tests)
- Suppress console noise in frontend test suite

Closes #94
This commit is contained in:
maziggy
2026-01-19 13:29:37 +01:00
committed by MartinNYHC
parent b2831d09a2
commit d48abe0f6a
36 changed files with 13111 additions and 8793 deletions
@@ -168,6 +168,81 @@ class TestPrintQueueAPI:
assert result["archive_id"] == archive.id
assert result["ams_mapping"] == [5, -1, 2, -1]
@pytest.mark.asyncio
@pytest.mark.integration
async def test_add_to_queue_with_plate_id(
self, async_client: AsyncClient, printer_factory, archive_factory, db_session
):
"""Verify item can be added to queue with plate_id for multi-plate 3MF."""
printer = await printer_factory()
archive = await archive_factory()
data = {
"printer_id": printer.id,
"archive_id": archive.id,
"plate_id": 3,
}
response = await async_client.post("/api/v1/queue/", json=data)
assert response.status_code == 200
result = response.json()
assert result["plate_id"] == 3
@pytest.mark.asyncio
@pytest.mark.integration
async def test_add_to_queue_with_print_options(
self, async_client: AsyncClient, printer_factory, archive_factory, db_session
):
"""Verify item can be added to queue with print options."""
printer = await printer_factory()
archive = await archive_factory()
data = {
"printer_id": printer.id,
"archive_id": archive.id,
"bed_levelling": False,
"flow_cali": True,
"vibration_cali": False,
"layer_inspect": True,
"timelapse": True,
"use_ams": False,
}
response = await async_client.post("/api/v1/queue/", json=data)
assert response.status_code == 200
result = response.json()
assert result["bed_levelling"] is False
assert result["flow_cali"] is True
assert result["vibration_cali"] is False
assert result["layer_inspect"] is True
assert result["timelapse"] is True
assert result["use_ams"] is False
@pytest.mark.asyncio
@pytest.mark.integration
async def test_update_queue_item_plate_id(self, async_client: AsyncClient, queue_item_factory, db_session):
"""Verify queue item plate_id can be updated."""
item = await queue_item_factory()
response = await async_client.patch(f"/api/v1/queue/{item.id}", json={"plate_id": 5})
assert response.status_code == 200
result = response.json()
assert result["plate_id"] == 5
@pytest.mark.asyncio
@pytest.mark.integration
async def test_update_queue_item_print_options(self, async_client: AsyncClient, queue_item_factory, db_session):
"""Verify queue item print options can be updated."""
item = await queue_item_factory()
response = await async_client.patch(
f"/api/v1/queue/{item.id}",
json={
"bed_levelling": False,
"timelapse": True,
},
)
assert response.status_code == 200
result = response.json()
assert result["bed_levelling"] is False
assert result["timelapse"] is True
@pytest.mark.asyncio
@pytest.mark.integration
async def test_get_queue_item(self, async_client: AsyncClient, queue_item_factory, db_session):