depot/third_party/nixpkgs/nixos/tests/minecraft.nix
Default email b6d97fd731 Project import generated by Copybara.
GitOrigin-RevId: be0b453d7c7eee2090962c9a83749b024ff9acf5
2020-12-25 14:55:36 +01:00

28 lines
813 B
Nix

import ./make-test-python.nix ({ pkgs, lib, ... }: {
name = "minecraft";
meta = with lib.maintainers; { maintainers = [ nequissimus ]; };
nodes.client = { nodes, ... }:
let user = nodes.client.config.users.users.alice;
in {
imports = [ ./common/user-account.nix ./common/x11.nix ];
environment.systemPackages = [ pkgs.minecraft ];
nixpkgs.config.allowUnfree = true;
test-support.displayManager.auto.user = user.name;
};
enableOCR = true;
testScript = { nodes, ... }:
let user = nodes.client.config.users.users.alice;
in ''
client.wait_for_x()
client.execute("su - alice -c minecraft-launcher &")
client.wait_for_text("Create a new Microsoft account")
client.sleep(10)
client.screenshot("launcher")
'';
})