mirror of
https://github.com/siddharthvaddem/openscreen.git
synced 2026-11-01 20:32:20 +08:00
test: expose source selector hooks
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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)}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user