feat(connection): preserve failed one-time connections

This commit is contained in:
zipg authored and GitHub committed 2026-08-25 14:02:51 +08:00
1 parent d1d8dc4aec
commit b488942d82
2 files changed
+11 -1

No files matched your search

@@ -31,4 +31,13 @@ describe("ConnectionDialog service deep-link hydration", () => {
expect(applyBody).toContain("parseConnectionDeepLink(input) ?? parseServiceConnectionUrl(input)");
expect(applyBody.indexOf("applyConnectionDraftToForm")).toBeLessThan(applyBody.indexOf("parseConnectionUrl(input"));
});
it("keeps failed one-time connections available for error inspection and retry", () => {
const saveStart = source.indexOf("async function save()");
const saveEnd = source.indexOf('const dialogTitle = ref("")', saveStart);
const saveBody = source.slice(saveStart, saveEnd);
expect(saveBody).not.toContain("store.removeConnection(config.id)");
expect(saveBody).toContain('emit("connectFailed"');
});
});