vicinae: Add tests for old vicinae version

This commit is contained in:
leiserfg
2025-12-27 23:07:38 +01:00
committed by Austin Horstman
parent 113b155fe8
commit 87785ddbc7
3 changed files with 52 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
{ lib, pkgs, ... }:
lib.optionalAttrs (pkgs.stdenv.hostPlatform.isLinux) {
vicinae-pre17-settings = ./pre17-settings.nix;
vicinae-example-settings = ./example-settings.nix;
}

View File

@@ -8,7 +8,7 @@
programs.vicinae = {
enable = true;
systemd.enable = true;
useLayerShell = false;
settings = {
faviconService = "twenty";
font = {
@@ -80,6 +80,10 @@
];
};
test.asserts.assertions.expected = [
''After version 0.17, if you want to explicitly disable the use of layer shell, you need to set {option}.programs.vicinae.settings.launcher_window.layer_shell.enabled = false.''
];
nmt.script = ''
assertFileExists "home-files/.config/vicinae/settings.json"
assertFileExists "home-files/.config/systemd/user/vicinae.service"

View File

@@ -0,0 +1,46 @@
{
pkgs,
config,
...
}:
{
programs.vicinae = {
enable = true;
systemd.enable = true;
package = pkgs.stdenv.mkDerivation {
pname = "fake-vicinae";
version = "0.10.0";
src = pkgs.emptyFile;
buildCommand = "mkdir -p $out";
meta = {
mainProgram = "vicinae";
};
};
settings = {
faviconService = "twenty";
font = {
size = 10;
};
popToRootOnClose = false;
rootSearch = {
searchFiles = false;
};
theme = {
name = "vicinae-dark";
};
window = {
csd = true;
opacity = 0.95;
rounding = 10;
};
};
};
nmt.script = ''
assertFileExists "home-files/.config/vicinae/vicinae.json"
assertFileExists "home-files/.config/systemd/user/vicinae.service"
assertFileContains "home-files/.config/systemd/user/vicinae.service" "EnvironmentFile"
'';
}