Files
clan-core/pkgs/clan-app/flake-module.nix
Brian McGee 807b9fd61f feat(ui): enable storybook snapshot tests
- adds a process-compose namespace for running `storybook` and `luakit` together to replicate the `webkit`-based rendering that happens inside of `webview`
- adds some helper scripts for running storybook tests and updating snapshots, with documentation in the README.
- adds a `clan-app-ui-storybook` package which builds and tests the storybook, checking for rendering changes

Currently, we’re only doing markup-based snapshot tests. We’re also using headless chromium for the tests by default as I couldn't get webkit to work in the nix build.

As we’re only markup-based for the time being, this should be ok. But eventually I'd like to get it working with webkit.
2025-05-30 11:06:14 +01:00

37 lines
900 B
Nix

{
perSystem =
{
self',
pkgs,
config,
...
}:
{
packages = {
webview-lib = pkgs.callPackage ./webview-lib { };
};
devShells.clan-app = pkgs.callPackage ./shell.nix {
inherit self';
inherit (self'.packages) clan-app webview-lib clan-app-ui;
inherit (config.packages) clan-ts-api;
};
packages.clan-app = pkgs.callPackage ./default.nix {
inherit (config.packages) clan-cli clan-app-ui webview-lib;
pythonRuntime = pkgs.python3;
};
packages.fonts = pkgs.callPackage ./fonts.nix { };
packages.clan-app-ui = pkgs.callPackage ./ui.nix {
clan-ts-api = config.packages.clan-ts-api;
fonts = config.packages.fonts;
};
packages.clan-app-ui-storybook = self'.packages.clan-app-ui.storybook;
checks = config.packages.clan-app.tests;
};
}