[Upd] User states
This commit is contained in:
parent
d07202386f
commit
ec019a4dff
16 changed files with 667 additions and 87 deletions
18
apps/web/src/components/sidebar.test.tsx
Normal file
18
apps/web/src/components/sidebar.test.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { mtp } from "@tensamin/shared/data";
|
||||
import { onlineStatusOptions } from "./status-options";
|
||||
|
||||
describe("sidebar status requests", () => {
|
||||
it.each(onlineStatusOptions)("sends $label as $value", ({ value }) => {
|
||||
expect(mtp.SetUserState.request.parse({ UserState: value })).toEqual({
|
||||
UserState: value,
|
||||
});
|
||||
});
|
||||
|
||||
it("keeps status text on the profile operation", () => {
|
||||
expect(mtp.ChangeUserData.request.parse({ Status: "At lunch" })).toEqual({
|
||||
Status: "At lunch",
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue