fix(source): open pending tab while loading object source
This commit is contained in:
1 parent
eba6853480
commit
760d2c6409
14 files changed
+824
-149
No files matched your search
@@ -62,6 +62,20 @@ describe("openTabsPersistence originalSql round-trip", () => {
|
||||
expect(restored.objectSource).toBeUndefined();
|
||||
});
|
||||
|
||||
it("does not persist a pending object-source tab without its in-flight request", () => {
|
||||
const pending = queryTab({
|
||||
id: "pending-source",
|
||||
title: "Source - v_orders",
|
||||
sourceView: true,
|
||||
sourceLoad: {
|
||||
startedAt: Date.now(),
|
||||
request: { name: "v_orders", objectType: "VIEW" },
|
||||
},
|
||||
});
|
||||
|
||||
expect(serializeOpenTabs([pending])).toEqual([]);
|
||||
});
|
||||
|
||||
it("keeps legacy query tabs without source intent compatible", () => {
|
||||
const [restored] = roundTrip([queryTab({ sql: "SELECT 1" })]);
|
||||
expect(restored.sourceView).toBeUndefined();
|
||||
|
||||
Reference in new issue
Block a user