ci: trigga på master + formatfix inför Gitea Actions
CI / Typecheck, test & build (push) Failing after 2s
CI / Typecheck, test & build (push) Failing after 2s
This commit is contained in:
@@ -31,13 +31,25 @@ describe("scan-to-scan-diff", () => {
|
||||
.from(schema.inventoryItems)
|
||||
.where(eq(schema.inventoryItems.householdId, m.householdId));
|
||||
for (const it of items) {
|
||||
await testDb.db.delete(schema.inventoryTransactions).where(eq(schema.inventoryTransactions.inventoryItemId, it.id));
|
||||
await testDb.db.delete(schema.inventoryConflicts).where(eq(schema.inventoryConflicts.inventoryItemId, it.id));
|
||||
await testDb.db
|
||||
.delete(schema.inventoryTransactions)
|
||||
.where(eq(schema.inventoryTransactions.inventoryItemId, it.id));
|
||||
await testDb.db
|
||||
.delete(schema.inventoryConflicts)
|
||||
.where(eq(schema.inventoryConflicts.inventoryItemId, it.id));
|
||||
}
|
||||
await testDb.db.delete(schema.inventoryItems).where(eq(schema.inventoryItems.householdId, m.householdId));
|
||||
await testDb.db.delete(schema.inventoryConflicts).where(eq(schema.inventoryConflicts.householdId, m.householdId));
|
||||
await testDb.db.delete(schema.storageLocations).where(eq(schema.storageLocations.householdId, m.householdId));
|
||||
await testDb.db.delete(schema.householdMembers).where(eq(schema.householdMembers.householdId, m.householdId));
|
||||
await testDb.db
|
||||
.delete(schema.inventoryItems)
|
||||
.where(eq(schema.inventoryItems.householdId, m.householdId));
|
||||
await testDb.db
|
||||
.delete(schema.inventoryConflicts)
|
||||
.where(eq(schema.inventoryConflicts.householdId, m.householdId));
|
||||
await testDb.db
|
||||
.delete(schema.storageLocations)
|
||||
.where(eq(schema.storageLocations.householdId, m.householdId));
|
||||
await testDb.db
|
||||
.delete(schema.householdMembers)
|
||||
.where(eq(schema.householdMembers.householdId, m.householdId));
|
||||
await testDb.db.delete(schema.households).where(eq(schema.households.id, m.householdId));
|
||||
}
|
||||
await testDb.db.delete(schema.scanJobs).where(eq(schema.scanJobs.userId, u.id));
|
||||
@@ -107,8 +119,20 @@ describe("scan-to-scan-diff", () => {
|
||||
jobType: "ANALYZE_FRIDGE_IMAGE",
|
||||
status: "completed",
|
||||
result: [
|
||||
{ displayName: "Mjölk", quantity: 0.5, unit: "LITER", storageLocationId: location!.id, confidence: 0.9 },
|
||||
{ displayName: "Ost", quantity: 1, unit: "COUNT", storageLocationId: location!.id, confidence: 0.9 },
|
||||
{
|
||||
displayName: "Mjölk",
|
||||
quantity: 0.5,
|
||||
unit: "LITER",
|
||||
storageLocationId: location!.id,
|
||||
confidence: 0.9,
|
||||
},
|
||||
{
|
||||
displayName: "Ost",
|
||||
quantity: 1,
|
||||
unit: "COUNT",
|
||||
storageLocationId: location!.id,
|
||||
confidence: 0.9,
|
||||
},
|
||||
],
|
||||
modelVersion: "v1",
|
||||
promptVersion: "p1",
|
||||
@@ -151,7 +175,17 @@ describe("scan-to-scan-diff", () => {
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
payload: {},
|
||||
});
|
||||
const { rows } = JSON.parse(diff.body) as { rows: Array<{ kind: string; itemId?: string; previousItemId?: string; displayName: string; newQuantity?: number; newLocationId?: string; confidence: number }> };
|
||||
const { rows } = JSON.parse(diff.body) as {
|
||||
rows: Array<{
|
||||
kind: string;
|
||||
itemId?: string;
|
||||
previousItemId?: string;
|
||||
displayName: string;
|
||||
newQuantity?: number;
|
||||
newLocationId?: string;
|
||||
confidence: number;
|
||||
}>;
|
||||
};
|
||||
const changed = rows.find((r) => r.kind === "quantity_changed")!;
|
||||
|
||||
const apply = await app.inject({
|
||||
|
||||
Reference in New Issue
Block a user