This commit is contained in:
shamoon
2026-02-20 20:25:34 -08:00
parent 862c5d9f38
commit 614a87d768
117 changed files with 124 additions and 812 deletions
+1 -7
View File
@@ -4,6 +4,7 @@ import { screen } from "@testing-library/react";
import { beforeEach, describe, expect, it, vi } from "vitest";
import { renderWithProviders } from "test-utils/render-with-providers";
import { expectBlockValue } from "test-utils/widget-assertions";
const { useWidgetAPI } = vi.hoisted(() => ({ useWidgetAPI: vi.fn() }));
@@ -13,13 +14,6 @@ vi.mock("utils/proxy/use-widget-api", () => ({
import Component from "./component";
function expectBlockValue(container, label, value) {
const blocks = Array.from(container.querySelectorAll(".service-block"));
const block = blocks.find((b) => b.textContent?.includes(label));
expect(block, `missing block for ${label}`).toBeTruthy();
expect(block.textContent).toContain(String(value));
}
describe("widgets/arcane/component", () => {
beforeEach(() => {
vi.clearAllMocks();