refactor(frontend): rename project to s2s-frontend

This commit is contained in:
2026-10-06 17:00:57 -03:00
parent 99413fc06d
commit 6c4ee3a5e3
54 changed files with 26 additions and 26 deletions
@@ -0,0 +1,13 @@
import { describe, expect, it } from "vitest";
import { createBackendProxy } from "../../config/backend-proxy";
describe("development backend proxy", () => {
it("keeps the public host and original paths for the FastAPI runtime URL", () => {
const proxy = createBackendProxy("http://127.0.0.1:8421");
expect(proxy["/api"]).toEqual({ target: "http://127.0.0.1:8421", changeOrigin: false });
expect(proxy["/v1/realtime"]).toEqual({ target: "http://127.0.0.1:8421", changeOrigin: false, ws: true });
expect(proxy["/openapi.json"]).toEqual(proxy["/api"]);
expect(proxy["/oauth"]).toEqual(proxy["/api"]);
});
});
+28
View File
@@ -0,0 +1,28 @@
import "@testing-library/jest-dom/vitest";
import { cleanup } from "@testing-library/react";
import { afterEach } from "vitest";
// jsdom has no native modal top layer; real focus/inert behavior is checked in Chromium.
Object.defineProperties(HTMLDialogElement.prototype, {
showModal: {
configurable: true,
writable: true,
value: function (this: HTMLDialogElement) {
this.open = true;
},
},
close: {
configurable: true,
writable: true,
value: function (this: HTMLDialogElement) {
this.open = false;
},
},
});
afterEach(() => {
cleanup();
window.localStorage.clear();
window.sessionStorage.clear();
});