Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

test: expose source selector hooks

AjTheSpideyea09fdc12cf6
diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsx
index 570ec2809..66d8d92e5 100644
--- a/src/components/launch/LaunchWindow.tsx
+++ b/src/components/launch/LaunchWindow.tsx
@@ -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}
diff --git a/src/components/launch/SourceSelector.tsx b/src/components/launch/SourceSelector.tsx
index f3ae98908..65daa9aef 100644
--- a/src/components/launch/SourceSelector.tsx
+++ b/src/components/launch/SourceSelector.tsx
@@ -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)}
>