1
0
Commit Graph

15 Commits

Author SHA1 Message Date
0065514885
improve session reinsertion testing 2026-02-27 23:28:53 +01:00
570588f885
add db index for update timestamp 2026-02-27 23:24:41 +01:00
4f5f4fbb28
make it possible to reinsert all sessions at once
This will be needed for database upgrades going forward. For example, an
old session without an update timestamp will not be visible in the index
that will soon be added. But since the UI will switch to that index, it
is paramount that all sessions are part of that.

The session model was built with that in mind, and has the corresponding
"update" logic. However, for that to matter old records first need to be
readded to the database.
2026-02-27 23:24:35 +01:00
a7012657b3
refactor SessionRepo change tracking
It was gettig tedious to add the change tracking logic in all of the
methods. And since there likely will be many more such methods, I have
now extracted that bit into its own function.
2026-02-27 23:12:38 +01:00
ded78b09e2
test that session update timestamps actually change 2026-02-27 23:12:38 +01:00
78cf050a94
make database updating state trackable 2026-02-27 23:12:35 +01:00
ca2d388275
remove unneeded console log 2026-02-27 17:54:07 +01:00
bb3ad61950
make import paths absolute 2026-02-22 12:51:28 +01:00
353c441722
add repo method to load specific session 2026-02-17 20:41:08 +01:00
ad9f9035a1
update stored session when the model changes 2026-02-17 00:30:52 +01:00
b89206f113
implement session repository 2026-02-15 18:09:50 +01:00
fb2fd76c6c
add a bit of documentation 2026-02-15 15:43:15 +01:00
a27f3ac3af
move db tests cleanup test behind actual test 2026-02-15 04:32:56 +01:00
2af6cb4f6a
test exception types and messages
As I noted in commit 85b9c2459c I noticed
that the testing of the invalidity of invalid struct "deserialization"
was not sound. That was because if one error was not actually thrown,
the test would still be satisfied by the following error. However, if
only that specific thing was wrong, no error would be thrown and an
invalid struct would be accepted.

Therefore I now changed those tests to also check the exception type and
its message. This means that if an exception is missing, it is
immediately picked up.

I also found out that one exception was actually wrong. I had mistyped
`TypeError` as `TypError`. Funnily enough that still causes an exception
to be thrown at that location, but a `ReferenceError` instead of the
`TypeError`. Such bugs should now be more easily noticable.
2026-02-15 04:27:08 +01:00
80b7203805
implement wrapper for single IndexedDB database 2026-02-15 03:34:25 +01:00