import { Q as o } from "./56c67d3b.js";
import "react";
import "react-dom";
test("object create", () => {
  new o({
    value: {
      compType: "js"
    }
  });
});
test("onSuccess/onFail => onEvent", () => {
  let e = new o({
    value: {
      compType: "js",
      onSuccess: [{
        name: "after",
        handler: {
          compType: "empty",
          comp: {},
          condition: "",
          slowdown: "debounce",
          delay: ""
        }
      }],
      onFail: [{
        name: "after",
        handler: {
          compType: "empty",
          comp: {},
          condition: "",
          slowdown: "debounce",
          delay: ""
        }
      }]
    }
  });
  expect(e.children.onEvent.toJsonValue().length).toEqual(2), expect(e.children.onEvent.toJsonValue()[0].name).toEqual("success"), expect(e.children.onEvent.toJsonValue()[1].name).toEqual("fail"), expect(e.children.onEvent.toJsonValue().onSuccess).toEqual(void 0), expect(e.children.onEvent.toJsonValue().onFail).toEqual(void 0);
});
test("add notification for old query", () => {
  let e = new o({
    value: {
      compType: "js"
    }
  });
  expect(e.children.notification.toJsonValue().showSuccess).toEqual(!0), expect(e.children.notification.toJsonValue().showFail).toEqual(!0), e = new o({
    value: {
      compType: "js",
      onEvent: []
    }
  }), expect(e.children.notification.toJsonValue().showSuccess).toEqual(!1), expect(e.children.notification.toJsonValue().showFail).toEqual(!1), e = new o({
    value: {
      compType: "js",
      notification: {
        showSuccess: !0,
        success: {
          text: ""
        },
        showFail: !0,
        fail: [{
          text: "",
          condition: ""
        }],
        duration: ""
      }
    }
  }), expect(e.children.notification.toJsonValue().showSuccess).toEqual(!0), expect(e.children.notification.toJsonValue().showFail).toEqual(!0);
});
