Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(web): restore ResizeObserver stub and correct invite-flow comment

boredinnyce473a4137777
diff --git a/apps/web/src/routes/auth/verify-otp.test.tsx b/apps/web/src/routes/auth/verify-otp.test.tsx
index 992bf5820..83d94ecd8 100644
--- a/apps/web/src/routes/auth/verify-otp.test.tsx
+++ b/apps/web/src/routes/auth/verify-otp.test.tsx
@@ -6,7 +6,15 @@ import {
waitFor,
} from "@testing-library/react";
import type { ComponentType, ReactNode } from "react";
-import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import {
+ afterAll,
+ afterEach,
+ beforeEach,
+ describe,
+ expect,
+ it,
+ vi,
+} from "vitest";
import { Route } from "./verify-otp";
// The OTP input measures itself on mount, which jsdom cannot do.
@@ -75,6 +83,12 @@ afterEach(() => {
search = { email: "[email protected]" };
});
+// The ResizeObserver stub is installed at module scope, so restore it rather
+// than leaking it into other test files sharing this worker.
+afterAll(() => {
+ vi.unstubAllGlobals();
+});
+
describe("VerifyOtp", () => {
it("forwards the invitation so a first OTP sign-in can create the account", async () => {
search = { email: "[email protected]", invitationId: "invitation-1" };
diff --git a/apps/web/src/routes/invitation/accept.$inviteId.tsx b/apps/web/src/routes/invitation/accept.$inviteId.tsx
index 30975db05..9f5e21783 100644
--- a/apps/web/src/routes/invitation/accept.$inviteId.tsx
+++ b/apps/web/src/routes/invitation/accept.$inviteId.tsx
@@ -93,8 +93,8 @@ function AcceptInvitation() {
});
};
- // Invitees without an account need the sign-up page, not sign-in: it is the
- // only flow that forwards the invitation id, which is what allows account
+ // Invitees without an account need the sign-up page: sign-in cannot create
+ // one. Both flows forward the invitation id, which is what allows account
// creation on instances running with DISABLE_REGISTRATION=true.
const handleCreateAccount = () => {
const email = invitationData?.invitation?.email;