mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-30 04:04:09 +01:00
test(nix): Snapshot against states recorded from both ports
core-e2e writes the komorebic state of kfde, with three tiled windows and with one stacked onto another, into its output, and the files are kept in tests/fixtures beside kfw's three, recorded from a Windows guest (tiled, stacked, one window floated). test_recorded.py reads all five with the same checks: three containers of one window, a layout rectangle for each inside the work area, each window where its container's rectangle is up to a terminal cell (foot rounds to cells, kfw's test window does not), and a stack that is a container of two whose focused window is the one the ring names. Nothing in the parser had to change; the checks passed on the first real kfw state. The scenes written from the serializers stay for the shapes no run has recorded. The sync script copies the fixtures too. The workspaces scenario prints which windows are in view after the switch: one run of core-e2e failed that check and passed on the next, and the log did not say which window had been in view.
This commit is contained in:
1 parent
22a5dbdb32
commit
e385bace05
11 files changed
+1053
-40
No files matched your search
@@ -146,9 +146,10 @@ the run.
|
||||
- `Snapshot` (`core/snapshot.py`) is the daemon's state in one shape for every port:
|
||||
`snapshot.parse(json)` reads the `komorebic state` of kfde and of kfw into
|
||||
monitors, workspaces, containers and windows. What only one port's state has
|
||||
goes in `Snapshot.extra`. Its unit tests use fixtures written from the two
|
||||
ports' serializers; recorded states replace them once a run on each port
|
||||
exists.
|
||||
goes in `Snapshot.extra`. Its unit tests read states recorded from a real run of each
|
||||
port (`tests/fixtures`: kfde's from `core-e2e`, which writes them into its output, and
|
||||
kfw's from a Windows guest), and a scene written from the serializers for the shapes
|
||||
that no run has recorded.
|
||||
- `Platform` (`core/platform.py`) is what a scenario needs of a platform: start the
|
||||
daemon, run `komorebic`, read the `Snapshot`, open a window, ask whether the
|
||||
daemon put it away (`hidden`), ask the operating system for its frame
|
||||
|
||||
Reference in new issue
Block a user