voelin-gpui: a test for the deafen mark of the voice page
A person whose sound is off has the headphone mark in the corner of their avatar, and a talker's bars win over the marks, as in the Slint page. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c566716b45
commit
65b60f2bb7
1 file changed
+23
@@ -660,3 +660,26 @@ fn a_person_without_a_unique_id_has_the_controls_off(cx: &mut TestAppContext) {
|
|||||||
click(cx, "member-mute");
|
click(cx, "member-mute");
|
||||||
assert!(shell.app.read_with(cx, |app, _| app.take_sent()).is_empty(), "nothing is sent");
|
assert!(shell.app.read_with(cx, |app, _| app.take_sent()).is_empty(), "nothing is sent");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// A person whose sound is off, who does not hear, has the headphone mark in
|
||||||
|
/// the corner of their avatar, and a talker's bars win over both marks, as in
|
||||||
|
/// the Slint page.
|
||||||
|
#[gpui::test]
|
||||||
|
fn a_person_whose_sound_is_off_has_the_deafen_mark(cx: &mut TestAppContext) {
|
||||||
|
let (shell, cx) = on_the_voice_page(cx, Switches::default());
|
||||||
|
assert!(at(cx, "voice-off-2").is_none(), "Lumen hears");
|
||||||
|
shell
|
||||||
|
.events
|
||||||
|
.send(sample_presence!(p => p.clients.get_mut(&2).unwrap().output_muted = true))
|
||||||
|
.unwrap();
|
||||||
|
frame(cx);
|
||||||
|
assert!(at(cx, "voice-off-2").is_some(), "Lumen's sound is off: the mark");
|
||||||
|
assert!(people(&shell, cx).iter().any(|m| m.id == 2 && m.sound_off));
|
||||||
|
// Kairo talks and is muted too: the bars, not the mark.
|
||||||
|
shell
|
||||||
|
.events
|
||||||
|
.send(sample_presence!(p => p.clients.get_mut(&3).unwrap().input_muted = true))
|
||||||
|
.unwrap();
|
||||||
|
frame(cx);
|
||||||
|
assert!(at(cx, "voice-speaking-3").is_some() && at(cx, "voice-off-3").is_none());
|
||||||
|
}
|
||||||
Reference in new issue
Block a user