This commit is contained in:
germano2239 2022-07-26 17:27:51 +02:00
parent c46d5e1ab0
commit ce424dd152
4 changed files with 26 additions and 25 deletions

View File

@ -61,24 +61,24 @@ if admin is None or not admin.is_admin:
Users.register(username="USER", password="user")
Recipes.replace(
id=0,
name="Ferrari 923578",
client="Ferrari",
part_number="923578",
spec={"steps": []},
description="Tubo plastica doppia biforcazione con termorestringente centrale",
archived=False,
).execute()
Recipes.replace(
id=1,
name="BLOW-BY 5802814210",
client="",
part_number="5802814210",
spec={"steps": []},
description="Tubo blow-by",
archived=False,
).execute()
# Recipes.replace(
# id=0,
# name="Ferrari 923578",
# client="Ferrari",
# part_number="923578",
# spec={"steps": []},
# description="Tubo plastica doppia biforcazione con termorestringente centrale",
# archived=False,
# ).execute()
# Recipes.replace(
# id=1,
# name="BLOW-BY 5802814210",
# client="",
# part_number="5802814210",
# spec={"steps": []},
# description="Tubo blow-by",
# archived=False,
# ).execute()
if True:

View File

@ -80,7 +80,7 @@ Fasi di Test</string>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Perdite 1</string>
<string>Test caduta pressione 1</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="0">
@ -123,7 +123,7 @@ Fasi di Test</string>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Perdite 2</string>
<string>Test caduta pressione 2</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_5">
<item row="0" column="0">
@ -166,7 +166,7 @@ Fasi di Test</string>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Visione</string>
<string>Test telecamera</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">

View File

@ -39,9 +39,9 @@ class Test(Widget):
# "assembly_1": Test_Assembly(self.select_step_img("assembly_1"), u"INSERIRE SENSORE"),
"autotest": Test_Assembly(None, u"ESEGUIRE PROCEDURA DI AUTOTEST", Test_Autotest()),
"barcodes": Test_Assembly(None, u"SCANSIONARE IL SERIALE DEL PEZZO DA COLLAUDARE", Test_Barcodes()),
"done": Test_Assembly(self.select_step_img("success"), u"COLLAUDO COMPLETATO - RIMUOVERE IL SENSORE"),
"done": Test_Assembly(self.select_step_img("success"), u"COLLAUDO COMPLETATO"),
"emergency": Test_Assembly(self.select_step_img("reset_emergency"), u"EMERGENZA INTERVENUTA - RIPRISTINARE PULSANTE E SELEZIONARE \"RESET EMERGENZA\" DAL MEN\u00d9 \"STRUMENTI\""),
"fail": Test_Assembly(self.select_step_img("fail"), u"CICLO INTERROTTO - RIMUOVERE IL SENSORE"),
"fail": Test_Assembly(self.select_step_img("fail"), u"CICLO INTERROTTO"),
"leak": Test_Assembly(None, u"ESECUZIONE TEST IN CORSO - ATTENDERE", Test_Leak(components=self.components, recipe=self.recipe, step=self.step)),
"print": Test_Assembly(self.select_step_img("print"), u"STAMPA ETICHETTA IN CORSO"),
"select_recipe": Test_Assembly(None, u"SELEZIONARE IL CODICE DA COLLAUDARE", Recipe_Selection()),
@ -291,8 +291,8 @@ class Test(Widget):
"TTEST": "-",
"MAXLEAK": "-",
"PTESTMIN": "-",
"RESULT_L1": str(self.data.get("leak", [{}, {}])[0].get("results", {}).get("result", "FAIL")),
"RESULT_L2": str(self.data.get("leak", [{}, {}])[1].get("results", {}).get("result", "FAIL")),
"RESULT_L1": "ESITO",
"RESULT_L2": "CONFORME",
}
self.components["label_printer"].print_label("EtichettaR5", context=context)
self.log.info(f"cycle printed: {context!r}")

View File

@ -61,6 +61,7 @@ class Test_Test(Widget):
self.visualize()
def start(self, recipe=None, step=None):
self.admin_challenged = False
self.recipe = recipe
self.step = step
self.ok_counter = 0