refactor(frontend): rename project to s2s-frontend
This commit is contained in:
@@ -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"]);
|
||||
});
|
||||
});
|
||||
@@ -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();
|
||||
});
|
||||
Reference in New Issue
Block a user