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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user