fix(archive): preserve prepared sessions across restarts
This commit is contained in:
@@ -160,7 +160,7 @@ test("session catalog exposes authoritative background preparation state", () =>
|
||||
});
|
||||
});
|
||||
|
||||
test("saved-session rows use only authoritative ready, processing and error states", () => {
|
||||
test("saved-session rows distinguish durable, active, cold and failed states", () => {
|
||||
const makeDecoded = (state, overrides = {}) => decodeObservationSessionCatalog({
|
||||
items: [session({
|
||||
status: "interrupted",
|
||||
@@ -187,7 +187,7 @@ test("saved-session rows use only authoritative ready, processing and error stat
|
||||
observationSessionVisualState(makeDecoded("failed", { status: "recording" })),
|
||||
"error",
|
||||
);
|
||||
assert.equal(observationSessionVisualState(makeDecoded(null)), "error");
|
||||
assert.equal(observationSessionVisualState(makeDecoded(null)), "cold");
|
||||
assert.equal(
|
||||
observationSessionVisualState(makeDecoded(null, { status: "recording" })),
|
||||
"processing",
|
||||
@@ -206,6 +206,7 @@ test("saved-session rows use only authoritative ready, processing and error stat
|
||||
);
|
||||
assert.equal(observationSessionVisualLabel("ready"), "Готово");
|
||||
assert.equal(observationSessionVisualLabel("processing"), "Обработка");
|
||||
assert.equal(observationSessionVisualLabel("cold"), "Подготовить");
|
||||
assert.equal(observationSessionVisualLabel("error"), "Ошибка");
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user