@saasquatch/mint-components 1.14.7 → 1.14.8-1
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/collection/components/sqm-lead-form/sqm-lead-form.js +1 -0
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +1 -0
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +1 -0
- package/dist/types/components/sqm-lead-form/sqm-lead-form.d.ts +1 -0
- package/dist/types/components/sqm-portal-register/sqm-portal-register.d.ts +1 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +1 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/package.json +1 -1
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.e2e.js +0 -168
- package/dist/collection/components/sqm-context-router/sqm-context-router.e2e.js +0 -180
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.e2e.js +0 -113
- package/dist/collection/components/sqm-router/sqm-router.e2e.js +0 -180
- package/dist/collection/utils/utils.spec.js +0 -71
- package/dist/types/components/sqm-big-stat/sqm-big-stat.e2e.d.ts +0 -1
- package/dist/types/components/sqm-context-router/sqm-context-router.e2e.d.ts +0 -1
- package/dist/types/components/sqm-rewards-table/sqm-rewards-table.e2e.d.ts +0 -1
- package/dist/types/components/sqm-router/sqm-router.e2e.d.ts +0 -1
- package/dist/types/utils/utils.spec.d.ts +0 -1
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { newSpecPage } from "@stencil/core/testing";
|
|
2
|
-
import { format, sanitizeUrlPath } from "./utils";
|
|
3
|
-
describe("format", () => {
|
|
4
|
-
it("returns empty string for no names defined", () => {
|
|
5
|
-
expect(format(undefined, undefined, undefined)).toEqual("");
|
|
6
|
-
});
|
|
7
|
-
it("formats just first names", () => {
|
|
8
|
-
expect(format("Joseph", undefined, undefined)).toEqual("Joseph");
|
|
9
|
-
});
|
|
10
|
-
it("formats first and last names", () => {
|
|
11
|
-
expect(format("Joseph", undefined, "Publique")).toEqual("Joseph Publique");
|
|
12
|
-
});
|
|
13
|
-
it("formats first, middle and last names", () => {
|
|
14
|
-
expect(format("Joseph", "Quincy", "Publique")).toEqual("Joseph Quincy Publique");
|
|
15
|
-
});
|
|
16
|
-
});
|
|
17
|
-
describe("Users are redirected to the value of the nextPage url parameter as if it were a relative path", () => {
|
|
18
|
-
const expectUrlToRedirectTo = async (currentUrl, expectedUrl) => {
|
|
19
|
-
await newSpecPage({
|
|
20
|
-
components: [],
|
|
21
|
-
html: ``,
|
|
22
|
-
url: currentUrl,
|
|
23
|
-
});
|
|
24
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
25
|
-
const nextPage = urlParams.get("nextPage");
|
|
26
|
-
const url = sanitizeUrlPath(nextPage);
|
|
27
|
-
expect(url.href).toEqual(expectedUrl);
|
|
28
|
-
};
|
|
29
|
-
it("https://www.example.com?nextPage=activity --> https://www.example.com/activity", async () => {
|
|
30
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=activity", "https://www.example.com/activity");
|
|
31
|
-
});
|
|
32
|
-
it("https://www.example.com?nextPage=./activity --> https://www.example.com/activity", async () => {
|
|
33
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=./activity", "https://www.example.com/activity");
|
|
34
|
-
});
|
|
35
|
-
it("https://www.example.com?nextPage=/activity --> https://www.example.com/activity", async () => {
|
|
36
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=/activity", "https://www.example.com/activity");
|
|
37
|
-
});
|
|
38
|
-
it("http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1 --> http://www.example.com/activity", async () => {
|
|
39
|
-
await expectUrlToRedirectTo("http://www.example.com/nest/page?oob=123&other&nextPage=activity#heading-1", "http://www.example.com/activity");
|
|
40
|
-
});
|
|
41
|
-
it("https://www.example.com?nextPage=www.google.com --> https://www.example.com/www.google.com", async () => {
|
|
42
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=www.google.com", "https://www.example.com/www.google.com");
|
|
43
|
-
});
|
|
44
|
-
it("https://www.example.com?nextPage=//foo.com --> https://www.example.com/", async () => {
|
|
45
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=//foo.com", "https://www.example.com/");
|
|
46
|
-
});
|
|
47
|
-
it("https://www.example.com?nextPage=https://malicious.example.com --> https://www.example.com/", async () => {
|
|
48
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=https://malicious.example.com", "https://www.example.com/");
|
|
49
|
-
});
|
|
50
|
-
it("https://www.example.com?nextPage=activity?foo=bar --> https://www.example.com/activity", async () => {
|
|
51
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=activity?foo=bar", "https://www.example.com/activity?foo=bar");
|
|
52
|
-
});
|
|
53
|
-
it("https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar --> https://www.example.com/activity?foo=bar", async () => {
|
|
54
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar", "https://www.example.com/activity?foo=bar");
|
|
55
|
-
});
|
|
56
|
-
it("https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash --> https://www.example.com/activity?foo=bar", async () => {
|
|
57
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar#hash", "https://www.example.com/activity?foo=bar");
|
|
58
|
-
});
|
|
59
|
-
it("https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash --> https://www.example.com/activity?foo=bar#hash", async () => {
|
|
60
|
-
await expectUrlToRedirectTo("https://www.example.com?nextPage=%2Factivity%3Ffoo%3Dbar%23hash", "https://www.example.com/activity?foo=bar#hash");
|
|
61
|
-
});
|
|
62
|
-
it("https://www.example.com:1337?nextPage=activity --> https://www.example.com:1337/activity", async () => {
|
|
63
|
-
await expectUrlToRedirectTo("https://www.example.com:1337?nextPage=activity", "https://www.example.com:1337/activity");
|
|
64
|
-
});
|
|
65
|
-
it("http://1.1.1.1:1111?nextPage=activity --> http://1.1.1.1:1111/activity", async () => {
|
|
66
|
-
await expectUrlToRedirectTo("http://1.1.1.1:1111?nextPage=activity", "http://1.1.1.1:1111/activity");
|
|
67
|
-
});
|
|
68
|
-
it("@landmine https://user:pass@www.example.com:444?nextPage=activity --> https://www.example.com:444/activity", async () => {
|
|
69
|
-
await expectUrlToRedirectTo("https://user:pass@www.example.com:444?nextPage=activity", "https://www.example.com:444/activity");
|
|
70
|
-
});
|
|
71
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|