feat: refine market action bar and metrics sync
This commit is contained in:
@@ -10,12 +10,14 @@ import {
|
||||
|
||||
describe("backend-metrics-client", () => {
|
||||
test("exports the default backend metrics base url", () => {
|
||||
expect(DEFAULT_BACKEND_METRICS_BASE_URL).toBe("http://192.168.31.29:8083");
|
||||
expect(DEFAULT_BACKEND_METRICS_BASE_URL).toBe(
|
||||
"https://talent-search.intelligrow.cn"
|
||||
);
|
||||
});
|
||||
|
||||
test("builds the backend search url", () => {
|
||||
expect(buildBackendMetricsSearchUrl("http://192.168.31.29:8083")).toBe(
|
||||
"http://192.168.31.29:8083/api/v1/history/talents/search"
|
||||
expect(buildBackendMetricsSearchUrl("https://talent-search.intelligrow.cn")).toBe(
|
||||
"https://talent-search.intelligrow.cn/api/v1/history/talents/search"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -71,7 +73,7 @@ describe("backend-metrics-client", () => {
|
||||
}),
|
||||
ok: true,
|
||||
status: 200,
|
||||
url: "http://192.168.31.29:8083/api/v1/history/talents/search"
|
||||
url: "https://talent-search.intelligrow.cn/api/v1/history/talents/search"
|
||||
});
|
||||
const fetchSpy = vi.fn(fetchImpl);
|
||||
const client = createBackendMetricsClient({
|
||||
@@ -82,7 +84,7 @@ describe("backend-metrics-client", () => {
|
||||
await client.searchByStarIds(["111", "222"]);
|
||||
|
||||
expect(fetchSpy).toHaveBeenCalledWith(
|
||||
"http://192.168.31.29:8083/api/v1/history/talents/search",
|
||||
"https://talent-search.intelligrow.cn/api/v1/history/talents/search",
|
||||
expect.objectContaining({
|
||||
body: JSON.stringify({
|
||||
page: 1,
|
||||
|
||||
Reference in New Issue
Block a user