Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): keep screenshots attached to preview annotations #12267

Closedvedprakash2302(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/12267/headopened View on GitHub

Showing 4 changed files with 31 additions and 57 deletions (loading 1).

x
0 of 4 viewed, 4 left
2 additions and 10 deletionsapps/web/src/components/preview/PreviewView.test.tsxModified
View file
@@ -27,7 +27,6 @@
openPictureInPicture: vi.fn(async (_tabId: string): Promise<void> => undefined),
closePictureInPicture: vi.fn(async (_tabId: string): Promise<void> => undefined),
pickElement: vi.fn(),
- capturePreviewAnnotationScreenshot: vi.fn(),
addPreviewAnnotation: vi.fn(),
addImage: vi.fn(),
toggleAnnotation: null as (() => void) | null,
@@ -90,10 +89,6 @@
}),
}));
​
-vi.mock("~/lib/previewAnnotation", () => ({
- capturePreviewAnnotationScreenshot: mocks.capturePreviewAnnotationScreenshot,
-}));
-​
vi.mock("~/localApi", () => ({
ensureLocalApi: vi.fn(),
}));
@@ -342,8 +337,6 @@
mocks.openPictureInPicture.mockClear();
mocks.closePictureInPicture.mockClear();
mocks.pickElement.mockReset();
- mocks.capturePreviewAnnotationScreenshot.mockReset();
- mocks.capturePreviewAnnotationScreenshot.mockResolvedValue({ status: "none" });
mocks.addPreviewAnnotation.mockClear();
vi.mocked(toastManager.add).mockClear();
mocks.addImage.mockClear();