test: align Arch profile assertions with committed bindings

The committed profile now uses the discovered APC identity, media CC48/note64 and master CC56/note89. Verify those routes, reject the removed CC50 assignment, and retain MIDI learn cancellation coverage. No profile data changed. Tests: cargo fmt --all -- --check and cargo test --workspace --all-targets --all-features --quiet pass (two opt-in hardware tests ignored).
This commit is contained in:
Dandaedre 2026-10-18 13:56:30 +02:00
parent 1b32efec9f
commit dd397eb681
Signed by: Dandaedre
GPG Key ID: 440C6592E8A26D99
2 changed files with 16 additions and 16 deletions

View File

@ -229,15 +229,15 @@ fn arch_pipewire_profile_matches_reported_qobuz_metadata() {
);
let surface = &profile.surfaces()[0];
assert_eq!(surface.id(), "apc-mini");
assert_eq!(surface.id(), "apc-mini-apc-mini-midi-1");
assert_eq!(surface.input_port(), "APC MINI:APC MINI MIDI 1");
assert_eq!(surface.usb_vendor_id(), Some("09e8"));
assert_eq!(surface.usb_product_id(), Some("0028"));
assert_eq!(surface.usb_serial(), Some("Ver00.10"));
assert_eq!(profile.faders().len(), 4);
assert_eq!(profile.bindings().len(), 8);
assert_eq!(profile.faders().len(), 5);
assert_eq!(profile.bindings().len(), 4);
assert_eq!(profile.bindings()[0].number(), 48);
assert_eq!(profile.bindings()[7].number(), 98);
assert_eq!(profile.bindings()[3].number(), 89);
}
#[test]

View File

@ -677,8 +677,8 @@ mod tests {
assert_eq!(
runtime.snapshot(),
vec![MidiDevice {
id: "apc-mini".into(),
label: "APC MINI".into(),
id: "apc-mini-apc-mini-midi-1".into(),
label: "APC MINI:APC MINI MIDI 1".into(),
status: "missing".into(),
backend_id: None,
error: None,
@ -691,7 +691,7 @@ mod tests {
let profile =
Profile::parse(include_str!("../../examples/profiles/arch-pipewire.toml")).unwrap();
let mut runtime = MidiRuntime::new(&profile).unwrap();
let surface = SurfaceId::new("apc-mini").unwrap();
let surface = SurfaceId::new("apc-mini-apc-mini-midi-1").unwrap();
let volume = runtime.router.route(
&surface,
MidiMessage::ControlChange {
@ -702,7 +702,7 @@ mod tests {
);
assert!(matches!(
volume,
Some(MidiIntent::AbsoluteVolume { fader, .. }) if fader.as_str() == "music-fader"
Some(MidiIntent::AbsoluteVolume { fader, .. }) if fader.as_str() == "media-fader"
));
let mute = runtime.router.route(
&surface,
@ -715,7 +715,7 @@ mod tests {
);
assert!(matches!(
mute,
Some(MidiIntent::ToggleMute { fader, .. }) if fader.as_str() == "music-fader"
Some(MidiIntent::ToggleMute { fader, .. }) if fader.as_str() == "media-fader"
));
let media = runtime.router.route(
&surface,
@ -725,10 +725,10 @@ mod tests {
value: MidiData::new(64).unwrap(),
},
);
assert!(matches!(
media,
Some(MidiIntent::AbsoluteVolume { fader, .. }) if fader.as_str() == "media-fader"
));
assert!(
media.is_none(),
"the old CC 50 mapping is no longer assigned"
);
let master = runtime.router.route(
&surface,
MidiMessage::ControlChange {
@ -745,7 +745,7 @@ mod tests {
&surface,
MidiMessage::Note {
channel: MidiChannel::new(1).unwrap(),
number: MidiData::new(98).unwrap(),
number: MidiData::new(89).unwrap(),
velocity: MidiData::new(127).unwrap(),
edge: ButtonEdge::Press,
},
@ -761,7 +761,7 @@ mod tests {
let profile =
Profile::parse(include_str!("../../examples/profiles/arch-pipewire.toml")).unwrap();
let mut runtime = MidiRuntime::new(&profile).unwrap();
let surface = SurfaceId::new("apc-mini").unwrap();
let surface = SurfaceId::new("apc-mini-apc-mini-midi-1").unwrap();
runtime.start_learn(MidiLearn {
surface: surface.clone(),
fader: FaderId::new("media-fader").unwrap(),
@ -796,7 +796,7 @@ mod tests {
runtime.handle_message(surface, message, &mut routed);
assert!(matches!(
routed.intents.as_slice(),
[MidiIntent::AbsoluteVolume { fader, .. }] if fader.as_str() == "music-fader"
[MidiIntent::AbsoluteVolume { fader, .. }] if fader.as_str() == "media-fader"
));
}