From 2d59483893ea2321afdd0bc6392d56deb34626ab Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Fri, 5 Apr 2024 19:07:21 +0200 Subject: [PATCH 01/36] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F:=20refactor=20`Form?= =?UTF-8?q?Hidden`=20to=20composition=20API=20and=20`typeScript`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Form/Elements/FormHidden.vue | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/client/src/components/Form/Elements/FormHidden.vue b/client/src/components/Form/Elements/FormHidden.vue index fb4d9879a5bf..2f6efc98d34a 100644 --- a/client/src/components/Form/Elements/FormHidden.vue +++ b/client/src/components/Form/Elements/FormHidden.vue @@ -1,19 +1,13 @@ + + - - From dd3234472da4759e467014a98c751e42ae816441 Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Fri, 5 Apr 2024 19:08:03 +0200 Subject: [PATCH 02/36] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F:=20refactor=20`Form?= =?UTF-8?q?Hidden`=20test=20to=20typescript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Form/Elements/FormHidden.test.js | 27 ------------------- .../Form/Elements/FormHidden.test.ts | 23 ++++++++++++++++ 2 files changed, 23 insertions(+), 27 deletions(-) delete mode 100644 client/src/components/Form/Elements/FormHidden.test.js create mode 100644 client/src/components/Form/Elements/FormHidden.test.ts diff --git a/client/src/components/Form/Elements/FormHidden.test.js b/client/src/components/Form/Elements/FormHidden.test.js deleted file mode 100644 index 93e5b1402614..000000000000 --- a/client/src/components/Form/Elements/FormHidden.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { mount } from "@vue/test-utils"; -import { getLocalVue } from "tests/jest/helpers"; - -import FormHidden from "./FormHidden"; - -const localVue = getLocalVue(); - -describe("FormHidden", () => { - let wrapper; - - beforeEach(() => { - wrapper = mount(FormHidden, { - propsData: { - value: false, - info: "info", - }, - localVue, - }); - }); - - it("check initial value and value change", async () => { - expect(wrapper.vm.value).toBe(false); - await wrapper.setProps({ value: true }); - expect(wrapper.vm.value).toBe(true); - expect(wrapper.text()).toBe("info"); - }); -}); diff --git a/client/src/components/Form/Elements/FormHidden.test.ts b/client/src/components/Form/Elements/FormHidden.test.ts new file mode 100644 index 000000000000..8b95dc3d173a --- /dev/null +++ b/client/src/components/Form/Elements/FormHidden.test.ts @@ -0,0 +1,23 @@ +import { getLocalVue } from "@tests/jest/helpers"; +import { mount, Wrapper } from "@vue/test-utils"; + +import FormHidden from "./FormHidden.vue"; + +const localVue = getLocalVue(); + +describe("FormHidden", () => { + let wrapper: Wrapper; + + beforeEach(() => { + wrapper = mount(FormHidden as object, { + propsData: { + info: "info", + }, + localVue, + }); + }); + + it("check initial value and value change", async () => { + expect(wrapper.text()).toBe("info"); + }); +}); From 4788781cad98e13b8cec11c98dffe7a0ed0e15c1 Mon Sep 17 00:00:00 2001 From: Alireza Heidari Date: Fri, 5 Apr 2024 19:08:33 +0200 Subject: [PATCH 03/36] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F:=20refactor=20`Form?= =?UTF-8?q?Input`=20to=20composition=20API=20and=20`typeScript`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Form/Elements/FormInput.vue | 54 +++++++++---------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/client/src/components/Form/Elements/FormInput.vue b/client/src/components/Form/Elements/FormInput.vue index d6d3d54bd056..7b95af35fe3e 100644 --- a/client/src/components/Form/Elements/FormInput.vue +++ b/client/src/components/Form/Elements/FormInput.vue @@ -1,32 +1,30 @@ + +