Skip to content

Commit

Permalink
nixosTests.vscodium: Workaround OCR tests (NixOS#360404)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobby285271 authored Nov 30, 2024
2 parents f40efe1 + cd45cfe commit 4e0999e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nixos/tests/vscodium.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ let
wayland = { pkgs, ... }: {
imports = [ ./common/wayland-cage.nix ];

services.cage.program = "${pkgs.vscodium}/bin/codium";
# We scale vscodium to help OCR find the small "Untitled" text.
services.cage.program = "${pkgs.vscodium}/bin/codium --force-device-scale-factor=2";

environment.variables.NIXOS_OZONE_WL = "1";
environment.variables.DISPLAY = "do not use";
Expand All @@ -16,7 +17,7 @@ let
virtualisation.memorySize = 2047;
services.xserver.enable = true;
services.xserver.displayManager.sessionCommands = ''
${pkgs.vscodium}/bin/codium
${pkgs.vscodium}/bin/codium --force-device-scale-factor=2
'';
test-support.displayManager.auto.user = "alice";
};
Expand Down Expand Up @@ -46,7 +47,7 @@ let
codium_running.wait() # type: ignore[union-attr]
with codium_running: # type: ignore[union-attr]
# Wait until vscodium is visible. "File" is in the menu bar.
machine.wait_for_text('Welcome')
machine.wait_for_text('Get Started with')
machine.screenshot('start_screen')
test_string = 'testfile'
Expand Down

0 comments on commit 4e0999e

Please sign in to comment.