create-m5kdev 0.40.0 → 0.40.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/package.json
CHANGED
|
@@ -636,28 +636,26 @@ test("session management endpoints list and revoke sessions", async ({ page, req
|
|
|
636
636
|
await expectAuthOk(revokeResponse);
|
|
637
637
|
});
|
|
638
638
|
|
|
639
|
-
test("
|
|
640
|
-
const email = `expo.
|
|
639
|
+
test("Close User refuses login until Admin Restore", async ({ page, request }) => {
|
|
640
|
+
const email = `expo.close.${Date.now()}@auth-e2e.local`;
|
|
641
641
|
const password = "password1234";
|
|
642
642
|
|
|
643
643
|
await createVerifiedExpoAccount(page, request, email, password);
|
|
644
644
|
await expoLoginNative(page, email, password);
|
|
645
645
|
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
body: {
|
|
649
|
-
callbackURL: `${profiles[profile].webUrl}/login`,
|
|
650
|
-
},
|
|
651
|
-
});
|
|
652
|
-
await expectAuthOk(deleteResponse);
|
|
646
|
+
const userTrpc = await createExpoTrpcClient(page, profile);
|
|
647
|
+
await userTrpc.auth.closeUser.mutate({ email });
|
|
653
648
|
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
expect(
|
|
649
|
+
await expectExpoLoginRejectedNative(page, email, password);
|
|
650
|
+
|
|
651
|
+
await expoLoginNative(page, profiles[profile].adminEmail, profiles[profile].adminPassword);
|
|
652
|
+
const adminTrpc = await createExpoTrpcClient(page, profile);
|
|
653
|
+
const users = await adminTrpc.auth.searchAdminUsers.query({ q: email, limit: 10 });
|
|
654
|
+
const user = users.rows.find((row) => row.email === email);
|
|
655
|
+
expect(user).toBeTruthy();
|
|
656
|
+
await adminTrpc.auth.restoreUser.mutate({ id: user?.id ?? "" });
|
|
657
|
+
|
|
658
|
+
await expoLoginNative(page, email, password);
|
|
661
659
|
});
|
|
662
660
|
|
|
663
661
|
test("admin can create and switch to a child organization from an enterprise org", async ({
|
|
@@ -781,31 +781,53 @@ test("session management endpoints list and revoke sessions", async ({ page, req
|
|
|
781
781
|
).toBe(true);
|
|
782
782
|
});
|
|
783
783
|
|
|
784
|
-
test("
|
|
785
|
-
|
|
784
|
+
test("Close account from preferences refuses login until Admin Restore", async ({
|
|
785
|
+
page,
|
|
786
|
+
request,
|
|
787
|
+
}) => {
|
|
788
|
+
const email = `close.${Date.now()}@auth-e2e.local`;
|
|
786
789
|
const password = "password1234";
|
|
787
790
|
|
|
788
791
|
await createVerifiedAccount(page, request, email, password);
|
|
789
792
|
await login(page, email, password);
|
|
790
793
|
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
794
|
+
await page.goto("/user/preferences");
|
|
795
|
+
await page.getByPlaceholder(email).fill(email);
|
|
796
|
+
const closeResponsePromise = page.waitForResponse(
|
|
797
|
+
(response) =>
|
|
798
|
+
response.request().method() === "POST" && response.url().includes("closeUser")
|
|
799
|
+
);
|
|
800
|
+
await page.getByRole("button", { name: /close account/i }).click();
|
|
801
|
+
const closeResponse = await closeResponsePromise;
|
|
797
802
|
expect(
|
|
798
|
-
|
|
799
|
-
`${
|
|
803
|
+
closeResponse.ok(),
|
|
804
|
+
`${closeResponse.status()} ${closeResponse.statusText()}: ${await closeResponse.text()}`
|
|
800
805
|
).toBe(true);
|
|
806
|
+
await expect(page).toHaveURL(/\/login/);
|
|
801
807
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
expect(
|
|
808
|
+
await expectLoginRejected(page, email, password);
|
|
809
|
+
|
|
810
|
+
await login(page, profiles.standard.adminEmail, profiles.standard.adminPassword);
|
|
811
|
+
await page.goto("/admin/users");
|
|
812
|
+
await page.locator('input[name="search"]').fill(email);
|
|
813
|
+
const row = page.getByRole("row").filter({ hasText: email });
|
|
814
|
+
await expect(row).toBeVisible();
|
|
815
|
+
await expect(row.getByText(/^closed$/i)).toBeVisible();
|
|
816
|
+
await row.getByLabel("User actions").click();
|
|
817
|
+
const restoreResponsePromise = page.waitForResponse(
|
|
818
|
+
(response) =>
|
|
819
|
+
response.request().method() === "POST" && response.url().includes("restoreUser")
|
|
820
|
+
);
|
|
821
|
+
await page.getByRole("menuitem", { name: /^restore$/i }).click();
|
|
822
|
+
const restoreResponse = await restoreResponsePromise;
|
|
823
|
+
expect(
|
|
824
|
+
restoreResponse.ok(),
|
|
825
|
+
`${restoreResponse.status()} ${restoreResponse.statusText()}: ${await restoreResponse.text()}`
|
|
826
|
+
).toBe(true);
|
|
827
|
+
await expect(row.getByText(/^active$/i)).toBeVisible();
|
|
828
|
+
|
|
829
|
+
await logout(page);
|
|
830
|
+
await login(page, email, password);
|
|
809
831
|
});
|
|
810
832
|
|
|
811
833
|
test("admin can create and switch to a child organization from an enterprise org", async ({
|
|
@@ -7,18 +7,18 @@ catalogs:
|
|
|
7
7
|
"@heroui/react": 3.0.3
|
|
8
8
|
"@heroui/styles": 3.0.3
|
|
9
9
|
"@libsql/client": 0.17.4
|
|
10
|
-
"@m5kdev/backend": 0.40.
|
|
11
|
-
"@m5kdev/commons": 0.40.
|
|
12
|
-
"@m5kdev/config": 0.40.
|
|
13
|
-
"@m5kdev/email": 0.40.
|
|
14
|
-
"@m5kdev/expo": 0.40.
|
|
15
|
-
"@m5kdev/frontend": 0.40.
|
|
16
|
-
"@m5kdev/module-clay": 0.40.
|
|
17
|
-
"@m5kdev/module-docx": 0.40.
|
|
18
|
-
"@m5kdev/module-pdf": 0.40.
|
|
19
|
-
"@m5kdev/module-social": 0.40.
|
|
20
|
-
"@m5kdev/module-video": 0.40.
|
|
21
|
-
"@m5kdev/web-ui": 0.40.
|
|
10
|
+
"@m5kdev/backend": 0.40.1
|
|
11
|
+
"@m5kdev/commons": 0.40.1
|
|
12
|
+
"@m5kdev/config": 0.40.1
|
|
13
|
+
"@m5kdev/email": 0.40.1
|
|
14
|
+
"@m5kdev/expo": 0.40.1
|
|
15
|
+
"@m5kdev/frontend": 0.40.1
|
|
16
|
+
"@m5kdev/module-clay": 0.40.1
|
|
17
|
+
"@m5kdev/module-docx": 0.40.1
|
|
18
|
+
"@m5kdev/module-pdf": 0.40.1
|
|
19
|
+
"@m5kdev/module-social": 0.40.1
|
|
20
|
+
"@m5kdev/module-video": 0.40.1
|
|
21
|
+
"@m5kdev/web-ui": 0.40.1
|
|
22
22
|
"@mastra/core": 1.51.0
|
|
23
23
|
"@openrouter/ai-sdk-provider": 3.0.0
|
|
24
24
|
"@opentelemetry/api": 1.9.0
|