feat: e2e tests for peek view (#7112)

fix AFF-1163
This commit is contained in:
pengx17
2024-05-31 10:28:42 +00:00
parent ea0059fa1b
commit 002b9e80f8
9 changed files with 226 additions and 12 deletions
@@ -42,7 +42,7 @@ export const PeekViewManagerModal = () => {
return (
<PeekViewModalContainer
open={show}
open={show && !!preview}
target={
activePeekView?.target instanceof HTMLElement
? activePeekView.target
@@ -18,11 +18,11 @@ export const WorkbenchLink = forwardRef<
(typeof to === 'string' ? to : `${to.pathname}${to.search}${to.hash}`);
const handleClick = useCallback(
(event: React.MouseEvent<HTMLAnchorElement>) => {
event.preventDefault();
event.stopPropagation();
if (onClick?.(event)) {
return;
}
event.preventDefault();
event.stopPropagation();
if (event.ctrlKey || event.metaKey) {
if (appSettings.enableMultiView && environment.isDesktop) {