1
0
Fork 0
mirror of https://github.com/nix-community/home-manager.git synced 2025-03-06 16:57:03 +00:00

tests/firefox: add profiles-extensions (#6510)

Wasn't actually running test because it wasn't included. Also had to fix
test after some of the recent changes.
This commit is contained in:
Austin Horstman 2025-02-21 20:41:22 -08:00 committed by GitHub
parent 765cb91e9d
commit e495cd8c80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 11 deletions

View file

@ -11,6 +11,7 @@ builtins.mapAttrs (test: module: import module [ "programs" name ]) {
"${name}-profiles-containers-id-out-of-range" =
./profiles/containers/id-out-of-range.nix;
"${name}-profiles-duplicate-ids" = ./profiles/duplicate-ids.nix;
"${name}-profiles-extensions" = ./profiles/extensions;
"${name}-profiles-overwrite" = ./profiles/overwrite;
"${name}-profiles-search" = ./profiles/search;
"${name}-profiles-settings" = ./profiles/settings;

View file

@ -1,5 +1,5 @@
modulePath:
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
with lib;
let
cfg = getAttrFromPath modulePath config;
@ -11,20 +11,25 @@ in {
config = mkIf config.test.enableBig (setAttrByPath modulePath {
enable = true;
profiles.extensions = {
extensions.settings."uBlock0@raymondhill.net".settings = {
selectedFilterLists = [
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-unbreak"
"ublock-quick-fixes"
];
extensions = {
force = true;
settings = {
"uBlock0@raymondhill.net".settings = {
selectedFilterLists = [
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-unbreak"
"ublock-quick-fixes"
];
};
};
};
};
} // {
nmt.script = ''
assertFileContent \
home-files/${cfg.configPath}/extensions/uBlock0@raymondhill.net/storage.js \
home-files/${cfg.configPath}/extensions/browser-extension-data/uBlock0@raymondhill.net/storage.js \
${./expected-storage.js}
'';
});

View file

@ -1 +1 @@
{"selectedFilterLists":["ublock-filters","ublock-badware","ublock-privacy","ublock-unbreak","ublock-quick-fixes"]}
{"selectedFilterLists":["ublock-filters","ublock-badware","ublock-privacy","ublock-unbreak","ublock-quick-fixes"]}