@plurix/ecom-components 0.0.2-beta.0 → 0.0.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/svgs/CloseIcon.d.ts +1 -0
- package/dist/assets/svgs/CloseIcon.js +37 -0
- package/dist/assets/svgs/DiscountIcon.d.ts +1 -0
- package/dist/assets/svgs/DiscountIcon.js +37 -0
- package/dist/assets/svgs/FacebookIcon.d.ts +1 -0
- package/dist/assets/svgs/FacebookIcon.js +22 -0
- package/dist/assets/svgs/InstagramIcon.d.ts +1 -0
- package/dist/assets/svgs/InstagramIcon.js +49 -0
- package/dist/main.d.ts +2 -3
- package/dist/main.js +6 -4
- package/dist/packages/CartClubAlert/CartClubAlert.d.ts +8 -0
- package/dist/packages/CartClubAlert/CartClubAlert.js +22 -0
- package/dist/packages/Onboarding/Onboarding.d.ts +10 -0
- package/dist/packages/Onboarding/Onboarding.js +47 -0
- package/dist/packages/Onboarding/components/Bullets.d.ts +5 -0
- package/dist/packages/Onboarding/components/Bullets.js +10 -0
- package/dist/packages/Onboarding/components/Content.d.ts +9 -0
- package/dist/packages/Onboarding/components/Content.js +30 -0
- package/dist/packages/Onboarding/components/Footer.d.ts +9 -0
- package/dist/packages/Onboarding/components/Footer.js +15 -0
- package/dist/packages/Onboarding/components/Header.d.ts +6 -0
- package/dist/packages/Onboarding/components/Header.js +11 -0
- package/dist/packages/Onboarding/components/SocialMedia.d.ts +10 -0
- package/dist/packages/Onboarding/components/SocialMedia.js +36 -0
- package/dist/packages/Onboarding/constants/tips.d.ts +11 -0
- package/dist/packages/Onboarding/constants/tips.js +36 -0
- package/dist/packages/Onboarding/test/Bullets.test.js +20 -0
- package/dist/packages/Onboarding/test/Content.test.js +52 -0
- package/dist/packages/Onboarding/test/Footer.test.js +60 -0
- package/dist/packages/Onboarding/test/Header.test.js +30 -0
- package/dist/packages/Onboarding/test/Onboarding.test.js +22 -0
- package/dist/packages/Onboarding/test/SocialMedia.test.js +39 -0
- package/dist/packages/Onboarding/tips/Tip1.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip1.js +2130 -0
- package/dist/packages/Onboarding/tips/Tip2.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip2.js +361 -0
- package/dist/packages/Onboarding/tips/Tip3.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip3.js +350 -0
- package/dist/packages/Onboarding/tips/Tip4.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip4.js +593 -0
- package/dist/packages/Onboarding/tips/Tip5.d.ts +1 -0
- package/dist/packages/Onboarding/tips/Tip5.js +1571 -0
- package/dist/styles/cart-club-alert.global.css +1 -0
- package/dist/styles/onboarding.global.css +1 -0
- package/dist/types/FixedLengthArray.d.ts +7 -0
- package/dist/types/FixedLengthArray.js +1 -0
- package/dist/vite-env.d.js +1 -0
- package/package.json +4 -1
- package/dist/assets/index.css +0 -3
- package/dist/assets/index2.css +0 -3
- package/dist/assets/index3.css +0 -3
- package/dist/components/Button/index.d.ts +0 -4
- package/dist/components/Button/index.js +0 -11
- package/dist/components/Input/index.d.ts +0 -4
- package/dist/components/Input/index.js +0 -11
- package/dist/components/Label/index.d.ts +0 -4
- package/dist/components/Label/index.js +0 -11
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { render as c, fireEvent as d } from "@testing-library/react";
|
|
3
|
+
import "@testing-library/jest-dom";
|
|
4
|
+
import { Header as s } from "../components/Header.js";
|
|
5
|
+
const t = jest.fn(), n = jest.fn();
|
|
6
|
+
describe("Header component tests", () => {
|
|
7
|
+
it("renders correctly UI", () => {
|
|
8
|
+
const { getByText: e, getByTestId: l } = c(
|
|
9
|
+
/* @__PURE__ */ o(
|
|
10
|
+
s,
|
|
11
|
+
{
|
|
12
|
+
sendEvent: t,
|
|
13
|
+
handleCloseAction: n
|
|
14
|
+
}
|
|
15
|
+
)
|
|
16
|
+
);
|
|
17
|
+
expect(e("Experiência Personalizada")).toBeInTheDocument(), expect(l("close-icon")).toBeInTheDocument();
|
|
18
|
+
}), it("should call sendEvent and handleCloseAction on click close button", () => {
|
|
19
|
+
const { getByTestId: e } = c(
|
|
20
|
+
/* @__PURE__ */ o(
|
|
21
|
+
s,
|
|
22
|
+
{
|
|
23
|
+
sendEvent: t,
|
|
24
|
+
handleCloseAction: n
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
);
|
|
28
|
+
d.click(e("close-icon")), expect(t).toHaveBeenCalled(), expect(n).toHaveBeenCalled();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { render as o } from "@testing-library/react";
|
|
3
|
+
import "@testing-library/jest-dom";
|
|
4
|
+
import { Onboarding as n } from "../Onboarding.js";
|
|
5
|
+
jest.mock("../components/Header", () => ({
|
|
6
|
+
Header: () => /* @__PURE__ */ e("div", { "data-testid": "header" })
|
|
7
|
+
}));
|
|
8
|
+
jest.mock("../components/Content", () => ({
|
|
9
|
+
Content: () => /* @__PURE__ */ e("div", { "data-testid": "content" })
|
|
10
|
+
}));
|
|
11
|
+
jest.mock("../components/Footer", () => ({
|
|
12
|
+
Footer: () => /* @__PURE__ */ e("div", { "data-testid": "footer" })
|
|
13
|
+
}));
|
|
14
|
+
const c = jest.fn();
|
|
15
|
+
describe("Onboarding package tests", () => {
|
|
16
|
+
it("should render sections correctly", () => {
|
|
17
|
+
const { getByTestId: t } = o(
|
|
18
|
+
/* @__PURE__ */ e(n, { handleCloseAction: c })
|
|
19
|
+
);
|
|
20
|
+
expect(t("header")).toBeInTheDocument(), expect(t("content")).toBeInTheDocument(), expect(t("footer")).toBeInTheDocument();
|
|
21
|
+
});
|
|
22
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { render as n, fireEvent as c } from "@testing-library/react";
|
|
3
|
+
import "@testing-library/jest-dom";
|
|
4
|
+
import { SocialMedia as t } from "../components/SocialMedia.js";
|
|
5
|
+
const o = jest.fn();
|
|
6
|
+
describe("SocialMedia component tests", () => {
|
|
7
|
+
it("should render nothing if socialMediaLinks does not exist", () => {
|
|
8
|
+
const { container: e } = n(/* @__PURE__ */ i(t, { sendEvent: o }));
|
|
9
|
+
expect(e.firstChild).toBeNull();
|
|
10
|
+
}), it("should render media section if link exist", () => {
|
|
11
|
+
const { getByTestId: e } = n(
|
|
12
|
+
/* @__PURE__ */ i(
|
|
13
|
+
t,
|
|
14
|
+
{
|
|
15
|
+
socialMediaLinks: {
|
|
16
|
+
facebook: "facebook_link",
|
|
17
|
+
instagram: "instagram_link"
|
|
18
|
+
},
|
|
19
|
+
sendEvent: o
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
23
|
+
expect(e("facebook-icon")).toBeInTheDocument(), expect(e("instagram-icon")).toBeInTheDocument();
|
|
24
|
+
}), it("should call sendEvent on click social media link", () => {
|
|
25
|
+
const { getByTestId: e } = n(
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
|
+
t,
|
|
28
|
+
{
|
|
29
|
+
socialMediaLinks: {
|
|
30
|
+
facebook: "facebook_link",
|
|
31
|
+
instagram: "instagram_link"
|
|
32
|
+
},
|
|
33
|
+
sendEvent: o
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
c.click(e("facebook-icon")), expect(o).toHaveBeenCalledWith("facebook");
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Tip1: () => import("react/jsx-runtime").JSX.Element;
|