feat(studio): recover matching Nitro sources and persist import phases
This commit is contained in:
1 parent
00e33623f7
commit
13bd3695cb
45 files changed
+903
-28
No files matched your search
@@ -98,3 +98,48 @@ test("history polling pauses while hidden and refreshes on visibility return", a
|
||||
});
|
||||
await expect.poll(() => requests).toBe(hiddenCount + 1);
|
||||
});
|
||||
|
||||
test("history shows the current phase and validated recovery source", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.route("**/api/admin/studio/import-jobs?*", (route) =>
|
||||
route.fulfill({
|
||||
json: {
|
||||
ok: true,
|
||||
jobs: [
|
||||
{
|
||||
...furnitureJobFixture,
|
||||
state: "running",
|
||||
items: [
|
||||
{
|
||||
...furnitureJobFixture.items[0],
|
||||
state: "running",
|
||||
phase: "writing_db",
|
||||
phaseStartedAt: new Date().toISOString(),
|
||||
recoveredSource: {
|
||||
sourceId: "configured",
|
||||
sourceName: "Configured source",
|
||||
revision: 42,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
nextCursor: null,
|
||||
},
|
||||
}),
|
||||
);
|
||||
await page.goto("/admin/jobs-harness?progress");
|
||||
await page.locator("details details summary").click();
|
||||
await expect(
|
||||
page.getByText("Current phase: Saving SQL and catalog"),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByText(/Bundle recovered from Configured source/),
|
||||
).toBeVisible();
|
||||
expect(
|
||||
await page.evaluate(
|
||||
() => document.documentElement.scrollWidth > innerWidth,
|
||||
),
|
||||
).toBe(false);
|
||||
});
|
||||
Reference in new issue
Block a user