test: expose source selector hooks

This commit is contained in:
AjTheSpidey
2026-05-21 19:35:26 +08:00
parent 9f7f498e22
commit ea09fdc12c
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -612,6 +612,7 @@ export function LaunchWindow() {
{/* Source selector */}
<button
data-testid="launch-source-selector-button"
className={`${hudGroupClasses} h-8 px-2.5 ${styles.electronNoDrag}`}
onClick={openSourceSelector}
disabled={recording}
+3
View File
@@ -74,9 +74,12 @@ export function SourceSelector() {
const renderSourceCard = (source: DesktopSource) => {
const isSelected = selectedSource?.id === source.id;
const sourceKind = source.id.startsWith("screen:") ? "screen" : "window";
return (
<div
key={source.id}
data-testid="source-selector-card"
data-source-kind={sourceKind}
className={`${styles.sourceCard} ${isSelected ? styles.selected : ""} p-1.5`}
onClick={() => handleSourceSelect(source)}
>