@@ -2412,6 +2412,9 @@ test("MV-2 Device Setup draft keeps verified output-only selection and never inv
24122412 assert . deepEqual ( draft . inputPins , [ ] ) ;
24132413 assert . deepEqual ( draft . outputPins , [ 0 , 1 ] ) ;
24142414 const ui = deviceVM . setupUiModel ( inventory , draft , deviceVM . setupInitial ( ) ) ;
2415+ assert . deepEqual ( ui . selectedInputPins , [ ] ) ;
2416+ assert . deepEqual ( ui . selectedOutputPins , [ 0 , 1 ] ) ;
2417+ assert . match ( ui . activeText , / A C T I V E · W i n d o w s A u d i o · 4 8 0 0 0 H z / ) ;
24152418 assert . deepEqual ( ui . captureChoices , [ "" , "Studio Mic" ] ) ;
24162419 assert . deepEqual ( ui . rateChoices , [ "0" , "48000" ] ) ;
24172420 assert . equal ( ui . canApply , true ) ;
@@ -2478,6 +2481,16 @@ test("MV-2 pin/rate edits reject phantom endpoints and do not reset native ACK s
24782481 { pinSide :"output" , pinIndex :29 , checked :true } ) , pins ) ;
24792482 assert . equal ( deviceVM . setupEditDraft ( f . inventory , pins ,
24802483 { pinSide :"input" , pinIndex :- 1 , checked :true } ) , pins ) ;
2484+ const unplugged = { ...f . inventory , active :{ ...f . inventory . active ,
2485+ deviceGeneration :20 , captureDevice :"Disconnected endpoint" } } ;
2486+ assert . equal ( deviceVM . setupUiModel ( unplugged , pins ,
2487+ deviceVM . setupInitial ( ) ) . same , false ) ;
2488+ assert . equal ( deviceVM . setupEditDraft ( unplugged , pins ,
2489+ { pinSide :"output" , pinIndex :2 , checked :true } ) , pins ,
2490+ "old physical pins cannot be retargeted against a new inventory" ) ;
2491+ const vmText = read ( "web/approved-device-view-model.js" ) ;
2492+ assert . doesNotMatch ( vmText , / A u d i o C o n t e x t | A u d i o W o r k l e t | d o c u m e n t \\ .| w i n d o w \\ .| l o c a l S t o r a g e / ,
2493+ "pure device selector has no DOM or audio authority" ) ;
24812494 assert . equal ( deviceVM . setupEditDraft ( f . inventory , pins ,
24822495 { field :"rate" , value :"96000" } ) , pins ) ;
24832496 const sample = deviceVM . setupEditDraft ( f . inventory , pins ,
0 commit comments