[#339] added API calls to timezone selectors (#396)

Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
Camille Moussu
2025-12-07 07:43:00 +01:00
committed by GitHub
parent 7567bfbd7b
commit 1056220719
4 changed files with 310 additions and 32 deletions
@@ -13,6 +13,8 @@ import { api } from "../../../src/utils/apiUtils";
import { browserDefaultTimeZone } from "../../../src/utils/timezone";
import { renderWithProviders } from "../../utils/Renderwithproviders";
jest.mock("../../../src/utils/apiUtils");
describe("Timezone synchronization after getOpenPaasUserDataAsync", () => {
let apiGetSpy: jest.SpyInstance;
@@ -315,6 +317,9 @@ describe("Timezone Logic - Backend to Frontend Flow", () => {
});
describe("User Actions - Changing Timezone", () => {
beforeEach(() => {
(api.patch as jest.Mock).mockResolvedValue({ status: 204 });
});
test("User enables browser default => Settings gets browser TZ, User gets null", async () => {
const { store } = renderWithProviders(<SettingsPage />, {
user: {