fix(objects): render MySQL event create editor with fresh state
This commit is contained in:
1 parent
349342efb7
commit
de2c4b38cd
4 files changed
+41
-6
No files matched your search
+12
-1
@@ -1,8 +1,19 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveInitialEventEditorRequest } from "./eventEditorRequest";
|
||||
import { eventEditorInstanceKey, resolveInitialEventEditorRequest } from "./eventEditorRequest";
|
||||
|
||||
const base = { openedRequestKey: "" };
|
||||
|
||||
describe("eventEditorInstanceKey", () => {
|
||||
it("separates repeated CREATE requests", () => {
|
||||
expect(eventEditorInstanceKey({ createRequestId: 1 })).not.toBe(eventEditorInstanceKey({ createRequestId: 2 }));
|
||||
});
|
||||
|
||||
it("separates ALTER rows from CREATE mode", () => {
|
||||
expect(eventEditorInstanceKey({ openRequestId: 1, rowId: "event:old_event" })).not.toBe(eventEditorInstanceKey({ createRequestId: 3 }));
|
||||
expect(eventEditorInstanceKey({ openRequestId: 1, rowId: "event:old_event" })).not.toBe(eventEditorInstanceKey({ openRequestId: 1, rowId: "event:other_event" }));
|
||||
});
|
||||
});
|
||||
|
||||
describe("resolveInitialEventEditorRequest", () => {
|
||||
describe("create request (New Event)", () => {
|
||||
it("opens CREATE mode without requiring an existing EVENT row", () => {
|
||||
|
||||
Reference in new issue
Block a user