Add per-order speed and material KPIs
This commit is contained in:
1 parent
211fb45d52
commit
f6ebd78a4a
15 files changed
+773
-30
No files matched your search
@@ -34,6 +34,26 @@ def test_shift_report_mode_navigation():
|
||||
assert ".mode-nav a:focus-visible" in html
|
||||
|
||||
|
||||
def test_production_rows_show_attributed_kpis_and_link_fa_to_detail():
|
||||
value = material_report((10,))
|
||||
item = replace(value.production.items[0], production_order="FA A/1",
|
||||
average_speed_m_min=10.24, material_consumption_kg=3317.58)
|
||||
html = page(replace(value, production=replace(value.production, items=(item,))))
|
||||
assert '<a class="fa-link" href="/order?production_order=FA+A%2F1">FA A/1</a>' in html
|
||||
assert '<th scope="col">Ø Geschwindigkeit</th>' in html
|
||||
assert '<td>10,24 m/min</td>' in html
|
||||
assert '<td>3.317,58 kg</td>' in html
|
||||
assert '<th scope="col">Details</th>' not in html
|
||||
|
||||
|
||||
def test_production_kpis_distinguish_unavailable_from_zero():
|
||||
value = material_report((10,))
|
||||
item = replace(value.production.items[0], average_speed_m_min=None,
|
||||
material_consumption_kg=0)
|
||||
html = page(replace(value, production=replace(value.production, items=(item,))))
|
||||
assert '<td>—</td><td>0,00 kg</td>' in html
|
||||
|
||||
|
||||
def test_multiple_materials_chart_and_table():
|
||||
html = page(material_report((10, 30)))
|
||||
assert '<figure class="material-chart">' in html
|
||||
|
||||
Reference in new issue
Block a user