Skip to content

Commit 58788bd

Browse files
committed
test(studio): stabilize property panel flag coverage
1 parent 24f05f0 commit 58788bd

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

‎packages/studio/src/components/editor/propertyPanelInputCoverage.test.tsx‎

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -459,12 +459,7 @@ function representativeElement() {
459459
describe("classic PropertyPanel input coverage", () => {
460460
it("emits only named, known-section events across body inputs and header/footer chrome", async () => {
461461
vi.resetModules();
462-
vi.doMock("./manualEditingAvailability", async () => {
463-
const actual = await vi.importActual<typeof import("./manualEditingAvailability")>(
464-
"./manualEditingAvailability",
465-
);
466-
return { ...actual, STUDIO_FLAT_INSPECTOR_ENABLED: false };
467-
});
462+
vi.doMock("./manualEditingAvailability", () => ({ STUDIO_FLAT_INSPECTOR_ENABLED: false }));
468463
const { PropertyPanel } = await import("./PropertyPanel");
469464
const host = render(
470465
<PropertyPanel
@@ -524,18 +519,13 @@ describe("classic PropertyPanel input coverage", () => {
524519
expect(sections.has("header")).toBe(true);
525520
expect(sections.has("footer")).toBe(true);
526521
expect(sections.size).toBeGreaterThan(2);
527-
});
522+
}, 15000);
528523
});
529524

530525
describe("flat PropertyPanel input coverage", () => {
531526
it("emits only named flat events from known sections for every visible layout input", async () => {
532527
vi.resetModules();
533-
vi.doMock("./manualEditingAvailability", async () => {
534-
const actual = await vi.importActual<typeof import("./manualEditingAvailability")>(
535-
"./manualEditingAvailability",
536-
);
537-
return { ...actual, STUDIO_FLAT_INSPECTOR_ENABLED: true };
538-
});
528+
vi.doMock("./manualEditingAvailability", () => ({ STUDIO_FLAT_INSPECTOR_ENABLED: true }));
539529
const { PropertyPanel } = await import("./PropertyPanel");
540530
const host = render(
541531
<PropertyPanel

0 commit comments

Comments
 (0)