test(09-03): add failing .ps1 route and detail-page link tests

- Create tests/test_script_download.py with 5 tests for .ps1 routes (install/uninstall/detect, 404, 422)
- Add test_detail_page_shows_script_links to TestCommandPreview in tests/test_packages.py
- All 6 new tests go RED (routes and template links do not exist yet)
This commit is contained in:
2026-04-13 10:47:09 +02:00
parent 71c808601c
commit d3590017e9
2 changed files with 130 additions and 0 deletions
+10
View File
@@ -190,6 +190,16 @@ class TestCommandPreview:
assert f"/printers/{printer.id}/icon" in html
assert "icon-status" in html
def test_detail_page_shows_script_links(self, client, setup_printer_with_driver):
"""Printer detail page shows 3 direct .ps1 script download links when driver assigned."""
printer, _ = setup_printer_with_driver
resp = client.get(f"/printers/{printer.id}")
assert resp.status_code == 200
html = resp.text
assert f"/printers/{printer.id}/scripts/install.ps1" in html
assert f"/printers/{printer.id}/scripts/uninstall.ps1" in html
assert f"/printers/{printer.id}/scripts/detect.ps1" in html
# ---------------------------------------------------------------------------
# Icon inclusion in .intunewin export