summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYarny0 <41838844+Yarny0@users.noreply.github.com>2022-08-18 10:28:02 +0200
committerYarny0 <41838844+Yarny0@users.noreply.github.com>2022-08-18 16:49:18 +0200
commit0fd253867885cebd9a8384110c0f0f50e9a5b327 (patch)
treec02833b895fc19d558aa62e02de60c1646a2baff
parent7df2bb1902e5bfe7a9891c66e11ac9ce20a6a226 (diff)
nixos/tests/pulseaudio: fix pavucontrol detection
The test tries to detect the presence of pavucontrol's window by looking for the tab label "Playback". However, the OCR mechanism fails to resolve the text, possibly due to the grey background color. To fix this issue, we instead look for the name of the sound device ("Dummy Output") which gets resolved by OCR. Note: Strangely, the tab "Playback" *is* correctly resolved when the test is run in interactive mode. This might be due to the changed screen resolution, but I didn't investigate further.
-rw-r--r--nixos/tests/pulseaudio.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/tests/pulseaudio.nix b/nixos/tests/pulseaudio.nix
index f23be66fdda8..c553527a482c 100644
--- a/nixos/tests/pulseaudio.nix
+++ b/nixos/tests/pulseaudio.nix
@@ -59,9 +59,9 @@ let
machine.screenshot("testPlay")
# Pavucontrol only loads when Pulseaudio is running. If it isn't, the
- # text "Playback" (one of the tabs) will never show.
+ # text "Dummy Output" (sound device name) will never show.
machine.send_chars("pavucontrol\n")
- machine.wait_for_text("Playback")
+ machine.wait_for_text("Dummy Output")
machine.screenshot("Pavucontrol")
'';
});